4 AC_CONFIG_SRCDIR([ssh.c])
6 AC_CONFIG_HEADER(config.h)
11 # Checks for programs.
16 AC_PATH_PROGS(PERL, perl5 perl)
18 AC_PATH_PROG(ENT, ent)
20 AC_PATH_PROGS(FILEPRIV, filepriv, true, /sbin:/usr/sbin)
21 AC_PATH_PROG(TEST_MINUS_S_SH, bash)
22 AC_PATH_PROG(TEST_MINUS_S_SH, ksh)
23 AC_PATH_PROG(TEST_MINUS_S_SH, sh)
28 if test -z "$AR" ; then
29 AC_MSG_ERROR([*** 'ar' missing, please install or fix your \$PATH ***])
32 # Use LOGIN_PROGRAM from environment if possible
33 if test ! -z "$LOGIN_PROGRAM" ; then
34 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM")
37 AC_PATH_PROG(LOGIN_PROGRAM_FALLBACK, login)
38 if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
39 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM_FALLBACK")
43 if test -z "$LD" ; then
49 if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
50 CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wno-uninitialized"
53 # Check for some target-specific stuff
57 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
58 LDFLAGS="$LDFLAGS -L/usr/local/lib"
59 if (test "$LD" != "gcc" && test -z "$blibpath"); then
60 blibpath="/usr/lib:/lib:/usr/local/lib"
62 AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)])
63 AC_DEFINE(BROKEN_GETADDRINFO)
64 dnl AIX handles lastlog as part of its login message
65 AC_DEFINE(DISABLE_LASTLOG)
68 LIBS="$LIBS -lregex /usr/lib/textmode.o"
69 AC_DEFINE(HAVE_CYGWIN)
71 AC_DEFINE(DISABLE_SHADOW)
72 AC_DEFINE(IPV4_DEFAULT)
73 AC_DEFINE(IP_TOS_IS_BROKEN)
74 AC_DEFINE(NO_X11_UNIX_SOCKETS)
77 AC_DEFINE(IP_TOS_IS_BROKEN)
80 AC_DEFINE(BROKEN_GETADDRINFO)
83 if test -z "$GCC"; then
86 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
89 AC_DEFINE(DISABLE_SHADOW)
90 AC_DEFINE(DISABLE_UTMP)
91 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
92 LIBS="$LIBS -lxnet -lsec"
95 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
97 AC_DEFINE(PAM_SUN_CODEBASE)
99 AC_DEFINE(DISABLE_SHADOW)
100 AC_DEFINE(DISABLE_UTMP)
101 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
102 LIBS="$LIBS -lxnet -lsec"
105 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
107 PATH="$PATH:/usr/etc"
108 AC_DEFINE(BROKEN_INET_NTOA)
111 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
113 PATH="$PATH:/usr/etc"
114 AC_DEFINE(WITH_IRIX_ARRAY)
115 AC_DEFINE(WITH_IRIX_PROJECT)
116 AC_DEFINE(WITH_IRIX_AUDIT)
117 AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)])
118 AC_DEFINE(BROKEN_INET_NTOA)
122 check_for_libcrypt_later=1
123 AC_DEFINE(DONT_TRY_OTHER_AF)
124 AC_DEFINE(PAM_TTY_KLUDGE)
125 inet6_default_4in6=yes
127 mips-sony-bsd|mips-sony-newsos4)
128 AC_DEFINE(HAVE_NEWS4)
130 AC_CHECK_LIB(iberty, xatexit, AC_DEFINE(HAVE_XATEXIT),
131 AC_MSG_ERROR([*** libiberty missing - please install first or check config.log ***])
138 check_for_libcrypt_later=1
141 conf_lastlog_location="/usr/adm/lastlog"
142 conf_utmp_location=/etc/utmp
143 conf_wtmp_location=/usr/adm/wtmp
146 AC_DEFINE(BROKEN_REALPATH)
148 AC_DEFINE(BROKEN_SAVED_UIDS)
149 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
153 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
154 LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib"
156 AC_DEFINE(PAM_SUN_CODEBASE)
157 AC_DEFINE(LOGIN_NEEDS_UTMPX)
158 AC_DEFINE(LOGIN_NEEDS_TERM)
159 AC_DEFINE(PAM_TTY_KLUDGE)
160 # hardwire lastlog location (can't detect it on some versions)
161 conf_lastlog_location="/var/adm/lastlog"
162 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
163 sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'`
164 if test "$sol2ver" -ge 8; then
166 AC_DEFINE(DISABLE_UTMP)
167 AC_DEFINE(DISABLE_WTMP)
173 CPPFLAGS="$CPPFLAGS -DSUNOS4"
174 AC_CHECK_FUNCS(getpwanam)
175 AC_DEFINE(PAM_SUN_CODEBASE)
176 AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
177 conf_utmp_location=/etc/utmp
178 conf_wtmp_location=/var/adm/wtmp
179 conf_lastlog_location=/var/adm/lastlog
183 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
184 LDFLAGS="$LDFLAGS -L/usr/local/lib"
186 AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
189 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
190 # /usr/ucblib MUST NOT be searched on ReliantUNIX
191 LDFLAGS="$LDFLAGS -L/usr/local/lib"
192 IPADDR_IN_DISPLAY=yes
194 AC_DEFINE(IP_TOS_IS_BROKEN)
195 AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
196 # /usr/ucblib/libucb.a no longer needed on ReliantUNIX
197 # Attention: always take care to bind libsocket and libnsl before libc,
198 # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog
201 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
202 LDFLAGS="$LDFLAGS -L/usr/local/lib"
207 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
208 LDFLAGS="$LDFLAGS -L/usr/local/lib"
213 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
214 LDFLAGS="$LDFLAGS -L/usr/local/lib"
217 CPPFLAGS="$CPPFLAGS -Dftruncate=chsize -I/usr/local/include"
218 LDFLAGS="$LDFLAGS -L/usr/local/lib"
219 LIBS="$LIBS -los -lprot -lx -ltinfo -lm"
220 rsh_path="/usr/bin/rcmd"
223 AC_DEFINE(BROKEN_SYS_TERMIO_H)
225 AC_DEFINE(HAVE_SCO_PROTECTED_PW)
226 AC_DEFINE(DISABLE_SHADOW)
227 AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
228 AC_DEFINE(BROKEN_SAVED_UIDS)
229 AC_CHECK_FUNCS(getluid setluid)
231 do_sco3_extra_lib_check=yes
234 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
235 LDFLAGS="$LDFLAGS -L/usr/local/lib"
236 LIBS="$LIBS -lprot -lx -ltinfo -lm"
238 rsh_path="/usr/bin/rcmd"
240 AC_DEFINE(HAVE_SCO_PROTECTED_PW)
241 AC_DEFINE(DISABLE_SHADOW)
242 AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
243 AC_CHECK_FUNCS(getluid setluid)
250 LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal,-L/usr/local/lib"
251 LIBS="$LIBS -lgen -lrsc"
254 AC_MSG_CHECKING(for Digital Unix SIA)
257 [ --with-osfsia Enable Digital Unix SIA],
259 if test "x$withval" = "xno" ; then
260 AC_MSG_RESULT(disabled)
265 if test -z "$no_osfsia" ; then
266 if test -f /etc/sia/matrix.conf; then
268 AC_DEFINE(HAVE_OSF_SIA)
269 AC_DEFINE(DISABLE_LOGIN)
270 LIBS="$LIBS -lsecurity -ldb -lm -laud"
279 AC_DEFINE(NO_X11_UNIX_SOCKETS)
280 AC_DEFINE(MISSING_NFDBITS)
281 AC_DEFINE(MISSING_HOWMANY)
282 AC_DEFINE(MISSING_FD_MASK)
286 # Allow user to specify flags
288 [ --with-cflags Specify additional flags to pass to compiler],
290 if test "x$withval" != "xno" ; then
291 CFLAGS="$CFLAGS $withval"
295 AC_ARG_WITH(cppflags,
296 [ --with-cppflags Specify additional flags to pass to preprocessor] ,
298 if test "x$withval" != "xno"; then
299 CPPFLAGS="$CPPFLAGS $withval"
304 [ --with-ldflags Specify additional flags to pass to linker],
306 if test "x$withval" != "xno" ; then
307 LDFLAGS="$LDFLAGS $withval"
312 [ --with-libs Specify additional libraries to link with],
314 if test "x$withval" != "xno" ; then
315 LIBS="$LIBS $withval"
321 [ --with-pcre[[=PATH]] Override built in regex library with pcre
322 (optionally in PATH)],
327 if test "x$withval" != "xyes"; then
328 if test -d "$withval/lib"; then
329 if test -n "${need_dash_r}"; then
330 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
332 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
335 if test -n "${need_dash_r}"; then
336 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
338 LDFLAGS="-L${withval} ${LDFLAGS}"
341 if test -d "$withval/include"; then
342 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
344 CPPFLAGS="-I${withval} ${CPPFLAGS}"
348 AC_CHECK_HEADER(pcreposix.h,
349 AC_CHECK_LIB(pcre, pcre_info,[
350 AC_DEFINE(HAVE_LIBPCRE)
351 LIBS="$LIBS -lpcreposix -lpcre"
353 AC_MSG_ERROR([*** unable to locate pcre library ***])),
354 AC_MSG_ERROR([*** unable to locate pcreposix.h include file ***]))
360 # Checks for libraries.
361 AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match))
362 AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
364 dnl SCO OS3 needs this for libwrap
365 if test "x$with_tcp_wrappers" != "xno" ; then
366 if test "x$do_sco3_extra_lib_check" = "xyes" ; then
367 AC_CHECK_LIB(rpc, innetgr, LIBS="-lrpc -lyp -lrpc $LIBS" , , -lyp -lrpc)
371 AC_CHECK_FUNC(getspnam, ,
372 AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen"))
376 [ --with-zlib=PATH Use zlib in PATH],
378 if test -d "$withval/lib"; then
379 if test -n "${need_dash_r}"; then
380 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
382 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
385 if test -n "${need_dash_r}"; then
386 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
388 LDFLAGS="-L${withval} ${LDFLAGS}"
391 if test -d "$withval/include"; then
392 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
394 CPPFLAGS="-I${withval} ${CPPFLAGS}"
399 AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first or check config.log ***]))
401 # We don't want to check if we did an pcre override.
402 if test -z "$no_comp_check" ; then
403 AC_CHECK_FUNC(regcomp,
404 [ AC_DEFINE(HAVE_REGCOMP)],
406 AC_CHECK_LIB(pcre, pcre_info,
408 AC_DEFINE(HAVE_LIBPCRE)
409 LIBS="$LIBS -lpcreposix -lpcre"
412 AC_MSG_ERROR([*** No regex library found.])
419 AC_CHECK_FUNC(strcasecmp,
420 [], [ AC_CHECK_LIB(resolv, strcasecmp, LIBS="$LIBS -lresolv") ]
422 AC_CHECK_FUNC(utimes,
423 [], [ AC_CHECK_LIB(c89, utimes, LIBS="$LIBS -lc89") ]
426 dnl Checks for libutil functions
427 AC_CHECK_HEADERS(libutil.h)
428 AC_SEARCH_LIBS(login, util bsd, [AC_DEFINE(HAVE_LOGIN)])
429 AC_CHECK_FUNCS(logout updwtmp logwtmp)
433 # Checks for header files.
434 AC_CHECK_HEADERS(bstring.h crypt.h endian.h floatingpoint.h \
435 getopt.h glob.h lastlog.h limits.h login.h \
436 login_cap.h maillock.h netdb.h netgroup.h \
437 netinet/in_systm.h paths.h poll.h pty.h regex.h \
438 security/pam_appl.h shadow.h stddef.h stdint.h \
439 strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h \
440 sys/poll.h sys/queue.h sys/select.h sys/stat.h \
441 sys/stropts.h sys/sysmacros.h sys/time.h \
442 sys/ttcompat.h sys/un.h time.h ttyent.h usersec.h \
443 util.h utime.h utmp.h utmpx.h)
445 # Check for ALTDIRFUNC glob() extension
446 AC_MSG_CHECKING(for GLOB_ALTDIRFUNC support)
447 AC_EGREP_CPP(FOUNDIT,
450 #ifdef GLOB_ALTDIRFUNC
455 AC_DEFINE(GLOB_HAS_ALTDIRFUNC)
463 # Check for g.gl_matchc glob() extension
464 AC_MSG_CHECKING(for gl_matchc field in glob_t)
465 AC_EGREP_CPP(FOUNDIT,
468 int main(void){glob_t g; g.gl_matchc = 1;}
471 AC_DEFINE(GLOB_HAS_GL_MATCHC)
479 AC_MSG_CHECKING([whether struct dirent allocates space for d_name])
482 #include <sys/types.h>
484 int main(void){struct dirent d;return(sizeof(d.d_name)<=sizeof(char));}
486 [AC_MSG_RESULT(yes)],
489 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME)
493 # Check whether the user wants GSI (Globus) support
496 [ --with-gsi=PATH Enable GSI/Globus authentication support],
503 [ --with-globus=PATH Enable GSI/Globus authentication support],
509 if test "x$gsi_path" != "xno" ; then
510 # Globus GSSAPI configuration
514 # Find GLOBUS/GSI installation Directory
515 AC_MSG_CHECKING(for Globus/GSI installation directory)
517 globus_install_dir=$gsi_path
519 if test "x$globus_install_dir" = "xyes" ; then
520 if test -n "$GLOBUS_INSTALL_PATH" ; then
521 globus_install_dir=$GLOBUS_INSTALL_PATH
522 elif test -n "$GSI_INSTALL_PATH" ; then
523 globus_install_dir=$GSI_INSTALL_PATH
524 elif test -d /usr/local/globus ; then
525 globus_install_dir="/usr/local/globus"
526 elif test -d /usr/local/gsi ; then
527 globus_install_dir="/usr/local/gsi"
529 AC_MSG_ERROR(Cannot find Globus/GSI installation directory)
532 AC_MSG_RESULT($globus_install_dir)
534 # Find GLOBUS/GSI development directory
535 AC_MSG_CHECKING(for Globus/GSI development directory)
537 if test -d ${globus_install_dir}/lib ; then
538 # Looks like a flat directory structure from configure/make
539 # and not globus-install or gsi-install
540 globus_dev_dir=$globus_install_dir
543 # Assume a true globus installation with architecture
544 # directories and run globus-development-path to find
545 # the development directory
547 # Set GLOBUS_INSTALL_PATH
548 GLOBUS_INSTALL_PATH=$globus_install_dir
549 export GLOBUS_INSTALL_PATH
551 dev_path_program=${globus_install_dir}/bin/globus-development-path
553 if test ! -x ${dev_path_program} ; then
554 AC_MSG_ERROR(Cannot find Globus/GSI installation directory: program ${dev_path_program} does not exist or is not executable)
557 globus_dev_dir=`${dev_path_program}`
559 if test -z "$globus_dev_dir" -o "X$globus_dev_dir" = "X<not found>" ; then
560 AC_MSG_ERROR(Cannot find Globus/GSI development directory)
563 if test ! -d "$globus_dev_dir" ; then
564 AC_MSG_ERROR(Cannot find Globus/GSI development directory: $globus_dev_dir does not exist)
567 AC_MSG_RESULT($globus_dev_dir)
569 GSI_LIBS="-lglobus_gss_assist -lglobus_gss -lglobus_gaa -lssl -lcrypto"
570 GSI_LDFLAGS="-L${globus_dev_dir}/lib"
571 GSI_CFLAGS="-I${globus_dev_dir}/include"
573 LIBS="$LIBS $GSI_LIBS"
574 LDFLAGS="$LDFLAGS $GSI_LDFLAGS"
575 CFLAGS="$CFLAGS $GSI_CFLAGS"
576 # End Globus/GSI section
579 # Check whether user wants S/Key support
582 [ --with-skey[[=PATH]] Enable S/Key support
583 (optionally in PATH)],
585 if test "x$withval" != "xno" ; then
587 if test "x$withval" != "xyes" ; then
588 CPPFLAGS="$CPPFLAGS -I${withval}/include"
589 LDFLAGS="$LDFLAGS -L${withval}/lib"
596 AC_CHECK_FUNC(skey_keyinfo,
599 AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
605 # Check whether user wants TCP wrappers support
607 AC_ARG_WITH(tcp-wrappers,
608 [ --with-tcp-wrappers[[=PATH]] Enable tcpwrappers support
609 (optionally in PATH)],
611 if test "x$withval" != "xno" ; then
613 saved_LDFLAGS="$LDFLAGS"
614 saved_CPPFLAGS="$CPPFLAGS"
615 if test -n "${withval}" -a "${withval}" != "yes"; then
616 if test -d "${withval}/lib"; then
617 if test -n "${need_dash_r}"; then
618 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
620 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
623 if test -n "${need_dash_r}"; then
624 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
626 LDFLAGS="-L${withval} ${LDFLAGS}"
629 if test -d "${withval}/include"; then
630 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
632 CPPFLAGS="-I${withval} ${CPPFLAGS}"
636 AC_MSG_CHECKING(for libwrap)
640 int deny_severity = 0, allow_severity = 0;
649 AC_MSG_ERROR([*** libwrap missing])
656 dnl Checks for library functions.
657 AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_sa \
658 clock fchmod fchown freeaddrinfo futimes gai_strerror \
659 getaddrinfo getcwd getgrouplist getnameinfo getopt \
660 getrlimit getrusage getttyent glob inet_aton inet_ntoa \
661 inet_ntop innetgr login_getcapbool md5_crypt memmove \
662 mkdtemp on_exit openpty readpassphrase realpath \
663 rresvport_af setdtablesize setegid setenv seteuid \
664 setlogin setproctitle setresgid setreuid setrlimit \
665 setsid setvbuf sigaction sigvec snprintf strerror \
666 strlcat strlcpy strmode strsep sysconf tcgetpgrp utimes \
667 vhangup vsnprintf waitpid __b64_ntop _getpty)
669 dnl IRIX and Solaris 2.5.1 have dirname() in libgen
670 AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[
671 AC_CHECK_LIB(gen, dirname,[
672 AC_CACHE_CHECK([for broken dirname],
673 ac_cv_have_broken_dirname, [
681 int main(int argc, char **argv) {
684 strncpy(buf,"/etc", 32);
686 if (!s || strncmp(s, "/", 32) != 0) {
693 [ ac_cv_have_broken_dirname="no" ],
694 [ ac_cv_have_broken_dirname="yes" ]
698 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
700 AC_DEFINE(HAVE_DIRNAME)
701 AC_CHECK_HEADERS(libgen.h)
706 dnl Checks for time functions
707 AC_CHECK_FUNCS(gettimeofday time)
708 dnl Checks for utmp functions
709 AC_CHECK_FUNCS(endutent getutent getutid getutline pututline setutent)
710 AC_CHECK_FUNCS(utmpname)
711 dnl Checks for utmpx functions
712 AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline pututxline )
713 AC_CHECK_FUNCS(setutxent utmpxname)
715 AC_CHECK_FUNC(getuserattr,
716 [AC_DEFINE(HAVE_GETUSERATTR)],
717 [AC_CHECK_LIB(s, getuserattr, [LIBS="$LIBS -ls"; AC_DEFINE(HAVE_GETUSERATTR)])]
720 AC_CHECK_FUNC(daemon,
721 [AC_DEFINE(HAVE_DAEMON)],
722 [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
725 AC_CHECK_FUNC(getpagesize,
726 [AC_DEFINE(HAVE_GETPAGESIZE)],
727 [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])]
730 # Check for broken snprintf
731 if test "x$ac_cv_func_snprintf" = "xyes" ; then
732 AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
736 int main(void){char b[5];snprintf(b,5,"123456789");return(b[4]!='\0');}
738 [AC_MSG_RESULT(yes)],
741 AC_DEFINE(BROKEN_SNPRINTF)
742 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
752 [ --with-pam Enable PAM support ],
754 if test "x$withval" != "xno" ; then
755 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" ; then
756 AC_MSG_ERROR([PAM headers not found])
759 AC_CHECK_LIB(dl, dlopen, , )
760 AC_CHECK_LIB(pam, pam_set_item, , AC_MSG_ERROR([*** libpam missing]))
761 AC_CHECK_FUNCS(pam_getenvlist)
771 # Check for older PAM
772 if test "x$PAM_MSG" = "xyes" ; then
773 # Check PAM strerror arguments (old PAM)
774 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
778 #include <security/pam_appl.h>
780 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
783 AC_DEFINE(HAVE_OLD_PAM)
785 PAM_MSG="yes (old library)"
790 # The big search for OpenSSL
792 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
794 if test "x$withval" != "xno" ; then
801 saved_LDFLAGS="$LDFLAGS"
802 saved_CPPFLAGS="$CPPFLAGS"
803 if test "x$prefix" != "xNONE" ; then
804 tryssldir="$tryssldir $prefix"
806 AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [
807 for ssldir in $tryssldir "" /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
808 CPPFLAGS="$saved_CPPFLAGS"
809 LDFLAGS="$saved_LDFLAGS"
810 LIBS="$saved_LIBS -lcrypto"
812 # Skip directories if they don't exist
813 if test ! -z "$ssldir" -a ! -d "$ssldir" ; then
816 if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then
817 # Try to use $ssldir/lib if it exists, otherwise
819 if test -d "$ssldir/lib" ; then
820 LDFLAGS="-L$ssldir/lib $saved_LDFLAGS"
821 if test ! -z "$need_dash_r" ; then
822 LDFLAGS="-R$ssldir/lib $LDFLAGS"
825 LDFLAGS="-L$ssldir $saved_LDFLAGS"
826 if test ! -z "$need_dash_r" ; then
827 LDFLAGS="-R$ssldir $LDFLAGS"
830 # Try to use $ssldir/include if it exists, otherwise
832 if test -d "$ssldir/include" ; then
833 CPPFLAGS="-I$ssldir/include $saved_CPPFLAGS"
835 CPPFLAGS="-I$ssldir $saved_CPPFLAGS"
839 # Basic test to check for compatible version and correct linking
840 # *does not* test for RSA - that comes later.
844 #include <openssl/rand.h>
848 memset(a, 0, sizeof(a));
849 RAND_add(a, sizeof(a), sizeof(a));
850 return(RAND_status() <= 0);
859 if test ! -z "$found_crypto" ; then
864 if test -z "$found_crypto" ; then
865 AC_MSG_ERROR([Could not find working OpenSSL library, please install or check config.log])
867 if test -z "$ssldir" ; then
871 ac_cv_openssldir=$ssldir
874 if (test ! -z "$ac_cv_openssldir" && test "x$ac_cv_openssldir" != "x(system)") ; then
875 AC_DEFINE(HAVE_OPENSSL)
876 dnl Need to recover ssldir - test above runs in subshell
877 ssldir=$ac_cv_openssldir
878 if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then
879 # Try to use $ssldir/lib if it exists, otherwise
881 if test -d "$ssldir/lib" ; then
882 LDFLAGS="-L$ssldir/lib $saved_LDFLAGS"
883 if test ! -z "$need_dash_r" ; then
884 LDFLAGS="-R$ssldir/lib $LDFLAGS"
887 LDFLAGS="-L$ssldir $saved_LDFLAGS"
888 if test ! -z "$need_dash_r" ; then
889 LDFLAGS="-R$ssldir $LDFLAGS"
892 # Try to use $ssldir/include if it exists, otherwise
894 if test -d "$ssldir/include" ; then
895 CPPFLAGS="-I$ssldir/include $saved_CPPFLAGS"
897 CPPFLAGS="-I$ssldir $saved_CPPFLAGS"
901 LIBS="$saved_LIBS -lcrypto"
903 # Now test RSA support
905 AC_MSG_CHECKING([for RSA support])
906 for WANTS_RSAREF in "" 1 ; do
907 if test -z "$WANTS_RSAREF" ; then
910 LIBS="$saved_LIBS -lRSAglue -lrsaref"
914 #include <openssl/rand.h>
915 #include <openssl/rsa.h>
916 #include <openssl/bn.h>
917 #include <openssl/sha.h>
920 int num; RSA *key; static unsigned char p_in[] = "blahblah";
921 unsigned char c[256], p[256];
922 memset(c, 0, sizeof(c)); RAND_add(c, sizeof(c), sizeof(c));
923 if ((key=RSA_generate_key(512, 3, NULL, NULL))==NULL) return(1);
924 num = RSA_public_encrypt(sizeof(p_in) - 1, p_in, c, key, RSA_PKCS1_PADDING);
925 return(-1 == RSA_private_decrypt(num, c, p, key, RSA_PKCS1_PADDING));
935 if test ! -z "$no_rsa" ; then
936 AC_MSG_RESULT(disabled)
939 if test -z "$rsa_works" ; then
940 AC_MSG_WARN([*** No RSA support found *** ])
943 if test -z "$WANTS_RSAREF" ; then
947 RSA_MSG="yes (using RSAref)"
948 AC_MSG_RESULT(using RSAref)
949 LIBS="$LIBS -lcrypto -lRSAglue -lrsaref"
954 # Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
955 # version in OpenSSL. Skip this for PAM
956 if test "x$PAM_MSG" = "xno" -a "x$check_for_libcrypt_later" = "x1"; then
957 AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt")
960 # Cheap hack to ensure NEWS-OS libraries are arranged right.
961 if test ! -z "$SONY" ; then
962 LIBS="$LIBS -liberty";
965 # Checks for data types
966 AC_CHECK_SIZEOF(char, 1)
967 AC_CHECK_SIZEOF(short int, 2)
968 AC_CHECK_SIZEOF(int, 4)
969 AC_CHECK_SIZEOF(long int, 4)
970 AC_CHECK_SIZEOF(long long int, 8)
972 # More checks for data types
973 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
975 [ #include <sys/types.h> ],
977 [ ac_cv_have_u_int="yes" ],
978 [ ac_cv_have_u_int="no" ]
981 if test "x$ac_cv_have_u_int" = "xyes" ; then
982 AC_DEFINE(HAVE_U_INT)
986 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
988 [ #include <sys/types.h> ],
989 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
990 [ ac_cv_have_intxx_t="yes" ],
991 [ ac_cv_have_intxx_t="no" ]
994 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
995 AC_DEFINE(HAVE_INTXX_T)
999 if (test -z "$have_intxx_t" && \
1000 test "x$ac_cv_header_stdint_h" = "xyes")
1002 AC_MSG_CHECKING([for intXX_t types in stdint.h])
1004 [ #include <stdint.h> ],
1005 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1007 AC_DEFINE(HAVE_INTXX_T)
1010 [ AC_MSG_RESULT(no) ]
1014 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1016 [ #include <sys/types.h> ],
1017 [ int64_t a; a = 1;],
1018 [ ac_cv_have_int64_t="yes" ],
1019 [ ac_cv_have_int64_t="no" ]
1022 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1023 AC_DEFINE(HAVE_INT64_T)
1027 if test -z "$have_int64_t" ; then
1028 AC_MSG_CHECKING([for int64_t type in sys/socket.h])
1030 [ #include <sys/socket.h> ],
1031 [ int64_t a; a = 1],
1033 AC_DEFINE(HAVE_INT64_T)
1036 [ AC_MSG_RESULT(no) ]
1040 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1042 [ #include <sys/types.h> ],
1043 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1044 [ ac_cv_have_u_intxx_t="yes" ],
1045 [ ac_cv_have_u_intxx_t="no" ]
1048 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1049 AC_DEFINE(HAVE_U_INTXX_T)
1053 if test -z "$have_u_intxx_t" ; then
1054 AC_MSG_CHECKING([for u_intXX_t types in sys/socket.h])
1056 [ #include <sys/socket.h> ],
1057 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1059 AC_DEFINE(HAVE_U_INTXX_T)
1062 [ AC_MSG_RESULT(no) ]
1066 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1068 [ #include <sys/types.h> ],
1069 [ u_int64_t a; a = 1;],
1070 [ ac_cv_have_u_int64_t="yes" ],
1071 [ ac_cv_have_u_int64_t="no" ]
1074 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1075 AC_DEFINE(HAVE_U_INT64_T)
1079 if test -z "$have_u_intxx_t" ; then
1080 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1083 #include <sys/types.h>
1085 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
1086 [ ac_cv_have_uintxx_t="yes" ],
1087 [ ac_cv_have_uintxx_t="no" ]
1090 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1091 AC_DEFINE(HAVE_UINTXX_T)
1095 if test -z "$have_uintxx_t" ; then
1096 AC_MSG_CHECKING([for uintXX_t types in stdint.h])
1098 [ #include <stdint.h> ],
1099 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;],
1101 AC_DEFINE(HAVE_UINTXX_T)
1104 [ AC_MSG_RESULT(no) ]
1108 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1109 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1111 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1114 #include <sys/bitypes.h>
1117 int8_t a; int16_t b; int32_t c;
1118 u_int8_t e; u_int16_t f; u_int32_t g;
1119 a = b = c = e = f = g = 1;
1122 AC_DEFINE(HAVE_U_INTXX_T)
1123 AC_DEFINE(HAVE_INTXX_T)
1131 AC_CACHE_CHECK([for u_char], ac_cv_have_u_char, [
1134 #include <sys/types.h>
1136 [ u_char foo; foo = 125; ],
1137 [ ac_cv_have_u_char="yes" ],
1138 [ ac_cv_have_u_char="no" ]
1141 if test "x$ac_cv_have_u_char" = "xyes" ; then
1142 AC_DEFINE(HAVE_U_CHAR)
1147 AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
1150 #include <sys/types.h>
1152 [ size_t foo; foo = 1235; ],
1153 [ ac_cv_have_size_t="yes" ],
1154 [ ac_cv_have_size_t="no" ]
1157 if test "x$ac_cv_have_size_t" = "xyes" ; then
1158 AC_DEFINE(HAVE_SIZE_T)
1161 AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
1164 #include <sys/types.h>
1166 [ ssize_t foo; foo = 1235; ],
1167 [ ac_cv_have_ssize_t="yes" ],
1168 [ ac_cv_have_ssize_t="no" ]
1171 if test "x$ac_cv_have_ssize_t" = "xyes" ; then
1172 AC_DEFINE(HAVE_SSIZE_T)
1175 AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [
1180 [ clock_t foo; foo = 1235; ],
1181 [ ac_cv_have_clock_t="yes" ],
1182 [ ac_cv_have_clock_t="no" ]
1185 if test "x$ac_cv_have_clock_t" = "xyes" ; then
1186 AC_DEFINE(HAVE_CLOCK_T)
1189 AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
1192 #include <sys/types.h>
1193 #include <sys/socket.h>
1195 [ sa_family_t foo; foo = 1235; ],
1196 [ ac_cv_have_sa_family_t="yes" ],
1199 #include <sys/types.h>
1200 #include <sys/socket.h>
1201 #include <netinet/in.h>
1203 [ sa_family_t foo; foo = 1235; ],
1204 [ ac_cv_have_sa_family_t="yes" ],
1206 [ ac_cv_have_sa_family_t="no" ]
1210 if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
1211 AC_DEFINE(HAVE_SA_FAMILY_T)
1214 AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
1217 #include <sys/types.h>
1219 [ pid_t foo; foo = 1235; ],
1220 [ ac_cv_have_pid_t="yes" ],
1221 [ ac_cv_have_pid_t="no" ]
1224 if test "x$ac_cv_have_pid_t" = "xyes" ; then
1225 AC_DEFINE(HAVE_PID_T)
1228 AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
1231 #include <sys/types.h>
1233 [ mode_t foo; foo = 1235; ],
1234 [ ac_cv_have_mode_t="yes" ],
1235 [ ac_cv_have_mode_t="no" ]
1238 if test "x$ac_cv_have_mode_t" = "xyes" ; then
1239 AC_DEFINE(HAVE_MODE_T)
1243 AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
1246 #include <sys/types.h>
1247 #include <sys/socket.h>
1249 [ struct sockaddr_storage s; ],
1250 [ ac_cv_have_struct_sockaddr_storage="yes" ],
1251 [ ac_cv_have_struct_sockaddr_storage="no" ]
1254 if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
1255 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)
1258 AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
1261 #include <sys/types.h>
1262 #include <netinet/in.h>
1264 [ struct sockaddr_in6 s; s.sin6_family = 0; ],
1265 [ ac_cv_have_struct_sockaddr_in6="yes" ],
1266 [ ac_cv_have_struct_sockaddr_in6="no" ]
1269 if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
1270 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)
1273 AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
1276 #include <sys/types.h>
1277 #include <netinet/in.h>
1279 [ struct in6_addr s; s.s6_addr[0] = 0; ],
1280 [ ac_cv_have_struct_in6_addr="yes" ],
1281 [ ac_cv_have_struct_in6_addr="no" ]
1284 if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
1285 AC_DEFINE(HAVE_STRUCT_IN6_ADDR)
1288 AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
1291 #include <sys/types.h>
1292 #include <sys/socket.h>
1295 [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ],
1296 [ ac_cv_have_struct_addrinfo="yes" ],
1297 [ ac_cv_have_struct_addrinfo="no" ]
1300 if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
1301 AC_DEFINE(HAVE_STRUCT_ADDRINFO)
1304 AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [
1306 [ #include <sys/time.h> ],
1307 [ struct timeval tv; tv.tv_sec = 1;],
1308 [ ac_cv_have_struct_timeval="yes" ],
1309 [ ac_cv_have_struct_timeval="no" ]
1312 if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
1313 AC_DEFINE(HAVE_STRUCT_TIMEVAL)
1314 have_struct_timeval=1
1317 # If we don't have int64_t then we can't compile sftp-server. So don't
1318 # even attempt to do it.
1319 if test "x$ac_cv_have_int64_t" = "xno" -a \
1320 "x$ac_cv_sizeof_long_int" != "x8" -a \
1321 "x$ac_cv_sizeof_long_long_int" = "x0" ; then
1324 dnl test snprintf (broken on SCO w/gcc)
1329 #ifdef HAVE_SNPRINTF
1333 char expected_out[50];
1335 #if (SIZEOF_LONG_INT == 8)
1336 long int num = 0x7fffffffffffffff;
1338 long long num = 0x7fffffffffffffffll;
1340 strcpy(expected_out, "9223372036854775807");
1341 snprintf(buf, mazsize, "%lld", num);
1342 if(strcmp(buf, expected_out) != 0)
1349 ], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ]
1354 dnl Checks for structure members
1355 OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
1356 OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX)
1357 OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX)
1358 OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP)
1359 OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP)
1360 OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX)
1361 OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP)
1362 OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP)
1363 OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmpx.h, HAVE_ID_IN_UTMPX)
1364 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP)
1365 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX)
1366 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP)
1367 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX)
1368 OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP)
1369 OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP)
1370 OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX)
1371 OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX)
1373 AC_CHECK_MEMBERS([struct stat.st_blksize])
1375 AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
1376 ac_cv_have_ss_family_in_struct_ss, [
1379 #include <sys/types.h>
1380 #include <sys/socket.h>
1382 [ struct sockaddr_storage s; s.ss_family = 1; ],
1383 [ ac_cv_have_ss_family_in_struct_ss="yes" ],
1384 [ ac_cv_have_ss_family_in_struct_ss="no" ],
1387 if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
1388 AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
1391 AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
1392 ac_cv_have___ss_family_in_struct_ss, [
1395 #include <sys/types.h>
1396 #include <sys/socket.h>
1398 [ struct sockaddr_storage s; s.__ss_family = 1; ],
1399 [ ac_cv_have___ss_family_in_struct_ss="yes" ],
1400 [ ac_cv_have___ss_family_in_struct_ss="no" ]
1403 if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
1404 AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
1407 AC_CACHE_CHECK([for pw_class field in struct passwd],
1408 ac_cv_have_pw_class_in_struct_passwd, [
1413 [ struct passwd p; p.pw_class = 0; ],
1414 [ ac_cv_have_pw_class_in_struct_passwd="yes" ],
1415 [ ac_cv_have_pw_class_in_struct_passwd="no" ]
1418 if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
1419 AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD)
1422 AC_CACHE_CHECK([for pw_expire field in struct passwd],
1423 ac_cv_have_pw_expire_in_struct_passwd, [
1428 [ struct passwd p; p.pw_expire = 0; ],
1429 [ ac_cv_have_pw_expire_in_struct_passwd="yes" ],
1430 [ ac_cv_have_pw_expire_in_struct_passwd="no" ]
1433 if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then
1434 AC_DEFINE(HAVE_PW_EXPIRE_IN_PASSWD)
1437 AC_CACHE_CHECK([for pw_change field in struct passwd],
1438 ac_cv_have_pw_change_in_struct_passwd, [
1443 [ struct passwd p; p.pw_change = 0; ],
1444 [ ac_cv_have_pw_change_in_struct_passwd="yes" ],
1445 [ ac_cv_have_pw_change_in_struct_passwd="no" ]
1448 if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then
1449 AC_DEFINE(HAVE_PW_CHANGE_IN_PASSWD)
1452 AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
1454 [ extern char *__progname; printf("%s", __progname); ],
1455 [ ac_cv_libc_defines___progname="yes" ],
1456 [ ac_cv_libc_defines___progname="no" ]
1459 if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
1460 AC_DEFINE(HAVE___PROGNAME)
1463 AC_CACHE_CHECK([whether getopt has optreset support],
1464 ac_cv_have_getopt_optreset, [
1469 [ extern int optreset; optreset = 0; ],
1470 [ ac_cv_have_getopt_optreset="yes" ],
1471 [ ac_cv_have_getopt_optreset="no" ]
1474 if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
1475 AC_DEFINE(HAVE_GETOPT_OPTRESET)
1478 AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
1480 [ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);],
1481 [ ac_cv_libc_defines_sys_errlist="yes" ],
1482 [ ac_cv_libc_defines_sys_errlist="no" ]
1485 if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
1486 AC_DEFINE(HAVE_SYS_ERRLIST)
1490 AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [
1492 [ extern int sys_nerr; printf("%i", sys_nerr);],
1493 [ ac_cv_libc_defines_sys_nerr="yes" ],
1494 [ ac_cv_libc_defines_sys_nerr="no" ]
1497 if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
1498 AC_DEFINE(HAVE_SYS_NERR)
1502 # Check whether user wants Kerberos support
1504 AC_ARG_WITH(smartcard,
1505 [ --with-smartcard Enable smartcard support],
1507 if test "x$withval" != "xno" ; then
1508 if test "x$withval" != "xyes" ; then
1509 CPPFLAGS="$CPPFLAGS -I${withval}"
1510 LDFLAGS="$LDFLAGS -L${withval}"
1511 if test ! -z "$need_dash_r" ; then
1512 LDFLAGS="$LDFLAGS -R${withval}"
1514 if test ! -z "$blibpath" ; then
1515 blibpath="$blibpath:${withval}"
1518 AC_CHECK_HEADERS(sectok.h)
1519 if test "$ac_cv_header_sectok_h" != yes; then
1520 AC_MSG_ERROR(Can't find sectok.h)
1522 AC_CHECK_LIB(sectok, sectok_open)
1523 if test "$ac_cv_lib_sectok_sectok_open" != yes; then
1524 AC_MSG_ERROR(Can't find libsectok)
1526 AC_DEFINE(SMARTCARD)
1532 # Check whether user wants Kerberos 5 support
1533 AC_ARG_WITH(kerberos5,
1534 [ --with-kerberos5=PATH Enable Kerberos 5 support],
1536 if test "x$withval" != "xno" ; then
1537 if test "x$withval" = "xyes" ; then
1538 KRB5ROOT="/usr/local"
1542 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
1543 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
1545 AC_MSG_CHECKING(whether we are using Heimdal)
1546 AC_TRY_COMPILE([ #include <krb5.h> ],
1547 [ char *tmp = heimdal_version; ],
1548 [ AC_MSG_RESULT(yes)
1550 K5LIBS="-lkrb5 -ldes -lcom_err -lasn1 -lroken"
1553 K5LIBS="-lkrb5 -lk5crypto -lcom_err"
1556 if test ! -z "$need_dash_r" ; then
1557 LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib"
1559 if test ! -z "$blibpath" ; then
1560 blibpath="$blibpath:${KRB5ROOT}/lib"
1562 AC_CHECK_LIB(resolv, dn_expand, , )
1564 AC_CHECK_LIB(gssapi,gss_init_sec_context,
1566 K5LIBS="-lgssapi $K5LIBS" ],
1567 [ AC_CHECK_LIB(gssapi_krb5,gss_init_sec_context,
1569 K5LIBS="-lgssapi_krb5 $K5LIBS" ],
1570 AC_MSG_WARN([Cannot find any suitable gss-api library - build may fail]),
1575 AC_CHECK_HEADER(gssapi.h, ,
1576 [ unset ac_cv_header_gssapi_h
1577 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
1578 AC_CHECK_HEADERS(gssapi.h, ,
1579 AC_MSG_WARN([Cannot find any suitable gss-api header - build may fail])
1585 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
1586 AC_CHECK_HEADER(gssapi_krb5.h, ,
1587 [ CPPFLAGS="$oldCPP" ])
1593 # Check whether user wants Kerberos 4 support
1595 AC_ARG_WITH(kerberos4,
1596 [ --with-kerberos4=PATH Enable Kerberos 4 support],
1598 if test "x$withval" != "xno" ; then
1599 if test "x$withval" != "xyes" ; then
1600 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1601 LDFLAGS="$LDFLAGS -L${withval}/lib"
1602 if test ! -z "$need_dash_r" ; then
1603 LDFLAGS="$LDFLAGS -R${withval}/lib"
1605 if test ! -z "$blibpath" ; then
1606 blibpath="$blibpath:${withval}/lib"
1609 if test -d /usr/include/kerberosIV ; then
1610 CPPFLAGS="$CPPFLAGS -I/usr/include/kerberosIV"
1614 AC_CHECK_HEADERS(krb.h)
1615 if test "$ac_cv_header_krb_h" != yes; then
1616 AC_MSG_WARN([Cannot find krb.h, build may fail])
1618 AC_CHECK_LIB(krb, main)
1619 if test "$ac_cv_lib_krb_main" != yes; then
1620 AC_CHECK_LIB(krb4, main)
1621 if test "$ac_cv_lib_krb4_main" != yes; then
1622 AC_MSG_WARN([Cannot find libkrb nor libkrb4, build may fail])
1629 AC_CHECK_LIB(des, des_cbc_encrypt)
1630 if test "$ac_cv_lib_des_des_cbc_encrypt" != yes; then
1631 AC_CHECK_LIB(des425, des_cbc_encrypt)
1632 if test "$ac_cv_lib_des425_des_cbc_encrypt" != yes; then
1633 AC_MSG_WARN([Cannot find libdes nor libdes425, build may fail])
1640 AC_CHECK_LIB(resolv, dn_expand, , )
1648 # Check whether user wants AFS support
1651 [ --with-afs=PATH Enable AFS support],
1653 if test "x$withval" != "xno" ; then
1655 if test "x$withval" != "xyes" ; then
1656 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1657 LDFLAGS="$LDFLAGS -L${withval}/lib"
1660 if test -z "$KRB4" ; then
1661 AC_MSG_WARN([AFS requires Kerberos IV support, build may fail])
1665 if test ! -z "$AFS_LIBS" ; then
1666 LIBS="$LIBS $AFS_LIBS"
1673 LIBS="$LIBS $KLIBS $K5LIBS"
1675 # Looking for programs, paths and files
1677 [ --with-rsh=PATH Specify path to remote shell program ],
1679 if test "x$withval" != "$no" ; then
1684 AC_PATH_PROG(rsh_path, rsh)
1689 [ --with-xauth=PATH Specify path to xauth program ],
1691 if test "x$withval" != "xno" ; then
1696 AC_PATH_PROG(xauth_path, xauth,,$PATH:/usr/X/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/openwin/bin)
1697 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
1698 xauth_path="/usr/openwin/bin/xauth"
1703 if test -z "$xauth_path" ; then
1704 XAUTH_PATH="undefined"
1705 AC_SUBST(XAUTH_PATH)
1707 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
1708 XAUTH_PATH=$xauth_path
1709 AC_SUBST(XAUTH_PATH)
1711 if test ! -z "$rsh_path" ; then
1712 AC_DEFINE_UNQUOTED(RSH_PATH, "$rsh_path")
1715 # Check for mail directory (last resort if we cannot get it from headers)
1716 if test ! -z "$MAIL" ; then
1717 maildir=`dirname $MAIL`
1718 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
1721 if test -z "$no_dev_ptmx" ; then
1722 AC_CHECK_FILE("/dev/ptmx",
1724 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
1729 AC_CHECK_FILE("/dev/ptc",
1731 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
1736 # Options from here on. Some of these are preset by platform above
1738 # Check for user-specified random device, otherwise check /dev/urandom
1740 [ --with-random=FILE read entropy from FILE (default=/dev/urandom)],
1742 if test "x$withval" != "xno" ; then
1743 RANDOM_POOL="$withval";
1744 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
1748 # Check for random device
1749 AC_CHECK_FILE("/dev/urandom",
1751 RANDOM_POOL="/dev/urandom";
1752 AC_SUBST(RANDOM_POOL)
1753 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
1759 # Check for PRNGD/EGD pool file
1760 AC_ARG_WITH(prngd-port,
1761 [ --with-prngd-port=PORT read entropy from PRNGD/EGD localhost:PORT],
1763 if test ! -z "$withval" -a "x$withval" != "xno" ; then
1764 PRNGD_PORT="$withval"
1765 AC_DEFINE_UNQUOTED(PRNGD_PORT, $PRNGD_PORT)
1770 # Check for PRNGD/EGD pool file
1771 AC_ARG_WITH(prngd-socket,
1772 [ --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)],
1774 if test "x$withval" != "xno" ; then
1775 PRNGD_SOCKET="$withval"
1776 AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET")
1780 # Check for existing socket only if we don't have a random device already
1781 if test -z "$RANDOM_POOL" ; then
1782 AC_MSG_CHECKING(for PRNGD/EGD socket)
1783 # Insert other locations here
1784 for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
1785 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
1786 PRNGD_SOCKET="$sock"
1787 AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET")
1791 if test ! -z "$PRNGD_SOCKET" ; then
1792 AC_MSG_RESULT($PRNGD_SOCKET)
1794 AC_MSG_RESULT(not found)
1801 # detect pathnames for entropy gathering commands, if we need them
1802 INSTALL_SSH_PRNG_CMDS=""
1804 if (test -z "$RANDOM_POOL" && test -z "$PRNGD") ; then
1805 # Use these commands to collect entropy
1806 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
1807 OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
1808 OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
1809 OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
1810 OSSH_PATH_ENTROPY_PROG(PROG_JSTAT, jstat)
1811 OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
1812 OSSH_PATH_ENTROPY_PROG(PROG_SAR, sar)
1813 OSSH_PATH_ENTROPY_PROG(PROG_W, w)
1814 OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
1815 OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
1816 OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
1817 OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
1818 OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
1819 OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
1820 OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
1821 OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
1823 INSTALL_SSH_PRNG_CMDS="yes"
1825 AC_SUBST(INSTALL_SSH_PRNG_CMDS)
1828 AC_ARG_WITH(mantype,
1829 [ --with-mantype=man|cat|doc Set man page type],
1836 AC_MSG_ERROR(invalid man type: $withval)
1841 if test -z "$MANTYPE"; then
1842 AC_PATH_PROGS(NROFF, nroff awf, /bin/false, /usr/bin:/usr/ucb)
1843 if ${NROFF} -mdoc ${srcdir}/ssh.1 >/dev/null 2>&1; then
1845 elif ${NROFF} -man ${srcdir}/ssh.1 >/dev/null 2>&1; then
1852 if test "$MANTYPE" = "doc"; then
1859 # Check whether to enable MD5 passwords
1861 AC_ARG_WITH(md5-passwords,
1862 [ --with-md5-passwords Enable use of MD5 passwords],
1864 if test "x$withval" != "xno" ; then
1865 AC_DEFINE(HAVE_MD5_PASSWORDS)
1871 # Whether to disable shadow password support
1873 [ --without-shadow Disable shadow password support],
1875 if test "x$withval" = "xno" ; then
1876 AC_DEFINE(DISABLE_SHADOW)
1882 if test -z "$disable_shadow" ; then
1883 AC_MSG_CHECKING([if the systems has expire shadow information])
1886 #include <sys/types.h>
1889 ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ],
1890 [ sp_expire_available=yes ], []
1893 if test "x$sp_expire_available" = "xyes" ; then
1895 AC_DEFINE(HAS_SHADOW_EXPIRE)
1901 # Use ip address instead of hostname in $DISPLAY
1902 if test ! -z "$IPADDR_IN_DISPLAY" ; then
1903 DISPLAY_HACK_MSG="yes"
1904 AC_DEFINE(IPADDR_IN_DISPLAY)
1906 DISPLAY_HACK_MSG="no"
1907 AC_ARG_WITH(ipaddr-display,
1908 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
1910 if test "x$withval" != "xno" ; then
1911 AC_DEFINE(IPADDR_IN_DISPLAY)
1912 DISPLAY_HACK_MSG="yes"
1918 # Whether to mess with the default path
1919 SERVER_PATH_MSG="(default)"
1920 AC_ARG_WITH(default-path,
1921 [ --with-default-path=PATH Specify default \$PATH environment for server],
1923 if test "x$withval" != "xno" ; then
1924 user_path="$withval"
1925 SERVER_PATH_MSG="$withval"
1931 /* find out what STDPATH is */
1936 #ifndef _PATH_STDPATH
1937 # define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
1939 #include <sys/types.h>
1940 #include <sys/stat.h>
1942 #define DATA "conftest.stdpath"
1949 fd = fopen(DATA,"w");
1953 if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0)
1958 ], [ user_path=`cat conftest.stdpath` ],
1959 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ],
1960 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ]
1962 # make sure $bindir is in USER_PATH so scp will work
1963 t_bindir=`eval echo ${bindir}`
1965 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$prefix~"` ;;
1968 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$ac_default_prefix~"` ;;
1970 echo $user_path | grep ":$t_bindir" > /dev/null 2>&1
1971 if test $? -ne 0 ; then
1972 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1
1973 if test $? -ne 0 ; then
1974 user_path=$user_path:$t_bindir
1975 AC_MSG_RESULT(Adding $t_bindir to USER_PATH so scp will work)
1980 AC_DEFINE_UNQUOTED(USER_PATH, "$user_path")
1983 # Whether to force IPv4 by default (needed on broken glibc Linux)
1985 AC_ARG_WITH(ipv4-default,
1986 [ --with-ipv4-default Use IPv4 by connections unless '-6' specified],
1988 if test "x$withval" != "xno" ; then
1989 AC_DEFINE(IPV4_DEFAULT)
1995 AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
1996 IPV4_IN6_HACK_MSG="no"
1998 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
2000 if test "x$withval" != "xno" ; then
2002 AC_DEFINE(IPV4_IN_IPV6)
2003 IPV4_IN6_HACK_MSG="yes"
2008 if test "x$inet6_default_4in6" = "xyes"; then
2009 AC_MSG_RESULT([yes (default)])
2010 AC_DEFINE(IPV4_IN_IPV6)
2011 IPV4_IN6_HACK_MSG="yes"
2013 AC_MSG_RESULT([no (default)])
2018 # Whether to enable BSD auth support
2019 AC_ARG_WITH(bsd-auth,
2020 [ --with-bsd-auth Enable BSD auth support],
2022 if test "x$withval" != "xno" ; then
2029 AC_MSG_CHECKING(whether to install ssh as suid root)
2030 AC_ARG_ENABLE(suid-ssh,
2031 [ --enable-suid-ssh Install ssh as suid root (default)
2032 --disable-suid-ssh Install ssh without suid bit],
2033 [ case "$enableval" in
2038 *) AC_MSG_RESULT(yes)
2048 # Where to place sshd.pid
2050 AC_ARG_WITH(pid-dir,
2051 [ --with-pid-dir=PATH Specify location of ssh.pid file],
2053 if test "x$withval" != "xno" ; then
2059 # make sure the directory exists
2060 if test ! -d $piddir ; then
2061 piddir=`eval echo ${sysconfdir}`
2063 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
2067 AC_DEFINE_UNQUOTED(_PATH_SSH_PIDDIR, "$piddir")
2070 dnl allow user to disable some login recording features
2071 AC_ARG_ENABLE(lastlog,
2072 [ --disable-lastlog disable use of lastlog even if detected [no]],
2073 [ AC_DEFINE(DISABLE_LASTLOG) ]
2076 [ --disable-utmp disable use of utmp even if detected [no]],
2077 [ AC_DEFINE(DISABLE_UTMP) ]
2079 AC_ARG_ENABLE(utmpx,
2080 [ --disable-utmpx disable use of utmpx even if detected [no]],
2081 [ AC_DEFINE(DISABLE_UTMPX) ]
2084 [ --disable-wtmp disable use of wtmp even if detected [no]],
2085 [ AC_DEFINE(DISABLE_WTMP) ]
2087 AC_ARG_ENABLE(wtmpx,
2088 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
2089 [ AC_DEFINE(DISABLE_WTMPX) ]
2091 AC_ARG_ENABLE(libutil,
2092 [ --disable-libutil disable use of libutil (login() etc.) [no]],
2093 [ AC_DEFINE(DISABLE_LOGIN) ]
2095 AC_ARG_ENABLE(pututline,
2096 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
2097 [ AC_DEFINE(DISABLE_PUTUTLINE) ]
2099 AC_ARG_ENABLE(pututxline,
2100 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
2101 [ AC_DEFINE(DISABLE_PUTUTXLINE) ]
2103 AC_ARG_WITH(lastlog,
2104 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
2106 if test "x$withval" = "xno" ; then
2107 AC_DEFINE(DISABLE_LASTLOG)
2109 conf_lastlog_location=$withval
2114 dnl lastlog, [uw]tmpx? detection
2115 dnl NOTE: set the paths in the platform section to avoid the
2116 dnl need for command-line parameters
2117 dnl lastlog and [uw]tmp are subject to a file search if all else fails
2119 dnl lastlog detection
2120 dnl NOTE: the code itself will detect if lastlog is a directory
2121 AC_MSG_CHECKING([if your system defines LASTLOG_FILE])
2123 #include <sys/types.h>
2125 #ifdef HAVE_LASTLOG_H
2126 # include <lastlog.h>
2135 [ char *lastlog = LASTLOG_FILE; ],
2136 [ AC_MSG_RESULT(yes) ],
2139 AC_MSG_CHECKING([if your system defines _PATH_LASTLOG])
2141 #include <sys/types.h>
2143 #ifdef HAVE_LASTLOG_H
2144 # include <lastlog.h>
2150 [ char *lastlog = _PATH_LASTLOG; ],
2151 [ AC_MSG_RESULT(yes) ],
2154 system_lastlog_path=no
2159 if test -z "$conf_lastlog_location"; then
2160 if test x"$system_lastlog_path" = x"no" ; then
2161 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
2162 if (test -d "$f" || test -f "$f") ; then
2163 conf_lastlog_location=$f
2166 if test -z "$conf_lastlog_location"; then
2167 AC_MSG_WARN([** Cannot find lastlog **])
2168 dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx
2173 if test -n "$conf_lastlog_location"; then
2174 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location")
2178 AC_MSG_CHECKING([if your system defines UTMP_FILE])
2180 #include <sys/types.h>
2186 [ char *utmp = UTMP_FILE; ],
2187 [ AC_MSG_RESULT(yes) ],
2189 system_utmp_path=no ]
2191 if test -z "$conf_utmp_location"; then
2192 if test x"$system_utmp_path" = x"no" ; then
2193 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
2194 if test -f $f ; then
2195 conf_utmp_location=$f
2198 if test -z "$conf_utmp_location"; then
2199 AC_DEFINE(DISABLE_UTMP)
2203 if test -n "$conf_utmp_location"; then
2204 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location")
2208 AC_MSG_CHECKING([if your system defines WTMP_FILE])
2210 #include <sys/types.h>
2216 [ char *wtmp = WTMP_FILE; ],
2217 [ AC_MSG_RESULT(yes) ],
2219 system_wtmp_path=no ]
2221 if test -z "$conf_wtmp_location"; then
2222 if test x"$system_wtmp_path" = x"no" ; then
2223 for f in /usr/adm/wtmp /var/log/wtmp; do
2224 if test -f $f ; then
2225 conf_wtmp_location=$f
2228 if test -z "$conf_wtmp_location"; then
2229 AC_DEFINE(DISABLE_WTMP)
2233 if test -n "$conf_wtmp_location"; then
2234 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location")
2238 dnl utmpx detection - I don't know any system so perverse as to require
2239 dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out
2241 AC_MSG_CHECKING([if your system defines UTMPX_FILE])
2243 #include <sys/types.h>
2252 [ char *utmpx = UTMPX_FILE; ],
2253 [ AC_MSG_RESULT(yes) ],
2255 system_utmpx_path=no ]
2257 if test -z "$conf_utmpx_location"; then
2258 if test x"$system_utmpx_path" = x"no" ; then
2259 AC_DEFINE(DISABLE_UTMPX)
2262 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location")
2266 AC_MSG_CHECKING([if your system defines WTMPX_FILE])
2268 #include <sys/types.h>
2277 [ char *wtmpx = WTMPX_FILE; ],
2278 [ AC_MSG_RESULT(yes) ],
2280 system_wtmpx_path=no ]
2282 if test -z "$conf_wtmpx_location"; then
2283 if test x"$system_wtmpx_path" = x"no" ; then
2284 AC_DEFINE(DISABLE_WTMPX)
2287 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location")
2291 # Change default command timeout for builtin PRNG
2293 AC_ARG_WITH(entropy-timeout,
2294 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)],
2296 if test "x$withval" != "xno" ; then
2297 entropy_timeout=$withval
2301 AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout)
2304 if test ! -z "$blibpath" ; then
2305 LDFLAGS="$LDFLAGS -blibpath:$blibpath"
2306 AC_MSG_WARN([Please check and edit -blibpath in LDFLAGS in Makefile])
2311 AC_CONFIG_FILES([Makefile openbsd-compat/Makefile scard/Makefile ssh_prng_cmds])
2314 # Print summary of options
2316 if test ! -z "$RANDOM_POOL" ; then
2317 RAND_MSG="Device ($RANDOM_POOL)"
2319 if test ! -z "$PRNGD_PORT" ; then
2320 RAND_MSG="PRNGD/EGD (port localhost:$PRNGD_PORT)"
2321 elif test ! -z "$PRNGD_SOCKET" ; then
2322 RAND_MSG="PRNGD/EGD (socket $PRNGD_SOCKET)"
2324 RAND_MSG="Builtin (timeout $entropy_timeout)"
2329 # Someone please show me a better way :)
2330 A=`eval echo ${prefix}` ; A=`eval echo ${A}`
2331 B=`eval echo ${bindir}` ; B=`eval echo ${B}`
2332 C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
2333 D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
2334 E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
2335 F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
2336 G=`eval echo ${piddir}` ; G=`eval echo ${G}`
2337 H=`eval echo ${user_path}` ; H=`eval echo ${H}`
2340 echo "OpenSSH has been configured with the following options:"
2341 echo " User binaries: $B"
2342 echo " System binaries: $C"
2343 echo " Configuration files: $D"
2344 echo " Askpass program: $E"
2345 echo " Manual pages: $F"
2346 echo " PID file: $G"
2347 echo " sshd default user PATH: $H"
2348 echo " Random number collection: $RAND_MSG"
2349 echo " Manpage format: $MANTYPE"
2350 echo " PAM support: ${PAM_MSG}"
2351 echo " KerberosIV support: $KRB4_MSG"
2352 echo " Smartcard support: $SCARD_MSG"
2353 echo " AFS support: $AFS_MSG"
2354 echo " S/KEY support: $SKEY_MSG"
2355 echo " TCP Wrappers support: $TCPW_MSG"
2356 echo " MD5 password support: $MD5_MSG"
2357 echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
2358 echo " Use IPv4 by default hack: $IPV4_HACK_MSG"
2359 echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
2361 if test ! -z "$bsd_auth"; then
2362 echo " BSD Auth support: yes"
2367 echo " Host: ${host}"
2368 echo " Compiler: ${CC}"
2369 echo " Compiler flags: ${CFLAGS}"
2370 echo "Preprocessor flags: ${CPPFLAGS}"
2371 echo " Linker flags: ${LDFLAGS}"
2372 echo " Libraries: ${LIBS}"
2376 if test "x$PAM_MSG" = "xyes" ; then
2377 echo "PAM is enabled. You may need to install a PAM control file for sshd,"
2378 echo "otherwise password authentication may fail. Example PAM control files"
2379 echo "can be found in the contrib/ subdirectory"
2383 if test ! -z "$BUILTIN_RNG" ; then
2384 echo "WARNING: you are using the builtin random number collection service."
2385 echo "Please read WARNING.RNG and request that your OS vendor includes"
2386 echo "/dev/random in future versions of their OS."
2390 if test ! -z "$NO_SFTP"; then
2391 echo "sftp-server will be disabled. Your compiler does not support"
2392 echo "64bit integers."