3 AC_CONFIG_HEADER(config.h)
11 AC_CHECK_PROG(AR, ar, ar)
12 AC_PATH_PROG(PERL, perl)
14 AC_PATH_PROG(ENT, ent)
16 AC_PATH_PROGS(FILEPRIV, filepriv, true, /sbin:/usr/sbin)
18 if test -z "$AR" ; then
19 AC_MSG_ERROR([*** 'ar' missing, please install or fix your \$PATH ***])
22 # Use LOGIN_PROGRAM from environment if possible
23 if test ! -z "$LOGIN_PROGRAM" ; then
24 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM")
27 AC_PATH_PROG(LOGIN_PROGRAM_FALLBACK, login)
28 if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
29 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM_FALLBACK")
33 if test -z "$LD" ; then
40 if test "$GCC" = "yes"; then
41 CFLAGS="$CFLAGS -Wall"
44 # Check for some target-specific stuff
48 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
49 LDFLAGS="$LDFLAGS -L/usr/local/lib"
50 if (test "$LD" != "gcc" && test -z "$blibpath"); then
51 blibpath="/usr/lib:/lib:/usr/local/lib"
53 AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)])
54 AC_DEFINE(BROKEN_GETADDRINFO)
57 dnl AIX handles lastlog as part of its login message
58 AC_DEFINE(DISABLE_LASTLOG)
63 LIBS="$LIBS -lregex /usr/lib/textmode.o"
64 AC_DEFINE(HAVE_CYGWIN)
65 AC_DEFINE(DISABLE_PAM)
66 AC_DEFINE(DISABLE_SHADOW)
67 AC_DEFINE(IPV4_DEFAULT)
68 AC_DEFINE(IP_TOS_IS_BROKEN)
69 AC_DEFINE(BROKEN_VHANGUP)
75 if test -z "$GCC"; then
78 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
81 AC_DEFINE(DISABLE_SHADOW)
82 AC_DEFINE(DISABLE_UTMP)
83 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
89 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
91 AC_DEFINE(PAM_SUN_CODEBASE)
93 AC_DEFINE(DISABLE_SHADOW)
94 AC_DEFINE(DISABLE_UTMP)
95 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
101 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
103 PATH="$PATH:/usr/etc"
107 AC_DEFINE(BROKEN_INET_NTOA)
110 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
112 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)])
120 AC_DEFINE(BROKEN_INET_NTOA)
125 AC_DEFINE(DONT_TRY_OTHER_AF)
126 AC_DEFINE(PAM_TTY_KLUDGE)
127 inet6_default_4in6=yes
129 mips-sony-bsd|mips-sony-newsos4)
130 AC_DEFINE(HAVE_NEWS4)
132 AC_CHECK_LIB(iberty, xatexit, AC_DEFINE(HAVE_XATEXIT),
133 AC_MSG_ERROR([*** libiberty missing - please install first ***])
140 conf_lastlog_location="/usr/adm/lastlog"
141 conf_utmp_location=/etc/utmp
142 conf_wtmp_location=/usr/adm/wtmp
145 AC_DEFINE(BROKEN_REALPATH)
147 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
151 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
152 LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib -L/usr/ucblib -R/usr/ucblib"
154 AC_DEFINE(PAM_SUN_CODEBASE)
155 # hardwire lastlog location (can't detect it on some versions)
156 conf_lastlog_location="/var/adm/lastlog"
157 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
158 sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'`
159 if test "$sol2ver" -ge 8; then
161 AC_DEFINE(DISABLE_UTMP)
162 AC_DEFINE(DISABLE_WTMP)
168 CPPFLAGS="$CPPFLAGS -DSUNOS4"
169 AC_CHECK_FUNCS(getpwanam)
170 AC_DEFINE(PAM_SUN_CODEBASE)
171 conf_utmp_location=/etc/utmp
172 conf_wtmp_location=/var/adm/wtmp
173 conf_lastlog_location=/var/adm/lastlog
179 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
180 LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/ucblib"
182 IPADDR_IN_DISPLAY=yes
184 AC_DEFINE(IP_TOS_IS_BROKEN)
186 LIBS="$LIBS -lgen -lnsl -lucb"
189 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
190 LDFLAGS="$LDFLAGS -L/usr/local/lib"
196 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
197 LDFLAGS="$LDFLAGS -L/usr/local/lib"
203 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
204 LDFLAGS="$LDFLAGS -L/usr/local/lib"
207 LIBS="$LIBS -lgen -lsocket"
211 CPPFLAGS="$CPPFLAGS -Dftruncate=chsize -I/usr/local/include"
212 LDFLAGS="$LDFLAGS -L/usr/local/lib"
215 LIBS="$LIBS -lgen -lsocket -los -lprot -lx -ltinfo -lm"
218 AC_DEFINE(BROKEN_SYS_TERMIO_H)
219 rsh_path="/usr/bin/rcmd"
220 AC_DEFINE(HAVE_SCO_PROTECTED_PW)
221 AC_DEFINE(DISABLE_SHADOW)
222 AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
225 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
226 LDFLAGS="$LDFLAGS -L/usr/local/lib"
229 LIBS="$LIBS -lprot -lx -ltinfo -lm"
231 rsh_path="/usr/bin/rcmd"
232 AC_DEFINE(HAVE_SCO_PROTECTED_PW)
233 AC_DEFINE(DISABLE_SHADOW)
234 AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
238 if test ! -z "USE_SIA" ; then
239 AC_MSG_CHECKING(for Digital Unix Security Integration Architecture)
240 if test -f /etc/sia/matrix.conf; then
242 AC_DEFINE(HAVE_OSF_SIA)
243 AC_DEFINE(DISABLE_LOGIN)
244 LIBS="$LIBS -lsecurity -ldb -lm -laud"
252 # Allow user to specify flags
254 [ --with-cflags Specify additional flags to pass to compiler],
256 if test "x$withval" != "xno" ; then
257 CFLAGS="$CFLAGS $withval"
261 AC_ARG_WITH(cppflags,
262 [ --with-cppflags Specify additional flags to pass to preprocessor] ,
264 if test "x$withval" != "xno"; then
265 CPPFLAGS="$CPPFLAGS $withval"
270 [ --with-ldflags Specify additional flags to pass to linker],
272 if test "x$withval" != "xno" ; then
273 LDFLAGS="$LDFLAGS $withval"
278 [ --with-libs Specify additional libraries to link with],
280 if test "x$withval" != "xno" ; then
281 LIBS="$LIBS $withval"
287 # Checks for libraries.
288 if test -z "$no_libsocket" ; then
289 AC_CHECK_LIB(nsl, yp_match, , )
291 if test -z "$no_libnsl" ; then
292 AC_CHECK_LIB(socket, main, , )
295 AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen")
296 AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***]))
297 AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil")
299 AC_CHECK_FUNC(regcomp,
302 AC_CHECK_LIB(pcre, pcre_info,
303 AC_DEFINE(HAVE_LIBPCRE) LIBS="$LIBS -lpcreposix -lpcre")
308 AC_CHECK_FUNC(strcasecmp,
309 [], [ AC_CHECK_LIB(resolv, strcasecmp, LIBS="$LIBS -lresolv") ]
311 AC_CHECK_FUNC(utimes,
312 [], [ AC_CHECK_LIB(c89, utimes, LIBS="$LIBS -lc89") ]
315 # Checks for header files.
316 AC_CHECK_HEADERS(bstring.h endian.h floatingpoint.h getopt.h lastlog.h limits.h login.h login_cap.h maillock.h netdb.h netgroup.h netinet/in_systm.h paths.h poll.h pty.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/queue.h sys/select.h sys/stat.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h sys/un.h stddef.h time.h ttyent.h usersec.h util.h utime.h utmp.h utmpx.h vis.h)
318 dnl Checks for library functions.
319 AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_af clock fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getnameinfo getrlimit getrusage getttyent inet_aton inet_ntoa innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty realpath rresvport_af setdtablesize setenv seteuid setlogin setproctitle setreuid setrlimit setsid sigaction sigvec snprintf strerror strlcat strlcpy strsep strtok_r sysconf utimes vsnprintf vhangup vis waitpid _getpty __b64_ntop)
320 dnl Checks for time functions
321 AC_CHECK_FUNCS(gettimeofday time)
322 dnl Checks for libutil functions
323 AC_CHECK_HEADERS(libutil.h)
324 AC_CHECK_FUNCS(login logout updwtmp logwtmp)
325 dnl Checks for utmp functions
326 AC_CHECK_FUNCS(endutent getutent getutid getutline pututline setutent)
327 AC_CHECK_FUNCS(utmpname)
328 dnl Checks for utmpx functions
329 AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline pututxline )
330 AC_CHECK_FUNCS(setutxent utmpxname)
332 AC_CHECK_FUNC(getuserattr,
333 [AC_DEFINE(HAVE_GETUSERATTR)],
334 [AC_CHECK_LIB(s, getuserattr, [LIBS="$LIBS -ls"; AC_DEFINE(HAVE_GETUSERATTR)])]
338 [AC_DEFINE(HAVE_LOGIN)],
339 [AC_CHECK_LIB(bsd, login, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_LOGIN)])]
342 AC_CHECK_FUNC(daemon,
343 [AC_DEFINE(HAVE_DAEMON)],
344 [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
347 AC_CHECK_FUNC(getpagesize,
348 [AC_DEFINE(HAVE_GETPAGESIZE)],
349 [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])]
352 # Check for broken snprintf
353 if test "x$ac_cv_func_snprintf" = "xyes" ; then
354 AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
358 int main(void){char b[5];snprintf(b,5,"123456789");return(b[4]!='\0');}
360 [AC_MSG_RESULT(yes)],
363 AC_DEFINE(BROKEN_SNPRINTF)
364 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
373 [ --without-pam Disable PAM support ],
375 if test "x$withval" = "xno" ; then
377 AC_DEFINE(DISABLE_PAM)
382 if (test -z "$no_pam" && test "x$ac_cv_header_security_pam_appl_h" = "xyes") ; then
383 AC_CHECK_LIB(dl, dlopen, , )
386 AC_CHECK_FUNCS(pam_getenvlist)
392 # Check PAM strerror arguments (old PAM)
393 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
397 #include <security/pam_appl.h>
399 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
402 AC_DEFINE(HAVE_OLD_PAM)
404 PAM_MSG="yes (old library)"
409 # The big search for OpenSSL
411 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
413 if test "x$withval" != "xno" ; then
420 saved_LDFLAGS="$LDFLAGS"
421 saved_CPPFLAGS="$CPPFLAGS"
422 if test "x$prefix" != "xNONE" ; then
423 tryssldir="$tryssldir $prefix"
425 AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [
427 for ssldir in $tryssldir "" /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
428 if test ! -z "$ssldir" ; then
429 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
430 CPPFLAGS="$saved_CPPFLAGS -I$ssldir/include"
431 if test ! -z "$need_dash_r" ; then
432 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
435 LDFLAGS="$saved_LDFLAGS"
438 LIBS="$saved_LIBS -lcrypto"
440 # Basic test to check for compatible version and correct linking
441 # *does not* test for RSA - that comes later.
445 #include <openssl/rand.h>
449 memset(a, 0, sizeof(a));
450 RAND_add(a, sizeof(a), sizeof(a));
451 return(RAND_status() <= 0);
460 if test ! -z "$found_crypto" ; then
465 if test -z "$found_crypto" ; then
466 AC_MSG_ERROR([Could not find working SSLeay / OpenSSL libraries, please install])
468 if test -z "$ssldir" ; then
472 ac_cv_openssldir=$ssldir
475 if (test ! -z "$ac_cv_openssldir" && test "x$ac_cv_openssldir" != "x(system)") ; then
476 AC_DEFINE(HAVE_OPENSSL)
477 dnl Need to recover ssldir - test above runs in subshell
478 ssldir=$ac_cv_openssldir
479 CPPFLAGS="$saved_CPPFLAGS -I$ssldir/include"
480 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
481 if test ! -z "$need_dash_r" ; then
482 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
484 if test ! -z "$blibpath" ; then
485 blibpath="$blibpath:$ssldir:$ssldir/lib"
488 LIBS="$saved_LIBS -lcrypto"
490 # Now test RSA support
492 AC_MSG_CHECKING([for RSA support])
493 for WANTS_RSAREF in "" 1 ; do
494 if test -z "$WANTS_RSAREF" ; then
497 LIBS="$saved_LIBS -lRSAglue -lrsaref"
501 #include <openssl/rand.h>
502 #include <openssl/rsa.h>
503 #include <openssl/bn.h>
504 #include <openssl/sha.h>
507 int num; RSA *key; static unsigned char p_in[] = "blahblah";
508 unsigned char c[256], p[256];
509 memset(c, 0, sizeof(c)); RAND_add(c, sizeof(c), sizeof(c));
510 if ((key=RSA_generate_key(512, 3, NULL, NULL))==NULL) return(1);
511 num = RSA_public_encrypt(sizeof(p_in) - 1, p_in, c, key, RSA_PKCS1_PADDING);
512 return(-1 == RSA_private_decrypt(num, c, p, key, RSA_PKCS1_PADDING));
521 if test ! -z "$no_rsa" ; then
522 AC_MSG_RESULT(disabled)
525 if test -z "$rsa_works" ; then
526 AC_MSG_WARN([*** No RSA support found *** ])
529 if test -z "$WANTS_RSAREF" ; then
533 RSA_MSG="yes (using RSAref)"
534 AC_MSG_RESULT(using RSAref)
535 LIBS="$saved_LIBS -lcrypto -lRSAglue -lrsaref"
540 # Cheap hack to ensure NEWS-OS libraries are arranged right.
541 if test ! -z "$SONY" ; then
542 LIBS="$LIBS -liberty";
545 # Checks for data types
546 AC_CHECK_SIZEOF(char, 1)
547 AC_CHECK_SIZEOF(short int, 2)
548 AC_CHECK_SIZEOF(int, 4)
549 AC_CHECK_SIZEOF(long int, 4)
550 AC_CHECK_SIZEOF(long long int, 8)
552 # More checks for data types
553 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
555 [ #include <sys/types.h> ],
557 [ ac_cv_have_u_int="yes" ],
558 [ ac_cv_have_u_int="no" ]
561 if test "x$ac_cv_have_u_int" = "xyes" ; then
562 AC_DEFINE(HAVE_U_INT)
566 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
568 [ #include <sys/types.h> ],
569 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
570 [ ac_cv_have_intxx_t="yes" ],
571 [ ac_cv_have_intxx_t="no" ]
574 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
575 AC_DEFINE(HAVE_INTXX_T)
579 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
581 [ #include <sys/types.h> ],
582 [ int64_t a; a = 1;],
583 [ ac_cv_have_int64_t="yes" ],
584 [ ac_cv_have_int64_t="no" ]
587 if test "x$ac_cv_have_int64_t" = "xyes" ; then
588 AC_DEFINE(HAVE_INT64_T)
592 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
594 [ #include <sys/types.h> ],
595 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
596 [ ac_cv_have_u_intxx_t="yes" ],
597 [ ac_cv_have_u_intxx_t="no" ]
600 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
601 AC_DEFINE(HAVE_U_INTXX_T)
605 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
607 [ #include <sys/types.h> ],
608 [ u_int64_t a; a = 1;],
609 [ ac_cv_have_u_int64_t="yes" ],
610 [ ac_cv_have_u_int64_t="no" ]
613 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
614 AC_DEFINE(HAVE_U_INT64_T)
618 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
619 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
621 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
624 #include <sys/bitypes.h>
627 int8_t a; int16_t b; int32_t c;
628 u_int8_t e; u_int16_t f; u_int32_t g;
629 a = b = c = e = f = g = 1;
632 AC_DEFINE(HAVE_U_INTXX_T)
633 AC_DEFINE(HAVE_INTXX_T)
640 if test -z "$have_u_intxx_t" ; then
641 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
644 #include <sys/types.h>
646 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
647 [ ac_cv_have_uintxx_t="yes" ],
648 [ ac_cv_have_uintxx_t="no" ]
651 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
652 AC_DEFINE(HAVE_UINTXX_T)
656 AC_CACHE_CHECK([for socklen_t], ac_cv_have_socklen_t, [
659 #include <sys/types.h>
660 #include <sys/socket.h>
662 [socklen_t foo; foo = 1235;],
663 [ ac_cv_have_socklen_t="yes" ],
664 [ ac_cv_have_socklen_t="no" ]
667 if test "x$ac_cv_have_socklen_t" = "xyes" ; then
668 AC_DEFINE(HAVE_SOCKLEN_T)
671 AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
674 #include <sys/types.h>
676 [ size_t foo; foo = 1235; ],
677 [ ac_cv_have_size_t="yes" ],
678 [ ac_cv_have_size_t="no" ]
681 if test "x$ac_cv_have_size_t" = "xyes" ; then
682 AC_DEFINE(HAVE_SIZE_T)
685 AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
688 #include <sys/types.h>
690 [ ssize_t foo; foo = 1235; ],
691 [ ac_cv_have_ssize_t="yes" ],
692 [ ac_cv_have_ssize_t="no" ]
695 if test "x$ac_cv_have_ssize_t" = "xyes" ; then
696 AC_DEFINE(HAVE_SSIZE_T)
699 AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [
704 [ clock_t foo; foo = 1235; ],
705 [ ac_cv_have_clock_t="yes" ],
706 [ ac_cv_have_clock_t="no" ]
709 if test "x$ac_cv_have_clock_t" = "xyes" ; then
710 AC_DEFINE(HAVE_CLOCK_T)
713 AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
716 #include <sys/types.h>
717 #include <sys/socket.h>
719 [ sa_family_t foo; foo = 1235; ],
720 [ ac_cv_have_sa_family_t="yes" ],
723 #include <sys/types.h>
724 #include <sys/socket.h>
725 #include <netinet/in.h>
727 [ sa_family_t foo; foo = 1235; ],
728 [ ac_cv_have_sa_family_t="yes" ],
730 [ ac_cv_have_sa_family_t="no" ]
734 if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
735 AC_DEFINE(HAVE_SA_FAMILY_T)
738 AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
741 #include <sys/types.h>
743 [ pid_t foo; foo = 1235; ],
744 [ ac_cv_have_pid_t="yes" ],
745 [ ac_cv_have_pid_t="no" ]
748 if test "x$ac_cv_have_pid_t" = "xyes" ; then
749 AC_DEFINE(HAVE_PID_T)
752 AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
755 #include <sys/types.h>
757 [ mode_t foo; foo = 1235; ],
758 [ ac_cv_have_mode_t="yes" ],
759 [ ac_cv_have_mode_t="no" ]
762 if test "x$ac_cv_have_mode_t" = "xyes" ; then
763 AC_DEFINE(HAVE_MODE_T)
767 AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
770 #include <sys/types.h>
771 #include <sys/socket.h>
773 [ struct sockaddr_storage s; ],
774 [ ac_cv_have_struct_sockaddr_storage="yes" ],
775 [ ac_cv_have_struct_sockaddr_storage="no" ]
778 if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
779 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)
782 AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
785 #include <sys/types.h>
786 #include <netinet/in.h>
788 [ struct sockaddr_in6 s; s.sin6_family = 0; ],
789 [ ac_cv_have_struct_sockaddr_in6="yes" ],
790 [ ac_cv_have_struct_sockaddr_in6="no" ]
793 if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
794 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)
797 AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
800 #include <sys/types.h>
801 #include <netinet/in.h>
803 [ struct in6_addr s; s.s6_addr[0] = 0; ],
804 [ ac_cv_have_struct_in6_addr="yes" ],
805 [ ac_cv_have_struct_in6_addr="no" ]
808 if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
809 AC_DEFINE(HAVE_STRUCT_IN6_ADDR)
812 AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
815 #include <sys/types.h>
816 #include <sys/socket.h>
819 [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ],
820 [ ac_cv_have_struct_addrinfo="yes" ],
821 [ ac_cv_have_struct_addrinfo="no" ]
824 if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
825 AC_DEFINE(HAVE_STRUCT_ADDRINFO)
828 AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [
830 [ #include <sys/time.h> ],
831 [ struct timeval tv; tv.tv_sec = 1;],
832 [ ac_cv_have_struct_timeval="yes" ],
833 [ ac_cv_have_struct_timeval="no" ]
836 if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
837 AC_DEFINE(HAVE_STRUCT_TIMEVAL)
838 have_struct_timeval=1
841 # If we don't have int64_t then we can't compile sftp-server. So don't
842 # even attempt to do it.
843 if test "x$ac_cv_have_int64_t" = "xno" -a \
844 "x$ac_cv_sizeof_long_int" != "x8" -a \
845 "x$ac_cv_sizeof_long_long_int" = "x0" ; then
850 dnl Checks for structure members
851 OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
852 OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX)
853 OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX)
854 OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP)
855 OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP)
856 OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX)
857 OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP)
858 OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP)
859 OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmpx.h, HAVE_ID_IN_UTMPX)
860 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP)
861 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX)
862 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP)
863 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX)
864 OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP)
865 OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP)
866 OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX)
867 OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX)
870 AC_CACHE_CHECK([for sun_len field in struct sockaddr_un],
871 ac_cv_have_sun_len_in_struct_sockaddr_un, [
874 #include <sys/types.h>
875 #include <sys/socket.h>
877 [ struct sockaddr_un s; s.sun_len = 1; ],
878 [ ac_cv_have_sun_len_in_struct_sockaddr_un="yes" ],
879 [ ac_cv_have_sun_len_in_struct_sockaddr_un="no" ],
882 if test "x$ac_cv_have_sun_len_in_struct_sockaddr_un" = "xyes" ; then
883 AC_DEFINE(HAVE_SUN_LEN_IN_SOCKADDR_UN)
886 AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
887 ac_cv_have_ss_family_in_struct_ss, [
890 #include <sys/types.h>
891 #include <sys/socket.h>
893 [ struct sockaddr_storage s; s.ss_family = 1; ],
894 [ ac_cv_have_ss_family_in_struct_ss="yes" ],
895 [ ac_cv_have_ss_family_in_struct_ss="no" ],
898 if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
899 AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
902 AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
903 ac_cv_have___ss_family_in_struct_ss, [
906 #include <sys/types.h>
907 #include <sys/socket.h>
909 [ struct sockaddr_storage s; s.__ss_family = 1; ],
910 [ ac_cv_have___ss_family_in_struct_ss="yes" ],
911 [ ac_cv_have___ss_family_in_struct_ss="no" ]
914 if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
915 AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
918 AC_CACHE_CHECK([for pw_class field in struct passwd],
919 ac_cv_have_pw_class_in_struct_passwd, [
924 [ struct passwd p; p.pw_class = 0; ],
925 [ ac_cv_have_pw_class_in_struct_passwd="yes" ],
926 [ ac_cv_have_pw_class_in_struct_passwd="no" ]
929 if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
930 AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD)
934 AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
936 [ extern char *__progname; printf("%s", __progname); ],
937 [ ac_cv_libc_defines___progname="yes" ],
938 [ ac_cv_libc_defines___progname="no" ]
941 if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
942 AC_DEFINE(HAVE___PROGNAME)
946 AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
948 [ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);],
949 [ ac_cv_libc_defines_sys_errlist="yes" ],
950 [ ac_cv_libc_defines_sys_errlist="no" ]
953 if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
954 AC_DEFINE(HAVE_SYS_ERRLIST)
958 AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [
960 [ extern int sys_nerr; printf("%i", sys_nerr);],
961 [ ac_cv_libc_defines_sys_nerr="yes" ],
962 [ ac_cv_libc_defines_sys_nerr="no" ]
965 if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
966 AC_DEFINE(HAVE_SYS_NERR)
970 # Looking for programs, paths and files
972 [ --with-rsh=PATH Specify path to remote shell program ],
974 if test "x$withval" != "$no" ; then
979 AC_PATH_PROG(rsh_path, rsh)
984 [ --with-xauth=PATH Specify path to xauth program ],
986 if test "x$withval" != "xno" ; then
991 AC_PATH_PROG(xauth_path, xauth,,$PATH:/usr/X/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/openwin/bin)
992 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
993 xauth_path="/usr/openwin/bin/xauth"
998 if test -z "$xauth_path" ; then
999 XAUTH_PATH="undefined"
1000 AC_SUBST(XAUTH_PATH)
1002 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
1003 XAUTH_PATH=$xauth_path
1004 AC_SUBST(XAUTH_PATH)
1006 if test ! -z "$rsh_path" ; then
1007 AC_DEFINE_UNQUOTED(RSH_PATH, "$rsh_path")
1010 # Check for mail directory (last resort if we cannot get it from headers)
1011 if test ! -z "$MAIL" ; then
1012 maildir=`dirname $MAIL`
1013 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
1016 if test -z "$no_dev_ptmx" ; then
1017 AC_CHECK_FILE("/dev/ptmx",
1019 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
1024 AC_CHECK_FILE("/dev/ptc",
1026 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
1031 # Options from here on. Some of these are preset by platform above
1033 # Check for user-specified random device, otherwise check /dev/urandom
1035 [ --with-random=FILE read randomness from FILE (default=/dev/urandom)],
1037 if test "x$withval" != "xno" ; then
1038 RANDOM_POOL="$withval";
1039 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
1043 # Check for random device
1044 AC_CHECK_FILE("/dev/urandom",
1046 RANDOM_POOL="/dev/urandom";
1047 AC_SUBST(RANDOM_POOL)
1048 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
1054 # Check for EGD pool file
1055 AC_ARG_WITH(egd-pool,
1056 [ --with-egd-pool=FILE read randomness from EGD pool FILE (default none)],
1058 if test "x$withval" != "xno" ; then
1059 EGD_SOCKET="$withval";
1060 AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET")
1065 # detect pathnames for entropy gathering commands, if we need them
1066 INSTALL_SSH_PRNG_CMDS=""
1068 if (test -z "$RANDOM_POOL" && test -z "$EGD_SOCKET") ; then
1069 # Use these commands to collect entropy
1070 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
1071 OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
1072 OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
1073 OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
1074 OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
1075 OSSH_PATH_ENTROPY_PROG(PROG_W, w)
1076 OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
1077 OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
1078 OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
1079 OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
1080 OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
1081 OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
1082 OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
1083 OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
1084 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
1086 INSTALL_SSH_PRNG_CMDS="yes"
1088 AC_SUBST(INSTALL_SSH_PRNG_CMDS)
1092 [ --with-catman=man|cat Install preformatted manpages[no]],
1095 if test x"$withval" != x"yes" ; then
1101 if test -z "$MANTYPE" ; then
1102 MANTYPE='$(TROFFMAN)'
1110 # Check whether user wants Kerberos support
1112 AC_ARG_WITH(kerberos4,
1113 [ --with-kerberos4=PATH Enable Kerberos 4 support],
1115 if test "x$withval" != "xno" ; then
1117 if test "x$withval" != "xyes" ; then
1118 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1119 LDFLAGS="$LDFLAGS -L${withval}/lib"
1120 if test ! -z "$need_dash_r" ; then
1121 LDFLAGS="$LDFLAGS -R${withval}/lib"
1123 if test ! -z "$blibpath" ; then
1124 blibpath="$blibpath:${withval}/lib"
1127 if test -d /usr/include/kerberosIV ; then
1128 CPPFLAGS="$CPPFLAGS -I/usr/include/kerberosIV"
1132 AC_CHECK_HEADERS(krb.h)
1133 AC_CHECK_LIB(krb, main)
1134 if test "$ac_cv_header_krb_h" != yes; then
1135 AC_MSG_WARN([Cannot find krb.h, build may fail])
1137 if test "$ac_cv_lib_krb_main" != yes; then
1138 AC_MSG_WARN([Cannot find libkrb, build may fail])
1142 AC_CHECK_LIB(resolv, dn_expand, , )
1150 # Check whether user wants AFS support
1153 [ --with-afs=PATH Enable AFS support],
1155 if test "x$withval" != "xno" ; then
1157 if test "x$withval" != "xyes" ; then
1158 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1159 LDFLAGS="$LDFLAGS -L${withval}/lib"
1162 if test -z "$KRB4" ; then
1163 AC_MSG_WARN([AFS requires Kerberos IV support, build may fail])
1167 if test ! -z "$AFS_LIBS" ; then
1168 LIBS="$LIBS $AFS_LIBS"
1177 # Check whether user wants S/Key support
1180 [ --with-skey=PATH Enable S/Key support],
1182 if test "x$withval" != "xno" ; then
1184 if test "x$withval" != "xyes" ; then
1185 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1186 LDFLAGS="$LDFLAGS -L${withval}/lib"
1193 AC_CHECK_FUNC(skey_keyinfo,
1196 AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
1202 # Check whether user wants TCP wrappers support
1204 AC_ARG_WITH(tcp-wrappers,
1205 [ --with-tcp-wrappers Enable tcpwrappers support],
1207 if test "x$withval" != "xno" ; then
1210 AC_MSG_CHECKING(for libwrap)
1214 int deny_severity = 0, allow_severity = 0;
1223 AC_MSG_ERROR([*** libwrap missing])
1230 # Check whether to enable MD5 passwords
1232 AC_ARG_WITH(md5-passwords,
1233 [ --with-md5-passwords Enable use of MD5 passwords],
1235 if test "x$withval" != "xno" ; then
1236 AC_DEFINE(HAVE_MD5_PASSWORDS)
1242 # Whether to disable shadow password support
1244 [ --without-shadow Disable shadow password support],
1246 if test "x$withval" = "xno" ; then
1247 AC_DEFINE(DISABLE_SHADOW)
1253 if test -z "$disable_shadow" ; then
1254 AC_MSG_CHECKING([if the systems has expire shadow information])
1257 #include <sys/types.h>
1260 ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ],
1261 [ sp_expire_available=yes ], []
1264 if test "x$sp_expire_available" = "xyes" ; then
1266 AC_DEFINE(HAS_SHADOW_EXPIRE)
1272 # Use ip address instead of hostname in $DISPLAY
1273 if test ! -z "$IPADDR_IN_DISPLAY" ; then
1274 DISPLAY_HACK_MSG="yes"
1275 AC_DEFINE(IPADDR_IN_DISPLAY)
1277 DISPLAY_HACK_MSG="no"
1278 AC_ARG_WITH(ipaddr-display,
1279 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
1281 if test "x$withval" != "xno" ; then
1282 AC_DEFINE(IPADDR_IN_DISPLAY)
1283 DISPLAY_HACK_MSG="yes"
1289 # Whether to mess with the default path
1290 SERVER_PATH_MSG="(default)"
1291 AC_ARG_WITH(default-path,
1292 [ --with-default-path=PATH Specify default \$PATH environment for server],
1294 if test "x$withval" != "xno" ; then
1295 AC_DEFINE_UNQUOTED(USER_PATH, "$withval")
1296 SERVER_PATH_MSG="$withval"
1301 # Whether to force IPv4 by default (needed on broken glibc Linux)
1303 AC_ARG_WITH(ipv4-default,
1304 [ --with-ipv4-default Use IPv4 by connections unless '-6' specified],
1306 if test "x$withval" != "xno" ; then
1307 AC_DEFINE(IPV4_DEFAULT)
1313 AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
1314 IPV4_IN6_HACK_MSG="no"
1316 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
1318 if test "x$withval" != "xno" ; then
1320 AC_DEFINE(IPV4_IN_IPV6)
1321 IPV4_IN6_HACK_MSG="yes"
1326 if test "x$inet6_default_4in6" = "xyes"; then
1327 AC_MSG_RESULT([yes (default)])
1328 AC_DEFINE(IPV4_IN_IPV6)
1329 IPV4_IN6_HACK_MSG="yes"
1331 AC_MSG_RESULT([no (default)])
1336 AC_MSG_CHECKING(whether to install ssh as suid root)
1337 AC_ARG_ENABLE(suid-ssh,
1338 [ --enable-suid-ssh Install ssh as suid root (default)
1339 --disable-suid-ssh Install ssh without suid bit],
1340 [ case "$enableval" in
1345 *) AC_MSG_RESULT(yes)
1355 # Where to place sshd.pid
1357 AC_ARG_WITH(pid-dir,
1358 [ --with-pid-dir=PATH Specify location of ssh.pid file],
1360 if test "x$withval" != "xno" ; then
1366 # make sure the directory exists
1367 if test ! -d $piddir ; then
1368 piddir=`eval echo ${sysconfdir}`
1370 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
1374 AC_DEFINE_UNQUOTED(PIDDIR, "$piddir")
1377 dnl allow user to disable some login recording features
1378 AC_ARG_ENABLE(lastlog,
1379 [ --disable-lastlog disable use of lastlog even if detected [no]],
1380 [ AC_DEFINE(DISABLE_LASTLOG) ]
1383 [ --disable-utmp disable use of utmp even if detected [no]],
1384 [ AC_DEFINE(DISABLE_UTMP) ]
1386 AC_ARG_ENABLE(utmpx,
1387 [ --disable-utmpx disable use of utmpx even if detected [no]],
1388 [ AC_DEFINE(DISABLE_UTMPX) ]
1391 [ --disable-wtmp disable use of wtmp even if detected [no]],
1392 [ AC_DEFINE(DISABLE_WTMP) ]
1394 AC_ARG_ENABLE(wtmpx,
1395 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
1396 [ AC_DEFINE(DISABLE_WTMPX) ]
1398 AC_ARG_ENABLE(libutil,
1399 [ --disable-libutil disable use of libutil (login() etc.) [no]],
1400 [ AC_DEFINE(DISABLE_LOGIN) ]
1402 AC_ARG_ENABLE(pututline,
1403 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
1404 [ AC_DEFINE(DISABLE_PUTUTLINE) ]
1406 AC_ARG_ENABLE(pututxline,
1407 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
1408 [ AC_DEFINE(DISABLE_PUTUTXLINE) ]
1410 AC_ARG_WITH(lastlog,
1411 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
1412 [ conf_lastlog_location="$withval"; ],)
1414 dnl lastlog, [uw]tmpx? detection
1415 dnl NOTE: set the paths in the platform section to avoid the
1416 dnl need for command-line parameters
1417 dnl lastlog and [uw]tmp are subject to a file search if all else fails
1419 dnl lastlog detection
1420 dnl NOTE: the code itself will detect if lastlog is a directory
1421 AC_MSG_CHECKING([if your system defines LASTLOG_FILE])
1423 #include <sys/types.h>
1425 #ifdef HAVE_LASTLOG_H
1426 # include <lastlog.h>
1432 [ char *lastlog = LASTLOG_FILE; ],
1433 [ AC_MSG_RESULT(yes) ],
1436 AC_MSG_CHECKING([if your system defines _PATH_LASTLOG])
1438 #include <sys/types.h>
1440 #ifdef HAVE_LASTLOG_H
1441 # include <lastlog.h>
1447 [ char *lastlog = _PATH_LASTLOG; ],
1448 [ AC_MSG_RESULT(yes) ],
1451 system_lastlog_path=no
1456 if test -z "$conf_lastlog_location"; then
1457 if test x"$system_lastlog_path" = x"no" ; then
1458 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
1459 if (test -d "$f" || test -f "$f") ; then
1460 conf_lastlog_location=$f
1463 if test -z "$conf_lastlog_location"; then
1464 AC_MSG_WARN([** Cannot find lastlog **])
1465 dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx
1470 if test -n "$conf_lastlog_location"; then
1471 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location")
1475 AC_MSG_CHECKING([if your system defines UTMP_FILE])
1477 #include <sys/types.h>
1483 [ char *utmp = UTMP_FILE; ],
1484 [ AC_MSG_RESULT(yes) ],
1486 system_utmp_path=no ]
1488 if test -z "$conf_utmp_location"; then
1489 if test x"$system_utmp_path" = x"no" ; then
1490 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
1491 if test -f $f ; then
1492 conf_utmp_location=$f
1495 if test -z "$conf_utmp_location"; then
1496 AC_DEFINE(DISABLE_UTMP)
1500 if test -n "$conf_utmp_location"; then
1501 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location")
1505 AC_MSG_CHECKING([if your system defines WTMP_FILE])
1507 #include <sys/types.h>
1513 [ char *wtmp = WTMP_FILE; ],
1514 [ AC_MSG_RESULT(yes) ],
1516 system_wtmp_path=no ]
1518 if test -z "$conf_wtmp_location"; then
1519 if test x"$system_wtmp_path" = x"no" ; then
1520 for f in /usr/adm/wtmp /var/log/wtmp; do
1521 if test -f $f ; then
1522 conf_wtmp_location=$f
1525 if test -z "$conf_wtmp_location"; then
1526 AC_DEFINE(DISABLE_WTMP)
1530 if test -n "$conf_wtmp_location"; then
1531 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location")
1535 dnl utmpx detection - I don't know any system so perverse as to require
1536 dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out
1538 AC_MSG_CHECKING([if your system defines UTMPX_FILE])
1540 #include <sys/types.h>
1549 [ char *utmpx = UTMPX_FILE; ],
1550 [ AC_MSG_RESULT(yes) ],
1552 system_utmpx_path=no ]
1554 if test -z "$conf_utmpx_location"; then
1555 if test x"$system_utmpx_path" = x"no" ; then
1556 AC_DEFINE(DISABLE_UTMPX)
1559 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location")
1563 AC_MSG_CHECKING([if your system defines WTMPX_FILE])
1565 #include <sys/types.h>
1574 [ char *wtmpx = WTMPX_FILE; ],
1575 [ AC_MSG_RESULT(yes) ],
1577 system_wtmpx_path=no ]
1579 if test -z "$conf_wtmpx_location"; then
1580 if test x"$system_wtmpx_path" = x"no" ; then
1581 AC_DEFINE(DISABLE_WTMPX)
1584 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location")
1588 # Change default command timeout for builtin PRNG
1590 AC_ARG_WITH(entropy-timeout,
1591 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)],
1593 if test "x$withval" != "xno" ; then
1594 entropy_timeout=$withval
1598 AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout)
1601 if test ! -z "$blibpath" ; then
1602 LDFLAGS="$LDFLAGS -blibpath:$blibpath"
1603 AC_MSG_WARN([Please check and edit -blibpath in LDFLAGS in Makefile])
1608 AC_OUTPUT(Makefile ssh_prng_cmds)
1610 # Print summary of options
1612 if test x$MANTYPE = x'$(CATMAN)' ; then
1617 if test ! -z "$RANDOM_POOL" ; then
1618 RAND_MSG="Device ($RANDOM_POOL)"
1620 if test ! -z "$EGD_SOCKET" ; then
1621 RAND_MSG="EGD ($EGD_SOCKET)"
1623 RAND_MSG="Builtin (timeout $entropy_timeout)"
1628 # Someone please show me a better way :)
1629 A=`eval echo ${prefix}` ; A=`eval echo ${A}`
1630 B=`eval echo ${bindir}` ; B=`eval echo ${B}`
1631 C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
1632 D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
1633 E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
1634 F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
1635 G=`eval echo ${piddir}` ; G=`eval echo ${G}`
1638 echo "OpenSSH configured has been configured with the following options."
1639 echo " User binaries: $B"
1640 echo " User binaries: $B"
1641 echo " System binaries: $C"
1642 echo " Configuration files: $D"
1643 echo " Askpass program: $E"
1644 echo " Manual pages: $F"
1645 echo " PID file: $G"
1646 echo " Random number collection: $RAND_MSG"
1647 echo " Manpage format: $MAN_MSG"
1648 echo " PAM support: ${PAM_MSG}"
1649 echo " KerberosIV support: $KRB4_MSG"
1650 echo " AFS support: $AFS_MSG"
1651 echo " S/KEY support: $SKEY_MSG"
1652 echo " TCP Wrappers support: $TCPW_MSG"
1653 echo " MD5 password support: $MD5_MSG"
1654 echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
1655 echo " Use IPv4 by default hack: $IPV4_HACK_MSG"
1656 echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
1660 echo " Host: ${host}"
1661 echo " Compiler: ${CC}"
1662 echo " Compiler flags: ${CFLAGS}"
1663 echo "Preprocessor flags: ${CPPFLAGS}"
1664 echo " Linker flags: ${LDFLAGS}"
1665 echo " Libraries: ${LIBS}"
1669 if test "x$PAM_MSG" = "xyes" ; then
1670 echo "PAM is enabled. You may need to install a PAM control file for sshd,"
1671 echo "otherwise password authentication may fail. Example PAM control files"
1672 echo "can be found in the contrib/ subdirectory"
1676 if test ! -z "$BUILTIN_RNG" ; then
1677 echo "WARNING: you are using the builtin random number collection service."
1678 echo "Please read WARNING.RNG and request that your OS vendor includes"
1679 echo "/dev/random in future versions of their OS."
1683 if test ! -z "$NO_SFTP"; then
1684 echo "sftp-server will be disabled. Your compiler does not support"
1685 echo "64bit integers."