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_SHADOW)
66 AC_DEFINE(IPV4_DEFAULT)
67 AC_DEFINE(IP_TOS_IS_BROKEN)
68 AC_DEFINE(BROKEN_VHANGUP)
73 if test -z "$GCC"; then
76 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
79 AC_DEFINE(DISABLE_SHADOW)
80 AC_DEFINE(DISABLE_UTMP)
81 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
87 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
89 AC_DEFINE(PAM_SUN_CODEBASE)
91 AC_DEFINE(DISABLE_SHADOW)
92 AC_DEFINE(DISABLE_UTMP)
93 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
99 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
101 PATH="$PATH:/usr/etc"
105 AC_DEFINE(BROKEN_INET_NTOA)
108 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
110 PATH="$PATH:/usr/etc"
112 AC_DEFINE(WITH_IRIX_ARRAY)
113 AC_DEFINE(WITH_IRIX_PROJECT)
114 AC_DEFINE(WITH_IRIX_AUDIT)
115 AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)])
118 AC_DEFINE(BROKEN_INET_NTOA)
123 check_for_libcrypt_later=1
124 AC_DEFINE(DONT_TRY_OTHER_AF)
125 AC_DEFINE(PAM_TTY_KLUDGE)
126 inet6_default_4in6=yes
128 mips-sony-bsd|mips-sony-newsos4)
129 AC_DEFINE(HAVE_NEWS4)
131 AC_CHECK_LIB(iberty, xatexit, AC_DEFINE(HAVE_XATEXIT),
132 AC_MSG_ERROR([*** libiberty missing - please install first ***])
139 conf_lastlog_location="/usr/adm/lastlog"
140 conf_utmp_location=/etc/utmp
141 conf_wtmp_location=/usr/adm/wtmp
144 AC_DEFINE(BROKEN_REALPATH)
146 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
150 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
151 LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib -L/usr/ucblib -R/usr/ucblib"
153 AC_DEFINE(PAM_SUN_CODEBASE)
154 # hardwire lastlog location (can't detect it on some versions)
155 conf_lastlog_location="/var/adm/lastlog"
156 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
157 sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'`
158 if test "$sol2ver" -ge 8; then
160 AC_DEFINE(DISABLE_UTMP)
161 AC_DEFINE(DISABLE_WTMP)
167 CPPFLAGS="$CPPFLAGS -DSUNOS4"
168 AC_CHECK_FUNCS(getpwanam)
169 AC_DEFINE(PAM_SUN_CODEBASE)
170 conf_utmp_location=/etc/utmp
171 conf_wtmp_location=/var/adm/wtmp
172 conf_lastlog_location=/var/adm/lastlog
178 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
179 LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/ucblib"
181 IPADDR_IN_DISPLAY=yes
183 AC_DEFINE(IP_TOS_IS_BROKEN)
185 LIBS="$LIBS -lgen -lnsl -lucb"
188 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
189 LDFLAGS="$LDFLAGS -L/usr/local/lib"
195 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
196 LDFLAGS="$LDFLAGS -L/usr/local/lib"
202 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
203 LDFLAGS="$LDFLAGS -L/usr/local/lib"
206 LIBS="$LIBS -lgen -lsocket"
210 CPPFLAGS="$CPPFLAGS -Dftruncate=chsize -I/usr/local/include"
211 LDFLAGS="$LDFLAGS -L/usr/local/lib"
214 LIBS="$LIBS -lgen -lsocket -los -lprot -lx -ltinfo -lm"
217 AC_DEFINE(BROKEN_SYS_TERMIO_H)
218 rsh_path="/usr/bin/rcmd"
219 AC_DEFINE(HAVE_SCO_PROTECTED_PW)
220 AC_DEFINE(DISABLE_SHADOW)
221 AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
224 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
225 LDFLAGS="$LDFLAGS -L/usr/local/lib"
228 LIBS="$LIBS -lprot -lx -ltinfo -lm"
230 rsh_path="/usr/bin/rcmd"
231 AC_DEFINE(HAVE_SCO_PROTECTED_PW)
232 AC_DEFINE(DISABLE_SHADOW)
233 AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
237 if test ! -z "USE_SIA" ; then
238 AC_MSG_CHECKING(for Digital Unix Security Integration Architecture)
239 if test -f /etc/sia/matrix.conf; then
241 AC_DEFINE(HAVE_OSF_SIA)
242 AC_DEFINE(DISABLE_LOGIN)
243 LIBS="$LIBS -lsecurity -ldb -lm -laud"
251 # Allow user to specify flags
253 [ --with-cflags Specify additional flags to pass to compiler],
255 if test "x$withval" != "xno" ; then
256 CFLAGS="$CFLAGS $withval"
260 AC_ARG_WITH(cppflags,
261 [ --with-cppflags Specify additional flags to pass to preprocessor] ,
263 if test "x$withval" != "xno"; then
264 CPPFLAGS="$CPPFLAGS $withval"
269 [ --with-ldflags Specify additional flags to pass to linker],
271 if test "x$withval" != "xno" ; then
272 LDFLAGS="$LDFLAGS $withval"
277 [ --with-libs Specify additional libraries to link with],
279 if test "x$withval" != "xno" ; then
280 LIBS="$LIBS $withval"
286 # Checks for libraries.
287 if test -z "$no_libsocket" ; then
288 AC_CHECK_LIB(nsl, yp_match, , )
290 if test -z "$no_libnsl" ; then
291 AC_CHECK_LIB(socket, main, , )
294 AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen")
295 AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***]))
296 AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil")
298 AC_CHECK_FUNC(regcomp,
301 AC_CHECK_LIB(pcre, pcre_info,
302 AC_DEFINE(HAVE_LIBPCRE) LIBS="$LIBS -lpcreposix -lpcre")
307 AC_CHECK_FUNC(strcasecmp,
308 [], [ AC_CHECK_LIB(resolv, strcasecmp, LIBS="$LIBS -lresolv") ]
310 AC_CHECK_FUNC(utimes,
311 [], [ AC_CHECK_LIB(c89, utimes, LIBS="$LIBS -lc89") ]
314 # Checks for header files.
315 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)
317 dnl Checks for library functions.
318 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 strmode strsep strtok_r sysconf utimes vsnprintf vhangup vis waitpid _getpty __b64_ntop)
319 dnl Checks for time functions
320 AC_CHECK_FUNCS(gettimeofday time)
321 dnl Checks for libutil functions
322 AC_CHECK_HEADERS(libutil.h)
323 AC_CHECK_FUNCS(login logout updwtmp logwtmp)
324 dnl Checks for utmp functions
325 AC_CHECK_FUNCS(endutent getutent getutid getutline pututline setutent)
326 AC_CHECK_FUNCS(utmpname)
327 dnl Checks for utmpx functions
328 AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline pututxline )
329 AC_CHECK_FUNCS(setutxent utmpxname)
331 AC_CHECK_FUNC(getuserattr,
332 [AC_DEFINE(HAVE_GETUSERATTR)],
333 [AC_CHECK_LIB(s, getuserattr, [LIBS="$LIBS -ls"; AC_DEFINE(HAVE_GETUSERATTR)])]
337 [AC_DEFINE(HAVE_LOGIN)],
338 [AC_CHECK_LIB(bsd, login, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_LOGIN)])]
341 AC_CHECK_FUNC(daemon,
342 [AC_DEFINE(HAVE_DAEMON)],
343 [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
346 AC_CHECK_FUNC(getpagesize,
347 [AC_DEFINE(HAVE_GETPAGESIZE)],
348 [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])]
351 # Check for broken snprintf
352 if test "x$ac_cv_func_snprintf" = "xyes" ; then
353 AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
357 int main(void){char b[5];snprintf(b,5,"123456789");return(b[4]!='\0');}
359 [AC_MSG_RESULT(yes)],
362 AC_DEFINE(BROKEN_SNPRINTF)
363 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
373 [ --with-pam Enable PAM support ],
375 if test "x$withval" != "xno" ; then
376 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" ; then
377 AC_MSG_ERROR([PAM headers not found])
380 AC_CHECK_LIB(dl, dlopen, , )
381 AC_CHECK_LIB(pam, pam_set_item, , AC_MSG_ERROR([*** libpam missing]))
382 AC_CHECK_FUNCS(pam_getenvlist)
392 # Check for older PAM
393 if test "x$PAM_MSG" = "xyes" ; then
394 # Check PAM strerror arguments (old PAM)
395 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
399 #include <security/pam_appl.h>
401 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
404 AC_DEFINE(HAVE_OLD_PAM)
406 PAM_MSG="yes (old library)"
411 # The big search for OpenSSL
413 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
415 if test "x$withval" != "xno" ; then
422 saved_LDFLAGS="$LDFLAGS"
423 saved_CPPFLAGS="$CPPFLAGS"
424 if test "x$prefix" != "xNONE" ; then
425 tryssldir="$tryssldir $prefix"
427 AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [
429 for ssldir in $tryssldir "" /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
430 if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then
431 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
432 CPPFLAGS="$saved_CPPFLAGS -I$ssldir/include"
433 if test ! -z "$need_dash_r" ; then
434 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
437 LDFLAGS="$saved_LDFLAGS"
440 LIBS="$saved_LIBS -lcrypto"
442 # Basic test to check for compatible version and correct linking
443 # *does not* test for RSA - that comes later.
447 #include <openssl/rand.h>
451 memset(a, 0, sizeof(a));
452 RAND_add(a, sizeof(a), sizeof(a));
453 return(RAND_status() <= 0);
462 if test ! -z "$found_crypto" ; then
467 if test -z "$found_crypto" ; then
468 AC_MSG_ERROR([Could not find working SSLeay / OpenSSL libraries, please install])
470 if test -z "$ssldir" ; then
474 ac_cv_openssldir=$ssldir
477 if (test ! -z "$ac_cv_openssldir" && test "x$ac_cv_openssldir" != "x(system)") ; then
478 AC_DEFINE(HAVE_OPENSSL)
479 dnl Need to recover ssldir - test above runs in subshell
480 ssldir=$ac_cv_openssldir
482 if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then
483 CPPFLAGS="$saved_CPPFLAGS -I$ssldir/include"
484 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
485 if test ! -z "$need_dash_r" ; then
486 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
488 if test ! -z "$blibpath" ; then
489 blibpath="$blibpath:$ssldir:$ssldir/lib"
493 LIBS="$saved_LIBS -lcrypto"
495 # Now test RSA support
497 AC_MSG_CHECKING([for RSA support])
498 for WANTS_RSAREF in "" 1 ; do
499 if test -z "$WANTS_RSAREF" ; then
502 LIBS="$saved_LIBS -lRSAglue -lrsaref"
506 #include <openssl/rand.h>
507 #include <openssl/rsa.h>
508 #include <openssl/bn.h>
509 #include <openssl/sha.h>
512 int num; RSA *key; static unsigned char p_in[] = "blahblah";
513 unsigned char c[256], p[256];
514 memset(c, 0, sizeof(c)); RAND_add(c, sizeof(c), sizeof(c));
515 if ((key=RSA_generate_key(512, 3, NULL, NULL))==NULL) return(1);
516 num = RSA_public_encrypt(sizeof(p_in) - 1, p_in, c, key, RSA_PKCS1_PADDING);
517 return(-1 == RSA_private_decrypt(num, c, p, key, RSA_PKCS1_PADDING));
526 if test ! -z "$no_rsa" ; then
527 AC_MSG_RESULT(disabled)
530 if test -z "$rsa_works" ; then
531 AC_MSG_WARN([*** No RSA support found *** ])
534 if test -z "$WANTS_RSAREF" ; then
538 RSA_MSG="yes (using RSAref)"
539 AC_MSG_RESULT(using RSAref)
540 LIBS="$saved_LIBS -lcrypto -lRSAglue -lrsaref"
545 # Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
546 # version in OpenSSL. Skip this for PAM
547 if test "x$PAM_MSG" = "xno" -a "x$check_for_libcrypt_later" = "x1"; then
548 AC_CHECK_LIB(crypt, crypt, , )
551 # Cheap hack to ensure NEWS-OS libraries are arranged right.
552 if test ! -z "$SONY" ; then
553 LIBS="$LIBS -liberty";
556 # Checks for data types
557 AC_CHECK_SIZEOF(char, 1)
558 AC_CHECK_SIZEOF(short int, 2)
559 AC_CHECK_SIZEOF(int, 4)
560 AC_CHECK_SIZEOF(long int, 4)
561 AC_CHECK_SIZEOF(long long int, 8)
563 # More checks for data types
564 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
566 [ #include <sys/types.h> ],
568 [ ac_cv_have_u_int="yes" ],
569 [ ac_cv_have_u_int="no" ]
572 if test "x$ac_cv_have_u_int" = "xyes" ; then
573 AC_DEFINE(HAVE_U_INT)
577 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
579 [ #include <sys/types.h> ],
580 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
581 [ ac_cv_have_intxx_t="yes" ],
582 [ ac_cv_have_intxx_t="no" ]
585 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
586 AC_DEFINE(HAVE_INTXX_T)
590 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
592 [ #include <sys/types.h> ],
593 [ int64_t a; a = 1;],
594 [ ac_cv_have_int64_t="yes" ],
595 [ ac_cv_have_int64_t="no" ]
598 if test "x$ac_cv_have_int64_t" = "xyes" ; then
599 AC_DEFINE(HAVE_INT64_T)
603 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
605 [ #include <sys/types.h> ],
606 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
607 [ ac_cv_have_u_intxx_t="yes" ],
608 [ ac_cv_have_u_intxx_t="no" ]
611 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
612 AC_DEFINE(HAVE_U_INTXX_T)
616 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
618 [ #include <sys/types.h> ],
619 [ u_int64_t a; a = 1;],
620 [ ac_cv_have_u_int64_t="yes" ],
621 [ ac_cv_have_u_int64_t="no" ]
624 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
625 AC_DEFINE(HAVE_U_INT64_T)
629 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
630 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
632 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
635 #include <sys/bitypes.h>
638 int8_t a; int16_t b; int32_t c;
639 u_int8_t e; u_int16_t f; u_int32_t g;
640 a = b = c = e = f = g = 1;
643 AC_DEFINE(HAVE_U_INTXX_T)
644 AC_DEFINE(HAVE_INTXX_T)
651 if test -z "$have_u_intxx_t" ; then
652 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
655 #include <sys/types.h>
657 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
658 [ ac_cv_have_uintxx_t="yes" ],
659 [ ac_cv_have_uintxx_t="no" ]
662 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
663 AC_DEFINE(HAVE_UINTXX_T)
667 AC_CACHE_CHECK([for socklen_t], ac_cv_have_socklen_t, [
670 #include <sys/types.h>
671 #include <sys/socket.h>
673 [socklen_t foo; foo = 1235;],
674 [ ac_cv_have_socklen_t="yes" ],
675 [ ac_cv_have_socklen_t="no" ]
678 if test "x$ac_cv_have_socklen_t" = "xyes" ; then
679 AC_DEFINE(HAVE_SOCKLEN_T)
682 AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
685 #include <sys/types.h>
687 [ size_t foo; foo = 1235; ],
688 [ ac_cv_have_size_t="yes" ],
689 [ ac_cv_have_size_t="no" ]
692 if test "x$ac_cv_have_size_t" = "xyes" ; then
693 AC_DEFINE(HAVE_SIZE_T)
696 AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
699 #include <sys/types.h>
701 [ ssize_t foo; foo = 1235; ],
702 [ ac_cv_have_ssize_t="yes" ],
703 [ ac_cv_have_ssize_t="no" ]
706 if test "x$ac_cv_have_ssize_t" = "xyes" ; then
707 AC_DEFINE(HAVE_SSIZE_T)
710 AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [
715 [ clock_t foo; foo = 1235; ],
716 [ ac_cv_have_clock_t="yes" ],
717 [ ac_cv_have_clock_t="no" ]
720 if test "x$ac_cv_have_clock_t" = "xyes" ; then
721 AC_DEFINE(HAVE_CLOCK_T)
724 AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
727 #include <sys/types.h>
728 #include <sys/socket.h>
730 [ sa_family_t foo; foo = 1235; ],
731 [ ac_cv_have_sa_family_t="yes" ],
734 #include <sys/types.h>
735 #include <sys/socket.h>
736 #include <netinet/in.h>
738 [ sa_family_t foo; foo = 1235; ],
739 [ ac_cv_have_sa_family_t="yes" ],
741 [ ac_cv_have_sa_family_t="no" ]
745 if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
746 AC_DEFINE(HAVE_SA_FAMILY_T)
749 AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
752 #include <sys/types.h>
754 [ pid_t foo; foo = 1235; ],
755 [ ac_cv_have_pid_t="yes" ],
756 [ ac_cv_have_pid_t="no" ]
759 if test "x$ac_cv_have_pid_t" = "xyes" ; then
760 AC_DEFINE(HAVE_PID_T)
763 AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
766 #include <sys/types.h>
768 [ mode_t foo; foo = 1235; ],
769 [ ac_cv_have_mode_t="yes" ],
770 [ ac_cv_have_mode_t="no" ]
773 if test "x$ac_cv_have_mode_t" = "xyes" ; then
774 AC_DEFINE(HAVE_MODE_T)
778 AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
781 #include <sys/types.h>
782 #include <sys/socket.h>
784 [ struct sockaddr_storage s; ],
785 [ ac_cv_have_struct_sockaddr_storage="yes" ],
786 [ ac_cv_have_struct_sockaddr_storage="no" ]
789 if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
790 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)
793 AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
796 #include <sys/types.h>
797 #include <netinet/in.h>
799 [ struct sockaddr_in6 s; s.sin6_family = 0; ],
800 [ ac_cv_have_struct_sockaddr_in6="yes" ],
801 [ ac_cv_have_struct_sockaddr_in6="no" ]
804 if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
805 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)
808 AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
811 #include <sys/types.h>
812 #include <netinet/in.h>
814 [ struct in6_addr s; s.s6_addr[0] = 0; ],
815 [ ac_cv_have_struct_in6_addr="yes" ],
816 [ ac_cv_have_struct_in6_addr="no" ]
819 if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
820 AC_DEFINE(HAVE_STRUCT_IN6_ADDR)
823 AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
826 #include <sys/types.h>
827 #include <sys/socket.h>
830 [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ],
831 [ ac_cv_have_struct_addrinfo="yes" ],
832 [ ac_cv_have_struct_addrinfo="no" ]
835 if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
836 AC_DEFINE(HAVE_STRUCT_ADDRINFO)
839 AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [
841 [ #include <sys/time.h> ],
842 [ struct timeval tv; tv.tv_sec = 1;],
843 [ ac_cv_have_struct_timeval="yes" ],
844 [ ac_cv_have_struct_timeval="no" ]
847 if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
848 AC_DEFINE(HAVE_STRUCT_TIMEVAL)
849 have_struct_timeval=1
852 # If we don't have int64_t then we can't compile sftp-server. So don't
853 # even attempt to do it.
854 if test "x$ac_cv_have_int64_t" = "xno" -a \
855 "x$ac_cv_sizeof_long_int" != "x8" -a \
856 "x$ac_cv_sizeof_long_long_int" = "x0" ; then
861 dnl Checks for structure members
862 OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
863 OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX)
864 OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX)
865 OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP)
866 OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP)
867 OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX)
868 OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP)
869 OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP)
870 OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmpx.h, HAVE_ID_IN_UTMPX)
871 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP)
872 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX)
873 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP)
874 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX)
875 OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP)
876 OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP)
877 OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX)
878 OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX)
881 AC_CACHE_CHECK([for sun_len field in struct sockaddr_un],
882 ac_cv_have_sun_len_in_struct_sockaddr_un, [
885 #include <sys/types.h>
886 #include <sys/socket.h>
888 [ struct sockaddr_un s; s.sun_len = 1; ],
889 [ ac_cv_have_sun_len_in_struct_sockaddr_un="yes" ],
890 [ ac_cv_have_sun_len_in_struct_sockaddr_un="no" ],
893 if test "x$ac_cv_have_sun_len_in_struct_sockaddr_un" = "xyes" ; then
894 AC_DEFINE(HAVE_SUN_LEN_IN_SOCKADDR_UN)
897 AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
898 ac_cv_have_ss_family_in_struct_ss, [
901 #include <sys/types.h>
902 #include <sys/socket.h>
904 [ struct sockaddr_storage s; s.ss_family = 1; ],
905 [ ac_cv_have_ss_family_in_struct_ss="yes" ],
906 [ ac_cv_have_ss_family_in_struct_ss="no" ],
909 if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
910 AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
913 AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
914 ac_cv_have___ss_family_in_struct_ss, [
917 #include <sys/types.h>
918 #include <sys/socket.h>
920 [ struct sockaddr_storage s; s.__ss_family = 1; ],
921 [ ac_cv_have___ss_family_in_struct_ss="yes" ],
922 [ ac_cv_have___ss_family_in_struct_ss="no" ]
925 if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
926 AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
929 AC_CACHE_CHECK([for pw_class field in struct passwd],
930 ac_cv_have_pw_class_in_struct_passwd, [
935 [ struct passwd p; p.pw_class = 0; ],
936 [ ac_cv_have_pw_class_in_struct_passwd="yes" ],
937 [ ac_cv_have_pw_class_in_struct_passwd="no" ]
940 if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
941 AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD)
945 AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
947 [ extern char *__progname; printf("%s", __progname); ],
948 [ ac_cv_libc_defines___progname="yes" ],
949 [ ac_cv_libc_defines___progname="no" ]
952 if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
953 AC_DEFINE(HAVE___PROGNAME)
957 AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
959 [ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);],
960 [ ac_cv_libc_defines_sys_errlist="yes" ],
961 [ ac_cv_libc_defines_sys_errlist="no" ]
964 if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
965 AC_DEFINE(HAVE_SYS_ERRLIST)
969 AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [
971 [ extern int sys_nerr; printf("%i", sys_nerr);],
972 [ ac_cv_libc_defines_sys_nerr="yes" ],
973 [ ac_cv_libc_defines_sys_nerr="no" ]
976 if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
977 AC_DEFINE(HAVE_SYS_NERR)
981 # Looking for programs, paths and files
983 [ --with-rsh=PATH Specify path to remote shell program ],
985 if test "x$withval" != "$no" ; then
990 AC_PATH_PROG(rsh_path, rsh)
995 [ --with-xauth=PATH Specify path to xauth program ],
997 if test "x$withval" != "xno" ; then
1002 AC_PATH_PROG(xauth_path, xauth,,$PATH:/usr/X/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/openwin/bin)
1003 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
1004 xauth_path="/usr/openwin/bin/xauth"
1009 if test -z "$xauth_path" ; then
1010 XAUTH_PATH="undefined"
1011 AC_SUBST(XAUTH_PATH)
1013 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
1014 XAUTH_PATH=$xauth_path
1015 AC_SUBST(XAUTH_PATH)
1017 if test ! -z "$rsh_path" ; then
1018 AC_DEFINE_UNQUOTED(RSH_PATH, "$rsh_path")
1021 # Check for mail directory (last resort if we cannot get it from headers)
1022 if test ! -z "$MAIL" ; then
1023 maildir=`dirname $MAIL`
1024 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
1027 if test -z "$no_dev_ptmx" ; then
1028 AC_CHECK_FILE("/dev/ptmx",
1030 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
1035 AC_CHECK_FILE("/dev/ptc",
1037 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
1042 # Options from here on. Some of these are preset by platform above
1044 # Check for user-specified random device, otherwise check /dev/urandom
1046 [ --with-random=FILE read randomness from FILE (default=/dev/urandom)],
1048 if test "x$withval" != "xno" ; then
1049 RANDOM_POOL="$withval";
1050 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
1054 # Check for random device
1055 AC_CHECK_FILE("/dev/urandom",
1057 RANDOM_POOL="/dev/urandom";
1058 AC_SUBST(RANDOM_POOL)
1059 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
1065 # Check for EGD pool file
1066 AC_ARG_WITH(egd-pool,
1067 [ --with-egd-pool=FILE read randomness from EGD pool FILE (default none)],
1069 if test "x$withval" != "xno" ; then
1070 EGD_SOCKET="$withval";
1071 AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET")
1076 # detect pathnames for entropy gathering commands, if we need them
1077 INSTALL_SSH_PRNG_CMDS=""
1079 if (test -z "$RANDOM_POOL" && test -z "$EGD_SOCKET") ; then
1080 # Use these commands to collect entropy
1081 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
1082 OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
1083 OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
1084 OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
1085 OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
1086 OSSH_PATH_ENTROPY_PROG(PROG_W, w)
1087 OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
1088 OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
1089 OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
1090 OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
1091 OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
1092 OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
1093 OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
1094 OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
1095 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
1097 INSTALL_SSH_PRNG_CMDS="yes"
1099 AC_SUBST(INSTALL_SSH_PRNG_CMDS)
1103 [ --with-catman=man|cat Install preformatted manpages[no]],
1106 if test x"$withval" != x"yes" ; then
1112 if test -z "$MANTYPE" ; then
1113 MANTYPE='$(TROFFMAN)'
1121 # Check whether user wants Kerberos support
1123 AC_ARG_WITH(kerberos4,
1124 [ --with-kerberos4=PATH Enable Kerberos 4 support],
1126 if test "x$withval" != "xno" ; then
1128 if test "x$withval" != "xyes" ; then
1129 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1130 LDFLAGS="$LDFLAGS -L${withval}/lib"
1131 if test ! -z "$need_dash_r" ; then
1132 LDFLAGS="$LDFLAGS -R${withval}/lib"
1134 if test ! -z "$blibpath" ; then
1135 blibpath="$blibpath:${withval}/lib"
1138 if test -d /usr/include/kerberosIV ; then
1139 CPPFLAGS="$CPPFLAGS -I/usr/include/kerberosIV"
1143 AC_CHECK_HEADERS(krb.h)
1144 AC_CHECK_LIB(krb, main)
1145 if test "$ac_cv_header_krb_h" != yes; then
1146 AC_MSG_WARN([Cannot find krb.h, build may fail])
1148 if test "$ac_cv_lib_krb_main" != yes; then
1149 AC_MSG_WARN([Cannot find libkrb, build may fail])
1153 AC_CHECK_LIB(resolv, dn_expand, , )
1161 # Check whether user wants AFS support
1164 [ --with-afs=PATH Enable AFS support],
1166 if test "x$withval" != "xno" ; then
1168 if test "x$withval" != "xyes" ; then
1169 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1170 LDFLAGS="$LDFLAGS -L${withval}/lib"
1173 if test -z "$KRB4" ; then
1174 AC_MSG_WARN([AFS requires Kerberos IV support, build may fail])
1178 if test ! -z "$AFS_LIBS" ; then
1179 LIBS="$LIBS $AFS_LIBS"
1188 # Check whether user wants S/Key support
1191 [ --with-skey=PATH Enable S/Key support],
1193 if test "x$withval" != "xno" ; then
1195 if test "x$withval" != "xyes" ; then
1196 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1197 LDFLAGS="$LDFLAGS -L${withval}/lib"
1204 AC_CHECK_FUNC(skey_keyinfo,
1207 AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
1213 # Check whether user wants TCP wrappers support
1215 AC_ARG_WITH(tcp-wrappers,
1216 [ --with-tcp-wrappers Enable tcpwrappers support],
1218 if test "x$withval" != "xno" ; then
1221 AC_MSG_CHECKING(for libwrap)
1225 int deny_severity = 0, allow_severity = 0;
1234 AC_MSG_ERROR([*** libwrap missing])
1241 # Check whether to enable MD5 passwords
1243 AC_ARG_WITH(md5-passwords,
1244 [ --with-md5-passwords Enable use of MD5 passwords],
1246 if test "x$withval" != "xno" ; then
1247 AC_DEFINE(HAVE_MD5_PASSWORDS)
1253 # Whether to disable shadow password support
1255 [ --without-shadow Disable shadow password support],
1257 if test "x$withval" = "xno" ; then
1258 AC_DEFINE(DISABLE_SHADOW)
1264 if test -z "$disable_shadow" ; then
1265 AC_MSG_CHECKING([if the systems has expire shadow information])
1268 #include <sys/types.h>
1271 ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ],
1272 [ sp_expire_available=yes ], []
1275 if test "x$sp_expire_available" = "xyes" ; then
1277 AC_DEFINE(HAS_SHADOW_EXPIRE)
1283 # Use ip address instead of hostname in $DISPLAY
1284 if test ! -z "$IPADDR_IN_DISPLAY" ; then
1285 DISPLAY_HACK_MSG="yes"
1286 AC_DEFINE(IPADDR_IN_DISPLAY)
1288 DISPLAY_HACK_MSG="no"
1289 AC_ARG_WITH(ipaddr-display,
1290 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
1292 if test "x$withval" != "xno" ; then
1293 AC_DEFINE(IPADDR_IN_DISPLAY)
1294 DISPLAY_HACK_MSG="yes"
1300 # Whether to mess with the default path
1301 SERVER_PATH_MSG="(default)"
1302 AC_ARG_WITH(default-path,
1303 [ --with-default-path=PATH Specify default \$PATH environment for server],
1305 if test "x$withval" != "xno" ; then
1306 AC_DEFINE_UNQUOTED(USER_PATH, "$withval")
1307 SERVER_PATH_MSG="$withval"
1312 # Whether to force IPv4 by default (needed on broken glibc Linux)
1314 AC_ARG_WITH(ipv4-default,
1315 [ --with-ipv4-default Use IPv4 by connections unless '-6' specified],
1317 if test "x$withval" != "xno" ; then
1318 AC_DEFINE(IPV4_DEFAULT)
1324 AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
1325 IPV4_IN6_HACK_MSG="no"
1327 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
1329 if test "x$withval" != "xno" ; then
1331 AC_DEFINE(IPV4_IN_IPV6)
1332 IPV4_IN6_HACK_MSG="yes"
1337 if test "x$inet6_default_4in6" = "xyes"; then
1338 AC_MSG_RESULT([yes (default)])
1339 AC_DEFINE(IPV4_IN_IPV6)
1340 IPV4_IN6_HACK_MSG="yes"
1342 AC_MSG_RESULT([no (default)])
1347 AC_MSG_CHECKING(whether to install ssh as suid root)
1348 AC_ARG_ENABLE(suid-ssh,
1349 [ --enable-suid-ssh Install ssh as suid root (default)
1350 --disable-suid-ssh Install ssh without suid bit],
1351 [ case "$enableval" in
1356 *) AC_MSG_RESULT(yes)
1366 # Where to place sshd.pid
1368 AC_ARG_WITH(pid-dir,
1369 [ --with-pid-dir=PATH Specify location of ssh.pid file],
1371 if test "x$withval" != "xno" ; then
1377 # make sure the directory exists
1378 if test ! -d $piddir ; then
1379 piddir=`eval echo ${sysconfdir}`
1381 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
1385 AC_DEFINE_UNQUOTED(PIDDIR, "$piddir")
1388 dnl allow user to disable some login recording features
1389 AC_ARG_ENABLE(lastlog,
1390 [ --disable-lastlog disable use of lastlog even if detected [no]],
1391 [ AC_DEFINE(DISABLE_LASTLOG) ]
1394 [ --disable-utmp disable use of utmp even if detected [no]],
1395 [ AC_DEFINE(DISABLE_UTMP) ]
1397 AC_ARG_ENABLE(utmpx,
1398 [ --disable-utmpx disable use of utmpx even if detected [no]],
1399 [ AC_DEFINE(DISABLE_UTMPX) ]
1402 [ --disable-wtmp disable use of wtmp even if detected [no]],
1403 [ AC_DEFINE(DISABLE_WTMP) ]
1405 AC_ARG_ENABLE(wtmpx,
1406 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
1407 [ AC_DEFINE(DISABLE_WTMPX) ]
1409 AC_ARG_ENABLE(libutil,
1410 [ --disable-libutil disable use of libutil (login() etc.) [no]],
1411 [ AC_DEFINE(DISABLE_LOGIN) ]
1413 AC_ARG_ENABLE(pututline,
1414 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
1415 [ AC_DEFINE(DISABLE_PUTUTLINE) ]
1417 AC_ARG_ENABLE(pututxline,
1418 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
1419 [ AC_DEFINE(DISABLE_PUTUTXLINE) ]
1421 AC_ARG_WITH(lastlog,
1422 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
1423 [ conf_lastlog_location="$withval"; ],)
1425 dnl lastlog, [uw]tmpx? detection
1426 dnl NOTE: set the paths in the platform section to avoid the
1427 dnl need for command-line parameters
1428 dnl lastlog and [uw]tmp are subject to a file search if all else fails
1430 dnl lastlog detection
1431 dnl NOTE: the code itself will detect if lastlog is a directory
1432 AC_MSG_CHECKING([if your system defines LASTLOG_FILE])
1434 #include <sys/types.h>
1436 #ifdef HAVE_LASTLOG_H
1437 # include <lastlog.h>
1443 [ char *lastlog = LASTLOG_FILE; ],
1444 [ AC_MSG_RESULT(yes) ],
1447 AC_MSG_CHECKING([if your system defines _PATH_LASTLOG])
1449 #include <sys/types.h>
1451 #ifdef HAVE_LASTLOG_H
1452 # include <lastlog.h>
1458 [ char *lastlog = _PATH_LASTLOG; ],
1459 [ AC_MSG_RESULT(yes) ],
1462 system_lastlog_path=no
1467 if test -z "$conf_lastlog_location"; then
1468 if test x"$system_lastlog_path" = x"no" ; then
1469 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
1470 if (test -d "$f" || test -f "$f") ; then
1471 conf_lastlog_location=$f
1474 if test -z "$conf_lastlog_location"; then
1475 AC_MSG_WARN([** Cannot find lastlog **])
1476 dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx
1481 if test -n "$conf_lastlog_location"; then
1482 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location")
1486 AC_MSG_CHECKING([if your system defines UTMP_FILE])
1488 #include <sys/types.h>
1494 [ char *utmp = UTMP_FILE; ],
1495 [ AC_MSG_RESULT(yes) ],
1497 system_utmp_path=no ]
1499 if test -z "$conf_utmp_location"; then
1500 if test x"$system_utmp_path" = x"no" ; then
1501 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
1502 if test -f $f ; then
1503 conf_utmp_location=$f
1506 if test -z "$conf_utmp_location"; then
1507 AC_DEFINE(DISABLE_UTMP)
1511 if test -n "$conf_utmp_location"; then
1512 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location")
1516 AC_MSG_CHECKING([if your system defines WTMP_FILE])
1518 #include <sys/types.h>
1524 [ char *wtmp = WTMP_FILE; ],
1525 [ AC_MSG_RESULT(yes) ],
1527 system_wtmp_path=no ]
1529 if test -z "$conf_wtmp_location"; then
1530 if test x"$system_wtmp_path" = x"no" ; then
1531 for f in /usr/adm/wtmp /var/log/wtmp; do
1532 if test -f $f ; then
1533 conf_wtmp_location=$f
1536 if test -z "$conf_wtmp_location"; then
1537 AC_DEFINE(DISABLE_WTMP)
1541 if test -n "$conf_wtmp_location"; then
1542 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location")
1546 dnl utmpx detection - I don't know any system so perverse as to require
1547 dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out
1549 AC_MSG_CHECKING([if your system defines UTMPX_FILE])
1551 #include <sys/types.h>
1560 [ char *utmpx = UTMPX_FILE; ],
1561 [ AC_MSG_RESULT(yes) ],
1563 system_utmpx_path=no ]
1565 if test -z "$conf_utmpx_location"; then
1566 if test x"$system_utmpx_path" = x"no" ; then
1567 AC_DEFINE(DISABLE_UTMPX)
1570 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location")
1574 AC_MSG_CHECKING([if your system defines WTMPX_FILE])
1576 #include <sys/types.h>
1585 [ char *wtmpx = WTMPX_FILE; ],
1586 [ AC_MSG_RESULT(yes) ],
1588 system_wtmpx_path=no ]
1590 if test -z "$conf_wtmpx_location"; then
1591 if test x"$system_wtmpx_path" = x"no" ; then
1592 AC_DEFINE(DISABLE_WTMPX)
1595 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location")
1599 # Change default command timeout for builtin PRNG
1601 AC_ARG_WITH(entropy-timeout,
1602 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)],
1604 if test "x$withval" != "xno" ; then
1605 entropy_timeout=$withval
1609 AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout)
1612 if test ! -z "$blibpath" ; then
1613 LDFLAGS="$LDFLAGS -blibpath:$blibpath"
1614 AC_MSG_WARN([Please check and edit -blibpath in LDFLAGS in Makefile])
1619 AC_OUTPUT(Makefile ssh_prng_cmds)
1621 # Print summary of options
1623 if test x$MANTYPE = x'$(CATMAN)' ; then
1628 if test ! -z "$RANDOM_POOL" ; then
1629 RAND_MSG="Device ($RANDOM_POOL)"
1631 if test ! -z "$EGD_SOCKET" ; then
1632 RAND_MSG="EGD ($EGD_SOCKET)"
1634 RAND_MSG="Builtin (timeout $entropy_timeout)"
1639 # Someone please show me a better way :)
1640 A=`eval echo ${prefix}` ; A=`eval echo ${A}`
1641 B=`eval echo ${bindir}` ; B=`eval echo ${B}`
1642 C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
1643 D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
1644 E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
1645 F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
1646 G=`eval echo ${piddir}` ; G=`eval echo ${G}`
1649 echo "OpenSSH configured has been configured with the following options."
1650 echo " User binaries: $B"
1651 echo " User binaries: $B"
1652 echo " System binaries: $C"
1653 echo " Configuration files: $D"
1654 echo " Askpass program: $E"
1655 echo " Manual pages: $F"
1656 echo " PID file: $G"
1657 echo " Random number collection: $RAND_MSG"
1658 echo " Manpage format: $MAN_MSG"
1659 echo " PAM support: ${PAM_MSG}"
1660 echo " KerberosIV support: $KRB4_MSG"
1661 echo " AFS support: $AFS_MSG"
1662 echo " S/KEY support: $SKEY_MSG"
1663 echo " TCP Wrappers support: $TCPW_MSG"
1664 echo " MD5 password support: $MD5_MSG"
1665 echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
1666 echo " Use IPv4 by default hack: $IPV4_HACK_MSG"
1667 echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
1671 echo " Host: ${host}"
1672 echo " Compiler: ${CC}"
1673 echo " Compiler flags: ${CFLAGS}"
1674 echo "Preprocessor flags: ${CPPFLAGS}"
1675 echo " Linker flags: ${LDFLAGS}"
1676 echo " Libraries: ${LIBS}"
1680 if test "x$PAM_MSG" = "xyes" ; then
1681 echo "PAM is enabled. You may need to install a PAM control file for sshd,"
1682 echo "otherwise password authentication may fail. Example PAM control files"
1683 echo "can be found in the contrib/ subdirectory"
1687 if test ! -z "$BUILTIN_RNG" ; then
1688 echo "WARNING: you are using the builtin random number collection service."
1689 echo "Please read WARNING.RNG and request that your OS vendor includes"
1690 echo "/dev/random in future versions of their OS."
1694 if test ! -z "$NO_SFTP"; then
1695 echo "sftp-server will be disabled. Your compiler does not support"
1696 echo "64bit integers."