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)
17 if test -z "$LD" ; then
24 if test "$GCC" = "yes"; then
25 CFLAGS="$CFLAGS -Wall"
28 # Check for some target-specific stuff
32 CFLAGS="$CFLAGS -I/usr/local/include"
33 LDFLAGS="$LDFLAGS -L/usr/local/lib"
34 if test "$LD" != "gcc" -a -z "$blibpath"; then
35 blibpath="/usr/lib:/lib:/usr/local/lib"
37 AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)])
38 AC_DEFINE(BROKEN_GETADDRINFO)
41 if test -z "$GCC"; then
44 CFLAGS="$CFLAGS -D_HPUX_SOURCE"
45 CFLAGS="$CFLAGS -I/usr/local/include"
46 LDFLAGS="$LDFLAGS -L/usr/local/lib"
47 AC_DEFINE(IPADDR_IN_DISPLAY)
49 AC_MSG_CHECKING(for HPUX trusted system password database)
50 if test -f /tcb/files/auth/system/default; then
52 AC_DEFINE(HAVE_HPUX_TRUSTED_SYSTEM_PW)
54 AC_MSG_WARN([This configuration is untested])
57 AC_DEFINE(DISABLE_SHADOW)
63 if test -z "$GCC"; then
66 CFLAGS="$CFLAGS -D_HPUX_SOURCE"
67 CFLAGS="$CFLAGS -I/usr/local/include"
68 LDFLAGS="$LDFLAGS -L/usr/local/lib"
69 AC_DEFINE(IPADDR_IN_DISPLAY)
71 AC_MSG_CHECKING(for HPUX trusted system password database)
72 if test -f /tcb/files/auth/system/default; then
74 AC_DEFINE(HAVE_HPUX_TRUSTED_SYSTEM_PW)
76 AC_MSG_WARN([This configuration is untested])
79 AC_DEFINE(DISABLE_SHADOW)
85 CFLAGS="$CFLAGS -I/usr/local/include"
86 LDFLAGS="$LDFLAGS -L/usr/local/lib"
92 CFLAGS="$CFLAGS -I/usr/local/include"
93 LDFLAGS="$LDFLAGS -L/usr/local/lib"
95 AC_MSG_WARN([*** Irix 6.x is not tested, please report you experiences *** ])
101 AC_DEFINE(DONT_TRY_OTHER_AF)
102 inet6_default_4in6=yes
108 CFLAGS="$CFLAGS -I/usr/local/include"
109 LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib -L/usr/ucblib -R/usr/ucblib"
114 CFLAGS="$CFLAGS -DSUNOS4"
115 AC_CHECK_FUNCS(getpwanam)
118 CFLAGS="$CFLAGS -I/usr/local/include"
119 LDFLAGS="$LDFLAGS -L/usr/local/lib"
123 LIBS="$LIBS -lgen -lsocket"
127 # Checks for libraries.
128 AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***]))
129 AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil")
131 if test -z "$no_libsocket" ; then
132 AC_CHECK_LIB(nsl, yp_match, , )
134 if test -z "$no_libnsl" ; then
135 AC_CHECK_LIB(socket, main, , )
138 # Checks for header files.
139 AC_CHECK_HEADERS(bstring.h endian.h lastlog.h login.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/select.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h stddef.h util.h utmp.h utmpx.h)
141 # Checks for library functions.
142 AC_CHECK_FUNCS(arc4random b64_ntop bcopy bindresvport_af clock freeaddrinfo gai_strerror getaddrinfo getnameinfo getrusage innetgr md5_crypt memmove mkdtemp openpty rresvport_af setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy updwtmpx vsnprintf vhangup _getpty __b64_ntop)
145 [AC_DEFINE(HAVE_LOGIN)],
146 [AC_CHECK_LIB(bsd, login, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_LOGIN)])]
149 AC_CHECK_FUNC(daemon,
150 [AC_DEFINE(HAVE_DAEMON)],
151 [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
154 AC_CHECK_FUNC(getpagesize,
155 [AC_DEFINE(HAVE_GETPAGESIZE)],
156 [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])]
160 [ --without-pam Disable PAM support ],
162 if test "x$withval" = "xno" ; then
164 AC_DEFINE(DISABLE_PAM)
168 if test -z "$no_pam" -a "x$ac_cv_header_security_pam_appl_h" = "xyes" ; then
169 AC_CHECK_LIB(dl, dlopen, , )
172 AC_CHECK_FUNCS(pam_getenvlist)
174 # Check PAM strerror arguments (old PAM)
175 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
179 #include <security/pam_appl.h>
181 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
184 AC_DEFINE(HAVE_OLD_PAM)
190 # The big search for OpenSSL
192 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
194 if test "x$withval" != "$xno" ; then
201 saved_LDFLAGS="$LDFLAGS"
202 saved_CFLAGS="$CFLAGS"
203 if test "x$prefix" != "xNONE" ; then
204 tryssldir="$tryssldir $prefix"
206 AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [
208 for ssldir in "" $tryssldir /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
209 if test ! -z "$ssldir" ; then
210 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
211 CFLAGS="$saved_CFLAGS -I$ssldir/include"
212 if test ! -z "$need_dash_r" ; then
213 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
216 LDFLAGS="$saved_LDFLAGS"
219 LIBS="$saved_LIBS -lcrypto"
221 # Basic test to check for compatible version and correct linking
222 # *does not* test for RSA - that comes later.
226 #include <openssl/rand.h>
230 memset(a, 0, sizeof(a));
231 RAND_add(a, sizeof(a), sizeof(a));
232 return(RAND_status() <= 0);
241 if test ! -z "$found_crypto" ; then
246 if test -z "$found_crypto" ; then
247 AC_MSG_ERROR([Could not find working SSLeay / OpenSSL libraries, please install])
249 if test -z "$ssldir" ; then
253 ac_cv_openssldir=$ssldir
256 if test ! -z "$ac_cv_openssldir" -a ! "x$ac_cv_openssldir" = "x(system)" ; then
257 AC_DEFINE(HAVE_OPENSSL)
258 dnl Need to recover ssldir - test above runs in subshell
259 ssldir=$ac_cv_openssldir
260 CFLAGS="$saved_CFLAGS -I$ssldir/include"
261 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
262 if test ! -z "$need_dash_r" ; then
263 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
265 if test ! -z "$blibpath" ; then
266 blibpath="$blibpath:$ssldir:$ssldir/lib"
269 LIBS="$saved_LIBS -lcrypto"
271 # Now test RSA support
273 AC_MSG_CHECKING([for RSA support])
274 for WANTS_RSAREF in "" 1 ; do
275 if test -z "$WANTS_RSAREF" ; then
278 LIBS="$saved_LIBS -lRSAglue -lrsaref"
282 #include <openssl/rand.h>
283 #include <openssl/rsa.h>
284 #include <openssl/bn.h>
285 #include <openssl/sha.h>
288 int num; RSA *key; static unsigned char p_in[] = "blahblah";
289 unsigned char c[256], p[256];
290 memset(c, 0, sizeof(c)); RAND_add(c, sizeof(c), sizeof(c));
291 if ((key=RSA_generate_key(512, 3, NULL, NULL))==NULL) return(1);
292 num = RSA_public_encrypt(sizeof(p_in) - 1, p_in, c, key, RSA_PKCS1_PADDING);
293 return(-1 == RSA_private_decrypt(num, c, p, key, RSA_PKCS1_PADDING));
302 if test ! -z "$no_rsa" ; then
303 AC_MSG_RESULT(disabled)
305 if test -z "$rsa_works" ; then
306 AC_MSG_WARN([*** No RSA support found *** ])
308 if test -z "$WANTS_RSAREF" ; then
311 AC_MSG_RESULT(using RSAref)
312 LIBS="$saved_LIBS -lcrypto -lRSAglue -lrsaref"
317 # Checks for data types
318 AC_CHECK_SIZEOF(char, 1)
319 AC_CHECK_SIZEOF(short int, 2)
320 AC_CHECK_SIZEOF(int, 4)
321 AC_CHECK_SIZEOF(long int, 4)
322 AC_CHECK_SIZEOF(long long int, 8)
324 # More checks for data types
325 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
327 [ #include <sys/types.h> ],
328 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
329 [ ac_cv_have_intxx_t="yes" ],
330 [ ac_cv_have_intxx_t="no" ]
333 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
334 AC_DEFINE(HAVE_INTXX_T)
338 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
340 [ #include <sys/types.h> ],
341 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
342 [ ac_cv_have_u_intxx_t="yes" ],
343 [ ac_cv_have_u_intxx_t="no" ]
346 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
347 AC_DEFINE(HAVE_U_INTXX_T)
352 if test -z "$have_u_intxx_t" -o -z "$have_intxx_t" -a \
353 "x$ac_cv_header_sys_bitypes_h" = "xyes"
355 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
358 #include <sys/bitypes.h>
361 int8_t a; int16_t b; int32_t c;
362 u_int8_t e; u_int16_t f; u_int32_t g;
363 a = b = c = e = f = g = 1;
366 AC_DEFINE(HAVE_U_INTXX_T)
367 AC_DEFINE(HAVE_INTXX_T)
374 if test -z "$have_u_intxx_t" ; then
375 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
378 #include <sys/types.h>
380 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
381 [ ac_cv_have_uintxx_t="yes" ],
382 [ ac_cv_have_uintxx_t="no" ]
385 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
386 AC_DEFINE(HAVE_UINTXX_T)
390 AC_CACHE_CHECK([for socklen_t], ac_cv_have_socklen_t, [
393 #include <sys/types.h>
394 #include <sys/socket.h>
396 [socklen_t foo; foo = 1235;],
397 [ ac_cv_have_socklen_t="yes" ],
398 [ ac_cv_have_socklen_t="no" ]
401 if test "x$ac_cv_have_socklen_t" = "xyes" ; then
402 AC_DEFINE(HAVE_SOCKLEN_T)
405 AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
408 #include <sys/types.h>
410 [ size_t foo; foo = 1235; ],
411 [ ac_cv_have_size_t="yes" ],
412 [ ac_cv_have_size_t="no" ]
415 if test "x$ac_cv_have_size_t" = "xyes" ; then
416 AC_DEFINE(HAVE_SIZE_T)
419 AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
422 #include <sys/types.h>
424 [ ssize_t foo; foo = 1235; ],
425 [ ac_cv_have_ssize_t="yes" ],
426 [ ac_cv_have_ssize_t="no" ]
429 if test "x$ac_cv_have_ssize_t" = "xyes" ; then
430 AC_DEFINE(HAVE_SSIZE_T)
434 AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
437 #include <sys/types.h>
438 #include <sys/socket.h>
440 [ struct sockaddr_storage s; ],
441 [ ac_cv_have_struct_sockaddr_storage="yes" ],
442 [ ac_cv_have_struct_sockaddr_storage="no" ]
445 if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
446 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)
449 AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
452 #include <netinet/in.h>
454 [ struct sockaddr_in6 s; s.sin6_family = 0; ],
455 [ ac_cv_have_struct_sockaddr_in6="yes" ],
456 [ ac_cv_have_struct_sockaddr_in6="no" ]
459 if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
460 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)
463 AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
466 #include <netinet/in.h>
468 [ struct in6_addr s; s.s6_addr[0] = 0; ],
469 [ ac_cv_have_struct_in6_addr="yes" ],
470 [ ac_cv_have_struct_in6_addr="no" ]
473 if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
474 AC_DEFINE(HAVE_STRUCT_IN6_ADDR)
477 AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
480 #include <sys/types.h>
481 #include <sys/socket.h>
484 [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ],
485 [ ac_cv_have_struct_addrinfo="yes" ],
486 [ ac_cv_have_struct_addrinfo="no" ]
489 if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
490 AC_DEFINE(HAVE_STRUCT_ADDRINFO)
494 # Checks for structure members
496 OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
497 OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX)
498 OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX)
499 OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP)
500 OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP)
501 OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX)
502 OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP)
503 OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP)
504 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP)
505 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX)
506 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP)
507 OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX)
510 AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
511 ac_cv_have_ss_family_in_struct_ss, [
514 #include <sys/types.h>
515 #include <sys/socket.h>
517 [ struct sockaddr_storage s; s.ss_family = 1; ],
518 [ ac_cv_have_ss_family_in_struct_ss="yes" ],
519 [ ac_cv_have_ss_family_in_struct_ss="no" ],
522 if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
523 AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
527 AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
528 ac_cv_have___ss_family_in_struct_ss, [
531 #include <sys/types.h>
532 #include <sys/socket.h>
534 [ struct sockaddr_storage s; s.__ss_family = 1; ],
535 [ ac_cv_have___ss_family_in_struct_ss="yes" ],
536 [ ac_cv_have___ss_family_in_struct_ss="no" ]
539 if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
540 AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
544 AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
546 [ extern char *__progname; printf("%s", __progname); ],
547 [ ac_cv_libc_defines___progname="yes" ],
548 [ ac_cv_libc_defines___progname="no" ]
551 if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
552 AC_DEFINE(HAVE___PROGNAME)
556 # Looking for programs, paths and files
558 [ --with-rsh=PATH Specify path to remote shell program ],
560 if test "x$withval" != "$no" ; then
561 AC_DEFINE_UNQUOTED(RSH_PATH, "$withval")
565 AC_PATH_PROG(rsh_path, rsh)
570 [ --with-xauth=PATH Specify path to xauth program ],
572 if test "x$withval" != "$xno" ; then
573 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$withval")
577 AC_PATH_PROG(xauth_path, xauth)
578 if test ! -z "$xauth_path" -a -x "/usr/openwin/bin/xauth" ; then
579 xauth_path="/usr/openwin/bin/xauth"
584 if test ! -z "$xauth_path" ; then
585 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
587 if test ! -z "$rsh_path" ; then
588 AC_DEFINE_UNQUOTED(RSH_PATH, "$rsh_path")
591 # Check for mail directory (last resort if we cannot get it from headers)
592 if test ! -z "$MAIL" ; then
593 maildir=`dirname $MAIL`
594 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
597 # Look for lastlog location
599 [ --with-lastlog=FILE Location of lastlog file],
601 if test "x$withval" = "xno" ; then
602 AC_DEFINE(DISABLE_LASTLOG)
604 AC_DEFINE_UNQUOTED(LASTLOG_LOCATION, "$withval")
608 AC_MSG_CHECKING([location of lastlog file])
609 for lastlog in /var/log/lastlog /var/adm/lastlog /usr/adm/lastlog /etc/security/lastlog ; do
610 if test -f $lastlog ; then
614 if test -d $lastlog ; then
619 if test -z "$gotlastlog" ; then
620 AC_MSG_RESULT(not found)
623 if test "x$gotlastlog" = "xdir" ; then
624 AC_MSG_RESULT(${lastlog}/)
625 AC_DEFINE(LASTLOG_IS_DIR)
627 AC_MSG_RESULT($lastlog)
628 AC_DEFINE_UNQUOTED(LASTLOG_LOCATION, "$lastlog")
634 if test ! -z "$nolastlog" ; then
635 AC_MSG_WARN([*** Disabling lastlog support *** ])
636 AC_DEFINE(DISABLE_LASTLOG)
639 if test -z "$no_dev_ptmx" ; then
640 AC_CHECK_FILE("/dev/ptmx",
642 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
647 AC_CHECK_FILE("/dev/ptc",
649 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
654 # Options from here on. Some of these are preset by platform above
656 # Check for user-specified random device, otherwise check /dev/urandom
658 [ --with-random=FILE read randomness from FILE (default=/dev/urandom)],
660 if test "x$withval" != "xno" ; then
661 RANDOM_POOL="$withval";
662 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
666 # Check for random device
667 AC_CHECK_FILE("/dev/urandom",
669 RANDOM_POOL="/dev/urandom";
670 AC_SUBST(RANDOM_POOL)
671 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
677 # Check for EGD pool file
678 AC_ARG_WITH(egd-pool,
679 [ --with-egd-pool=FILE read randomness from EGD pool FILE (default none)],
681 if test "x$withval" != "xno" ; then
682 EGD_SOCKET="$withval";
683 AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET")
688 # detect pathnames for entropy gathering commands, if we need them
689 INSTALL_SSH_PRNG_CMDS=""
691 if test -z "$RANDOM_POOL" -a -z "$EGD_SOCKET" ; then
692 # Use these commands to collect entropy
693 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
694 OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
695 OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
696 OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
697 OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
698 OSSH_PATH_ENTROPY_PROG(PROG_W, w)
699 OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
700 OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
701 OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
702 OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
703 OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
704 OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
705 OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
706 OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
707 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
709 INSTALL_SSH_PRNG_CMDS="yes"
711 AC_SUBST(INSTALL_SSH_PRNG_CMDS)
715 [ --with-catman=man|cat Install preformatted manpages[no]],
718 if test x"$withval" != x"yes" ; then
724 if test -z "$MANTYPE" ; then
725 MANTYPE='$(TROFFMAN)'
733 # Check whether user wants Kerberos support
734 AC_ARG_WITH(kerberos4,
735 [ --with-kerberos4=PATH Enable Kerberos 4 support],
737 if test "x$withval" != "xno" ; then
739 if test "x$withval" != "$xyes" ; then
740 CFLAGS="$CFLAGS -I${withval}/include"
741 LDFLAGS="$LDFLAGS -L${withval}/lib"
742 if test ! -z "$need_dash_r" ; then
743 LDFLAGS="$LDFLAGS -R${withval}/lib"
745 if test ! -z "$blibpath" ; then
746 blibpath="$blibpath:${withval}/lib"
749 if test -d /usr/include/kerberosIV ; then
750 CFLAGS="$CFLAGS -I/usr/include/kerberosIV"
754 AC_CHECK_HEADERS(krb.h)
755 AC_CHECK_LIB(krb, main)
756 if test "$ac_cv_header_krb_h" != yes; then
757 AC_MSG_WARN([Cannot find krb.h, build may fail])
759 if test "$ac_cv_lib_krb_main" != yes; then
760 AC_MSG_WARN([Cannot find libkrb, build may fail])
764 AC_CHECK_LIB(resolv, dn_expand, , )
771 # Check whether user wants AFS support
773 [ --with-afs=PATH Enable AFS support],
775 if test "x$withval" != "xno" ; then
777 if test "x$withval" != "$xyes" ; then
778 CFLAGS="$CFLAGS -I${withval}/include"
779 LFLAGS="$LFLAGS -L${withval}/lib"
782 if test -z "$KRB4" ; then
783 AC_MSG_WARN([AFS requires Kerberos IV support, build may fail])
787 if test ! -z "$AFS_LIBS" ; then
788 LIBS="$LIBS $AFS_LIBS"
796 # Check whether user wants S/Key support
798 [ --with-skey Enable S/Key support],
800 if test "x$withval" != "xno" ; then
807 # Check whether user wants TCP wrappers support
808 AC_ARG_WITH(tcp-wrappers,
809 [ --with-tcp-wrappers Enable tcpwrappers support],
811 if test "x$withval" != "xno" ; then
814 AC_MSG_CHECKING(for libwrap)
818 int deny_severity = 0, allow_severity = 0;
827 AC_MSG_WARN([*** libwrap missing - tcpwrapper support disabled ***])
835 # Check whether to enable MD5 passwords
836 AC_ARG_WITH(md5-passwords,
837 [ --with-md5-passwords Enable use of MD5 passwords],
839 if test "x$withval" != "xno" ; then
840 AC_DEFINE(HAVE_MD5_PASSWORDS)
845 # Check whether to enable utmpx support
847 [ --with-utmpx Enable utmpx support],
849 if test "x$withval" != "xno" ; then
855 # Whether to disable shadow password support
857 [ --without-shadow Disable shadow password support],
859 if test "x$withval" = "xno" ; then
860 AC_DEFINE(DISABLE_SHADOW)
865 # Use ip address instead of hostname in $DISPLAY
866 AC_ARG_WITH(ipaddr-display,
867 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
869 if test "x$withval" = "xno" ; then
870 AC_DEFINE(IPADDR_IN_DISPLAY)
875 # Whether to mess with the default path
876 AC_ARG_WITH(default-path,
877 [ --with-default-path=PATH Specify default \$PATH environment for server],
879 if test "x$withval" != "xno" ; then
880 AC_DEFINE_UNQUOTED(USER_PATH, "$withval")
885 # Whether to force IPv4 by default (needed on broken glibc Linux)
886 AC_ARG_WITH(ipv4-default,
887 [ --with-ipv4-default Use IPv4 by connections unless '-6' specified],
889 if test "x$withval" != "xno" ; then
890 AC_DEFINE(IPV4_DEFAULT)
895 AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
897 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
899 if test "x$withval" != "xno" ; then
901 AC_DEFINE(IPV4_IN_IPV6)
906 if test "x$inet6_default_4in6" = "xyes"; then
907 AC_MSG_RESULT([yes (default)])
908 AC_DEFINE(IPV4_IN_IPV6)
910 AC_MSG_RESULT([no (default)])
915 # Where to place sshd.pid
918 [ --with-pid-dir=PATH Specify location of ssh.pid file],
920 if test "x$withval" != "xno" ; then
926 AC_DEFINE_UNQUOTED(PIDDIR, "$piddir")
930 # Change default command timeout for builtin PRNG
932 AC_ARG_WITH(entropy-timeout,
933 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)],
935 if test "x$withval" != "xno" ; then
936 entropy_timeout=$withval
940 AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout)
943 if test ! -z "$blibpath" ; then
944 LDFLAGS="$LDFLAGS -blibpath:$blibpath"
945 AC_MSG_WARN([Please check and edit -blibpath in LDFLAGS in Makefile])
948 AC_OUTPUT(Makefile ssh_prng_cmds)