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 AC_DEFINE(IP_TOS_IS_BROKEN)
184 LIBS="$LIBS -lgen -lnsl -lucb"
187 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
188 LDFLAGS="$LDFLAGS -L/usr/local/lib"
194 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
195 LDFLAGS="$LDFLAGS -L/usr/local/lib"
201 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
202 LDFLAGS="$LDFLAGS -L/usr/local/lib"
205 LIBS="$LIBS -lgen -lsocket"
209 CPPFLAGS="$CPPFLAGS -Dftruncate=chsize -I/usr/local/include"
210 LDFLAGS="$LDFLAGS -L/usr/local/lib"
213 LIBS="$LIBS -lgen -lsocket -los -lprot -lx -ltinfo -lm"
216 AC_DEFINE(BROKEN_SYS_TERMIO_H)
217 rsh_path="/usr/bin/rcmd"
218 AC_DEFINE(HAVE_SCO_PROTECTED_PW)
219 AC_DEFINE(DISABLE_SHADOW)
220 AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
223 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
224 LDFLAGS="$LDFLAGS -L/usr/local/lib"
227 LIBS="$LIBS -lprot -lx -ltinfo -lm"
229 rsh_path="/usr/bin/rcmd"
230 AC_DEFINE(HAVE_SCO_PROTECTED_PW)
231 AC_DEFINE(DISABLE_SHADOW)
232 AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
236 if test ! -z "USE_SIA" ; then
237 AC_MSG_CHECKING(for Digital Unix Security Integration Architecture)
238 if test -f /etc/sia/matrix.conf; then
240 AC_DEFINE(HAVE_OSF_SIA)
241 AC_DEFINE(DISABLE_LOGIN)
242 LIBS="$LIBS -lsecurity -ldb -lm -laud"
250 # Allow user to specify flags
252 [ --with-cflags Specify additional flags to pass to compiler],
254 if test "x$withval" != "xno" ; then
255 CFLAGS="$CFLAGS $withval"
259 AC_ARG_WITH(cppflags,
260 [ --with-cppflags Specify additional flags to pass to preprocessor] ,
262 if test "x$withval" != "xno"; then
263 CPPFLAGS="$CPPFLAGS $withval"
268 [ --with-ldflags Specify additional flags to pass to linker],
270 if test "x$withval" != "xno" ; then
271 LDFLAGS="$LDFLAGS $withval"
276 [ --with-libs Specify additional libraries to link with],
278 if test "x$withval" != "xno" ; then
279 LIBS="$LIBS $withval"
285 # Checks for libraries.
286 if test -z "$no_libsocket" ; then
287 AC_CHECK_LIB(nsl, yp_match, , )
289 if test -z "$no_libnsl" ; then
290 AC_CHECK_LIB(socket, main, , )
293 AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen")
294 AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***]))
295 AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil")
297 AC_CHECK_FUNC(regcomp,
300 AC_CHECK_LIB(pcre, pcre_info,
301 AC_DEFINE(HAVE_LIBPCRE) LIBS="$LIBS -lpcreposix -lpcre")
306 AC_CHECK_FUNC(strcasecmp,
307 [], [ AC_CHECK_LIB(resolv, strcasecmp, LIBS="$LIBS -lresolv") ]
309 AC_CHECK_FUNC(utimes,
310 [], [ AC_CHECK_LIB(c89, utimes, LIBS="$LIBS -lc89") ]
313 # Checks for header files.
314 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)
316 dnl Checks for library functions.
317 AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_af clock fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo 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)
318 dnl Checks for time functions
319 AC_CHECK_FUNCS(gettimeofday time)
320 dnl Checks for libutil functions
321 AC_CHECK_HEADERS(libutil.h)
322 AC_CHECK_FUNCS(login logout updwtmp logwtmp)
323 dnl Checks for utmp functions
324 AC_CHECK_FUNCS(endutent getutent getutid getutline pututline setutent)
325 AC_CHECK_FUNCS(utmpname)
326 dnl Checks for utmpx functions
327 AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline pututxline )
328 AC_CHECK_FUNCS(setutxent utmpxname)
330 AC_CHECK_FUNC(getuserattr,
331 [AC_DEFINE(HAVE_GETUSERATTR)],
332 [AC_CHECK_LIB(s, getuserattr, [LIBS="$LIBS -ls"; AC_DEFINE(HAVE_GETUSERATTR)])]
336 [AC_DEFINE(HAVE_LOGIN)],
337 [AC_CHECK_LIB(bsd, login, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_LOGIN)])]
340 AC_CHECK_FUNC(daemon,
341 [AC_DEFINE(HAVE_DAEMON)],
342 [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
345 AC_CHECK_FUNC(getpagesize,
346 [AC_DEFINE(HAVE_GETPAGESIZE)],
347 [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])]
350 # Check for broken snprintf
351 if test "x$ac_cv_func_snprintf" = "xyes" ; then
352 AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
356 int main(void){char b[5];snprintf(b,5,"123456789");return(b[4]!='\0');}
358 [AC_MSG_RESULT(yes)],
361 AC_DEFINE(BROKEN_SNPRINTF)
362 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
371 [ --without-pam Disable PAM support ],
373 if test "x$withval" = "xno" ; then
375 AC_DEFINE(DISABLE_PAM)
380 if (test -z "$no_pam" && test "x$ac_cv_header_security_pam_appl_h" = "xyes") ; then
381 AC_CHECK_LIB(dl, dlopen, , )
384 AC_CHECK_FUNCS(pam_getenvlist)
390 # Check PAM strerror arguments (old PAM)
391 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
395 #include <security/pam_appl.h>
397 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
400 AC_DEFINE(HAVE_OLD_PAM)
402 PAM_MSG="yes (old library)"
407 # The big search for OpenSSL
409 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
411 if test "x$withval" != "xno" ; then
418 saved_LDFLAGS="$LDFLAGS"
419 saved_CPPFLAGS="$CPPFLAGS"
420 if test "x$prefix" != "xNONE" ; then
421 tryssldir="$tryssldir $prefix"
423 AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [
425 for ssldir in $tryssldir "" /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
426 if test ! -z "$ssldir" ; then
427 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
428 CPPFLAGS="$saved_CPPFLAGS -I$ssldir/include"
429 if test ! -z "$need_dash_r" ; then
430 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
433 LDFLAGS="$saved_LDFLAGS"
436 LIBS="$saved_LIBS -lcrypto"
438 # Basic test to check for compatible version and correct linking
439 # *does not* test for RSA - that comes later.
443 #include <openssl/rand.h>
447 memset(a, 0, sizeof(a));
448 RAND_add(a, sizeof(a), sizeof(a));
449 return(RAND_status() <= 0);
458 if test ! -z "$found_crypto" ; then
463 if test -z "$found_crypto" ; then
464 AC_MSG_ERROR([Could not find working SSLeay / OpenSSL libraries, please install])
466 if test -z "$ssldir" ; then
470 ac_cv_openssldir=$ssldir
473 if (test ! -z "$ac_cv_openssldir" && test "x$ac_cv_openssldir" != "x(system)") ; then
474 AC_DEFINE(HAVE_OPENSSL)
475 dnl Need to recover ssldir - test above runs in subshell
476 ssldir=$ac_cv_openssldir
477 CPPFLAGS="$saved_CPPFLAGS -I$ssldir/include"
478 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
479 if test ! -z "$need_dash_r" ; then
480 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
482 if test ! -z "$blibpath" ; then
483 blibpath="$blibpath:$ssldir:$ssldir/lib"
486 LIBS="$saved_LIBS -lcrypto"
488 # Now test RSA support
490 AC_MSG_CHECKING([for RSA support])
491 for WANTS_RSAREF in "" 1 ; do
492 if test -z "$WANTS_RSAREF" ; then
495 LIBS="$saved_LIBS -lRSAglue -lrsaref"
499 #include <openssl/rand.h>
500 #include <openssl/rsa.h>
501 #include <openssl/bn.h>
502 #include <openssl/sha.h>
505 int num; RSA *key; static unsigned char p_in[] = "blahblah";
506 unsigned char c[256], p[256];
507 memset(c, 0, sizeof(c)); RAND_add(c, sizeof(c), sizeof(c));
508 if ((key=RSA_generate_key(512, 3, NULL, NULL))==NULL) return(1);
509 num = RSA_public_encrypt(sizeof(p_in) - 1, p_in, c, key, RSA_PKCS1_PADDING);
510 return(-1 == RSA_private_decrypt(num, c, p, key, RSA_PKCS1_PADDING));
519 if test ! -z "$no_rsa" ; then
520 AC_MSG_RESULT(disabled)
523 if test -z "$rsa_works" ; then
524 AC_MSG_WARN([*** No RSA support found *** ])
527 if test -z "$WANTS_RSAREF" ; then
531 RSA_MSG="yes (using RSAref)"
532 AC_MSG_RESULT(using RSAref)
533 LIBS="$saved_LIBS -lcrypto -lRSAglue -lrsaref"
538 # Cheap hack to ensure NEWS-OS libraries are arranged right.
539 if test ! -z "$SONY" ; then
540 LIBS="$LIBS -liberty";
543 # Checks for data types
544 AC_CHECK_SIZEOF(char, 1)
545 AC_CHECK_SIZEOF(short int, 2)
546 AC_CHECK_SIZEOF(int, 4)
547 AC_CHECK_SIZEOF(long int, 4)
548 AC_CHECK_SIZEOF(long long int, 8)
550 # More checks for data types
551 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
553 [ #include <sys/types.h> ],
555 [ ac_cv_have_u_int="yes" ],
556 [ ac_cv_have_u_int="no" ]
559 if test "x$ac_cv_have_u_int" = "xyes" ; then
560 AC_DEFINE(HAVE_U_INT)
564 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
566 [ #include <sys/types.h> ],
567 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
568 [ ac_cv_have_intxx_t="yes" ],
569 [ ac_cv_have_intxx_t="no" ]
572 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
573 AC_DEFINE(HAVE_INTXX_T)
577 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
579 [ #include <sys/types.h> ],
580 [ int64_t a; a = 1;],
581 [ ac_cv_have_int64_t="yes" ],
582 [ ac_cv_have_int64_t="no" ]
585 if test "x$ac_cv_have_int64_t" = "xyes" ; then
586 AC_DEFINE(HAVE_INT64_T)
590 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
592 [ #include <sys/types.h> ],
593 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
594 [ ac_cv_have_u_intxx_t="yes" ],
595 [ ac_cv_have_u_intxx_t="no" ]
598 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
599 AC_DEFINE(HAVE_U_INTXX_T)
603 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
605 [ #include <sys/types.h> ],
606 [ u_int64_t a; a = 1;],
607 [ ac_cv_have_u_int64_t="yes" ],
608 [ ac_cv_have_u_int64_t="no" ]
611 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
612 AC_DEFINE(HAVE_U_INT64_T)
616 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
617 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
619 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
622 #include <sys/bitypes.h>
625 int8_t a; int16_t b; int32_t c;
626 u_int8_t e; u_int16_t f; u_int32_t g;
627 a = b = c = e = f = g = 1;
630 AC_DEFINE(HAVE_U_INTXX_T)
631 AC_DEFINE(HAVE_INTXX_T)
638 if test -z "$have_u_intxx_t" ; then
639 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
642 #include <sys/types.h>
644 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
645 [ ac_cv_have_uintxx_t="yes" ],
646 [ ac_cv_have_uintxx_t="no" ]
649 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
650 AC_DEFINE(HAVE_UINTXX_T)
654 AC_CACHE_CHECK([for socklen_t], ac_cv_have_socklen_t, [
657 #include <sys/types.h>
658 #include <sys/socket.h>
660 [socklen_t foo; foo = 1235;],
661 [ ac_cv_have_socklen_t="yes" ],
662 [ ac_cv_have_socklen_t="no" ]
665 if test "x$ac_cv_have_socklen_t" = "xyes" ; then
666 AC_DEFINE(HAVE_SOCKLEN_T)
669 AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
672 #include <sys/types.h>
674 [ size_t foo; foo = 1235; ],
675 [ ac_cv_have_size_t="yes" ],
676 [ ac_cv_have_size_t="no" ]
679 if test "x$ac_cv_have_size_t" = "xyes" ; then
680 AC_DEFINE(HAVE_SIZE_T)
683 AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
686 #include <sys/types.h>
688 [ ssize_t foo; foo = 1235; ],
689 [ ac_cv_have_ssize_t="yes" ],
690 [ ac_cv_have_ssize_t="no" ]
693 if test "x$ac_cv_have_ssize_t" = "xyes" ; then
694 AC_DEFINE(HAVE_SSIZE_T)
697 AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [
702 [ clock_t foo; foo = 1235; ],
703 [ ac_cv_have_clock_t="yes" ],
704 [ ac_cv_have_clock_t="no" ]
707 if test "x$ac_cv_have_clock_t" = "xyes" ; then
708 AC_DEFINE(HAVE_CLOCK_T)
711 AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
714 #include <sys/types.h>
715 #include <sys/socket.h>
717 [ sa_family_t foo; foo = 1235; ],
718 [ ac_cv_have_sa_family_t="yes" ],
721 #include <sys/types.h>
722 #include <sys/socket.h>
723 #include <netinet/in.h>
725 [ sa_family_t foo; foo = 1235; ],
726 [ ac_cv_have_sa_family_t="yes" ],
728 [ ac_cv_have_sa_family_t="no" ]
732 if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
733 AC_DEFINE(HAVE_SA_FAMILY_T)
736 AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
739 #include <sys/types.h>
741 [ pid_t foo; foo = 1235; ],
742 [ ac_cv_have_pid_t="yes" ],
743 [ ac_cv_have_pid_t="no" ]
746 if test "x$ac_cv_have_pid_t" = "xyes" ; then
747 AC_DEFINE(HAVE_PID_T)
750 AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
753 #include <sys/types.h>
755 [ mode_t foo; foo = 1235; ],
756 [ ac_cv_have_mode_t="yes" ],
757 [ ac_cv_have_mode_t="no" ]
760 if test "x$ac_cv_have_mode_t" = "xyes" ; then
761 AC_DEFINE(HAVE_MODE_T)
765 AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
768 #include <sys/types.h>
769 #include <sys/socket.h>
771 [ struct sockaddr_storage s; ],
772 [ ac_cv_have_struct_sockaddr_storage="yes" ],
773 [ ac_cv_have_struct_sockaddr_storage="no" ]
776 if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
777 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)
780 AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
783 #include <sys/types.h>
784 #include <netinet/in.h>
786 [ struct sockaddr_in6 s; s.sin6_family = 0; ],
787 [ ac_cv_have_struct_sockaddr_in6="yes" ],
788 [ ac_cv_have_struct_sockaddr_in6="no" ]
791 if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
792 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)
795 AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
798 #include <sys/types.h>
799 #include <netinet/in.h>
801 [ struct in6_addr s; s.s6_addr[0] = 0; ],
802 [ ac_cv_have_struct_in6_addr="yes" ],
803 [ ac_cv_have_struct_in6_addr="no" ]
806 if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
807 AC_DEFINE(HAVE_STRUCT_IN6_ADDR)
810 AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
813 #include <sys/types.h>
814 #include <sys/socket.h>
817 [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ],
818 [ ac_cv_have_struct_addrinfo="yes" ],
819 [ ac_cv_have_struct_addrinfo="no" ]
822 if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
823 AC_DEFINE(HAVE_STRUCT_ADDRINFO)
826 # If we don't have int64_t then we can't compile sftp-server. So don't
827 # even attempt to do it.
828 if test "x$ac_cv_have_int64_t" = "xno" -a \
829 "x$ac_cv_sizeof_long_int" != "x8" -a \
830 "x$ac_cv_sizeof_long_long_int" = "x0" ; then
835 dnl Checks for structure members
836 OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
837 OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX)
838 OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX)
839 OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP)
840 OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP)
841 OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX)
842 OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP)
843 OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP)
844 OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmpx.h, HAVE_ID_IN_UTMPX)
845 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP)
846 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX)
847 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP)
848 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX)
849 OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP)
850 OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP)
851 OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX)
852 OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX)
855 AC_CACHE_CHECK([for sun_len field in struct sockaddr_un],
856 ac_cv_have_sun_len_in_struct_sockaddr_un, [
859 #include <sys/types.h>
860 #include <sys/socket.h>
862 [ struct sockaddr_un s; s.sun_len = 1; ],
863 [ ac_cv_have_sun_len_in_struct_sockaddr_un="yes" ],
864 [ ac_cv_have_sun_len_in_struct_sockaddr_un="no" ],
867 if test "x$ac_cv_have_sun_len_in_struct_sockaddr_un" = "xyes" ; then
868 AC_DEFINE(HAVE_SUN_LEN_IN_SOCKADDR_UN)
871 AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
872 ac_cv_have_ss_family_in_struct_ss, [
875 #include <sys/types.h>
876 #include <sys/socket.h>
878 [ struct sockaddr_storage s; s.ss_family = 1; ],
879 [ ac_cv_have_ss_family_in_struct_ss="yes" ],
880 [ ac_cv_have_ss_family_in_struct_ss="no" ],
883 if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
884 AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
887 AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
888 ac_cv_have___ss_family_in_struct_ss, [
891 #include <sys/types.h>
892 #include <sys/socket.h>
894 [ struct sockaddr_storage s; s.__ss_family = 1; ],
895 [ ac_cv_have___ss_family_in_struct_ss="yes" ],
896 [ ac_cv_have___ss_family_in_struct_ss="no" ]
899 if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
900 AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
903 AC_CACHE_CHECK([for pw_class field in struct passwd],
904 ac_cv_have_pw_class_in_struct_passwd, [
909 [ struct passwd p; p.pw_class = 0; ],
910 [ ac_cv_have_pw_class_in_struct_passwd="yes" ],
911 [ ac_cv_have_pw_class_in_struct_passwd="no" ]
914 if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
915 AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD)
919 AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
921 [ extern char *__progname; printf("%s", __progname); ],
922 [ ac_cv_libc_defines___progname="yes" ],
923 [ ac_cv_libc_defines___progname="no" ]
926 if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
927 AC_DEFINE(HAVE___PROGNAME)
931 AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
933 [ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);],
934 [ ac_cv_libc_defines_sys_errlist="yes" ],
935 [ ac_cv_libc_defines_sys_errlist="no" ]
938 if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
939 AC_DEFINE(HAVE_SYS_ERRLIST)
943 AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [
945 [ extern int sys_nerr; printf("%i", sys_nerr);],
946 [ ac_cv_libc_defines_sys_nerr="yes" ],
947 [ ac_cv_libc_defines_sys_nerr="no" ]
950 if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
951 AC_DEFINE(HAVE_SYS_NERR)
955 # Looking for programs, paths and files
957 [ --with-rsh=PATH Specify path to remote shell program ],
959 if test "x$withval" != "$no" ; then
964 AC_PATH_PROG(rsh_path, rsh)
969 [ --with-xauth=PATH Specify path to xauth program ],
971 if test "x$withval" != "xno" ; then
976 AC_PATH_PROG(xauth_path, xauth,,$PATH:/usr/X/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/openwin/bin)
977 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
978 xauth_path="/usr/openwin/bin/xauth"
983 if test -z "$xauth_path" ; then
984 XAUTH_PATH="undefined"
987 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
988 XAUTH_PATH=$xauth_path
991 if test ! -z "$rsh_path" ; then
992 AC_DEFINE_UNQUOTED(RSH_PATH, "$rsh_path")
995 # Check for mail directory (last resort if we cannot get it from headers)
996 if test ! -z "$MAIL" ; then
997 maildir=`dirname $MAIL`
998 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
1001 if test -z "$no_dev_ptmx" ; then
1002 AC_CHECK_FILE("/dev/ptmx",
1004 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
1009 AC_CHECK_FILE("/dev/ptc",
1011 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
1016 # Options from here on. Some of these are preset by platform above
1018 # Check for user-specified random device, otherwise check /dev/urandom
1020 [ --with-random=FILE read randomness from FILE (default=/dev/urandom)],
1022 if test "x$withval" != "xno" ; then
1023 RANDOM_POOL="$withval";
1024 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
1028 # Check for random device
1029 AC_CHECK_FILE("/dev/urandom",
1031 RANDOM_POOL="/dev/urandom";
1032 AC_SUBST(RANDOM_POOL)
1033 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
1039 # Check for EGD pool file
1040 AC_ARG_WITH(egd-pool,
1041 [ --with-egd-pool=FILE read randomness from EGD pool FILE (default none)],
1043 if test "x$withval" != "xno" ; then
1044 EGD_SOCKET="$withval";
1045 AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET")
1050 # detect pathnames for entropy gathering commands, if we need them
1051 INSTALL_SSH_PRNG_CMDS=""
1053 if (test -z "$RANDOM_POOL" && test -z "$EGD_SOCKET") ; then
1054 # Use these commands to collect entropy
1055 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
1056 OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
1057 OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
1058 OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
1059 OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
1060 OSSH_PATH_ENTROPY_PROG(PROG_W, w)
1061 OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
1062 OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
1063 OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
1064 OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
1065 OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
1066 OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
1067 OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
1068 OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
1069 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
1071 INSTALL_SSH_PRNG_CMDS="yes"
1073 AC_SUBST(INSTALL_SSH_PRNG_CMDS)
1077 [ --with-catman=man|cat Install preformatted manpages[no]],
1080 if test x"$withval" != x"yes" ; then
1086 if test -z "$MANTYPE" ; then
1087 MANTYPE='$(TROFFMAN)'
1095 # Check whether user wants Kerberos support
1097 AC_ARG_WITH(kerberos4,
1098 [ --with-kerberos4=PATH Enable Kerberos 4 support],
1100 if test "x$withval" != "xno" ; then
1102 if test "x$withval" != "xyes" ; then
1103 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1104 LDFLAGS="$LDFLAGS -L${withval}/lib"
1105 if test ! -z "$need_dash_r" ; then
1106 LDFLAGS="$LDFLAGS -R${withval}/lib"
1108 if test ! -z "$blibpath" ; then
1109 blibpath="$blibpath:${withval}/lib"
1112 if test -d /usr/include/kerberosIV ; then
1113 CPPFLAGS="$CPPFLAGS -I/usr/include/kerberosIV"
1117 AC_CHECK_HEADERS(krb.h)
1118 AC_CHECK_LIB(krb, main)
1119 if test "$ac_cv_header_krb_h" != yes; then
1120 AC_MSG_WARN([Cannot find krb.h, build may fail])
1122 if test "$ac_cv_lib_krb_main" != yes; then
1123 AC_MSG_WARN([Cannot find libkrb, build may fail])
1127 AC_CHECK_LIB(resolv, dn_expand, , )
1135 # Check whether user wants AFS support
1138 [ --with-afs=PATH Enable AFS support],
1140 if test "x$withval" != "xno" ; then
1142 if test "x$withval" != "xyes" ; then
1143 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1144 LDFLAGS="$LDFLAGS -L${withval}/lib"
1147 if test -z "$KRB4" ; then
1148 AC_MSG_WARN([AFS requires Kerberos IV support, build may fail])
1152 if test ! -z "$AFS_LIBS" ; then
1153 LIBS="$LIBS $AFS_LIBS"
1162 # Check whether user wants S/Key support
1165 [ --with-skey=PATH Enable S/Key support],
1167 if test "x$withval" != "xno" ; then
1169 if test "x$withval" != "xyes" ; then
1170 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1171 LDFLAGS="$LDFLAGS -L${withval}/lib"
1178 AC_CHECK_FUNC(skey_keyinfo,
1181 AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
1187 # Check whether user wants TCP wrappers support
1189 AC_ARG_WITH(tcp-wrappers,
1190 [ --with-tcp-wrappers Enable tcpwrappers support],
1192 if test "x$withval" != "xno" ; then
1195 AC_MSG_CHECKING(for libwrap)
1199 int deny_severity = 0, allow_severity = 0;
1208 AC_MSG_ERROR([*** libwrap missing])
1215 # Check whether to enable MD5 passwords
1217 AC_ARG_WITH(md5-passwords,
1218 [ --with-md5-passwords Enable use of MD5 passwords],
1220 if test "x$withval" != "xno" ; then
1221 AC_DEFINE(HAVE_MD5_PASSWORDS)
1227 # Whether to disable shadow password support
1229 [ --without-shadow Disable shadow password support],
1231 if test "x$withval" = "xno" ; then
1232 AC_DEFINE(DISABLE_SHADOW)
1238 if test -z "$disable_shadow" ; then
1239 AC_MSG_CHECKING([if the systems has expire shadow information])
1242 #include <sys/types.h>
1245 ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ],
1246 [ sp_expire_available=yes ], []
1249 if test "x$sp_expire_available" = "xyes" ; then
1251 AC_DEFINE(HAS_SHADOW_EXPIRE)
1257 # Use ip address instead of hostname in $DISPLAY
1258 if test ! -z "$IPADDR_IN_DISPLAY" ; then
1259 DISPLAY_HACK_MSG="yes"
1260 AC_DEFINE(IPADDR_IN_DISPLAY)
1262 DISPLAY_HACK_MSG="no"
1263 AC_ARG_WITH(ipaddr-display,
1264 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
1266 if test "x$withval" != "xno" ; then
1267 AC_DEFINE(IPADDR_IN_DISPLAY)
1268 DISPLAY_HACK_MSG="yes"
1274 # Whether to mess with the default path
1275 SERVER_PATH_MSG="(default)"
1276 AC_ARG_WITH(default-path,
1277 [ --with-default-path=PATH Specify default \$PATH environment for server],
1279 if test "x$withval" != "xno" ; then
1280 AC_DEFINE_UNQUOTED(USER_PATH, "$withval")
1281 SERVER_PATH_MSG="$withval"
1286 # Whether to force IPv4 by default (needed on broken glibc Linux)
1288 AC_ARG_WITH(ipv4-default,
1289 [ --with-ipv4-default Use IPv4 by connections unless '-6' specified],
1291 if test "x$withval" != "xno" ; then
1292 AC_DEFINE(IPV4_DEFAULT)
1298 AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
1299 IPV4_IN6_HACK_MSG="no"
1301 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
1303 if test "x$withval" != "xno" ; then
1305 AC_DEFINE(IPV4_IN_IPV6)
1306 IPV4_IN6_HACK_MSG="yes"
1311 if test "x$inet6_default_4in6" = "xyes"; then
1312 AC_MSG_RESULT([yes (default)])
1313 AC_DEFINE(IPV4_IN_IPV6)
1314 IPV4_IN6_HACK_MSG="yes"
1316 AC_MSG_RESULT([no (default)])
1321 AC_MSG_CHECKING(whether to install ssh as suid root)
1322 AC_ARG_ENABLE(suid-ssh,
1323 [ --enable-suid-ssh Install ssh as suid root (default)
1324 --disable-suid-ssh Install ssh without suid bit],
1325 [ case "$enableval" in
1330 *) AC_MSG_RESULT(yes)
1340 # Where to place sshd.pid
1342 AC_ARG_WITH(pid-dir,
1343 [ --with-pid-dir=PATH Specify location of ssh.pid file],
1345 if test "x$withval" != "xno" ; then
1351 # make sure the directory exists
1352 if test ! -d $piddir ; then
1353 piddir=`eval echo ${sysconfdir}`
1355 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
1359 AC_DEFINE_UNQUOTED(PIDDIR, "$piddir")
1362 dnl allow user to disable some login recording features
1363 AC_ARG_ENABLE(lastlog,
1364 [ --disable-lastlog disable use of lastlog even if detected [no]],
1365 [ AC_DEFINE(DISABLE_LASTLOG) ]
1368 [ --disable-utmp disable use of utmp even if detected [no]],
1369 [ AC_DEFINE(DISABLE_UTMP) ]
1371 AC_ARG_ENABLE(utmpx,
1372 [ --disable-utmpx disable use of utmpx even if detected [no]],
1373 [ AC_DEFINE(DISABLE_UTMPX) ]
1376 [ --disable-wtmp disable use of wtmp even if detected [no]],
1377 [ AC_DEFINE(DISABLE_WTMP) ]
1379 AC_ARG_ENABLE(wtmpx,
1380 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
1381 [ AC_DEFINE(DISABLE_WTMPX) ]
1383 AC_ARG_ENABLE(libutil,
1384 [ --disable-libutil disable use of libutil (login() etc.) [no]],
1385 [ AC_DEFINE(DISABLE_LOGIN) ]
1387 AC_ARG_ENABLE(pututline,
1388 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
1389 [ AC_DEFINE(DISABLE_PUTUTLINE) ]
1391 AC_ARG_ENABLE(pututxline,
1392 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
1393 [ AC_DEFINE(DISABLE_PUTUTXLINE) ]
1395 AC_ARG_WITH(lastlog,
1396 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
1397 [ conf_lastlog_location="$withval"; ],)
1399 dnl lastlog, [uw]tmpx? detection
1400 dnl NOTE: set the paths in the platform section to avoid the
1401 dnl need for command-line parameters
1402 dnl lastlog and [uw]tmp are subject to a file search if all else fails
1404 dnl lastlog detection
1405 dnl NOTE: the code itself will detect if lastlog is a directory
1406 AC_MSG_CHECKING([if your system defines LASTLOG_FILE])
1408 #include <sys/types.h>
1410 #ifdef HAVE_LASTLOG_H
1411 # include <lastlog.h>
1417 [ char *lastlog = LASTLOG_FILE; ],
1418 [ AC_MSG_RESULT(yes) ],
1421 AC_MSG_CHECKING([if your system defines _PATH_LASTLOG])
1423 #include <sys/types.h>
1425 #ifdef HAVE_LASTLOG_H
1426 # include <lastlog.h>
1432 [ char *lastlog = _PATH_LASTLOG; ],
1433 [ AC_MSG_RESULT(yes) ],
1436 system_lastlog_path=no
1441 if test -z "$conf_lastlog_location"; then
1442 if test x"$system_lastlog_path" = x"no" ; then
1443 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
1444 if (test -d "$f" || test -f "$f") ; then
1445 conf_lastlog_location=$f
1448 if test -z "$conf_lastlog_location"; then
1449 AC_MSG_WARN([** Cannot find lastlog **])
1450 dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx
1455 if test -n "$conf_lastlog_location"; then
1456 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location")
1460 AC_MSG_CHECKING([if your system defines UTMP_FILE])
1462 #include <sys/types.h>
1468 [ char *utmp = UTMP_FILE; ],
1469 [ AC_MSG_RESULT(yes) ],
1471 system_utmp_path=no ]
1473 if test -z "$conf_utmp_location"; then
1474 if test x"$system_utmp_path" = x"no" ; then
1475 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
1476 if test -f $f ; then
1477 conf_utmp_location=$f
1480 if test -z "$conf_utmp_location"; then
1481 AC_DEFINE(DISABLE_UTMP)
1485 if test -n "$conf_utmp_location"; then
1486 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location")
1490 AC_MSG_CHECKING([if your system defines WTMP_FILE])
1492 #include <sys/types.h>
1498 [ char *wtmp = WTMP_FILE; ],
1499 [ AC_MSG_RESULT(yes) ],
1501 system_wtmp_path=no ]
1503 if test -z "$conf_wtmp_location"; then
1504 if test x"$system_wtmp_path" = x"no" ; then
1505 for f in /usr/adm/wtmp /var/log/wtmp; do
1506 if test -f $f ; then
1507 conf_wtmp_location=$f
1510 if test -z "$conf_wtmp_location"; then
1511 AC_DEFINE(DISABLE_WTMP)
1515 if test -n "$conf_wtmp_location"; then
1516 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location")
1520 dnl utmpx detection - I don't know any system so perverse as to require
1521 dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out
1523 AC_MSG_CHECKING([if your system defines UTMPX_FILE])
1525 #include <sys/types.h>
1534 [ char *utmpx = UTMPX_FILE; ],
1535 [ AC_MSG_RESULT(yes) ],
1537 system_utmpx_path=no ]
1539 if test -z "$conf_utmpx_location"; then
1540 if test x"$system_utmpx_path" = x"no" ; then
1541 AC_DEFINE(DISABLE_UTMPX)
1544 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location")
1548 AC_MSG_CHECKING([if your system defines WTMPX_FILE])
1550 #include <sys/types.h>
1559 [ char *wtmpx = WTMPX_FILE; ],
1560 [ AC_MSG_RESULT(yes) ],
1562 system_wtmpx_path=no ]
1564 if test -z "$conf_wtmpx_location"; then
1565 if test x"$system_wtmpx_path" = x"no" ; then
1566 AC_DEFINE(DISABLE_WTMPX)
1569 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location")
1573 # Change default command timeout for builtin PRNG
1575 AC_ARG_WITH(entropy-timeout,
1576 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)],
1578 if test "x$withval" != "xno" ; then
1579 entropy_timeout=$withval
1583 AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout)
1586 if test ! -z "$blibpath" ; then
1587 LDFLAGS="$LDFLAGS -blibpath:$blibpath"
1588 AC_MSG_WARN([Please check and edit -blibpath in LDFLAGS in Makefile])
1593 AC_OUTPUT(Makefile ssh_prng_cmds)
1595 # Print summary of options
1597 if test x$MANTYPE = x'$(CATMAN)' ; then
1602 if test ! -z "$RANDOM_POOL" ; then
1603 RAND_MSG="Device ($RANDOM_POOL)"
1605 if test ! -z "$EGD_SOCKET" ; then
1606 RAND_MSG="EGD ($EGD_SOCKET)"
1608 RAND_MSG="Builtin (timeout $entropy_timeout)"
1613 # Someone please show me a better way :)
1614 A=`eval echo ${prefix}` ; A=`eval echo ${A}`
1615 B=`eval echo ${bindir}` ; B=`eval echo ${B}`
1616 C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
1617 D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
1618 E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
1619 F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
1620 G=`eval echo ${piddir}` ; G=`eval echo ${G}`
1623 echo "OpenSSH configured has been configured with the following options."
1624 echo " User binaries: $B"
1625 echo " User binaries: $B"
1626 echo " System binaries: $C"
1627 echo " Configuration files: $D"
1628 echo " Askpass program: $E"
1629 echo " Manual pages: $F"
1630 echo " PID file: $G"
1631 echo " Random number collection: $RAND_MSG"
1632 echo " Manpage format: $MAN_MSG"
1633 echo " PAM support: ${PAM_MSG}"
1634 echo " KerberosIV support: $KRB4_MSG"
1635 echo " AFS support: $AFS_MSG"
1636 echo " S/KEY support: $SKEY_MSG"
1637 echo " TCP Wrappers support: $TCPW_MSG"
1638 echo " MD5 password support: $MD5_MSG"
1639 echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
1640 echo " Use IPv4 by default hack: $IPV4_HACK_MSG"
1641 echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
1645 echo " Host: ${host}"
1646 echo " Compiler: ${CC}"
1647 echo " Compiler flags: ${CFLAGS}"
1648 echo "Preprocessor flags: ${CPPFLAGS}"
1649 echo " Linker flags: ${LDFLAGS}"
1650 echo " Libraries: ${LIBS}"
1654 if test "x$PAM_MSG" = "xyes" ; then
1655 echo "PAM is enabled. You may need to install a PAM control file for sshd,"
1656 echo "otherwise password authentication may fail. Example PAM control files"
1657 echo "can be found in the contrib/ subdirectory"
1661 if test ! -z "$BUILTIN_RNG" ; then
1662 echo "WARNING: you are using the builtin random number collection service."
1663 echo "Please read WARNING.RNG and request that your OS vendor includes"
1664 echo "/dev/random in future versions of their OS."
1668 if test ! -z "$NO_SFTP"; then
1669 echo "sftp-server will be disabled. Your compiler does not support"
1670 echo "64bit integers."