]> andersk Git - gssapi-openssh.git/blame - openssh/configure.ac
Import of openssh-SNAP-20040105
[gssapi-openssh.git] / openssh / configure.ac
CommitLineData
3c0ef626 1# $Id$
2
3AC_INIT
4AC_CONFIG_SRCDIR([ssh.c])
5
6AC_CONFIG_HEADER(config.h)
7AC_PROG_CC
8AC_CANONICAL_HOST
9AC_C_BIGENDIAN
10
11# Checks for programs.
0fff78ff 12AC_PROG_AWK
3c0ef626 13AC_PROG_CPP
14AC_PROG_RANLIB
15AC_PROG_INSTALL
16AC_PATH_PROG(AR, ar)
17AC_PATH_PROGS(PERL, perl5 perl)
6a9b3198 18AC_PATH_PROG(SED, sed)
3c0ef626 19AC_SUBST(PERL)
20AC_PATH_PROG(ENT, ent)
21AC_SUBST(ENT)
3c0ef626 22AC_PATH_PROG(TEST_MINUS_S_SH, bash)
23AC_PATH_PROG(TEST_MINUS_S_SH, ksh)
24AC_PATH_PROG(TEST_MINUS_S_SH, sh)
700318f3 25AC_PATH_PROG(SH, sh)
3c0ef626 26
27# System features
28AC_SYS_LARGEFILE
29
30if test -z "$AR" ; then
31 AC_MSG_ERROR([*** 'ar' missing, please install or fix your \$PATH ***])
32fi
33
34# Use LOGIN_PROGRAM from environment if possible
35if test ! -z "$LOGIN_PROGRAM" ; then
36 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM")
37else
38 # Search for login
39 AC_PATH_PROG(LOGIN_PROGRAM_FALLBACK, login)
40 if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
41 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM_FALLBACK")
42 fi
43fi
44
45if test -z "$LD" ; then
46 LD=$CC
47fi
48AC_SUBST(LD)
49
50AC_C_INLINE
12408a1b 51if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
3c0ef626 52 CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wno-uninitialized"
53fi
54
12408a1b 55AC_ARG_WITH(rpath,
56 [ --without-rpath Disable auto-added -R linker paths],
57 [
58 if test "x$withval" = "xno" ; then
59 need_dash_r=""
60 fi
61 if test "x$withval" = "xyes" ; then
62 need_dash_r=1
63 fi
64 ]
65)
66
3c0ef626 67# Check for some target-specific stuff
68case "$host" in
69*-*-aix*)
3c0ef626 70 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
71 LDFLAGS="$LDFLAGS -L/usr/local/lib"
12408a1b 72 AC_MSG_CHECKING([how to specify blibpath for linker ($LD)])
7e772e1f 73 if (test -z "$blibpath"); then
74 blibpath="/usr/lib:/lib:/usr/local/lib"
75 fi
76 saved_LDFLAGS="$LDFLAGS"
77 for tryflags in -blibpath: -Wl,-blibpath: -Wl,-rpath, ;do
78 if (test -z "$blibflags"); then
79 LDFLAGS="$saved_LDFLAGS $tryflags$blibpath"
80 AC_TRY_LINK([], [], [blibflags=$tryflags])
81 fi
82 done
83 if (test -z "$blibflags"); then
84 AC_MSG_RESULT(not found)
85 AC_MSG_ERROR([*** must be able to specify blibpath on AIX - check config.log])
86 else
87 AC_MSG_RESULT($blibflags)
3c0ef626 88 fi
7e772e1f 89 LDFLAGS="$saved_LDFLAGS"
0fff78ff 90 dnl Check for authenticate. Might be in libs.a on older AIXes
41b2f314 91 AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)],
92 [AC_CHECK_LIB(s,authenticate,
93 [ AC_DEFINE(WITH_AIXAUTHENTICATE)
94 LIBS="$LIBS -ls"
95 ])
96 ])
0fff78ff 97 dnl Check if loginfailed is declared and takes 4 arguments (AIX >= 5.2)
98 AC_CHECK_DECL(loginfailed,
99 [AC_MSG_CHECKING(if loginfailed takes 4 arguments)
100 AC_TRY_COMPILE(
101 [#include <usersec.h>],
102 [(void)loginfailed("user","host","tty",0);],
103 [AC_MSG_RESULT(yes)
104 AC_DEFINE(AIX_LOGINFAILED_4ARG)],
105 [AC_MSG_RESULT(no)]
106 )],
107 [],
108 [#include <usersec.h>]
109 )
110 AC_CHECK_FUNCS(setauthdb)
3c0ef626 111 AC_DEFINE(BROKEN_GETADDRINFO)
700318f3 112 AC_DEFINE(BROKEN_REALPATH)
0fff78ff 113 AC_DEFINE(SETEUID_BREAKS_SETUID)
114 AC_DEFINE(BROKEN_SETREUID)
115 AC_DEFINE(BROKEN_SETREGID)
3c0ef626 116 dnl AIX handles lastlog as part of its login message
117 AC_DEFINE(DISABLE_LASTLOG)
680cee3b 118 AC_DEFINE(LOGIN_NEEDS_UTMPX)
0fff78ff 119 AC_DEFINE(SPT_TYPE,SPT_REUSEARGV)
3c0ef626 120 ;;
121*-*-cygwin*)
6a9b3198 122 check_for_libcrypt_later=1
e9a17296 123 LIBS="$LIBS /usr/lib/textmode.o"
3c0ef626 124 AC_DEFINE(HAVE_CYGWIN)
125 AC_DEFINE(USE_PIPES)
126 AC_DEFINE(DISABLE_SHADOW)
3c0ef626 127 AC_DEFINE(IP_TOS_IS_BROKEN)
128 AC_DEFINE(NO_X11_UNIX_SOCKETS)
41b2f314 129 AC_DEFINE(NO_IPPORT_RESERVED_CONCEPT)
130 AC_DEFINE(DISABLE_FD_PASSING)
f5799ae1 131 AC_DEFINE(SETGROUPS_NOOP)
3c0ef626 132 ;;
133*-*-dgux*)
134 AC_DEFINE(IP_TOS_IS_BROKEN)
12408a1b 135 AC_DEFINE(SETEUID_BREAKS_SETUID)
136 AC_DEFINE(BROKEN_SETREUID)
137 AC_DEFINE(BROKEN_SETREGID)
3c0ef626 138 ;;
139*-*-darwin*)
41b2f314 140 AC_MSG_CHECKING(if we have working getaddrinfo)
141 AC_TRY_RUN([#include <mach-o/dyld.h>
142main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
143 exit(0);
144 else
145 exit(1);
146}], [AC_MSG_RESULT(working)],
147 [AC_MSG_RESULT(buggy)
148 AC_DEFINE(BROKEN_GETADDRINFO)],
149 [AC_MSG_RESULT(assume it is working)])
acc3d05e 150 AC_DEFINE(SETEUID_BREAKS_SETUID)
151 AC_DEFINE(BROKEN_SETREUID)
152 AC_DEFINE(BROKEN_SETREGID)
12408a1b 153 AC_DEFINE_UNQUOTED(BIND_8_COMPAT, 1)
3c0ef626 154 ;;
700318f3 155*-*-hpux10.26)
156 if test -z "$GCC"; then
157 CFLAGS="$CFLAGS -Ae"
158 fi
159 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
160 IPADDR_IN_DISPLAY=yes
161 AC_DEFINE(HAVE_SECUREWARE)
162 AC_DEFINE(USE_PIPES)
163 AC_DEFINE(LOGIN_NO_ENDOPT)
164 AC_DEFINE(LOGIN_NEEDS_UTMPX)
700318f3 165 AC_DEFINE(DISABLE_UTMP)
0fff78ff 166 AC_DEFINE(LOCKED_PASSWD_STRING, "*")
167 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
41b2f314 168 LIBS="$LIBS -lsec -lsecpw"
169 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***]))
700318f3 170 disable_ptmx_check=yes
171 ;;
3c0ef626 172*-*-hpux10*)
173 if test -z "$GCC"; then
174 CFLAGS="$CFLAGS -Ae"
175 fi
176 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
177 IPADDR_IN_DISPLAY=yes
178 AC_DEFINE(USE_PIPES)
700318f3 179 AC_DEFINE(LOGIN_NO_ENDOPT)
180 AC_DEFINE(LOGIN_NEEDS_UTMPX)
3c0ef626 181 AC_DEFINE(DISABLE_UTMP)
0fff78ff 182 AC_DEFINE(LOCKED_PASSWD_STRING, "*")
183 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
41b2f314 184 LIBS="$LIBS -lsec"
185 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***]))
3c0ef626 186 ;;
187*-*-hpux11*)
188 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
189 IPADDR_IN_DISPLAY=yes
190 AC_DEFINE(PAM_SUN_CODEBASE)
191 AC_DEFINE(USE_PIPES)
700318f3 192 AC_DEFINE(LOGIN_NO_ENDOPT)
193 AC_DEFINE(LOGIN_NEEDS_UTMPX)
3c0ef626 194 AC_DEFINE(DISABLE_UTMP)
0fff78ff 195 AC_DEFINE(LOCKED_PASSWD_STRING, "*")
196 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
41b2f314 197 LIBS="$LIBS -lsec"
198 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***]))
3c0ef626 199 ;;
200*-*-irix5*)
201 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
202 LDFLAGS="$LDFLAGS"
203 PATH="$PATH:/usr/etc"
204 AC_DEFINE(BROKEN_INET_NTOA)
12408a1b 205 AC_DEFINE(SETEUID_BREAKS_SETUID)
206 AC_DEFINE(BROKEN_SETREUID)
207 AC_DEFINE(BROKEN_SETREGID)
700318f3 208 AC_DEFINE(WITH_ABBREV_NO_TTY)
0fff78ff 209 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
3c0ef626 210 ;;
211*-*-irix6*)
212 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
213 LDFLAGS="$LDFLAGS"
214 PATH="$PATH:/usr/etc"
215 AC_DEFINE(WITH_IRIX_ARRAY)
216 AC_DEFINE(WITH_IRIX_PROJECT)
217 AC_DEFINE(WITH_IRIX_AUDIT)
218 AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)])
219 AC_DEFINE(BROKEN_INET_NTOA)
acc3d05e 220 AC_DEFINE(SETEUID_BREAKS_SETUID)
221 AC_DEFINE(BROKEN_SETREUID)
222 AC_DEFINE(BROKEN_SETREGID)
700318f3 223 AC_DEFINE(WITH_ABBREV_NO_TTY)
0fff78ff 224 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
3c0ef626 225 ;;
226*-*-linux*)
227 no_dev_ptmx=1
228 check_for_libcrypt_later=1
0fff78ff 229 check_for_openpty_ctty_bug=1
3c0ef626 230 AC_DEFINE(DONT_TRY_OTHER_AF)
231 AC_DEFINE(PAM_TTY_KLUDGE)
0fff78ff 232 AC_DEFINE(LOCKED_PASSWD_PREFIX, "!!")
233 AC_DEFINE(SPT_TYPE,SPT_REUSEARGV)
3c0ef626 234 inet6_default_4in6=yes
0fff78ff 235 case `uname -r` in
236 1.*|2.0.*)
237 AC_DEFINE(BROKEN_CMSG_TYPE)
238 ;;
239 esac
3c0ef626 240 ;;
241mips-sony-bsd|mips-sony-newsos4)
242 AC_DEFINE(HAVE_NEWS4)
243 SONY=1
3c0ef626 244 ;;
245*-*-netbsd*)
41b2f314 246 check_for_libcrypt_before=1
12408a1b 247 if test "x$withval" != "xno" ; then
248 need_dash_r=1
249 fi
3c0ef626 250 ;;
251*-*-freebsd*)
252 check_for_libcrypt_later=1
253 ;;
acc3d05e 254*-*-bsdi*)
255 AC_DEFINE(SETEUID_BREAKS_SETUID)
256 AC_DEFINE(BROKEN_SETREUID)
257 AC_DEFINE(BROKEN_SETREGID)
258 ;;
3c0ef626 259*-next-*)
260 conf_lastlog_location="/usr/adm/lastlog"
261 conf_utmp_location=/etc/utmp
262 conf_wtmp_location=/usr/adm/wtmp
263 MAIL=/usr/spool/mail
264 AC_DEFINE(HAVE_NEXT)
265 AC_DEFINE(BROKEN_REALPATH)
266 AC_DEFINE(USE_PIPES)
267 AC_DEFINE(BROKEN_SAVED_UIDS)
268 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
269 CFLAGS="$CFLAGS"
270 ;;
271*-*-solaris*)
272 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
12408a1b 273 if test "x$withval" = "xno" ; then
274 LDFLAGS="$LDFLAGS -L/usr/local/lib"
275 else
276 LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib"
277 need_dash_r=1
278 fi
3c0ef626 279 AC_DEFINE(PAM_SUN_CODEBASE)
280 AC_DEFINE(LOGIN_NEEDS_UTMPX)
281 AC_DEFINE(LOGIN_NEEDS_TERM)
282 AC_DEFINE(PAM_TTY_KLUDGE)
0fff78ff 283 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
284 # Pushing STREAMS modules will cause sshd to acquire a controlling tty.
285 AC_DEFINE(SSHD_ACQUIRES_CTTY)
286 external_path_file=/etc/default/login
3c0ef626 287 # hardwire lastlog location (can't detect it on some versions)
288 conf_lastlog_location="/var/adm/lastlog"
289 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
290 sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'`
291 if test "$sol2ver" -ge 8; then
292 AC_MSG_RESULT(yes)
293 AC_DEFINE(DISABLE_UTMP)
294 AC_DEFINE(DISABLE_WTMP)
295 else
296 AC_MSG_RESULT(no)
297 fi
298 ;;
299*-*-sunos4*)
300 CPPFLAGS="$CPPFLAGS -DSUNOS4"
301 AC_CHECK_FUNCS(getpwanam)
302 AC_DEFINE(PAM_SUN_CODEBASE)
3c0ef626 303 conf_utmp_location=/etc/utmp
304 conf_wtmp_location=/var/adm/wtmp
305 conf_lastlog_location=/var/adm/lastlog
306 AC_DEFINE(USE_PIPES)
307 ;;
308*-ncr-sysv*)
309 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
310 LDFLAGS="$LDFLAGS -L/usr/local/lib"
311 LIBS="$LIBS -lc89"
e9a17296 312 AC_DEFINE(USE_PIPES)
0fff78ff 313 AC_DEFINE(SSHD_ACQUIRES_CTTY)
acc3d05e 314 AC_DEFINE(SETEUID_BREAKS_SETUID)
315 AC_DEFINE(BROKEN_SETREUID)
316 AC_DEFINE(BROKEN_SETREGID)
3c0ef626 317 ;;
318*-sni-sysv*)
319 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
320 # /usr/ucblib MUST NOT be searched on ReliantUNIX
321 LDFLAGS="$LDFLAGS -L/usr/local/lib"
12408a1b 322 AC_CHECK_LIB(dl, dlsym, ,)
3c0ef626 323 IPADDR_IN_DISPLAY=yes
324 AC_DEFINE(USE_PIPES)
325 AC_DEFINE(IP_TOS_IS_BROKEN)
12408a1b 326 AC_DEFINE(SETEUID_BREAKS_SETUID)
327 AC_DEFINE(BROKEN_SETREUID)
328 AC_DEFINE(BROKEN_SETREGID)
0fff78ff 329 AC_DEFINE(SSHD_ACQUIRES_CTTY)
330 external_path_file=/etc/default/login
3c0ef626 331 # /usr/ucblib/libucb.a no longer needed on ReliantUNIX
332 # Attention: always take care to bind libsocket and libnsl before libc,
333 # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog
334 ;;
335*-*-sysv4.2*)
336 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
337 LDFLAGS="$LDFLAGS -L/usr/local/lib"
3c0ef626 338 AC_DEFINE(USE_PIPES)
0fff78ff 339 AC_DEFINE(SETEUID_BREAKS_SETUID)
340 AC_DEFINE(BROKEN_SETREUID)
341 AC_DEFINE(BROKEN_SETREGID)
3c0ef626 342 ;;
343*-*-sysv5*)
344 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
345 LDFLAGS="$LDFLAGS -L/usr/local/lib"
3c0ef626 346 AC_DEFINE(USE_PIPES)
0fff78ff 347 AC_DEFINE(SETEUID_BREAKS_SETUID)
348 AC_DEFINE(BROKEN_SETREUID)
349 AC_DEFINE(BROKEN_SETREGID)
3c0ef626 350 ;;
351*-*-sysv*)
352 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
353 LDFLAGS="$LDFLAGS -L/usr/local/lib"
354 ;;
355*-*-sco3.2v4*)
356 CPPFLAGS="$CPPFLAGS -Dftruncate=chsize -I/usr/local/include"
357 LDFLAGS="$LDFLAGS -L/usr/local/lib"
358 LIBS="$LIBS -los -lprot -lx -ltinfo -lm"
3c0ef626 359 RANLIB=true
360 no_dev_ptmx=1
361 AC_DEFINE(BROKEN_SYS_TERMIO_H)
362 AC_DEFINE(USE_PIPES)
700318f3 363 AC_DEFINE(HAVE_SECUREWARE)
3c0ef626 364 AC_DEFINE(DISABLE_SHADOW)
3c0ef626 365 AC_DEFINE(BROKEN_SAVED_UIDS)
0fff78ff 366 AC_DEFINE(WITH_ABBREV_NO_TTY)
3c0ef626 367 AC_CHECK_FUNCS(getluid setluid)
368 MANTYPE=man
369 do_sco3_extra_lib_check=yes
370 ;;
371*-*-sco3.2v5*)
6a9b3198 372 if test -z "$GCC"; then
373 CFLAGS="$CFLAGS -belf"
374 fi
3c0ef626 375 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
376 LDFLAGS="$LDFLAGS -L/usr/local/lib"
377 LIBS="$LIBS -lprot -lx -ltinfo -lm"
378 no_dev_ptmx=1
3c0ef626 379 AC_DEFINE(USE_PIPES)
700318f3 380 AC_DEFINE(HAVE_SECUREWARE)
3c0ef626 381 AC_DEFINE(DISABLE_SHADOW)
41b2f314 382 AC_DEFINE(DISABLE_FD_PASSING)
0fff78ff 383 AC_DEFINE(SETEUID_BREAKS_SETUID)
384 AC_DEFINE(BROKEN_SETREUID)
385 AC_DEFINE(BROKEN_SETREGID)
386 AC_DEFINE(WITH_ABBREV_NO_TTY)
3c0ef626 387 AC_CHECK_FUNCS(getluid setluid)
388 MANTYPE=man
389 ;;
41b2f314 390*-*-unicosmk*)
41b2f314 391 AC_DEFINE(USE_PIPES)
392 AC_DEFINE(DISABLE_FD_PASSING)
393 LDFLAGS="$LDFLAGS"
394 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
395 MANTYPE=cat
396 ;;
0fff78ff 397*-*-unicosmp*)
398 AC_DEFINE(WITH_ABBREV_NO_TTY)
399 AC_DEFINE(USE_PIPES)
400 AC_DEFINE(DISABLE_FD_PASSING)
401 LDFLAGS="$LDFLAGS"
402 LIBS="$LIBS -lgen -lacid"
403 MANTYPE=cat
404 ;;
3c0ef626 405*-*-unicos*)
3c0ef626 406 AC_DEFINE(USE_PIPES)
41b2f314 407 AC_DEFINE(DISABLE_FD_PASSING)
408 AC_DEFINE(NO_SSH_LASTLOG)
409 LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal"
410 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
411 MANTYPE=cat
3c0ef626 412 ;;
413*-dec-osf*)
414 AC_MSG_CHECKING(for Digital Unix SIA)
415 no_osfsia=""
416 AC_ARG_WITH(osfsia,
417 [ --with-osfsia Enable Digital Unix SIA],
418 [
419 if test "x$withval" = "xno" ; then
420 AC_MSG_RESULT(disabled)
421 no_osfsia=1
422 fi
423 ],
424 )
425 if test -z "$no_osfsia" ; then
426 if test -f /etc/sia/matrix.conf; then
427 AC_MSG_RESULT(yes)
428 AC_DEFINE(HAVE_OSF_SIA)
429 AC_DEFINE(DISABLE_LOGIN)
6a9b3198 430 AC_DEFINE(DISABLE_FD_PASSING)
3c0ef626 431 LIBS="$LIBS -lsecurity -ldb -lm -laud"
432 else
433 AC_MSG_RESULT(no)
12408a1b 434 AC_DEFINE(LOCKED_PASSWD_SUBSTR, "Nologin")
3c0ef626 435 fi
436 fi
0fff78ff 437 AC_DEFINE(BROKEN_GETADDRINFO)
acc3d05e 438 AC_DEFINE(SETEUID_BREAKS_SETUID)
439 AC_DEFINE(BROKEN_SETREUID)
440 AC_DEFINE(BROKEN_SETREGID)
3c0ef626 441 ;;
442
443*-*-nto-qnx)
444 AC_DEFINE(USE_PIPES)
445 AC_DEFINE(NO_X11_UNIX_SOCKETS)
446 AC_DEFINE(MISSING_NFDBITS)
447 AC_DEFINE(MISSING_HOWMANY)
448 AC_DEFINE(MISSING_FD_MASK)
449 ;;
450esac
451
452# Allow user to specify flags
453AC_ARG_WITH(cflags,
454 [ --with-cflags Specify additional flags to pass to compiler],
455 [
456 if test "x$withval" != "xno" ; then
457 CFLAGS="$CFLAGS $withval"
458 fi
459 ]
460)
461AC_ARG_WITH(cppflags,
462 [ --with-cppflags Specify additional flags to pass to preprocessor] ,
463 [
464 if test "x$withval" != "xno"; then
465 CPPFLAGS="$CPPFLAGS $withval"
466 fi
467 ]
468)
469AC_ARG_WITH(ldflags,
470 [ --with-ldflags Specify additional flags to pass to linker],
471 [
472 if test "x$withval" != "xno" ; then
473 LDFLAGS="$LDFLAGS $withval"
474 fi
475 ]
476)
477AC_ARG_WITH(libs,
478 [ --with-libs Specify additional libraries to link with],
479 [
480 if test "x$withval" != "xno" ; then
481 LIBS="$LIBS $withval"
482 fi
483 ]
484)
485
0fff78ff 486AC_MSG_CHECKING(compiler and flags for sanity)
487AC_TRY_RUN([
488#include <stdio.h>
489int main(){exit(0);}
490 ],
491 [ AC_MSG_RESULT(yes) ],
492 [
493 AC_MSG_RESULT(no)
494 AC_MSG_ERROR([*** compiler cannot create working executables, check config.log ***])
495 ]
496)
497
e9a17296 498# Checks for header files.
0fff78ff 499AC_CHECK_HEADERS(bstring.h crypt.h endian.h features.h floatingpoint.h \
500 getopt.h glob.h ia.h lastlog.h limits.h login.h \
e9a17296 501 login_cap.h maillock.h netdb.h netgroup.h \
12408a1b 502 netinet/in_systm.h pam/pam_appl.h paths.h pty.h readpassphrase.h \
700318f3 503 rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \
0fff78ff 504 strings.h sys/strtio.h sys/audit.h sys/bitypes.h sys/bsdtty.h \
505 sys/cdefs.h sys/mman.h sys/pstat.h sys/select.h sys/stat.h \
6a9b3198 506 sys/stropts.h sys/sysmacros.h sys/time.h sys/timers.h \
41b2f314 507 sys/un.h time.h tmpdir.h ttyent.h usersec.h \
acc3d05e 508 util.h utime.h utmp.h utmpx.h vis.h)
3c0ef626 509
510# Checks for libraries.
511AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match))
512AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
513
514dnl SCO OS3 needs this for libwrap
515if test "x$with_tcp_wrappers" != "xno" ; then
516 if test "x$do_sco3_extra_lib_check" = "xyes" ; then
517 AC_CHECK_LIB(rpc, innetgr, LIBS="-lrpc -lyp -lrpc $LIBS" , , -lyp -lrpc)
518 fi
519fi
520
0fff78ff 521dnl IRIX and Solaris 2.5.1 have dirname() in libgen
522AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[
523 AC_CHECK_LIB(gen, dirname,[
524 AC_CACHE_CHECK([for broken dirname],
525 ac_cv_have_broken_dirname, [
526 save_LIBS="$LIBS"
527 LIBS="$LIBS -lgen"
528 AC_TRY_RUN(
529 [
530#include <libgen.h>
531#include <string.h>
532
533int main(int argc, char **argv) {
534 char *s, buf[32];
535
536 strncpy(buf,"/etc", 32);
537 s = dirname(buf);
538 if (!s || strncmp(s, "/", 32) != 0) {
539 exit(1);
540 } else {
541 exit(0);
542 }
543}
544 ],
545 [ ac_cv_have_broken_dirname="no" ],
546 [ ac_cv_have_broken_dirname="yes" ]
547 )
548 LIBS="$save_LIBS"
549 ])
550 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
551 LIBS="$LIBS -lgen"
552 AC_DEFINE(HAVE_DIRNAME)
553 AC_CHECK_HEADERS(libgen.h)
554 fi
555 ])
556])
557
3c0ef626 558AC_CHECK_FUNC(getspnam, ,
559 AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen"))
0fff78ff 560AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME))
3c0ef626 561
562dnl zlib is required
563AC_ARG_WITH(zlib,
564 [ --with-zlib=PATH Use zlib in PATH],
565 [
e9a17296 566 if test "x$withval" = "xno" ; then
567 AC_MSG_ERROR([*** zlib is required ***])
568 fi
3c0ef626 569 if test -d "$withval/lib"; then
570 if test -n "${need_dash_r}"; then
571 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
572 else
573 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
574 fi
575 else
576 if test -n "${need_dash_r}"; then
577 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
578 else
579 LDFLAGS="-L${withval} ${LDFLAGS}"
580 fi
581 fi
582 if test -d "$withval/include"; then
583 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
584 else
585 CPPFLAGS="-I${withval} ${CPPFLAGS}"
586 fi
587 ]
588)
589
590AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first or check config.log ***]))
591
3c0ef626 592dnl UnixWare 2.x
12408a1b 593AC_CHECK_FUNC(strcasecmp,
3c0ef626 594 [], [ AC_CHECK_LIB(resolv, strcasecmp, LIBS="$LIBS -lresolv") ]
595)
12408a1b 596AC_CHECK_FUNC(utimes,
41b2f314 597 [], [ AC_CHECK_LIB(c89, utimes, [AC_DEFINE(HAVE_UTIMES)
598 LIBS="$LIBS -lc89"]) ]
3c0ef626 599)
600
601dnl Checks for libutil functions
602AC_CHECK_HEADERS(libutil.h)
603AC_SEARCH_LIBS(login, util bsd, [AC_DEFINE(HAVE_LOGIN)])
604AC_CHECK_FUNCS(logout updwtmp logwtmp)
605
606AC_FUNC_STRFTIME
607
3c0ef626 608# Check for ALTDIRFUNC glob() extension
609AC_MSG_CHECKING(for GLOB_ALTDIRFUNC support)
610AC_EGREP_CPP(FOUNDIT,
611 [
612 #include <glob.h>
613 #ifdef GLOB_ALTDIRFUNC
614 FOUNDIT
615 #endif
12408a1b 616 ],
3c0ef626 617 [
618 AC_DEFINE(GLOB_HAS_ALTDIRFUNC)
619 AC_MSG_RESULT(yes)
620 ],
621 [
622 AC_MSG_RESULT(no)
623 ]
624)
625
626# Check for g.gl_matchc glob() extension
627AC_MSG_CHECKING(for gl_matchc field in glob_t)
628AC_EGREP_CPP(FOUNDIT,
12408a1b 629 [
630 #include <glob.h>
3c0ef626 631 int main(void){glob_t g; g.gl_matchc = 1;}
12408a1b 632 ],
633 [
634 AC_DEFINE(GLOB_HAS_GL_MATCHC)
635 AC_MSG_RESULT(yes)
636 ],
637 [
638 AC_MSG_RESULT(no)
639 ]
3c0ef626 640)
641
642AC_MSG_CHECKING([whether struct dirent allocates space for d_name])
643AC_TRY_RUN(
644 [
645#include <sys/types.h>
646#include <dirent.h>
41b2f314 647int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));}
3c0ef626 648 ],
12408a1b 649 [AC_MSG_RESULT(yes)],
3c0ef626 650 [
651 AC_MSG_RESULT(no)
652 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME)
653 ]
654)
655
656# Check whether user wants S/Key support
12408a1b 657SKEY_MSG="no"
3c0ef626 658AC_ARG_WITH(skey,
659 [ --with-skey[[=PATH]] Enable S/Key support
12408a1b 660 (optionally in PATH)],
3c0ef626 661 [
662 if test "x$withval" != "xno" ; then
663
664 if test "x$withval" != "xyes" ; then
665 CPPFLAGS="$CPPFLAGS -I${withval}/include"
666 LDFLAGS="$LDFLAGS -L${withval}/lib"
667 fi
668
669 AC_DEFINE(SKEY)
670 LIBS="-lskey $LIBS"
12408a1b 671 SKEY_MSG="yes"
3c0ef626 672
e9a17296 673 AC_MSG_CHECKING([for s/key support])
674 AC_TRY_RUN(
675 [
676#include <stdio.h>
677#include <skey.h>
41b2f314 678int main() { char *ff = skey_keyinfo(""); ff=""; exit(0); }
e9a17296 679 ],
680 [AC_MSG_RESULT(yes)],
3c0ef626 681 [
e9a17296 682 AC_MSG_RESULT(no)
3c0ef626 683 AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
684 ])
685 fi
686 ]
687)
688
689# Check whether user wants TCP wrappers support
690TCPW_MSG="no"
691AC_ARG_WITH(tcp-wrappers,
692 [ --with-tcp-wrappers[[=PATH]] Enable tcpwrappers support
12408a1b 693 (optionally in PATH)],
3c0ef626 694 [
695 if test "x$withval" != "xno" ; then
696 saved_LIBS="$LIBS"
697 saved_LDFLAGS="$LDFLAGS"
698 saved_CPPFLAGS="$CPPFLAGS"
699 if test -n "${withval}" -a "${withval}" != "yes"; then
700 if test -d "${withval}/lib"; then
701 if test -n "${need_dash_r}"; then
702 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
703 else
704 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
705 fi
706 else
707 if test -n "${need_dash_r}"; then
708 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
709 else
710 LDFLAGS="-L${withval} ${LDFLAGS}"
711 fi
712 fi
713 if test -d "${withval}/include"; then
714 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
715 else
716 CPPFLAGS="-I${withval} ${CPPFLAGS}"
717 fi
718 fi
e9a17296 719 LIBWRAP="-lwrap"
720 LIBS="$LIBWRAP $LIBS"
3c0ef626 721 AC_MSG_CHECKING(for libwrap)
722 AC_TRY_LINK(
723 [
724#include <tcpd.h>
725 int deny_severity = 0, allow_severity = 0;
726 ],
727 [hosts_access(0);],
728 [
729 AC_MSG_RESULT(yes)
730 AC_DEFINE(LIBWRAP)
e9a17296 731 AC_SUBST(LIBWRAP)
3c0ef626 732 TCPW_MSG="yes"
733 ],
734 [
735 AC_MSG_ERROR([*** libwrap missing])
736 ]
737 )
e9a17296 738 LIBS="$saved_LIBS"
3c0ef626 739 fi
740 ]
741)
742
6a9b3198 743dnl Checks for library functions. Please keep in alphabetical order
744AC_CHECK_FUNCS(\
12408a1b 745 arc4random __b64_ntop b64_ntop __b64_pton b64_pton \
0fff78ff 746 bcopy bindresvport_sa clock fchmod fchown freeaddrinfo futimes \
acc3d05e 747 getaddrinfo getcwd getgrouplist getnameinfo getopt \
0fff78ff 748 getpeereid _getpty getrlimit getttyent glob inet_aton \
6a9b3198 749 inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove \
0fff78ff 750 mkdtemp mmap ngetaddrinfo nsleep ogetaddrinfo openlog_r openpty \
751 pstat readpassphrase realpath recvmsg rresvport_af sendmsg \
752 setdtablesize setegid setenv seteuid setgroups setlogin setpcred \
12408a1b 753 setproctitle setregid setreuid setrlimit \
0fff78ff 754 setsid setvbuf sigaction sigvec snprintf socketpair strerror \
12408a1b 755 strlcat strlcpy strmode strnvis strtoul sysconf tcgetpgrp \
0fff78ff 756 truncate utimes vhangup vsnprintf waitpid \
6a9b3198 757)
758
acc3d05e 759# IRIX has a const char return value for gai_strerror()
760AC_CHECK_FUNCS(gai_strerror,[
761 AC_DEFINE(HAVE_GAI_STRERROR)
762 AC_TRY_COMPILE([
763#include <sys/types.h>
764#include <sys/socket.h>
765#include <netdb.h>
766
767const char *gai_strerror(int);],[
768char *str;
769
770str = gai_strerror(0);],[
771 AC_DEFINE(HAVE_CONST_GAI_STRERROR_PROTO, 1,
772 [Define if gai_strerror() returns const char *])])])
773
6a9b3198 774AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP))
775
0fff78ff 776dnl Make sure prototypes are defined for these before using them.
6a9b3198 777AC_CHECK_DECL(strsep, [AC_CHECK_FUNCS(strsep)])
0fff78ff 778AC_CHECK_DECL(getrusage, [AC_CHECK_FUNCS(getrusage)])
3c0ef626 779
0fff78ff 780dnl tcsendbreak might be a macro
781AC_CHECK_DECL(tcsendbreak,
782 [AC_DEFINE(HAVE_TCSENDBREAK)],
12408a1b 783 [AC_CHECK_FUNCS(tcsendbreak)],
0fff78ff 784 [#include <termios.h>]
785)
3c0ef626 786
12408a1b 787AC_CHECK_FUNCS(setresuid, [
788 dnl Some platorms have setresuid that isn't implemented, test for this
789 AC_MSG_CHECKING(if setresuid seems to work)
790 AC_TRY_RUN([
791#include <stdlib.h>
792#include <errno.h>
793int main(){errno=0; setresuid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);}
794 ],
795 [AC_MSG_RESULT(yes)],
796 [AC_DEFINE(BROKEN_SETRESUID),
797 AC_MSG_RESULT(not implemented)]
798 )
799])
800
801AC_CHECK_FUNCS(setresgid, [
802 dnl Some platorms have setresgid that isn't implemented, test for this
803 AC_MSG_CHECKING(if setresgid seems to work)
804 AC_TRY_RUN([
805#include <stdlib.h>
806#include <errno.h>
807int main(){errno=0; setresgid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);}
808 ],
809 [AC_MSG_RESULT(yes)],
810 [AC_DEFINE(BROKEN_SETRESGID)
811 AC_MSG_RESULT(not implemented)]
812 )
813])
814
3c0ef626 815dnl Checks for time functions
816AC_CHECK_FUNCS(gettimeofday time)
817dnl Checks for utmp functions
818AC_CHECK_FUNCS(endutent getutent getutid getutline pututline setutent)
819AC_CHECK_FUNCS(utmpname)
820dnl Checks for utmpx functions
821AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline pututxline )
822AC_CHECK_FUNCS(setutxent utmpxname)
823
12408a1b 824AC_CHECK_FUNC(daemon,
3c0ef626 825 [AC_DEFINE(HAVE_DAEMON)],
826 [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
827)
828
12408a1b 829AC_CHECK_FUNC(getpagesize,
3c0ef626 830 [AC_DEFINE(HAVE_GETPAGESIZE)],
831 [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])]
832)
833
834# Check for broken snprintf
835if test "x$ac_cv_func_snprintf" = "xyes" ; then
836 AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
837 AC_TRY_RUN(
838 [
839#include <stdio.h>
41b2f314 840int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');}
3c0ef626 841 ],
12408a1b 842 [AC_MSG_RESULT(yes)],
3c0ef626 843 [
844 AC_MSG_RESULT(no)
845 AC_DEFINE(BROKEN_SNPRINTF)
846 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
847 ]
848 )
849fi
850
6a9b3198 851dnl see whether mkstemp() requires XXXXXX
852if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
853AC_MSG_CHECKING([for (overly) strict mkstemp])
854AC_TRY_RUN(
855 [
856#include <stdlib.h>
857main() { char template[]="conftest.mkstemp-test";
858if (mkstemp(template) == -1)
859 exit(1);
860unlink(template); exit(0);
861}
862 ],
863 [
864 AC_MSG_RESULT(no)
865 ],
12408a1b 866 [
6a9b3198 867 AC_MSG_RESULT(yes)
868 AC_DEFINE(HAVE_STRICT_MKSTEMP)
869 ],
870 [
871 AC_MSG_RESULT(yes)
872 AC_DEFINE(HAVE_STRICT_MKSTEMP)
12408a1b 873 ]
6a9b3198 874)
875fi
876
0fff78ff 877dnl make sure that openpty does not reacquire controlling terminal
878if test ! -z "$check_for_openpty_ctty_bug"; then
879 AC_MSG_CHECKING(if openpty correctly handles controlling tty)
880 AC_TRY_RUN(
881 [
882#include <stdio.h>
883#include <sys/fcntl.h>
884#include <sys/types.h>
885#include <sys/wait.h>
886
887int
888main()
889{
890 pid_t pid;
891 int fd, ptyfd, ttyfd, status;
892
893 pid = fork();
894 if (pid < 0) { /* failed */
895 exit(1);
896 } else if (pid > 0) { /* parent */
897 waitpid(pid, &status, 0);
12408a1b 898 if (WIFEXITED(status))
0fff78ff 899 exit(WEXITSTATUS(status));
900 else
901 exit(2);
902 } else { /* child */
903 close(0); close(1); close(2);
904 setsid();
905 openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);
906 fd = open("/dev/tty", O_RDWR | O_NOCTTY);
907 if (fd >= 0)
908 exit(3); /* Acquired ctty: broken */
909 else
910 exit(0); /* Did not acquire ctty: OK */
911 }
912}
913 ],
914 [
915 AC_MSG_RESULT(yes)
916 ],
917 [
918 AC_MSG_RESULT(no)
919 AC_DEFINE(SSHD_ACQUIRES_CTTY)
920 ]
921 )
922fi
923
3c0ef626 924AC_FUNC_GETPGRP
925
926# Check for PAM libs
927PAM_MSG="no"
928AC_ARG_WITH(pam,
929 [ --with-pam Enable PAM support ],
930 [
931 if test "x$withval" != "xno" ; then
12408a1b 932 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" && \
933 test "x$ac_cv_header_pam_pam_appl_h" != "xyes" ; then
3c0ef626 934 AC_MSG_ERROR([PAM headers not found])
935 fi
936
937 AC_CHECK_LIB(dl, dlopen, , )
938 AC_CHECK_LIB(pam, pam_set_item, , AC_MSG_ERROR([*** libpam missing]))
939 AC_CHECK_FUNCS(pam_getenvlist)
0fff78ff 940 AC_CHECK_FUNCS(pam_putenv)
3c0ef626 941
3c0ef626 942 PAM_MSG="yes"
943
944 AC_DEFINE(USE_PAM)
e9a17296 945 if test $ac_cv_lib_dl_dlopen = yes; then
946 LIBPAM="-lpam -ldl"
947 else
948 LIBPAM="-lpam"
949 fi
950 AC_SUBST(LIBPAM)
3c0ef626 951 fi
952 ]
953)
954
955# Check for older PAM
956if test "x$PAM_MSG" = "xyes" ; then
957 # Check PAM strerror arguments (old PAM)
958 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
959 AC_TRY_COMPILE(
960 [
961#include <stdlib.h>
12408a1b 962#if defined(HAVE_SECURITY_PAM_APPL_H)
3c0ef626 963#include <security/pam_appl.h>
12408a1b 964#elif defined (HAVE_PAM_PAM_APPL_H)
965#include <pam/pam_appl.h>
966#endif
967 ],
968 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
3c0ef626 969 [AC_MSG_RESULT(no)],
970 [
971 AC_DEFINE(HAVE_OLD_PAM)
972 AC_MSG_RESULT(yes)
973 PAM_MSG="yes (old library)"
974 ]
975 )
976fi
977
41b2f314 978# Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
979# because the system crypt() is more featureful.
980if test "x$check_for_libcrypt_before" = "x1"; then
981 AC_CHECK_LIB(crypt, crypt)
982fi
983
700318f3 984# Search for OpenSSL
985saved_CPPFLAGS="$CPPFLAGS"
986saved_LDFLAGS="$LDFLAGS"
3c0ef626 987AC_ARG_WITH(ssl-dir,
988 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
989 [
990 if test "x$withval" != "xno" ; then
700318f3 991 if test -d "$withval/lib"; then
992 if test -n "${need_dash_r}"; then
993 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
994 else
995 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
3c0ef626 996 fi
997 else
700318f3 998 if test -n "${need_dash_r}"; then
999 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
1000 else
1001 LDFLAGS="-L${withval} ${LDFLAGS}"
3c0ef626 1002 fi
1003 fi
700318f3 1004 if test -d "$withval/include"; then
1005 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
3c0ef626 1006 else
700318f3 1007 CPPFLAGS="-I${withval} ${CPPFLAGS}"
3c0ef626 1008 fi
1009 fi
700318f3 1010 ]
1011)
1012LIBS="$LIBS -lcrypto"
1013AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL),
3c0ef626 1014 [
700318f3 1015 dnl Check default openssl install dir
1016 if test -n "${need_dash_r}"; then
1017 LDFLAGS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib ${saved_LDFLAGS}"
3c0ef626 1018 else
700318f3 1019 LDFLAGS="-L/usr/local/ssl/lib ${saved_LDFLAGS}"
3c0ef626 1020 fi
700318f3 1021 CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}"
1022 AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL),
1023 [
1024 AC_MSG_ERROR([*** Can't find recent OpenSSL libcrypto (see config.log for details) ***])
1025 ]
1026 )
1027 ]
1028)
1029
41b2f314 1030# Determine OpenSSL header version
1031AC_MSG_CHECKING([OpenSSL header version])
1032AC_TRY_RUN(
1033 [
1034#include <stdio.h>
1035#include <string.h>
1036#include <openssl/opensslv.h>
1037#define DATA "conftest.sslincver"
1038int main(void) {
12408a1b 1039 FILE *fd;
1040 int rc;
41b2f314 1041
12408a1b 1042 fd = fopen(DATA,"w");
1043 if(fd == NULL)
1044 exit(1);
41b2f314 1045
1046 if ((rc = fprintf(fd ,"%x (%s)\n", OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_TEXT)) <0)
1047 exit(1);
1048
1049 exit(0);
1050}
1051 ],
1052 [
1053 ssl_header_ver=`cat conftest.sslincver`
1054 AC_MSG_RESULT($ssl_header_ver)
1055 ],
1056 [
1057 AC_MSG_RESULT(not found)
1058 AC_MSG_ERROR(OpenSSL version header not found.)
1059 ]
1060)
1061
1062# Determine OpenSSL library version
1063AC_MSG_CHECKING([OpenSSL library version])
1064AC_TRY_RUN(
1065 [
1066#include <stdio.h>
1067#include <string.h>
1068#include <openssl/opensslv.h>
1069#include <openssl/crypto.h>
1070#define DATA "conftest.ssllibver"
1071int main(void) {
12408a1b 1072 FILE *fd;
1073 int rc;
41b2f314 1074
12408a1b 1075 fd = fopen(DATA,"w");
1076 if(fd == NULL)
1077 exit(1);
41b2f314 1078
1079 if ((rc = fprintf(fd ,"%x (%s)\n", SSLeay(), SSLeay_version(SSLEAY_VERSION))) <0)
1080 exit(1);
1081
1082 exit(0);
1083}
1084 ],
1085 [
1086 ssl_library_ver=`cat conftest.ssllibver`
1087 AC_MSG_RESULT($ssl_library_ver)
1088 ],
1089 [
1090 AC_MSG_RESULT(not found)
1091 AC_MSG_ERROR(OpenSSL library not found.)
1092 ]
1093)
3c0ef626 1094
e9a17296 1095# Sanity check OpenSSL headers
1096AC_MSG_CHECKING([whether OpenSSL's headers match the library])
1097AC_TRY_RUN(
1098 [
1099#include <string.h>
1100#include <openssl/opensslv.h>
41b2f314 1101int main(void) { exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); }
e9a17296 1102 ],
1103 [
1104 AC_MSG_RESULT(yes)
1105 ],
1106 [
1107 AC_MSG_RESULT(no)
0fff78ff 1108 AC_MSG_ERROR([Your OpenSSL headers do not match your library.
1109Check config.log for details.
1110Also see contrib/findssl.sh for help identifying header/library mismatches.])
e9a17296 1111 ]
1112)
1113
12408a1b 1114# Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
3c0ef626 1115# version in OpenSSL. Skip this for PAM
0fff78ff 1116if test "x$check_for_libcrypt_later" = "x1"; then
3c0ef626 1117 AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt")
1118fi
1119
e9a17296 1120
1121### Configure cryptographic random number support
1122
1123# Check wheter OpenSSL seeds itself
1124AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded])
1125AC_TRY_RUN(
1126 [
1127#include <string.h>
1128#include <openssl/rand.h>
41b2f314 1129int main(void) { exit(RAND_status() == 1 ? 0 : 1); }
e9a17296 1130 ],
1131 [
1132 OPENSSL_SEEDS_ITSELF=yes
1133 AC_MSG_RESULT(yes)
1134 ],
1135 [
1136 AC_MSG_RESULT(no)
1137 # Default to use of the rand helper if OpenSSL doesn't
1138 # seed itself
1139 USE_RAND_HELPER=yes
1140 ]
1141)
1142
1143
1144# Do we want to force the use of the rand helper?
1145AC_ARG_WITH(rand-helper,
1146 [ --with-rand-helper Use subprocess to gather strong randomness ],
1147 [
1148 if test "x$withval" = "xno" ; then
12408a1b 1149 # Force use of OpenSSL's internal RNG, even if
e9a17296 1150 # the previous test showed it to be unseeded.
1151 if test -z "$OPENSSL_SEEDS_ITSELF" ; then
1152 AC_MSG_WARN([*** Forcing use of OpenSSL's non-self-seeding PRNG])
1153 OPENSSL_SEEDS_ITSELF=yes
1154 USE_RAND_HELPER=""
1155 fi
1156 else
1157 USE_RAND_HELPER=yes
1158 fi
1159 ],
1160)
1161
1162# Which randomness source do we use?
1163if test ! -z "$OPENSSL_SEEDS_ITSELF" -a -z "$USE_RAND_HELPER" ; then
1164 # OpenSSL only
1165 AC_DEFINE(OPENSSL_PRNG_ONLY)
1166 RAND_MSG="OpenSSL internal ONLY"
1167 INSTALL_SSH_RAND_HELPER=""
1168elif test ! -z "$USE_RAND_HELPER" ; then
1169 # install rand helper
1170 RAND_MSG="ssh-rand-helper"
1171 INSTALL_SSH_RAND_HELPER="yes"
1172fi
1173AC_SUBST(INSTALL_SSH_RAND_HELPER)
1174
1175### Configuration of ssh-rand-helper
1176
1177# PRNGD TCP socket
1178AC_ARG_WITH(prngd-port,
1179 [ --with-prngd-port=PORT read entropy from PRNGD/EGD TCP localhost:PORT],
1180 [
1181 case "$withval" in
1182 no)
1183 withval=""
1184 ;;
1185 [[0-9]]*)
1186 ;;
1187 *)
1188 AC_MSG_ERROR(You must specify a numeric port number for --with-prngd-port)
1189 ;;
1190 esac
1191 if test ! -z "$withval" ; then
1192 PRNGD_PORT="$withval"
1193 AC_DEFINE_UNQUOTED(PRNGD_PORT, $PRNGD_PORT)
1194 fi
1195 ]
1196)
1197
1198# PRNGD Unix domain socket
1199AC_ARG_WITH(prngd-socket,
1200 [ --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)],
1201 [
1202 case "$withval" in
1203 yes)
1204 withval="/var/run/egd-pool"
1205 ;;
1206 no)
1207 withval=""
1208 ;;
1209 /*)
1210 ;;
1211 *)
1212 AC_MSG_ERROR(You must specify an absolute path to the entropy socket)
1213 ;;
1214 esac
1215
1216 if test ! -z "$withval" ; then
1217 if test ! -z "$PRNGD_PORT" ; then
1218 AC_MSG_ERROR(You may not specify both a PRNGD/EGD port and socket)
1219 fi
1220 if test ! -r "$withval" ; then
1221 AC_MSG_WARN(Entropy socket is not readable)
1222 fi
1223 PRNGD_SOCKET="$withval"
1224 AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET")
1225 fi
1226 ],
1227 [
1228 # Check for existing socket only if we don't have a random device already
1229 if test "$USE_RAND_HELPER" = yes ; then
1230 AC_MSG_CHECKING(for PRNGD/EGD socket)
1231 # Insert other locations here
1232 for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
1233 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
1234 PRNGD_SOCKET="$sock"
1235 AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET")
1236 break;
1237 fi
1238 done
1239 if test ! -z "$PRNGD_SOCKET" ; then
1240 AC_MSG_RESULT($PRNGD_SOCKET)
1241 else
1242 AC_MSG_RESULT(not found)
1243 fi
1244 fi
1245 ]
1246)
1247
1248# Change default command timeout for hashing entropy source
1249entropy_timeout=200
1250AC_ARG_WITH(entropy-timeout,
1251 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)],
1252 [
1253 if test "x$withval" != "xno" ; then
1254 entropy_timeout=$withval
1255 fi
1256 ]
1257)
e9a17296 1258AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout)
1259
680cee3b 1260SSH_PRIVSEP_USER=sshd
700318f3 1261AC_ARG_WITH(privsep-user,
1262 [ --with-privsep-user=user Specify non-privileged user for privilege separation],
1263 [
1264 if test -n "$withval"; then
680cee3b 1265 SSH_PRIVSEP_USER=$withval
700318f3 1266 fi
1267 ]
1268)
680cee3b 1269AC_DEFINE_UNQUOTED(SSH_PRIVSEP_USER, "$SSH_PRIVSEP_USER")
1270AC_SUBST(SSH_PRIVSEP_USER)
700318f3 1271
1272# We do this little dance with the search path to insure
1273# that programs that we select for use by installed programs
1274# (which may be run by the super-user) come from trusted
1275# locations before they come from the user's private area.
1276# This should help avoid accidentally configuring some
1277# random version of a program in someone's personal bin.
1278
1279OPATH=$PATH
1280PATH=/bin:/usr/bin
1281test -h /bin 2> /dev/null && PATH=/usr/bin
1282test -d /sbin && PATH=$PATH:/sbin
1283test -d /usr/sbin && PATH=$PATH:/usr/sbin
1284PATH=$PATH:/etc:$OPATH
1285
12408a1b 1286# These programs are used by the command hashing source to gather entropy
e9a17296 1287OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
1288OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
1289OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
1290OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
1291OSSH_PATH_ENTROPY_PROG(PROG_JSTAT, jstat)
1292OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
1293OSSH_PATH_ENTROPY_PROG(PROG_SAR, sar)
1294OSSH_PATH_ENTROPY_PROG(PROG_W, w)
1295OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
1296OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
1297OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
1298OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
1299OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
1300OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
1301OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
1302OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
700318f3 1303# restore PATH
1304PATH=$OPATH
e9a17296 1305
1306# Where does ssh-rand-helper get its randomness from?
1307INSTALL_SSH_PRNG_CMDS=""
1308if test ! -z "$INSTALL_SSH_RAND_HELPER" ; then
1309 if test ! -z "$PRNGD_PORT" ; then
1310 RAND_HELPER_MSG="TCP localhost:$PRNGD_PORT"
1311 elif test ! -z "$PRNGD_SOCKET" ; then
1312 RAND_HELPER_MSG="Unix domain socket \"$PRNGD_SOCKET\""
1313 else
1314 RAND_HELPER_MSG="Command hashing (timeout $entropy_timeout)"
1315 RAND_HELPER_CMDHASH=yes
1316 INSTALL_SSH_PRNG_CMDS="yes"
1317 fi
1318fi
1319AC_SUBST(INSTALL_SSH_PRNG_CMDS)
1320
1321
3c0ef626 1322# Cheap hack to ensure NEWS-OS libraries are arranged right.
1323if test ! -z "$SONY" ; then
1324 LIBS="$LIBS -liberty";
1325fi
1326
1327# Checks for data types
1328AC_CHECK_SIZEOF(char, 1)
1329AC_CHECK_SIZEOF(short int, 2)
1330AC_CHECK_SIZEOF(int, 4)
1331AC_CHECK_SIZEOF(long int, 4)
1332AC_CHECK_SIZEOF(long long int, 8)
1333
700318f3 1334# Sanity check long long for some platforms (AIX)
1335if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then
1336 ac_cv_sizeof_long_long_int=0
1337fi
1338
3c0ef626 1339# More checks for data types
1340AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1341 AC_TRY_COMPILE(
12408a1b 1342 [ #include <sys/types.h> ],
1343 [ u_int a; a = 1;],
3c0ef626 1344 [ ac_cv_have_u_int="yes" ],
1345 [ ac_cv_have_u_int="no" ]
1346 )
1347])
1348if test "x$ac_cv_have_u_int" = "xyes" ; then
1349 AC_DEFINE(HAVE_U_INT)
1350 have_u_int=1
1351fi
1352
1353AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1354 AC_TRY_COMPILE(
12408a1b 1355 [ #include <sys/types.h> ],
1356 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
3c0ef626 1357 [ ac_cv_have_intxx_t="yes" ],
1358 [ ac_cv_have_intxx_t="no" ]
1359 )
1360])
1361if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1362 AC_DEFINE(HAVE_INTXX_T)
1363 have_intxx_t=1
1364fi
1365
1366if (test -z "$have_intxx_t" && \
12408a1b 1367 test "x$ac_cv_header_stdint_h" = "xyes")
3c0ef626 1368then
1369 AC_MSG_CHECKING([for intXX_t types in stdint.h])
1370 AC_TRY_COMPILE(
12408a1b 1371 [ #include <stdint.h> ],
1372 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
3c0ef626 1373 [
1374 AC_DEFINE(HAVE_INTXX_T)
1375 AC_MSG_RESULT(yes)
1376 ],
1377 [ AC_MSG_RESULT(no) ]
1378 )
1379fi
1380
1381AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1382 AC_TRY_COMPILE(
41b2f314 1383 [
1384#include <sys/types.h>
1385#ifdef HAVE_STDINT_H
1386# include <stdint.h>
1387#endif
1388#include <sys/socket.h>
1389#ifdef HAVE_SYS_BITYPES_H
1390# include <sys/bitypes.h>
1391#endif
12408a1b 1392 ],
1393 [ int64_t a; a = 1;],
3c0ef626 1394 [ ac_cv_have_int64_t="yes" ],
1395 [ ac_cv_have_int64_t="no" ]
1396 )
1397])
1398if test "x$ac_cv_have_int64_t" = "xyes" ; then
1399 AC_DEFINE(HAVE_INT64_T)
e9a17296 1400fi
1401
3c0ef626 1402AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1403 AC_TRY_COMPILE(
12408a1b 1404 [ #include <sys/types.h> ],
1405 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
3c0ef626 1406 [ ac_cv_have_u_intxx_t="yes" ],
1407 [ ac_cv_have_u_intxx_t="no" ]
1408 )
1409])
1410if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1411 AC_DEFINE(HAVE_U_INTXX_T)
1412 have_u_intxx_t=1
1413fi
1414
1415if test -z "$have_u_intxx_t" ; then
1416 AC_MSG_CHECKING([for u_intXX_t types in sys/socket.h])
1417 AC_TRY_COMPILE(
12408a1b 1418 [ #include <sys/socket.h> ],
1419 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
3c0ef626 1420 [
1421 AC_DEFINE(HAVE_U_INTXX_T)
1422 AC_MSG_RESULT(yes)
1423 ],
1424 [ AC_MSG_RESULT(no) ]
1425 )
1426fi
1427
1428AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1429 AC_TRY_COMPILE(
12408a1b 1430 [ #include <sys/types.h> ],
1431 [ u_int64_t a; a = 1;],
3c0ef626 1432 [ ac_cv_have_u_int64_t="yes" ],
1433 [ ac_cv_have_u_int64_t="no" ]
1434 )
1435])
1436if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1437 AC_DEFINE(HAVE_U_INT64_T)
1438 have_u_int64_t=1
1439fi
1440
e9a17296 1441if test -z "$have_u_int64_t" ; then
1442 AC_MSG_CHECKING([for u_int64_t type in sys/bitypes.h])
1443 AC_TRY_COMPILE(
12408a1b 1444 [ #include <sys/bitypes.h> ],
e9a17296 1445 [ u_int64_t a; a = 1],
1446 [
1447 AC_DEFINE(HAVE_U_INT64_T)
1448 AC_MSG_RESULT(yes)
1449 ],
1450 [ AC_MSG_RESULT(no) ]
1451 )
1452fi
1453
3c0ef626 1454if test -z "$have_u_intxx_t" ; then
1455 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1456 AC_TRY_COMPILE(
1457 [
1458#include <sys/types.h>
12408a1b 1459 ],
1460 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
3c0ef626 1461 [ ac_cv_have_uintxx_t="yes" ],
1462 [ ac_cv_have_uintxx_t="no" ]
1463 )
1464 ])
1465 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1466 AC_DEFINE(HAVE_UINTXX_T)
1467 fi
1468fi
1469
1470if test -z "$have_uintxx_t" ; then
1471 AC_MSG_CHECKING([for uintXX_t types in stdint.h])
1472 AC_TRY_COMPILE(
12408a1b 1473 [ #include <stdint.h> ],
1474 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;],
3c0ef626 1475 [
1476 AC_DEFINE(HAVE_UINTXX_T)
1477 AC_MSG_RESULT(yes)
1478 ],
1479 [ AC_MSG_RESULT(no) ]
1480 )
1481fi
1482
1483if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
12408a1b 1484 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
3c0ef626 1485then
1486 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1487 AC_TRY_COMPILE(
1488 [
1489#include <sys/bitypes.h>
12408a1b 1490 ],
3c0ef626 1491 [
1492 int8_t a; int16_t b; int32_t c;
1493 u_int8_t e; u_int16_t f; u_int32_t g;
1494 a = b = c = e = f = g = 1;
12408a1b 1495 ],
3c0ef626 1496 [
1497 AC_DEFINE(HAVE_U_INTXX_T)
1498 AC_DEFINE(HAVE_INTXX_T)
1499 AC_MSG_RESULT(yes)
1500 ],
1501 [AC_MSG_RESULT(no)]
12408a1b 1502 )
3c0ef626 1503fi
1504
1505
1506AC_CACHE_CHECK([for u_char], ac_cv_have_u_char, [
1507 AC_TRY_COMPILE(
1508 [
1509#include <sys/types.h>
1510 ],
1511 [ u_char foo; foo = 125; ],
1512 [ ac_cv_have_u_char="yes" ],
1513 [ ac_cv_have_u_char="no" ]
1514 )
1515])
1516if test "x$ac_cv_have_u_char" = "xyes" ; then
1517 AC_DEFINE(HAVE_U_CHAR)
1518fi
1519
1520TYPE_SOCKLEN_T
1521
e9a17296 1522AC_CHECK_TYPES(sig_atomic_t,,,[#include <signal.h>])
1523
3c0ef626 1524AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
1525 AC_TRY_COMPILE(
1526 [
1527#include <sys/types.h>
1528 ],
1529 [ size_t foo; foo = 1235; ],
1530 [ ac_cv_have_size_t="yes" ],
1531 [ ac_cv_have_size_t="no" ]
1532 )
1533])
1534if test "x$ac_cv_have_size_t" = "xyes" ; then
1535 AC_DEFINE(HAVE_SIZE_T)
1536fi
1537
1538AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
1539 AC_TRY_COMPILE(
1540 [
1541#include <sys/types.h>
1542 ],
1543 [ ssize_t foo; foo = 1235; ],
1544 [ ac_cv_have_ssize_t="yes" ],
1545 [ ac_cv_have_ssize_t="no" ]
1546 )
1547])
1548if test "x$ac_cv_have_ssize_t" = "xyes" ; then
1549 AC_DEFINE(HAVE_SSIZE_T)
1550fi
1551
1552AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [
1553 AC_TRY_COMPILE(
1554 [
1555#include <time.h>
1556 ],
1557 [ clock_t foo; foo = 1235; ],
1558 [ ac_cv_have_clock_t="yes" ],
1559 [ ac_cv_have_clock_t="no" ]
1560 )
1561])
1562if test "x$ac_cv_have_clock_t" = "xyes" ; then
1563 AC_DEFINE(HAVE_CLOCK_T)
1564fi
1565
1566AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
1567 AC_TRY_COMPILE(
1568 [
1569#include <sys/types.h>
1570#include <sys/socket.h>
1571 ],
1572 [ sa_family_t foo; foo = 1235; ],
1573 [ ac_cv_have_sa_family_t="yes" ],
1574 [ AC_TRY_COMPILE(
1575 [
1576#include <sys/types.h>
1577#include <sys/socket.h>
1578#include <netinet/in.h>
1579 ],
1580 [ sa_family_t foo; foo = 1235; ],
1581 [ ac_cv_have_sa_family_t="yes" ],
1582
1583 [ ac_cv_have_sa_family_t="no" ]
1584 )]
1585 )
1586])
1587if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
1588 AC_DEFINE(HAVE_SA_FAMILY_T)
1589fi
1590
1591AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
1592 AC_TRY_COMPILE(
1593 [
1594#include <sys/types.h>
1595 ],
1596 [ pid_t foo; foo = 1235; ],
1597 [ ac_cv_have_pid_t="yes" ],
1598 [ ac_cv_have_pid_t="no" ]
1599 )
1600])
1601if test "x$ac_cv_have_pid_t" = "xyes" ; then
1602 AC_DEFINE(HAVE_PID_T)
1603fi
1604
1605AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
1606 AC_TRY_COMPILE(
1607 [
1608#include <sys/types.h>
1609 ],
1610 [ mode_t foo; foo = 1235; ],
1611 [ ac_cv_have_mode_t="yes" ],
1612 [ ac_cv_have_mode_t="no" ]
1613 )
1614])
1615if test "x$ac_cv_have_mode_t" = "xyes" ; then
1616 AC_DEFINE(HAVE_MODE_T)
1617fi
1618
1619
1620AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
1621 AC_TRY_COMPILE(
1622 [
1623#include <sys/types.h>
1624#include <sys/socket.h>
1625 ],
1626 [ struct sockaddr_storage s; ],
1627 [ ac_cv_have_struct_sockaddr_storage="yes" ],
1628 [ ac_cv_have_struct_sockaddr_storage="no" ]
1629 )
1630])
1631if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
1632 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)
1633fi
1634
1635AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
1636 AC_TRY_COMPILE(
1637 [
1638#include <sys/types.h>
1639#include <netinet/in.h>
1640 ],
1641 [ struct sockaddr_in6 s; s.sin6_family = 0; ],
1642 [ ac_cv_have_struct_sockaddr_in6="yes" ],
1643 [ ac_cv_have_struct_sockaddr_in6="no" ]
1644 )
1645])
1646if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
1647 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)
1648fi
1649
1650AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
1651 AC_TRY_COMPILE(
1652 [
1653#include <sys/types.h>
1654#include <netinet/in.h>
1655 ],
1656 [ struct in6_addr s; s.s6_addr[0] = 0; ],
1657 [ ac_cv_have_struct_in6_addr="yes" ],
1658 [ ac_cv_have_struct_in6_addr="no" ]
1659 )
1660])
1661if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
1662 AC_DEFINE(HAVE_STRUCT_IN6_ADDR)
1663fi
1664
1665AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
1666 AC_TRY_COMPILE(
1667 [
1668#include <sys/types.h>
1669#include <sys/socket.h>
1670#include <netdb.h>
1671 ],
1672 [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ],
1673 [ ac_cv_have_struct_addrinfo="yes" ],
1674 [ ac_cv_have_struct_addrinfo="no" ]
1675 )
1676])
1677if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
1678 AC_DEFINE(HAVE_STRUCT_ADDRINFO)
1679fi
1680
1681AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [
1682 AC_TRY_COMPILE(
12408a1b 1683 [ #include <sys/time.h> ],
1684 [ struct timeval tv; tv.tv_sec = 1;],
3c0ef626 1685 [ ac_cv_have_struct_timeval="yes" ],
1686 [ ac_cv_have_struct_timeval="no" ]
1687 )
1688])
1689if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
1690 AC_DEFINE(HAVE_STRUCT_TIMEVAL)
1691 have_struct_timeval=1
1692fi
1693
6a9b3198 1694AC_CHECK_TYPES(struct timespec)
1695
1696# We need int64_t or else certian parts of the compile will fail.
3c0ef626 1697if test "x$ac_cv_have_int64_t" = "xno" -a \
1698 "x$ac_cv_sizeof_long_int" != "x8" -a \
1699 "x$ac_cv_sizeof_long_long_int" = "x0" ; then
6a9b3198 1700 echo "OpenSSH requires int64_t support. Contact your vendor or install"
1701 echo "an alternative compiler (I.E., GCC) before continuing."
1702 echo ""
1703 exit 1;
3c0ef626 1704else
1705dnl test snprintf (broken on SCO w/gcc)
1706 AC_TRY_RUN(
1707 [
1708#include <stdio.h>
1709#include <string.h>
1710#ifdef HAVE_SNPRINTF
1711main()
1712{
1713 char buf[50];
1714 char expected_out[50];
1715 int mazsize = 50 ;
1716#if (SIZEOF_LONG_INT == 8)
1717 long int num = 0x7fffffffffffffff;
1718#else
1719 long long num = 0x7fffffffffffffffll;
1720#endif
1721 strcpy(expected_out, "9223372036854775807");
1722 snprintf(buf, mazsize, "%lld", num);
1723 if(strcmp(buf, expected_out) != 0)
12408a1b 1724 exit(1);
3c0ef626 1725 exit(0);
1726}
1727#else
1728main() { exit(0); }
1729#endif
1730 ], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ]
1731 )
1732fi
3c0ef626 1733
1734dnl Checks for structure members
1735OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
1736OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX)
1737OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX)
1738OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP)
1739OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP)
1740OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX)
1741OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP)
1742OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP)
1743OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmpx.h, HAVE_ID_IN_UTMPX)
1744OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP)
1745OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX)
1746OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP)
1747OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX)
1748OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP)
1749OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP)
1750OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX)
1751OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX)
1752
1753AC_CHECK_MEMBERS([struct stat.st_blksize])
1754
1755AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
1756 ac_cv_have_ss_family_in_struct_ss, [
1757 AC_TRY_COMPILE(
1758 [
1759#include <sys/types.h>
1760#include <sys/socket.h>
1761 ],
1762 [ struct sockaddr_storage s; s.ss_family = 1; ],
1763 [ ac_cv_have_ss_family_in_struct_ss="yes" ],
1764 [ ac_cv_have_ss_family_in_struct_ss="no" ],
1765 )
1766])
1767if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
1768 AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
1769fi
1770
1771AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
1772 ac_cv_have___ss_family_in_struct_ss, [
1773 AC_TRY_COMPILE(
1774 [
1775#include <sys/types.h>
1776#include <sys/socket.h>
1777 ],
1778 [ struct sockaddr_storage s; s.__ss_family = 1; ],
1779 [ ac_cv_have___ss_family_in_struct_ss="yes" ],
1780 [ ac_cv_have___ss_family_in_struct_ss="no" ]
1781 )
1782])
1783if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
1784 AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
1785fi
1786
1787AC_CACHE_CHECK([for pw_class field in struct passwd],
1788 ac_cv_have_pw_class_in_struct_passwd, [
1789 AC_TRY_COMPILE(
1790 [
1791#include <pwd.h>
1792 ],
1793 [ struct passwd p; p.pw_class = 0; ],
1794 [ ac_cv_have_pw_class_in_struct_passwd="yes" ],
1795 [ ac_cv_have_pw_class_in_struct_passwd="no" ]
1796 )
1797])
1798if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
1799 AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD)
1800fi
1801
1802AC_CACHE_CHECK([for pw_expire field in struct passwd],
1803 ac_cv_have_pw_expire_in_struct_passwd, [
1804 AC_TRY_COMPILE(
1805 [
1806#include <pwd.h>
1807 ],
1808 [ struct passwd p; p.pw_expire = 0; ],
1809 [ ac_cv_have_pw_expire_in_struct_passwd="yes" ],
1810 [ ac_cv_have_pw_expire_in_struct_passwd="no" ]
1811 )
1812])
1813if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then
1814 AC_DEFINE(HAVE_PW_EXPIRE_IN_PASSWD)
1815fi
1816
1817AC_CACHE_CHECK([for pw_change field in struct passwd],
1818 ac_cv_have_pw_change_in_struct_passwd, [
1819 AC_TRY_COMPILE(
1820 [
1821#include <pwd.h>
1822 ],
1823 [ struct passwd p; p.pw_change = 0; ],
1824 [ ac_cv_have_pw_change_in_struct_passwd="yes" ],
1825 [ ac_cv_have_pw_change_in_struct_passwd="no" ]
1826 )
1827])
1828if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then
1829 AC_DEFINE(HAVE_PW_CHANGE_IN_PASSWD)
1830fi
1831
fba3c309 1832dnl make sure we're using the real structure members and not defines
700318f3 1833AC_CACHE_CHECK([for msg_accrights field in struct msghdr],
1834 ac_cv_have_accrights_in_msghdr, [
fba3c309 1835 AC_TRY_RUN(
700318f3 1836 [
1837#include <sys/types.h>
1838#include <sys/socket.h>
1839#include <sys/uio.h>
fba3c309 1840int main() {
1841#ifdef msg_accrights
1842exit(1);
1843#endif
1844struct msghdr m;
1845m.msg_accrights = 0;
1846exit(0);
1847}
700318f3 1848 ],
700318f3 1849 [ ac_cv_have_accrights_in_msghdr="yes" ],
1850 [ ac_cv_have_accrights_in_msghdr="no" ]
1851 )
1852])
1853if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
1854 AC_DEFINE(HAVE_ACCRIGHTS_IN_MSGHDR)
1855fi
1856
1857AC_CACHE_CHECK([for msg_control field in struct msghdr],
1858 ac_cv_have_control_in_msghdr, [
fba3c309 1859 AC_TRY_RUN(
700318f3 1860 [
1861#include <sys/types.h>
1862#include <sys/socket.h>
1863#include <sys/uio.h>
fba3c309 1864int main() {
1865#ifdef msg_control
1866exit(1);
1867#endif
1868struct msghdr m;
1869m.msg_control = 0;
1870exit(0);
1871}
700318f3 1872 ],
700318f3 1873 [ ac_cv_have_control_in_msghdr="yes" ],
1874 [ ac_cv_have_control_in_msghdr="no" ]
1875 )
1876])
1877if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
1878 AC_DEFINE(HAVE_CONTROL_IN_MSGHDR)
1879fi
1880
3c0ef626 1881AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
12408a1b 1882 AC_TRY_LINK([],
1883 [ extern char *__progname; printf("%s", __progname); ],
3c0ef626 1884 [ ac_cv_libc_defines___progname="yes" ],
1885 [ ac_cv_libc_defines___progname="no" ]
1886 )
1887])
1888if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
1889 AC_DEFINE(HAVE___PROGNAME)
1890fi
1891
700318f3 1892AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNCTION__, [
1893 AC_TRY_LINK([
1894#include <stdio.h>
12408a1b 1895],
1896 [ printf("%s", __FUNCTION__); ],
700318f3 1897 [ ac_cv_cc_implements___FUNCTION__="yes" ],
1898 [ ac_cv_cc_implements___FUNCTION__="no" ]
1899 )
1900])
1901if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
1902 AC_DEFINE(HAVE___FUNCTION__)
1903fi
1904
1905AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__, [
1906 AC_TRY_LINK([
1907#include <stdio.h>
12408a1b 1908],
1909 [ printf("%s", __func__); ],
700318f3 1910 [ ac_cv_cc_implements___func__="yes" ],
1911 [ ac_cv_cc_implements___func__="no" ]
1912 )
1913])
1914if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
1915 AC_DEFINE(HAVE___func__)
1916fi
1917
3c0ef626 1918AC_CACHE_CHECK([whether getopt has optreset support],
1919 ac_cv_have_getopt_optreset, [
1920 AC_TRY_LINK(
1921 [
1922#include <getopt.h>
1923 ],
1924 [ extern int optreset; optreset = 0; ],
1925 [ ac_cv_have_getopt_optreset="yes" ],
1926 [ ac_cv_have_getopt_optreset="no" ]
1927 )
1928])
1929if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
1930 AC_DEFINE(HAVE_GETOPT_OPTRESET)
1931fi
1932
1933AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
12408a1b 1934 AC_TRY_LINK([],
1935 [ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);],
3c0ef626 1936 [ ac_cv_libc_defines_sys_errlist="yes" ],
1937 [ ac_cv_libc_defines_sys_errlist="no" ]
1938 )
1939])
1940if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
1941 AC_DEFINE(HAVE_SYS_ERRLIST)
1942fi
1943
1944
1945AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [
12408a1b 1946 AC_TRY_LINK([],
1947 [ extern int sys_nerr; printf("%i", sys_nerr);],
3c0ef626 1948 [ ac_cv_libc_defines_sys_nerr="yes" ],
1949 [ ac_cv_libc_defines_sys_nerr="no" ]
1950 )
1951])
1952if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
1953 AC_DEFINE(HAVE_SYS_NERR)
1954fi
1955
12408a1b 1956SCARD_MSG="no"
700318f3 1957# Check whether user wants sectok support
1958AC_ARG_WITH(sectok,
1959 [ --with-sectok Enable smartcard support using libsectok],
3c0ef626 1960 [
1961 if test "x$withval" != "xno" ; then
1962 if test "x$withval" != "xyes" ; then
1963 CPPFLAGS="$CPPFLAGS -I${withval}"
1964 LDFLAGS="$LDFLAGS -L${withval}"
1965 if test ! -z "$need_dash_r" ; then
1966 LDFLAGS="$LDFLAGS -R${withval}"
1967 fi
1968 if test ! -z "$blibpath" ; then
1969 blibpath="$blibpath:${withval}"
1970 fi
1971 fi
1972 AC_CHECK_HEADERS(sectok.h)
1973 if test "$ac_cv_header_sectok_h" != yes; then
1974 AC_MSG_ERROR(Can't find sectok.h)
1975 fi
1976 AC_CHECK_LIB(sectok, sectok_open)
1977 if test "$ac_cv_lib_sectok_sectok_open" != yes; then
1978 AC_MSG_ERROR(Can't find libsectok)
1979 fi
1980 AC_DEFINE(SMARTCARD)
700318f3 1981 AC_DEFINE(USE_SECTOK)
12408a1b 1982 SCARD_MSG="yes, using sectok"
3c0ef626 1983 fi
1984 ]
1985)
1986
700318f3 1987# Check whether user wants OpenSC support
1988AC_ARG_WITH(opensc,
1989 AC_HELP_STRING([--with-opensc=PFX],
1990 [Enable smartcard support using OpenSC]),
1991 opensc_config_prefix="$withval", opensc_config_prefix="")
1992if test x$opensc_config_prefix != x ; then
1993 OPENSC_CONFIG=$opensc_config_prefix/bin/opensc-config
1994 AC_PATH_PROG(OPENSC_CONFIG, opensc-config, no)
1995 if test "$OPENSC_CONFIG" != "no"; then
1996 LIBOPENSC_CFLAGS=`$OPENSC_CONFIG --cflags`
1997 LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs`
1998 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS"
1999 LDFLAGS="$LDFLAGS $LIBOPENSC_LIBS"
2000 AC_DEFINE(SMARTCARD)
2001 AC_DEFINE(USE_OPENSC)
12408a1b 2002 SCARD_MSG="yes, using OpenSC"
700318f3 2003 fi
2004fi
2005
12408a1b 2006# Check libraries needed by DNS fingerprint support
2007AC_SEARCH_LIBS(getrrsetbyname, resolv,
2008 [AC_DEFINE(HAVE_GETRRSETBYNAME)],
0fff78ff 2009 [
12408a1b 2010 # Needed by our getrrsetbyname()
2011 AC_SEARCH_LIBS(res_query, resolv)
2012 AC_SEARCH_LIBS(dn_expand, resolv)
2013 AC_CHECK_FUNCS(_getshort _getlong)
2014 AC_CHECK_MEMBER(HEADER.ad,
2015 [AC_DEFINE(HAVE_HEADER_AD)],,
2016 [#include <arpa/nameser.h>])
2017 ])
0fff78ff 2018
700318f3 2019# Check whether user wants Kerberos 5 support
12408a1b 2020KRB5_MSG="no"
700318f3 2021AC_ARG_WITH(kerberos5,
12408a1b 2022 [ --with-kerberos5=PATH Enable Kerberos 5 support],
2023 [
2024 if test "x$withval" != "xno" ; then
2025 if test "x$withval" = "xyes" ; then
2026 KRB5ROOT="/usr/local"
2027 else
2028 KRB5ROOT=${withval}
2029 fi
700318f3 2030 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
12408a1b 2031 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
2032 AC_DEFINE(KRB5)
700318f3 2033 KRB5_MSG="yes"
12408a1b 2034 AC_MSG_CHECKING(whether we are using Heimdal)
2035 AC_TRY_COMPILE([ #include <krb5.h> ],
2036 [ char *tmp = heimdal_version; ],
2037 [ AC_MSG_RESULT(yes)
2038 AC_DEFINE(HEIMDAL)
2039 K5LIBS="-lkrb5 -ldes -lcom_err -lasn1 -lroken"
2040 ],
2041 [ AC_MSG_RESULT(no)
2042 K5LIBS="-lkrb5 -lk5crypto -lcom_err"
2043 ]
2044 )
2045 if test ! -z "$need_dash_r" ; then
2046 LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib"
2047 fi
2048 if test ! -z "$blibpath" ; then
2049 blibpath="$blibpath:${KRB5ROOT}/lib"
2050 fi
0fff78ff 2051 AC_SEARCH_LIBS(dn_expand, resolv)
2052
2053 AC_CHECK_LIB(gssapi,gss_init_sec_context,
2054 [ AC_DEFINE(GSSAPI)
2055 K5LIBS="-lgssapi $K5LIBS" ],
2056 [ AC_CHECK_LIB(gssapi_krb5,gss_init_sec_context,
2057 [ AC_DEFINE(GSSAPI)
12408a1b 2058 K5LIBS="-lgssapi_krb5 $K5LIBS" ],
0fff78ff 2059 AC_MSG_WARN([Cannot find any suitable gss-api library - build may fail]),
2060 $K5LIBS)
2061 ],
2062 $K5LIBS)
2063
2064 AC_CHECK_HEADER(gssapi.h, ,
2065 [ unset ac_cv_header_gssapi_h
12408a1b 2066 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
0fff78ff 2067 AC_CHECK_HEADERS(gssapi.h, ,
2068 AC_MSG_WARN([Cannot find any suitable gss-api header - build may fail])
12408a1b 2069 )
0fff78ff 2070 ]
2071 )
2072
2073 oldCPP="$CPPFLAGS"
2074 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
2075 AC_CHECK_HEADER(gssapi_krb5.h, ,
2076 [ CPPFLAGS="$oldCPP" ])
700318f3 2077
12408a1b 2078 KRB5=yes
2079 fi
2080 ]
700318f3 2081)
0fff78ff 2082LIBS="$LIBS $K5LIBS"
3c0ef626 2083
2084# Looking for programs, paths and files
3c0ef626 2085
700318f3 2086PRIVSEP_PATH=/var/empty
2087AC_ARG_WITH(privsep-path,
41b2f314 2088 [ --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)],
700318f3 2089 [
2090 if test "x$withval" != "$no" ; then
2091 PRIVSEP_PATH=$withval
2092 fi
2093 ]
2094)
2095AC_SUBST(PRIVSEP_PATH)
2096
3c0ef626 2097AC_ARG_WITH(xauth,
2098 [ --with-xauth=PATH Specify path to xauth program ],
2099 [
2100 if test "x$withval" != "xno" ; then
2101 xauth_path=$withval
2102 fi
2103 ],
2104 [
41b2f314 2105 TestPath="$PATH"
2106 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X/bin"
2107 TestPath="${TestPath}${PATH_SEPARATOR}/usr/bin/X11"
2108 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X11R6/bin"
2109 TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin"
2110 AC_PATH_PROG(xauth_path, xauth, , $TestPath)
3c0ef626 2111 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
2112 xauth_path="/usr/openwin/bin/xauth"
2113 fi
2114 ]
2115)
2116
6a9b3198 2117STRIP_OPT=-s
2118AC_ARG_ENABLE(strip,
2119 [ --disable-strip Disable calling strip(1) on install],
2120 [
2121 if test "x$enableval" = "xno" ; then
2122 STRIP_OPT=
2123 fi
2124 ]
2125)
2126AC_SUBST(STRIP_OPT)
2127
3c0ef626 2128if test -z "$xauth_path" ; then
2129 XAUTH_PATH="undefined"
2130 AC_SUBST(XAUTH_PATH)
2131else
2132 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
2133 XAUTH_PATH=$xauth_path
2134 AC_SUBST(XAUTH_PATH)
2135fi
3c0ef626 2136
2137# Check for mail directory (last resort if we cannot get it from headers)
2138if test ! -z "$MAIL" ; then
2139 maildir=`dirname $MAIL`
2140 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
2141fi
2142
2143if test -z "$no_dev_ptmx" ; then
700318f3 2144 if test "x$disable_ptmx_check" != "xyes" ; then
12408a1b 2145 AC_CHECK_FILE("/dev/ptmx",
700318f3 2146 [
2147 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
2148 have_dev_ptmx=1
2149 ]
2150 )
2151 fi
3c0ef626 2152fi
12408a1b 2153AC_CHECK_FILE("/dev/ptc",
3c0ef626 2154 [
2155 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
2156 have_dev_ptc=1
2157 ]
2158)
2159
2160# Options from here on. Some of these are preset by platform above
3c0ef626 2161AC_ARG_WITH(mantype,
2162 [ --with-mantype=man|cat|doc Set man page type],
2163 [
2164 case "$withval" in
2165 man|cat|doc)
2166 MANTYPE=$withval
2167 ;;
2168 *)
2169 AC_MSG_ERROR(invalid man type: $withval)
2170 ;;
2171 esac
2172 ]
2173)
2174if test -z "$MANTYPE"; then
41b2f314 2175 TestPath="/usr/bin${PATH_SEPARATOR}/usr/ucb"
2176 AC_PATH_PROGS(NROFF, nroff awf, /bin/false, $TestPath)
3c0ef626 2177 if ${NROFF} -mdoc ${srcdir}/ssh.1 >/dev/null 2>&1; then
2178 MANTYPE=doc
2179 elif ${NROFF} -man ${srcdir}/ssh.1 >/dev/null 2>&1; then
2180 MANTYPE=man
2181 else
2182 MANTYPE=cat
2183 fi
2184fi
2185AC_SUBST(MANTYPE)
2186if test "$MANTYPE" = "doc"; then
2187 mansubdir=man;
2188else
2189 mansubdir=$MANTYPE;
2190fi
2191AC_SUBST(mansubdir)
2192
2193# Check whether to enable MD5 passwords
12408a1b 2194MD5_MSG="no"
3c0ef626 2195AC_ARG_WITH(md5-passwords,
2196 [ --with-md5-passwords Enable use of MD5 passwords],
2197 [
2198 if test "x$withval" != "xno" ; then
2199 AC_DEFINE(HAVE_MD5_PASSWORDS)
12408a1b 2200 MD5_MSG="yes"
3c0ef626 2201 fi
2202 ]
2203)
2204
2205# Whether to disable shadow password support
2206AC_ARG_WITH(shadow,
2207 [ --without-shadow Disable shadow password support],
2208 [
2209 if test "x$withval" = "xno" ; then
2210 AC_DEFINE(DISABLE_SHADOW)
2211 disable_shadow=yes
2212 fi
2213 ]
2214)
2215
2216if test -z "$disable_shadow" ; then
2217 AC_MSG_CHECKING([if the systems has expire shadow information])
2218 AC_TRY_COMPILE(
2219 [
2220#include <sys/types.h>
2221#include <shadow.h>
2222 struct spwd sp;
2223 ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ],
2224 [ sp_expire_available=yes ], []
2225 )
2226
2227 if test "x$sp_expire_available" = "xyes" ; then
2228 AC_MSG_RESULT(yes)
2229 AC_DEFINE(HAS_SHADOW_EXPIRE)
2230 else
2231 AC_MSG_RESULT(no)
2232 fi
2233fi
2234
2235# Use ip address instead of hostname in $DISPLAY
2236if test ! -z "$IPADDR_IN_DISPLAY" ; then
2237 DISPLAY_HACK_MSG="yes"
2238 AC_DEFINE(IPADDR_IN_DISPLAY)
2239else
12408a1b 2240 DISPLAY_HACK_MSG="no"
3c0ef626 2241 AC_ARG_WITH(ipaddr-display,
2242 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
2243 [
2244 if test "x$withval" != "xno" ; then
2245 AC_DEFINE(IPADDR_IN_DISPLAY)
12408a1b 2246 DISPLAY_HACK_MSG="yes"
3c0ef626 2247 fi
2248 ]
2249 )
2250fi
2251
0fff78ff 2252# check for /etc/default/login and use it if present.
acc3d05e 2253AC_ARG_ENABLE(etc-default-login,
2254 [ --disable-etc-default-login Disable using PATH from /etc/default/login [no]],,
2255[
0fff78ff 2256AC_CHECK_FILE("/etc/default/login", [ external_path_file=/etc/default/login ])
2257
2258if test "x$external_path_file" = "x/etc/default/login"; then
2259 AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN)
2260fi
acc3d05e 2261])
0fff78ff 2262
700318f3 2263dnl BSD systems use /etc/login.conf so --with-default-path= has no effect
2264if test $ac_cv_func_login_getcapbool = "yes" -a \
2265 $ac_cv_header_login_cap_h = "yes" ; then
0fff78ff 2266 external_path_file=/etc/login.conf
700318f3 2267fi
0fff78ff 2268
3c0ef626 2269# Whether to mess with the default path
12408a1b 2270SERVER_PATH_MSG="(default)"
3c0ef626 2271AC_ARG_WITH(default-path,
700318f3 2272 [ --with-default-path= Specify default \$PATH environment for server],
3c0ef626 2273 [
0fff78ff 2274 if test "x$external_path_file" = "x/etc/login.conf" ; then
700318f3 2275 AC_MSG_WARN([
2276--with-default-path=PATH has no effect on this system.
2277Edit /etc/login.conf instead.])
2278 elif test "x$withval" != "xno" ; then
0fff78ff 2279 if test ! -z "$external_path_file" ; then
2280 AC_MSG_WARN([
2281--with-default-path=PATH will only be used if PATH is not defined in
2282$external_path_file .])
2283 fi
3c0ef626 2284 user_path="$withval"
12408a1b 2285 SERVER_PATH_MSG="$withval"
3c0ef626 2286 fi
2287 ],
0fff78ff 2288 [ if test "x$external_path_file" = "x/etc/login.conf" ; then
2289 AC_MSG_WARN([Make sure the path to scp is in /etc/login.conf])
700318f3 2290 else
0fff78ff 2291 if test ! -z "$external_path_file" ; then
2292 AC_MSG_WARN([
2293If PATH is defined in $external_path_file, ensure the path to scp is included,
2294otherwise scp will not work.])
2295 fi
2296 AC_TRY_RUN(
2297 [
3c0ef626 2298/* find out what STDPATH is */
2299#include <stdio.h>
2300#ifdef HAVE_PATHS_H
2301# include <paths.h>
2302#endif
2303#ifndef _PATH_STDPATH
6a9b3198 2304# ifdef _PATH_USERPATH /* Irix */
2305# define _PATH_STDPATH _PATH_USERPATH
2306# else
2307# define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
2308# endif
3c0ef626 2309#endif
2310#include <sys/types.h>
2311#include <sys/stat.h>
2312#include <fcntl.h>
2313#define DATA "conftest.stdpath"
2314
2315main()
2316{
2317 FILE *fd;
2318 int rc;
2319
2320 fd = fopen(DATA,"w");
2321 if(fd == NULL)
2322 exit(1);
2323
2324 if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0)
2325 exit(1);
2326
2327 exit(0);
2328}
2329 ], [ user_path=`cat conftest.stdpath` ],
2330 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ],
2331 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ]
2332 )
2333# make sure $bindir is in USER_PATH so scp will work
2334 t_bindir=`eval echo ${bindir}`
2335 case $t_bindir in
2336 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$prefix~"` ;;
2337 esac
2338 case $t_bindir in
2339 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$ac_default_prefix~"` ;;
2340 esac
2341 echo $user_path | grep ":$t_bindir" > /dev/null 2>&1
2342 if test $? -ne 0 ; then
2343 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1
2344 if test $? -ne 0 ; then
2345 user_path=$user_path:$t_bindir
2346 AC_MSG_RESULT(Adding $t_bindir to USER_PATH so scp will work)
2347 fi
2348 fi
700318f3 2349 fi ]
2350)
0fff78ff 2351if test "x$external_path_file" != "x/etc/login.conf" ; then
700318f3 2352 AC_DEFINE_UNQUOTED(USER_PATH, "$user_path")
2353 AC_SUBST(user_path)
2354fi
2355
2356# Set superuser path separately to user path
700318f3 2357AC_ARG_WITH(superuser-path,
2358 [ --with-superuser-path= Specify different path for super-user],
2359 [
2360 if test "x$withval" != "xno" ; then
2361 AC_DEFINE_UNQUOTED(SUPERUSER_PATH, "$withval")
2362 superuser_path=$withval
2363 fi
3c0ef626 2364 ]
2365)
700318f3 2366
3c0ef626 2367
3c0ef626 2368AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
12408a1b 2369IPV4_IN6_HACK_MSG="no"
3c0ef626 2370AC_ARG_WITH(4in6,
2371 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
2372 [
2373 if test "x$withval" != "xno" ; then
2374 AC_MSG_RESULT(yes)
2375 AC_DEFINE(IPV4_IN_IPV6)
12408a1b 2376 IPV4_IN6_HACK_MSG="yes"
3c0ef626 2377 else
2378 AC_MSG_RESULT(no)
2379 fi
2380 ],[
2381 if test "x$inet6_default_4in6" = "xyes"; then
2382 AC_MSG_RESULT([yes (default)])
2383 AC_DEFINE(IPV4_IN_IPV6)
12408a1b 2384 IPV4_IN6_HACK_MSG="yes"
3c0ef626 2385 else
2386 AC_MSG_RESULT([no (default)])
2387 fi
2388 ]
2389)
2390
2391# Whether to enable BSD auth support
e9a17296 2392BSD_AUTH_MSG=no
3c0ef626 2393AC_ARG_WITH(bsd-auth,
2394 [ --with-bsd-auth Enable BSD auth support],
2395 [
2396 if test "x$withval" != "xno" ; then
2397 AC_DEFINE(BSD_AUTH)
e9a17296 2398 BSD_AUTH_MSG=yes
3c0ef626 2399 fi
2400 ]
2401)
2402
3c0ef626 2403# Where to place sshd.pid
2404piddir=/var/run
700318f3 2405# make sure the directory exists
2406if test ! -d $piddir ; then
2407 piddir=`eval echo ${sysconfdir}`
2408 case $piddir in
12408a1b 2409 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
700318f3 2410 esac
2411fi
2412
3c0ef626 2413AC_ARG_WITH(pid-dir,
2414 [ --with-pid-dir=PATH Specify location of ssh.pid file],
2415 [
2416 if test "x$withval" != "xno" ; then
2417 piddir=$withval
700318f3 2418 if test ! -d $piddir ; then
2419 AC_MSG_WARN([** no $piddir directory on this system **])
2420 fi
3c0ef626 2421 fi
2422 ]
2423)
2424
3c0ef626 2425AC_DEFINE_UNQUOTED(_PATH_SSH_PIDDIR, "$piddir")
2426AC_SUBST(piddir)
2427
2428dnl allow user to disable some login recording features
2429AC_ARG_ENABLE(lastlog,
2430 [ --disable-lastlog disable use of lastlog even if detected [no]],
0fff78ff 2431 [
2432 if test "x$enableval" = "xno" ; then
2433 AC_DEFINE(DISABLE_LASTLOG)
2434 fi
2435 ]
3c0ef626 2436)
2437AC_ARG_ENABLE(utmp,
2438 [ --disable-utmp disable use of utmp even if detected [no]],
0fff78ff 2439 [
2440 if test "x$enableval" = "xno" ; then
2441 AC_DEFINE(DISABLE_UTMP)
2442 fi
2443 ]
3c0ef626 2444)
2445AC_ARG_ENABLE(utmpx,
2446 [ --disable-utmpx disable use of utmpx even if detected [no]],
0fff78ff 2447 [
2448 if test "x$enableval" = "xno" ; then
2449 AC_DEFINE(DISABLE_UTMPX)
2450 fi
2451 ]
3c0ef626 2452)
2453AC_ARG_ENABLE(wtmp,
2454 [ --disable-wtmp disable use of wtmp even if detected [no]],
0fff78ff 2455 [
2456 if test "x$enableval" = "xno" ; then
2457 AC_DEFINE(DISABLE_WTMP)
2458 fi
2459 ]
3c0ef626 2460)
2461AC_ARG_ENABLE(wtmpx,
2462 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
0fff78ff 2463 [
2464 if test "x$enableval" = "xno" ; then
2465 AC_DEFINE(DISABLE_WTMPX)
2466 fi
2467 ]
3c0ef626 2468)
2469AC_ARG_ENABLE(libutil,
2470 [ --disable-libutil disable use of libutil (login() etc.) [no]],
0fff78ff 2471 [
2472 if test "x$enableval" = "xno" ; then
2473 AC_DEFINE(DISABLE_LOGIN)
2474 fi
2475 ]
3c0ef626 2476)
2477AC_ARG_ENABLE(pututline,
2478 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
0fff78ff 2479 [
2480 if test "x$enableval" = "xno" ; then
12408a1b 2481 AC_DEFINE(DISABLE_PUTUTLINE)
0fff78ff 2482 fi
2483 ]
3c0ef626 2484)
2485AC_ARG_ENABLE(pututxline,
2486 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
0fff78ff 2487 [
2488 if test "x$enableval" = "xno" ; then
2489 AC_DEFINE(DISABLE_PUTUTXLINE)
2490 fi
2491 ]
3c0ef626 2492)
2493AC_ARG_WITH(lastlog,
2494 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
2495 [
2496 if test "x$withval" = "xno" ; then
2497 AC_DEFINE(DISABLE_LASTLOG)
2498 else
2499 conf_lastlog_location=$withval
2500 fi
2501 ]
2502)
2503
2504dnl lastlog, [uw]tmpx? detection
2505dnl NOTE: set the paths in the platform section to avoid the
2506dnl need for command-line parameters
2507dnl lastlog and [uw]tmp are subject to a file search if all else fails
2508
2509dnl lastlog detection
2510dnl NOTE: the code itself will detect if lastlog is a directory
2511AC_MSG_CHECKING([if your system defines LASTLOG_FILE])
2512AC_TRY_COMPILE([
2513#include <sys/types.h>
2514#include <utmp.h>
2515#ifdef HAVE_LASTLOG_H
2516# include <lastlog.h>
2517#endif
2518#ifdef HAVE_PATHS_H
2519# include <paths.h>
2520#endif
2521#ifdef HAVE_LOGIN_H
2522# include <login.h>
2523#endif
2524 ],
2525 [ char *lastlog = LASTLOG_FILE; ],
2526 [ AC_MSG_RESULT(yes) ],
2527 [
2528 AC_MSG_RESULT(no)
2529 AC_MSG_CHECKING([if your system defines _PATH_LASTLOG])
2530 AC_TRY_COMPILE([
2531#include <sys/types.h>
2532#include <utmp.h>
2533#ifdef HAVE_LASTLOG_H
2534# include <lastlog.h>
2535#endif
2536#ifdef HAVE_PATHS_H
2537# include <paths.h>
2538#endif
2539 ],
2540 [ char *lastlog = _PATH_LASTLOG; ],
2541 [ AC_MSG_RESULT(yes) ],
2542 [
2543 AC_MSG_RESULT(no)
2544 system_lastlog_path=no
2545 ])
2546 ]
2547)
2548
2549if test -z "$conf_lastlog_location"; then
2550 if test x"$system_lastlog_path" = x"no" ; then
2551 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
2552 if (test -d "$f" || test -f "$f") ; then
2553 conf_lastlog_location=$f
2554 fi
2555 done
2556 if test -z "$conf_lastlog_location"; then
2557 AC_MSG_WARN([** Cannot find lastlog **])
2558 dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx
2559 fi
2560 fi
2561fi
2562
2563if test -n "$conf_lastlog_location"; then
2564 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location")
2565fi
2566
2567dnl utmp detection
2568AC_MSG_CHECKING([if your system defines UTMP_FILE])
2569AC_TRY_COMPILE([
2570#include <sys/types.h>
2571#include <utmp.h>
2572#ifdef HAVE_PATHS_H
2573# include <paths.h>
2574#endif
2575 ],
2576 [ char *utmp = UTMP_FILE; ],
2577 [ AC_MSG_RESULT(yes) ],
2578 [ AC_MSG_RESULT(no)
2579 system_utmp_path=no ]
2580)
2581if test -z "$conf_utmp_location"; then
2582 if test x"$system_utmp_path" = x"no" ; then
2583 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
2584 if test -f $f ; then
2585 conf_utmp_location=$f
2586 fi
2587 done
2588 if test -z "$conf_utmp_location"; then
2589 AC_DEFINE(DISABLE_UTMP)
2590 fi
2591 fi
2592fi
2593if test -n "$conf_utmp_location"; then
2594 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location")
2595fi
2596
2597dnl wtmp detection
2598AC_MSG_CHECKING([if your system defines WTMP_FILE])
2599AC_TRY_COMPILE([
2600#include <sys/types.h>
2601#include <utmp.h>
2602#ifdef HAVE_PATHS_H
2603# include <paths.h>
2604#endif
2605 ],
2606 [ char *wtmp = WTMP_FILE; ],
2607 [ AC_MSG_RESULT(yes) ],
2608 [ AC_MSG_RESULT(no)
2609 system_wtmp_path=no ]
2610)
2611if test -z "$conf_wtmp_location"; then
2612 if test x"$system_wtmp_path" = x"no" ; then
2613 for f in /usr/adm/wtmp /var/log/wtmp; do
2614 if test -f $f ; then
2615 conf_wtmp_location=$f
2616 fi
2617 done
2618 if test -z "$conf_wtmp_location"; then
2619 AC_DEFINE(DISABLE_WTMP)
2620 fi
2621 fi
2622fi
2623if test -n "$conf_wtmp_location"; then
2624 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location")
2625fi
2626
2627
2628dnl utmpx detection - I don't know any system so perverse as to require
2629dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out
2630dnl there, though.
2631AC_MSG_CHECKING([if your system defines UTMPX_FILE])
2632AC_TRY_COMPILE([
2633#include <sys/types.h>
2634#include <utmp.h>
2635#ifdef HAVE_UTMPX_H
2636#include <utmpx.h>
2637#endif
2638#ifdef HAVE_PATHS_H
2639# include <paths.h>
2640#endif
2641 ],
2642 [ char *utmpx = UTMPX_FILE; ],
2643 [ AC_MSG_RESULT(yes) ],
2644 [ AC_MSG_RESULT(no)
2645 system_utmpx_path=no ]
2646)
2647if test -z "$conf_utmpx_location"; then
2648 if test x"$system_utmpx_path" = x"no" ; then
2649 AC_DEFINE(DISABLE_UTMPX)
2650 fi
2651else
2652 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location")
2653fi
2654
2655dnl wtmpx detection
2656AC_MSG_CHECKING([if your system defines WTMPX_FILE])
2657AC_TRY_COMPILE([
2658#include <sys/types.h>
2659#include <utmp.h>
2660#ifdef HAVE_UTMPX_H
2661#include <utmpx.h>
2662#endif
2663#ifdef HAVE_PATHS_H
2664# include <paths.h>
2665#endif
2666 ],
2667 [ char *wtmpx = WTMPX_FILE; ],
2668 [ AC_MSG_RESULT(yes) ],
2669 [ AC_MSG_RESULT(no)
2670 system_wtmpx_path=no ]
2671)
2672if test -z "$conf_wtmpx_location"; then
2673 if test x"$system_wtmpx_path" = x"no" ; then
2674 AC_DEFINE(DISABLE_WTMPX)
2675 fi
2676else
2677 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location")
2678fi
2679
2680
3c0ef626 2681if test ! -z "$blibpath" ; then
7e772e1f 2682 LDFLAGS="$LDFLAGS $blibflags$blibpath"
2683 AC_MSG_WARN([Please check and edit blibpath in LDFLAGS in Makefile])
3c0ef626 2684fi
2685
e9a17296 2686dnl remove pam and dl because they are in $LIBPAM
2687if test "$PAM_MSG" = yes ; then
2688 LIBS=`echo $LIBS | sed 's/-lpam //'`
2689fi
2690if test "$ac_cv_lib_pam_pam_set_item" = yes ; then
2691 LIBS=`echo $LIBS | sed 's/-ldl //'`
2692fi
3c0ef626 2693
e9a17296 2694AC_EXEEXT
3c0ef626 2695AC_CONFIG_FILES([Makefile openbsd-compat/Makefile scard/Makefile ssh_prng_cmds])
2696AC_OUTPUT
2697
2698# Print summary of options
2699
3c0ef626 2700# Someone please show me a better way :)
2701A=`eval echo ${prefix}` ; A=`eval echo ${A}`
2702B=`eval echo ${bindir}` ; B=`eval echo ${B}`
2703C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
2704D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
2705E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
2706F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
2707G=`eval echo ${piddir}` ; G=`eval echo ${G}`
700318f3 2708H=`eval echo ${PRIVSEP_PATH}` ; H=`eval echo ${H}`
2709I=`eval echo ${user_path}` ; I=`eval echo ${I}`
2710J=`eval echo ${superuser_path}` ; J=`eval echo ${J}`
3c0ef626 2711
2712echo ""
2713echo "OpenSSH has been configured with the following options:"
700318f3 2714echo " User binaries: $B"
2715echo " System binaries: $C"
2716echo " Configuration files: $D"
2717echo " Askpass program: $E"
2718echo " Manual pages: $F"
2719echo " PID file: $G"
2720echo " Privilege separation chroot path: $H"
0fff78ff 2721if test "x$external_path_file" = "x/etc/login.conf" ; then
2722echo " At runtime, sshd will use the path defined in $external_path_file"
2723echo " Make sure the path to scp is present, otherwise scp will not work"
700318f3 2724else
2725echo " sshd default user PATH: $I"
0fff78ff 2726 if test ! -z "$external_path_file"; then
2727echo " (If PATH is set in $external_path_file it will be used instead. If"
2728echo " used, ensure the path to scp is present, otherwise scp will not work.)"
2729 fi
700318f3 2730fi
2731if test ! -z "$superuser_path" ; then
2732echo " sshd superuser user PATH: $J"
2733fi
2734echo " Manpage format: $MANTYPE"
0fff78ff 2735echo " PAM support: $PAM_MSG"
700318f3 2736echo " KerberosV support: $KRB5_MSG"
2737echo " Smartcard support: $SCARD_MSG"
700318f3 2738echo " S/KEY support: $SKEY_MSG"
2739echo " TCP Wrappers support: $TCPW_MSG"
2740echo " MD5 password support: $MD5_MSG"
2741echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
700318f3 2742echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
2743echo " BSD Auth support: $BSD_AUTH_MSG"
2744echo " Random number source: $RAND_MSG"
e9a17296 2745if test ! -z "$USE_RAND_HELPER" ; then
700318f3 2746echo " ssh-rand-helper collects from: $RAND_HELPER_MSG"
3c0ef626 2747fi
2748
2749echo ""
2750
2751echo " Host: ${host}"
2752echo " Compiler: ${CC}"
2753echo " Compiler flags: ${CFLAGS}"
2754echo "Preprocessor flags: ${CPPFLAGS}"
2755echo " Linker flags: ${LDFLAGS}"
e9a17296 2756echo " Libraries: ${LIBWRAP} ${LIBPAM} ${LIBS}"
3c0ef626 2757
2758echo ""
2759
2760if test "x$PAM_MSG" = "xyes" ; then
e9a17296 2761 echo "PAM is enabled. You may need to install a PAM control file "
2762 echo "for sshd, otherwise password authentication may fail. "
12408a1b 2763 echo "Example PAM control files can be found in the contrib/ "
e9a17296 2764 echo "subdirectory"
3c0ef626 2765 echo ""
2766fi
2767
e9a17296 2768if test ! -z "$RAND_HELPER_CMDHASH" ; then
2769 echo "WARNING: you are using the builtin random number collection "
2770 echo "service. Please read WARNING.RNG and request that your OS "
2771 echo "vendor includes kernel-based random number collection in "
2772 echo "future versions of your OS."
3c0ef626 2773 echo ""
2774fi
2775
This page took 0.548173 seconds and 5 git commands to generate.