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 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 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 # If we don't have int64_t then we can't compile sftp-server. So don't
829 # even attempt to do it.
830 if test "x$ac_cv_have_int64_t" = "xno" -a \
831 "x$ac_cv_sizeof_long_int" != "x8" -a \
832 "x$ac_cv_sizeof_long_long_int" = "x0" ; then
837 dnl Checks for structure members
838 OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
839 OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX)
840 OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX)
841 OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP)
842 OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP)
843 OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX)
844 OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP)
845 OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP)
846 OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmpx.h, HAVE_ID_IN_UTMPX)
847 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP)
848 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX)
849 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP)
850 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX)
851 OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP)
852 OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP)
853 OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX)
854 OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX)
857 AC_CACHE_CHECK([for sun_len field in struct sockaddr_un],
858 ac_cv_have_sun_len_in_struct_sockaddr_un, [
861 #include <sys/types.h>
862 #include <sys/socket.h>
864 [ struct sockaddr_un s; s.sun_len = 1; ],
865 [ ac_cv_have_sun_len_in_struct_sockaddr_un="yes" ],
866 [ ac_cv_have_sun_len_in_struct_sockaddr_un="no" ],
869 if test "x$ac_cv_have_sun_len_in_struct_sockaddr_un" = "xyes" ; then
870 AC_DEFINE(HAVE_SUN_LEN_IN_SOCKADDR_UN)
873 AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
874 ac_cv_have_ss_family_in_struct_ss, [
877 #include <sys/types.h>
878 #include <sys/socket.h>
880 [ struct sockaddr_storage s; s.ss_family = 1; ],
881 [ ac_cv_have_ss_family_in_struct_ss="yes" ],
882 [ ac_cv_have_ss_family_in_struct_ss="no" ],
885 if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
886 AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
889 AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
890 ac_cv_have___ss_family_in_struct_ss, [
893 #include <sys/types.h>
894 #include <sys/socket.h>
896 [ struct sockaddr_storage s; s.__ss_family = 1; ],
897 [ ac_cv_have___ss_family_in_struct_ss="yes" ],
898 [ ac_cv_have___ss_family_in_struct_ss="no" ]
901 if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
902 AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
905 AC_CACHE_CHECK([for pw_class field in struct passwd],
906 ac_cv_have_pw_class_in_struct_passwd, [
911 [ struct passwd p; p.pw_class = 0; ],
912 [ ac_cv_have_pw_class_in_struct_passwd="yes" ],
913 [ ac_cv_have_pw_class_in_struct_passwd="no" ]
916 if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
917 AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD)
921 AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
923 [ extern char *__progname; printf("%s", __progname); ],
924 [ ac_cv_libc_defines___progname="yes" ],
925 [ ac_cv_libc_defines___progname="no" ]
928 if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
929 AC_DEFINE(HAVE___PROGNAME)
933 AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
935 [ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);],
936 [ ac_cv_libc_defines_sys_errlist="yes" ],
937 [ ac_cv_libc_defines_sys_errlist="no" ]
940 if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
941 AC_DEFINE(HAVE_SYS_ERRLIST)
945 AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [
947 [ extern int sys_nerr; printf("%i", sys_nerr);],
948 [ ac_cv_libc_defines_sys_nerr="yes" ],
949 [ ac_cv_libc_defines_sys_nerr="no" ]
952 if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
953 AC_DEFINE(HAVE_SYS_NERR)
957 # Looking for programs, paths and files
959 [ --with-rsh=PATH Specify path to remote shell program ],
961 if test "x$withval" != "$no" ; then
966 AC_PATH_PROG(rsh_path, rsh)
971 [ --with-xauth=PATH Specify path to xauth program ],
973 if test "x$withval" != "xno" ; then
978 AC_PATH_PROG(xauth_path, xauth,,$PATH:/usr/X/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/openwin/bin)
979 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
980 xauth_path="/usr/openwin/bin/xauth"
985 if test -z "$xauth_path" ; then
986 XAUTH_PATH="undefined"
989 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
990 XAUTH_PATH=$xauth_path
993 if test ! -z "$rsh_path" ; then
994 AC_DEFINE_UNQUOTED(RSH_PATH, "$rsh_path")
997 # Check for mail directory (last resort if we cannot get it from headers)
998 if test ! -z "$MAIL" ; then
999 maildir=`dirname $MAIL`
1000 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
1003 if test -z "$no_dev_ptmx" ; then
1004 AC_CHECK_FILE("/dev/ptmx",
1006 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
1011 AC_CHECK_FILE("/dev/ptc",
1013 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
1018 # Options from here on. Some of these are preset by platform above
1020 # Check for user-specified random device, otherwise check /dev/urandom
1022 [ --with-random=FILE read randomness from FILE (default=/dev/urandom)],
1024 if test "x$withval" != "xno" ; then
1025 RANDOM_POOL="$withval";
1026 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
1030 # Check for random device
1031 AC_CHECK_FILE("/dev/urandom",
1033 RANDOM_POOL="/dev/urandom";
1034 AC_SUBST(RANDOM_POOL)
1035 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
1041 # Check for EGD pool file
1042 AC_ARG_WITH(egd-pool,
1043 [ --with-egd-pool=FILE read randomness from EGD pool FILE (default none)],
1045 if test "x$withval" != "xno" ; then
1046 EGD_SOCKET="$withval";
1047 AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET")
1052 # detect pathnames for entropy gathering commands, if we need them
1053 INSTALL_SSH_PRNG_CMDS=""
1055 if (test -z "$RANDOM_POOL" && test -z "$EGD_SOCKET") ; then
1056 # Use these commands to collect entropy
1057 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
1058 OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
1059 OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
1060 OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
1061 OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
1062 OSSH_PATH_ENTROPY_PROG(PROG_W, w)
1063 OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
1064 OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
1065 OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
1066 OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
1067 OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
1068 OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
1069 OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
1070 OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
1071 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
1073 INSTALL_SSH_PRNG_CMDS="yes"
1075 AC_SUBST(INSTALL_SSH_PRNG_CMDS)
1079 [ --with-catman=man|cat Install preformatted manpages[no]],
1082 if test x"$withval" != x"yes" ; then
1088 if test -z "$MANTYPE" ; then
1089 MANTYPE='$(TROFFMAN)'
1097 # Check whether user wants Kerberos support
1099 AC_ARG_WITH(kerberos4,
1100 [ --with-kerberos4=PATH Enable Kerberos 4 support],
1102 if test "x$withval" != "xno" ; then
1104 if test "x$withval" != "xyes" ; then
1105 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1106 LDFLAGS="$LDFLAGS -L${withval}/lib"
1107 if test ! -z "$need_dash_r" ; then
1108 LDFLAGS="$LDFLAGS -R${withval}/lib"
1110 if test ! -z "$blibpath" ; then
1111 blibpath="$blibpath:${withval}/lib"
1114 if test -d /usr/include/kerberosIV ; then
1115 CPPFLAGS="$CPPFLAGS -I/usr/include/kerberosIV"
1119 AC_CHECK_HEADERS(krb.h)
1120 AC_CHECK_LIB(krb, main)
1121 if test "$ac_cv_header_krb_h" != yes; then
1122 AC_MSG_WARN([Cannot find krb.h, build may fail])
1124 if test "$ac_cv_lib_krb_main" != yes; then
1125 AC_MSG_WARN([Cannot find libkrb, build may fail])
1129 AC_CHECK_LIB(resolv, dn_expand, , )
1137 # Check whether user wants AFS support
1140 [ --with-afs=PATH Enable AFS support],
1142 if test "x$withval" != "xno" ; then
1144 if test "x$withval" != "xyes" ; then
1145 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1146 LDFLAGS="$LDFLAGS -L${withval}/lib"
1149 if test -z "$KRB4" ; then
1150 AC_MSG_WARN([AFS requires Kerberos IV support, build may fail])
1154 if test ! -z "$AFS_LIBS" ; then
1155 LIBS="$LIBS $AFS_LIBS"
1164 # Check whether user wants S/Key support
1167 [ --with-skey=PATH Enable S/Key support],
1169 if test "x$withval" != "xno" ; then
1171 if test "x$withval" != "xyes" ; then
1172 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1173 LDFLAGS="$LDFLAGS -L${withval}/lib"
1180 AC_CHECK_FUNC(skey_keyinfo,
1183 AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
1189 # Check whether user wants TCP wrappers support
1191 AC_ARG_WITH(tcp-wrappers,
1192 [ --with-tcp-wrappers Enable tcpwrappers support],
1194 if test "x$withval" != "xno" ; then
1197 AC_MSG_CHECKING(for libwrap)
1201 int deny_severity = 0, allow_severity = 0;
1210 AC_MSG_ERROR([*** libwrap missing])
1217 # Check whether to enable MD5 passwords
1219 AC_ARG_WITH(md5-passwords,
1220 [ --with-md5-passwords Enable use of MD5 passwords],
1222 if test "x$withval" != "xno" ; then
1223 AC_DEFINE(HAVE_MD5_PASSWORDS)
1229 # Whether to disable shadow password support
1231 [ --without-shadow Disable shadow password support],
1233 if test "x$withval" = "xno" ; then
1234 AC_DEFINE(DISABLE_SHADOW)
1240 if test -z "$disable_shadow" ; then
1241 AC_MSG_CHECKING([if the systems has expire shadow information])
1244 #include <sys/types.h>
1247 ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ],
1248 [ sp_expire_available=yes ], []
1251 if test "x$sp_expire_available" = "xyes" ; then
1253 AC_DEFINE(HAS_SHADOW_EXPIRE)
1259 # Use ip address instead of hostname in $DISPLAY
1260 if test ! -z "$IPADDR_IN_DISPLAY" ; then
1261 DISPLAY_HACK_MSG="yes"
1262 AC_DEFINE(IPADDR_IN_DISPLAY)
1264 DISPLAY_HACK_MSG="no"
1265 AC_ARG_WITH(ipaddr-display,
1266 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
1268 if test "x$withval" != "xno" ; then
1269 AC_DEFINE(IPADDR_IN_DISPLAY)
1270 DISPLAY_HACK_MSG="yes"
1276 # Whether to mess with the default path
1277 SERVER_PATH_MSG="(default)"
1278 AC_ARG_WITH(default-path,
1279 [ --with-default-path=PATH Specify default \$PATH environment for server],
1281 if test "x$withval" != "xno" ; then
1282 AC_DEFINE_UNQUOTED(USER_PATH, "$withval")
1283 SERVER_PATH_MSG="$withval"
1288 # Whether to force IPv4 by default (needed on broken glibc Linux)
1290 AC_ARG_WITH(ipv4-default,
1291 [ --with-ipv4-default Use IPv4 by connections unless '-6' specified],
1293 if test "x$withval" != "xno" ; then
1294 AC_DEFINE(IPV4_DEFAULT)
1300 AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
1301 IPV4_IN6_HACK_MSG="no"
1303 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
1305 if test "x$withval" != "xno" ; then
1307 AC_DEFINE(IPV4_IN_IPV6)
1308 IPV4_IN6_HACK_MSG="yes"
1313 if test "x$inet6_default_4in6" = "xyes"; then
1314 AC_MSG_RESULT([yes (default)])
1315 AC_DEFINE(IPV4_IN_IPV6)
1316 IPV4_IN6_HACK_MSG="yes"
1318 AC_MSG_RESULT([no (default)])
1323 AC_MSG_CHECKING(whether to install ssh as suid root)
1324 AC_ARG_ENABLE(suid-ssh,
1325 [ --enable-suid-ssh Install ssh as suid root (default)
1326 --disable-suid-ssh Install ssh without suid bit],
1327 [ case "$enableval" in
1332 *) AC_MSG_RESULT(yes)
1342 # Where to place sshd.pid
1344 AC_ARG_WITH(pid-dir,
1345 [ --with-pid-dir=PATH Specify location of ssh.pid file],
1347 if test "x$withval" != "xno" ; then
1353 # make sure the directory exists
1354 if test ! -d $piddir ; then
1355 piddir=`eval echo ${sysconfdir}`
1357 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
1361 AC_DEFINE_UNQUOTED(PIDDIR, "$piddir")
1364 dnl allow user to disable some login recording features
1365 AC_ARG_ENABLE(lastlog,
1366 [ --disable-lastlog disable use of lastlog even if detected [no]],
1367 [ AC_DEFINE(DISABLE_LASTLOG) ]
1370 [ --disable-utmp disable use of utmp even if detected [no]],
1371 [ AC_DEFINE(DISABLE_UTMP) ]
1373 AC_ARG_ENABLE(utmpx,
1374 [ --disable-utmpx disable use of utmpx even if detected [no]],
1375 [ AC_DEFINE(DISABLE_UTMPX) ]
1378 [ --disable-wtmp disable use of wtmp even if detected [no]],
1379 [ AC_DEFINE(DISABLE_WTMP) ]
1381 AC_ARG_ENABLE(wtmpx,
1382 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
1383 [ AC_DEFINE(DISABLE_WTMPX) ]
1385 AC_ARG_ENABLE(libutil,
1386 [ --disable-libutil disable use of libutil (login() etc.) [no]],
1387 [ AC_DEFINE(DISABLE_LOGIN) ]
1389 AC_ARG_ENABLE(pututline,
1390 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
1391 [ AC_DEFINE(DISABLE_PUTUTLINE) ]
1393 AC_ARG_ENABLE(pututxline,
1394 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
1395 [ AC_DEFINE(DISABLE_PUTUTXLINE) ]
1397 AC_ARG_WITH(lastlog,
1398 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
1399 [ conf_lastlog_location="$withval"; ],)
1401 dnl lastlog, [uw]tmpx? detection
1402 dnl NOTE: set the paths in the platform section to avoid the
1403 dnl need for command-line parameters
1404 dnl lastlog and [uw]tmp are subject to a file search if all else fails
1406 dnl lastlog detection
1407 dnl NOTE: the code itself will detect if lastlog is a directory
1408 AC_MSG_CHECKING([if your system defines LASTLOG_FILE])
1410 #include <sys/types.h>
1412 #ifdef HAVE_LASTLOG_H
1413 # include <lastlog.h>
1419 [ char *lastlog = LASTLOG_FILE; ],
1420 [ AC_MSG_RESULT(yes) ],
1423 AC_MSG_CHECKING([if your system defines _PATH_LASTLOG])
1425 #include <sys/types.h>
1427 #ifdef HAVE_LASTLOG_H
1428 # include <lastlog.h>
1434 [ char *lastlog = _PATH_LASTLOG; ],
1435 [ AC_MSG_RESULT(yes) ],
1438 system_lastlog_path=no
1443 if test -z "$conf_lastlog_location"; then
1444 if test x"$system_lastlog_path" = x"no" ; then
1445 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
1446 if (test -d "$f" || test -f "$f") ; then
1447 conf_lastlog_location=$f
1450 if test -z "$conf_lastlog_location"; then
1451 AC_MSG_WARN([** Cannot find lastlog **])
1452 dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx
1457 if test -n "$conf_lastlog_location"; then
1458 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location")
1462 AC_MSG_CHECKING([if your system defines UTMP_FILE])
1464 #include <sys/types.h>
1470 [ char *utmp = UTMP_FILE; ],
1471 [ AC_MSG_RESULT(yes) ],
1473 system_utmp_path=no ]
1475 if test -z "$conf_utmp_location"; then
1476 if test x"$system_utmp_path" = x"no" ; then
1477 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
1478 if test -f $f ; then
1479 conf_utmp_location=$f
1482 if test -z "$conf_utmp_location"; then
1483 AC_DEFINE(DISABLE_UTMP)
1487 if test -n "$conf_utmp_location"; then
1488 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location")
1492 AC_MSG_CHECKING([if your system defines WTMP_FILE])
1494 #include <sys/types.h>
1500 [ char *wtmp = WTMP_FILE; ],
1501 [ AC_MSG_RESULT(yes) ],
1503 system_wtmp_path=no ]
1505 if test -z "$conf_wtmp_location"; then
1506 if test x"$system_wtmp_path" = x"no" ; then
1507 for f in /usr/adm/wtmp /var/log/wtmp; do
1508 if test -f $f ; then
1509 conf_wtmp_location=$f
1512 if test -z "$conf_wtmp_location"; then
1513 AC_DEFINE(DISABLE_WTMP)
1517 if test -n "$conf_wtmp_location"; then
1518 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location")
1522 dnl utmpx detection - I don't know any system so perverse as to require
1523 dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out
1525 AC_MSG_CHECKING([if your system defines UTMPX_FILE])
1527 #include <sys/types.h>
1536 [ char *utmpx = UTMPX_FILE; ],
1537 [ AC_MSG_RESULT(yes) ],
1539 system_utmpx_path=no ]
1541 if test -z "$conf_utmpx_location"; then
1542 if test x"$system_utmpx_path" = x"no" ; then
1543 AC_DEFINE(DISABLE_UTMPX)
1546 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location")
1550 AC_MSG_CHECKING([if your system defines WTMPX_FILE])
1552 #include <sys/types.h>
1561 [ char *wtmpx = WTMPX_FILE; ],
1562 [ AC_MSG_RESULT(yes) ],
1564 system_wtmpx_path=no ]
1566 if test -z "$conf_wtmpx_location"; then
1567 if test x"$system_wtmpx_path" = x"no" ; then
1568 AC_DEFINE(DISABLE_WTMPX)
1571 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location")
1575 # Change default command timeout for builtin PRNG
1577 AC_ARG_WITH(entropy-timeout,
1578 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)],
1580 if test "x$withval" != "xno" ; then
1581 entropy_timeout=$withval
1585 AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout)
1588 if test ! -z "$blibpath" ; then
1589 LDFLAGS="$LDFLAGS -blibpath:$blibpath"
1590 AC_MSG_WARN([Please check and edit -blibpath in LDFLAGS in Makefile])
1595 AC_OUTPUT(Makefile ssh_prng_cmds)
1597 # Print summary of options
1599 if test x$MANTYPE = x'$(CATMAN)' ; then
1604 if test ! -z "$RANDOM_POOL" ; then
1605 RAND_MSG="Device ($RANDOM_POOL)"
1607 if test ! -z "$EGD_SOCKET" ; then
1608 RAND_MSG="EGD ($EGD_SOCKET)"
1610 RAND_MSG="Builtin (timeout $entropy_timeout)"
1615 # Someone please show me a better way :)
1616 A=`eval echo ${prefix}` ; A=`eval echo ${A}`
1617 B=`eval echo ${bindir}` ; B=`eval echo ${B}`
1618 C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
1619 D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
1620 E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
1621 F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
1622 G=`eval echo ${piddir}` ; G=`eval echo ${G}`
1625 echo "OpenSSH configured has been configured with the following options."
1626 echo " User binaries: $B"
1627 echo " User binaries: $B"
1628 echo " System binaries: $C"
1629 echo " Configuration files: $D"
1630 echo " Askpass program: $E"
1631 echo " Manual pages: $F"
1632 echo " PID file: $G"
1633 echo " Random number collection: $RAND_MSG"
1634 echo " Manpage format: $MAN_MSG"
1635 echo " PAM support: ${PAM_MSG}"
1636 echo " KerberosIV support: $KRB4_MSG"
1637 echo " AFS support: $AFS_MSG"
1638 echo " S/KEY support: $SKEY_MSG"
1639 echo " TCP Wrappers support: $TCPW_MSG"
1640 echo " MD5 password support: $MD5_MSG"
1641 echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
1642 echo " Use IPv4 by default hack: $IPV4_HACK_MSG"
1643 echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
1647 echo " Host: ${host}"
1648 echo " Compiler: ${CC}"
1649 echo " Compiler flags: ${CFLAGS}"
1650 echo "Preprocessor flags: ${CPPFLAGS}"
1651 echo " Linker flags: ${LDFLAGS}"
1652 echo " Libraries: ${LIBS}"
1656 if test "x$PAM_MSG" = "xyes" ; then
1657 echo "PAM is enabled. You may need to install a PAM control file for sshd,"
1658 echo "otherwise password authentication may fail. Example PAM control files"
1659 echo "can be found in the contrib/ subdirectory"
1663 if test ! -z "$BUILTIN_RNG" ; then
1664 echo "WARNING: you are using the builtin random number collection service."
1665 echo "Please read WARNING.RNG and request that your OS vendor includes"
1666 echo "/dev/random in future versions of their OS."
1670 if test ! -z "$NO_SFTP"; then
1671 echo "sftp-server will be disabled. Your compiler does not support"
1672 echo "64bit integers."