summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac201
1 files changed, 119 insertions, 82 deletions
diff --git a/configure.ac b/configure.ac
index e48028b7b..20c8f1587 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.250 2005/03/07 09:21:37 tim Exp $ 1# $Id: configure.ac,v 1.260 2005/04/24 07:52:23 dtucker Exp $
2# 2#
3# Copyright (c) 1999-2004 Damien Miller 3# Copyright (c) 1999-2004 Damien Miller
4# 4#
@@ -75,7 +75,7 @@ if test -z "$LD" ; then
75 LD=$CC 75 LD=$CC
76fi 76fi
77AC_SUBST(LD) 77AC_SUBST(LD)
78 78
79AC_C_INLINE 79AC_C_INLINE
80if test "$GCC" = "yes" || test "$GCC" = "egcs"; then 80if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
81 CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wno-uninitialized" 81 CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wno-uninitialized"
@@ -84,7 +84,7 @@ fi
84AC_ARG_WITH(rpath, 84AC_ARG_WITH(rpath,
85 [ --without-rpath Disable auto-added -R linker paths], 85 [ --without-rpath Disable auto-added -R linker paths],
86 [ 86 [
87 if test "x$withval" = "xno" ; then 87 if test "x$withval" = "xno" ; then
88 need_dash_r="" 88 need_dash_r=""
89 fi 89 fi
90 if test "x$withval" = "xyes" ; then 90 if test "x$withval" = "xyes" ; then
@@ -123,7 +123,7 @@ case "$host" in
123 ]) 123 ])
124 dnl Check for various auth function declarations in headers. 124 dnl Check for various auth function declarations in headers.
125 AC_CHECK_DECLS([authenticate, loginrestrictions, loginsuccess, 125 AC_CHECK_DECLS([authenticate, loginrestrictions, loginsuccess,
126 passwdexpired], , , [#include <usersec.h>]) 126 passwdexpired, setauthdb], , , [#include <usersec.h>])
127 dnl Check if loginfailed is declared and takes 4 arguments (AIX >= 5.2) 127 dnl Check if loginfailed is declared and takes 4 arguments (AIX >= 5.2)
128 AC_CHECK_DECLS(loginfailed, 128 AC_CHECK_DECLS(loginfailed,
129 [AC_MSG_CHECKING(if loginfailed takes 4 arguments) 129 [AC_MSG_CHECKING(if loginfailed takes 4 arguments)
@@ -274,7 +274,7 @@ mips-sony-bsd|mips-sony-newsos4)
274 ;; 274 ;;
275*-*-netbsd*) 275*-*-netbsd*)
276 check_for_libcrypt_before=1 276 check_for_libcrypt_before=1
277 if test "x$withval" != "xno" ; then 277 if test "x$withval" != "xno" ; then
278 need_dash_r=1 278 need_dash_r=1
279 fi 279 fi
280 ;; 280 ;;
@@ -297,7 +297,7 @@ mips-sony-bsd|mips-sony-newsos4)
297 AC_DEFINE(BROKEN_SAVED_UIDS) 297 AC_DEFINE(BROKEN_SAVED_UIDS)
298 ;; 298 ;;
299*-*-solaris*) 299*-*-solaris*)
300 if test "x$withval" != "xno" ; then 300 if test "x$withval" != "xno" ; then
301 need_dash_r=1 301 need_dash_r=1
302 fi 302 fi
303 AC_DEFINE(PAM_SUN_CODEBASE) 303 AC_DEFINE(PAM_SUN_CODEBASE)
@@ -361,6 +361,7 @@ mips-sony-bsd|mips-sony-newsos4)
361 AC_DEFINE(SETEUID_BREAKS_SETUID) 361 AC_DEFINE(SETEUID_BREAKS_SETUID)
362 AC_DEFINE(BROKEN_SETREUID) 362 AC_DEFINE(BROKEN_SETREUID)
363 AC_DEFINE(BROKEN_SETREGID) 363 AC_DEFINE(BROKEN_SETREGID)
364 AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd])
364 ;; 365 ;;
365# UnixWare 7.x, OpenUNIX 8 366# UnixWare 7.x, OpenUNIX 8
366*-*-sysv5*) 367*-*-sysv5*)
@@ -368,6 +369,7 @@ mips-sony-bsd|mips-sony-newsos4)
368 AC_DEFINE(SETEUID_BREAKS_SETUID) 369 AC_DEFINE(SETEUID_BREAKS_SETUID)
369 AC_DEFINE(BROKEN_SETREUID) 370 AC_DEFINE(BROKEN_SETREUID)
370 AC_DEFINE(BROKEN_SETREGID) 371 AC_DEFINE(BROKEN_SETREGID)
372 AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd])
371 ;; 373 ;;
372*-*-sysv*) 374*-*-sysv*)
373 ;; 375 ;;
@@ -472,15 +474,17 @@ esac
472AC_ARG_WITH(cflags, 474AC_ARG_WITH(cflags,
473 [ --with-cflags Specify additional flags to pass to compiler], 475 [ --with-cflags Specify additional flags to pass to compiler],
474 [ 476 [
475 if test "x$withval" != "xno" ; then 477 if test -n "$withval" && test "x$withval" != "xno" && \
478 test "x${withval}" != "xyes"; then
476 CFLAGS="$CFLAGS $withval" 479 CFLAGS="$CFLAGS $withval"
477 fi 480 fi
478 ] 481 ]
479) 482)
480AC_ARG_WITH(cppflags, 483AC_ARG_WITH(cppflags,
481 [ --with-cppflags Specify additional flags to pass to preprocessor] , 484 [ --with-cppflags Specify additional flags to pass to preprocessor] ,
482 [ 485 [
483 if test "x$withval" != "xno"; then 486 if test -n "$withval" && test "x$withval" != "xno" && \
487 test "x${withval}" != "xyes"; then
484 CPPFLAGS="$CPPFLAGS $withval" 488 CPPFLAGS="$CPPFLAGS $withval"
485 fi 489 fi
486 ] 490 ]
@@ -488,18 +492,20 @@ AC_ARG_WITH(cppflags,
488AC_ARG_WITH(ldflags, 492AC_ARG_WITH(ldflags,
489 [ --with-ldflags Specify additional flags to pass to linker], 493 [ --with-ldflags Specify additional flags to pass to linker],
490 [ 494 [
491 if test "x$withval" != "xno" ; then 495 if test -n "$withval" && test "x$withval" != "xno" && \
496 test "x${withval}" != "xyes"; then
492 LDFLAGS="$LDFLAGS $withval" 497 LDFLAGS="$LDFLAGS $withval"
493 fi 498 fi
494 ] 499 ]
495) 500)
496AC_ARG_WITH(libs, 501AC_ARG_WITH(libs,
497 [ --with-libs Specify additional libraries to link with], 502 [ --with-libs Specify additional libraries to link with],
498 [ 503 [
499 if test "x$withval" != "xno" ; then 504 if test -n "$withval" && test "x$withval" != "xno" && \
505 test "x${withval}" != "xyes"; then
500 LIBS="$LIBS $withval" 506 LIBS="$LIBS $withval"
501 fi 507 fi
502 ] 508 ]
503) 509)
504 510
505AC_MSG_CHECKING(compiler and flags for sanity) 511AC_MSG_CHECKING(compiler and flags for sanity)
@@ -583,10 +589,9 @@ AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME))
583dnl zlib is required 589dnl zlib is required
584AC_ARG_WITH(zlib, 590AC_ARG_WITH(zlib,
585 [ --with-zlib=PATH Use zlib in PATH], 591 [ --with-zlib=PATH Use zlib in PATH],
586 [ 592 [ if test "x$withval" = "xno" ; then
587 if test "x$withval" = "xno" ; then 593 AC_MSG_ERROR([*** zlib is required ***])
588 AC_MSG_ERROR([*** zlib is required ***]) 594 elif test "x$withval" != "xyes"; then
589 fi
590 if test -d "$withval/lib"; then 595 if test -d "$withval/lib"; then
591 if test -n "${need_dash_r}"; then 596 if test -n "${need_dash_r}"; then
592 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}" 597 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
@@ -605,7 +610,7 @@ AC_ARG_WITH(zlib,
605 else 610 else
606 CPPFLAGS="-I${withval} ${CPPFLAGS}" 611 CPPFLAGS="-I${withval} ${CPPFLAGS}"
607 fi 612 fi
608 ] 613 fi ]
609) 614)
610 615
611AC_CHECK_LIB(z, deflate, , 616AC_CHECK_LIB(z, deflate, ,
@@ -638,29 +643,40 @@ AC_ARG_WITH(zlib-version-check,
638 ] 643 ]
639) 644)
640 645
641AC_MSG_CHECKING(for zlib 1.1.4 or greater) 646AC_MSG_CHECKING(for possibly buggy zlib)
642AC_RUN_IFELSE([AC_LANG_SOURCE([[ 647AC_RUN_IFELSE([AC_LANG_SOURCE([[
648#include <stdio.h>
643#include <zlib.h> 649#include <zlib.h>
644int main() 650int main()
645{ 651{
646 int a, b, c, v; 652 int a=0, b=0, c=0, d=0, n, v;
647 if (sscanf(ZLIB_VERSION, "%d.%d.%d", &a, &b, &c) != 3) 653 n = sscanf(ZLIB_VERSION, "%d.%d.%d.%d", &a, &b, &c, &d);
654 if (n != 3 && n != 4)
648 exit(1); 655 exit(1);
649 v = a*1000000 + b*1000 + c; 656 v = a*1000000 + b*10000 + c*100 + d;
650 if (v >= 1001004) 657 fprintf(stderr, "found zlib version %s (%d)\n", ZLIB_VERSION, v);
658
659 /* 1.1.4 is OK */
660 if (a == 1 && b == 1 && c >= 4)
651 exit(0); 661 exit(0);
662
663 /* 1.2.1.2 and up are OK */
664 if (v >= 1020102)
665 exit(0);
666
652 exit(2); 667 exit(2);
653} 668}
654 ]])], 669 ]])],
655 AC_MSG_RESULT(yes), 670 AC_MSG_RESULT(no),
656 [ AC_MSG_RESULT(no) 671 [ AC_MSG_RESULT(yes)
657 if test -z "$zlib_check_nonfatal" ; then 672 if test -z "$zlib_check_nonfatal" ; then
658 AC_MSG_ERROR([*** zlib too old - check config.log *** 673 AC_MSG_ERROR([*** zlib too old - check config.log ***
659Your reported zlib version has known security problems. It's possible your 674Your reported zlib version has known security problems. It's possible your
660vendor has fixed these problems without changing the version number. If you 675vendor has fixed these problems without changing the version number. If you
661are sure this is the case, you can disable the check by running 676are sure this is the case, you can disable the check by running
662"./configure --without-zlib-version-check". 677"./configure --without-zlib-version-check".
663If you are in doubt, upgrade zlib to version 1.1.4 or greater.]) 678If you are in doubt, upgrade zlib to version 1.2.1.2 or greater.
679See http://www.gzip.org/zlib/ for details.])
664 else 680 else
665 AC_MSG_WARN([zlib version may have security problems]) 681 AC_MSG_WARN([zlib version may have security problems])
666 fi 682 fi
@@ -730,7 +746,7 @@ int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));}
730 AC_MSG_RESULT(no) 746 AC_MSG_RESULT(no)
731 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME) 747 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME)
732 ], 748 ],
733 [ 749 [
734 AC_MSG_WARN([cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME]) 750 AC_MSG_WARN([cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME])
735 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME) 751 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME)
736 ] 752 ]
@@ -759,7 +775,7 @@ AC_ARG_WITH(skey,
759 AC_DEFINE(SKEY) 775 AC_DEFINE(SKEY)
760 LIBS="-lskey $LIBS" 776 LIBS="-lskey $LIBS"
761 SKEY_MSG="yes" 777 SKEY_MSG="yes"
762 778
763 AC_MSG_CHECKING([for s/key support]) 779 AC_MSG_CHECKING([for s/key support])
764 AC_TRY_RUN( 780 AC_TRY_RUN(
765 [ 781 [
@@ -794,7 +810,8 @@ AC_ARG_WITH(tcp-wrappers,
794 saved_LIBS="$LIBS" 810 saved_LIBS="$LIBS"
795 saved_LDFLAGS="$LDFLAGS" 811 saved_LDFLAGS="$LDFLAGS"
796 saved_CPPFLAGS="$CPPFLAGS" 812 saved_CPPFLAGS="$CPPFLAGS"
797 if test -n "${withval}" -a "${withval}" != "yes"; then 813 if test -n "${withval}" && \
814 test "x${withval}" != "xyes"; then
798 if test -d "${withval}/lib"; then 815 if test -d "${withval}/lib"; then
799 if test -n "${need_dash_r}"; then 816 if test -n "${need_dash_r}"; then
800 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}" 817 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
@@ -846,13 +863,18 @@ LIBEDIT_MSG="no"
846AC_ARG_WITH(libedit, 863AC_ARG_WITH(libedit,
847 [ --with-libedit[[=PATH]] Enable libedit support for sftp], 864 [ --with-libedit[[=PATH]] Enable libedit support for sftp],
848 [ if test "x$withval" != "xno" ; then 865 [ if test "x$withval" != "xno" ; then
866 if test "x$withval" != "xyes"; then
867 CPPFLAGS="$CPPFLAGS -I$withval/include"
868 LDFLAGS="$LDFLAGS -L$withval/lib"
869 fi
849 AC_CHECK_LIB(edit, el_init, 870 AC_CHECK_LIB(edit, el_init,
850 [ AC_DEFINE(USE_LIBEDIT, [], [Use libedit for sftp]) 871 [ AC_DEFINE(USE_LIBEDIT, [], [Use libedit for sftp])
851 LIBEDIT="-ledit -lcurses" 872 LIBEDIT="-ledit -lcurses"
852 LIBEDIT_MSG="yes" 873 LIBEDIT_MSG="yes"
853 AC_SUBST(LIBEDIT) 874 AC_SUBST(LIBEDIT)
854 ], 875 ],
855 [], [-lcurses] 876 [ AC_MSG_ERROR(libedit not found) ],
877 [ -lcurses ]
856 ) 878 )
857 fi ] 879 fi ]
858) 880)
@@ -1011,7 +1033,9 @@ if test "x$ac_cv_func_getpeereid" != "xyes" ; then
1011 [#include <sys/types.h> 1033 [#include <sys/types.h>
1012 #include <sys/socket.h>], 1034 #include <sys/socket.h>],
1013 [int i = SO_PEERCRED;], 1035 [int i = SO_PEERCRED;],
1014 [AC_MSG_RESULT(yes)], 1036 [ AC_MSG_RESULT(yes)
1037 AC_DEFINE(HAVE_SO_PEERCRED, [], [Have PEERCRED socket option])
1038 ],
1015 [AC_MSG_RESULT(no) 1039 [AC_MSG_RESULT(no)
1016 NO_PEERCHECK=1] 1040 NO_PEERCHECK=1]
1017 ) 1041 )
@@ -1090,7 +1114,8 @@ main()
1090 ) 1114 )
1091fi 1115fi
1092 1116
1093if test "x$ac_cv_func_getaddrinfo" = "xyes" -a "x$check_for_hpux_broken_getaddrinfo" = "x1"; then 1117if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
1118 test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then
1094 AC_MSG_CHECKING(if getaddrinfo seems to work) 1119 AC_MSG_CHECKING(if getaddrinfo seems to work)
1095 AC_TRY_RUN( 1120 AC_TRY_RUN(
1096 [ 1121 [
@@ -1158,7 +1183,8 @@ main(void)
1158 ) 1183 )
1159fi 1184fi
1160 1185
1161if test "x$ac_cv_func_getaddrinfo" = "xyes" -a "x$check_for_aix_broken_getaddrinfo" = "x1"; then 1186if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
1187 test "x$check_for_aix_broken_getaddrinfo" = "x1"; then
1162 AC_MSG_CHECKING(if getaddrinfo seems to work) 1188 AC_MSG_CHECKING(if getaddrinfo seems to work)
1163 AC_TRY_RUN( 1189 AC_TRY_RUN(
1164 [ 1190 [
@@ -1467,7 +1493,7 @@ int main(void) { exit(RAND_status() == 1 ? 0 : 1); }
1467 [ 1493 [
1468 AC_MSG_WARN([cross compiling: assuming yes]) 1494 AC_MSG_WARN([cross compiling: assuming yes])
1469 # This is safe, since all recent OpenSSL versions will 1495 # This is safe, since all recent OpenSSL versions will
1470 # complain at runtime if not seeded correctly. 1496 # complain at runtime if not seeded correctly.
1471 OPENSSL_SEEDS_ITSELF=yes 1497 OPENSSL_SEEDS_ITSELF=yes
1472 ] 1498 ]
1473) 1499)
@@ -1489,10 +1515,10 @@ AC_ARG_WITH(rand-helper,
1489 USE_RAND_HELPER=yes 1515 USE_RAND_HELPER=yes
1490 fi 1516 fi
1491 ], 1517 ],
1492) 1518)
1493 1519
1494# Which randomness source do we use? 1520# Which randomness source do we use?
1495if test ! -z "$OPENSSL_SEEDS_ITSELF" -a -z "$USE_RAND_HELPER" ; then 1521if test ! -z "$OPENSSL_SEEDS_ITSELF" && test -z "$USE_RAND_HELPER" ; then
1496 # OpenSSL only 1522 # OpenSSL only
1497 AC_DEFINE(OPENSSL_PRNG_ONLY) 1523 AC_DEFINE(OPENSSL_PRNG_ONLY)
1498 RAND_MSG="OpenSSL internal ONLY" 1524 RAND_MSG="OpenSSL internal ONLY"
@@ -1582,10 +1608,11 @@ entropy_timeout=200
1582AC_ARG_WITH(entropy-timeout, 1608AC_ARG_WITH(entropy-timeout,
1583 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)], 1609 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)],
1584 [ 1610 [
1585 if test "x$withval" != "xno" ; then 1611 if test -n "$withval" && test "x$withval" != "xno" && \
1612 test "x${withval}" != "xyes"; then
1586 entropy_timeout=$withval 1613 entropy_timeout=$withval
1587 fi 1614 fi
1588 ] 1615 ]
1589) 1616)
1590AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout) 1617AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout)
1591 1618
@@ -1593,10 +1620,11 @@ SSH_PRIVSEP_USER=sshd
1593AC_ARG_WITH(privsep-user, 1620AC_ARG_WITH(privsep-user,
1594 [ --with-privsep-user=user Specify non-privileged user for privilege separation], 1621 [ --with-privsep-user=user Specify non-privileged user for privilege separation],
1595 [ 1622 [
1596 if test -n "$withval"; then 1623 if test -n "$withval" && test "x$withval" != "xno" && \
1624 test "x${withval}" != "xyes"; then
1597 SSH_PRIVSEP_USER=$withval 1625 SSH_PRIVSEP_USER=$withval
1598 fi 1626 fi
1599 ] 1627 ]
1600) 1628)
1601AC_DEFINE_UNQUOTED(SSH_PRIVSEP_USER, "$SSH_PRIVSEP_USER") 1629AC_DEFINE_UNQUOTED(SSH_PRIVSEP_USER, "$SSH_PRIVSEP_USER")
1602AC_SUBST(SSH_PRIVSEP_USER) 1630AC_SUBST(SSH_PRIVSEP_USER)
@@ -2030,9 +2058,9 @@ fi
2030AC_CHECK_TYPES(struct timespec) 2058AC_CHECK_TYPES(struct timespec)
2031 2059
2032# We need int64_t or else certian parts of the compile will fail. 2060# We need int64_t or else certian parts of the compile will fail.
2033if test "x$ac_cv_have_int64_t" = "xno" -a \ 2061if test "x$ac_cv_have_int64_t" = "xno" && \
2034 "x$ac_cv_sizeof_long_int" != "x8" -a \ 2062 test "x$ac_cv_sizeof_long_int" != "x8" && \
2035 "x$ac_cv_sizeof_long_long_int" = "x0" ; then 2063 test "x$ac_cv_sizeof_long_long_int" = "x0" ; then
2036 echo "OpenSSH requires int64_t support. Contact your vendor or install" 2064 echo "OpenSSH requires int64_t support. Contact your vendor or install"
2037 echo "an alternative compiler (I.E., GCC) before continuing." 2065 echo "an alternative compiler (I.E., GCC) before continuing."
2038 echo "" 2066 echo ""
@@ -2324,23 +2352,28 @@ AC_ARG_WITH(sectok,
2324) 2352)
2325 2353
2326# Check whether user wants OpenSC support 2354# Check whether user wants OpenSC support
2355OPENSC_CONFIG="no"
2327AC_ARG_WITH(opensc, 2356AC_ARG_WITH(opensc,
2328 AC_HELP_STRING([--with-opensc=PFX], 2357 [--with-opensc[[=PFX]] Enable smartcard support using OpenSC (optionally in PATH)],
2329 [Enable smartcard support using OpenSC]), 2358 [
2330 opensc_config_prefix="$withval", opensc_config_prefix="") 2359 if test "x$withval" != "xno" ; then
2331if test x$opensc_config_prefix != x ; then 2360 if test "x$withval" != "xyes" ; then
2332 OPENSC_CONFIG=$opensc_config_prefix/bin/opensc-config 2361 OPENSC_CONFIG=$withval/bin/opensc-config
2333 AC_PATH_PROG(OPENSC_CONFIG, opensc-config, no) 2362 else
2334 if test "$OPENSC_CONFIG" != "no"; then 2363 AC_PATH_PROG(OPENSC_CONFIG, opensc-config, no)
2335 LIBOPENSC_CFLAGS=`$OPENSC_CONFIG --cflags` 2364 fi
2336 LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs` 2365 if test "$OPENSC_CONFIG" != "no"; then
2337 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS" 2366 LIBOPENSC_CFLAGS=`$OPENSC_CONFIG --cflags`
2338 LDFLAGS="$LDFLAGS $LIBOPENSC_LIBS" 2367 LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs`
2339 AC_DEFINE(SMARTCARD) 2368 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS"
2340 AC_DEFINE(USE_OPENSC) 2369 LDFLAGS="$LDFLAGS $LIBOPENSC_LIBS"
2341 SCARD_MSG="yes, using OpenSC" 2370 AC_DEFINE(SMARTCARD)
2342 fi 2371 AC_DEFINE(USE_OPENSC)
2343fi 2372 SCARD_MSG="yes, using OpenSC"
2373 fi
2374 fi
2375 ]
2376)
2344 2377
2345# Check libraries needed by DNS fingerprint support 2378# Check libraries needed by DNS fingerprint support
2346AC_SEARCH_LIBS(getrrsetbyname, resolv, 2379AC_SEARCH_LIBS(getrrsetbyname, resolv,
@@ -2423,7 +2456,7 @@ AC_ARG_WITH(kerberos5,
2423 AC_DEFINE(HEIMDAL) 2456 AC_DEFINE(HEIMDAL)
2424 K5LIBS="-lkrb5 -ldes" 2457 K5LIBS="-lkrb5 -ldes"
2425 K5LIBS="$K5LIBS -lcom_err -lasn1" 2458 K5LIBS="$K5LIBS -lcom_err -lasn1"
2426 AC_CHECK_LIB(roken, net_write, 2459 AC_CHECK_LIB(roken, net_write,
2427 [K5LIBS="$K5LIBS -lroken"]) 2460 [K5LIBS="$K5LIBS -lroken"])
2428 ], 2461 ],
2429 [ AC_MSG_RESULT(no) 2462 [ AC_MSG_RESULT(no)
@@ -2442,7 +2475,7 @@ AC_ARG_WITH(kerberos5,
2442 $K5LIBS) 2475 $K5LIBS)
2443 ], 2476 ],
2444 $K5LIBS) 2477 $K5LIBS)
2445 2478
2446 AC_CHECK_HEADER(gssapi.h, , 2479 AC_CHECK_HEADER(gssapi.h, ,
2447 [ unset ac_cv_header_gssapi_h 2480 [ unset ac_cv_header_gssapi_h
2448 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi" 2481 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
@@ -2482,7 +2515,8 @@ PRIVSEP_PATH=/var/empty
2482AC_ARG_WITH(privsep-path, 2515AC_ARG_WITH(privsep-path,
2483 [ --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)], 2516 [ --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)],
2484 [ 2517 [
2485 if test "x$withval" != "$no" ; then 2518 if test -n "$withval" && test "x$withval" != "xno" && \
2519 test "x${withval}" != "xyes"; then
2486 PRIVSEP_PATH=$withval 2520 PRIVSEP_PATH=$withval
2487 fi 2521 fi
2488 ] 2522 ]
@@ -2492,7 +2526,8 @@ AC_SUBST(PRIVSEP_PATH)
2492AC_ARG_WITH(xauth, 2526AC_ARG_WITH(xauth,
2493 [ --with-xauth=PATH Specify path to xauth program ], 2527 [ --with-xauth=PATH Specify path to xauth program ],
2494 [ 2528 [
2495 if test "x$withval" != "xno" ; then 2529 if test -n "$withval" && test "x$withval" != "xno" && \
2530 test "x${withval}" != "xyes"; then
2496 xauth_path=$withval 2531 xauth_path=$withval
2497 fi 2532 fi
2498 ], 2533 ],
@@ -2610,7 +2645,7 @@ AC_ARG_WITH(md5-passwords,
2610AC_ARG_WITH(shadow, 2645AC_ARG_WITH(shadow,
2611 [ --without-shadow Disable shadow password support], 2646 [ --without-shadow Disable shadow password support],
2612 [ 2647 [
2613 if test "x$withval" = "xno" ; then 2648 if test "x$withval" = "xno" ; then
2614 AC_DEFINE(DISABLE_SHADOW) 2649 AC_DEFINE(DISABLE_SHADOW)
2615 disable_shadow=yes 2650 disable_shadow=yes
2616 fi 2651 fi
@@ -2645,7 +2680,7 @@ else
2645 AC_ARG_WITH(ipaddr-display, 2680 AC_ARG_WITH(ipaddr-display,
2646 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY], 2681 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
2647 [ 2682 [
2648 if test "x$withval" != "xno" ; then 2683 if test "x$withval" != "xno" ; then
2649 AC_DEFINE(IPADDR_IN_DISPLAY) 2684 AC_DEFINE(IPADDR_IN_DISPLAY)
2650 DISPLAY_HACK_MSG="yes" 2685 DISPLAY_HACK_MSG="yes"
2651 fi 2686 fi
@@ -2677,8 +2712,8 @@ if test "x$etc_default_login" != "xno"; then
2677fi 2712fi
2678 2713
2679dnl BSD systems use /etc/login.conf so --with-default-path= has no effect 2714dnl BSD systems use /etc/login.conf so --with-default-path= has no effect
2680if test $ac_cv_func_login_getcapbool = "yes" -a \ 2715if test $ac_cv_func_login_getcapbool = "yes" && \
2681 $ac_cv_header_login_cap_h = "yes" ; then 2716 test $ac_cv_header_login_cap_h = "yes" ; then
2682 external_path_file=/etc/login.conf 2717 external_path_file=/etc/login.conf
2683fi 2718fi
2684 2719
@@ -2691,7 +2726,7 @@ AC_ARG_WITH(default-path,
2691 AC_MSG_WARN([ 2726 AC_MSG_WARN([
2692--with-default-path=PATH has no effect on this system. 2727--with-default-path=PATH has no effect on this system.
2693Edit /etc/login.conf instead.]) 2728Edit /etc/login.conf instead.])
2694 elif test "x$withval" != "xno" ; then 2729 elif test "x$withval" != "xno" ; then
2695 if test ! -z "$external_path_file" ; then 2730 if test ! -z "$external_path_file" ; then
2696 AC_MSG_WARN([ 2731 AC_MSG_WARN([
2697--with-default-path=PATH will only be used if PATH is not defined in 2732--with-default-path=PATH will only be used if PATH is not defined in
@@ -2732,11 +2767,11 @@ main()
2732{ 2767{
2733 FILE *fd; 2768 FILE *fd;
2734 int rc; 2769 int rc;
2735 2770
2736 fd = fopen(DATA,"w"); 2771 fd = fopen(DATA,"w");
2737 if(fd == NULL) 2772 if(fd == NULL)
2738 exit(1); 2773 exit(1);
2739 2774
2740 if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0) 2775 if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0)
2741 exit(1); 2776 exit(1);
2742 2777
@@ -2773,7 +2808,8 @@ fi
2773AC_ARG_WITH(superuser-path, 2808AC_ARG_WITH(superuser-path,
2774 [ --with-superuser-path= Specify different path for super-user], 2809 [ --with-superuser-path= Specify different path for super-user],
2775 [ 2810 [
2776 if test "x$withval" != "xno" ; then 2811 if test -n "$withval" && test "x$withval" != "xno" && \
2812 test "x${withval}" != "xyes"; then
2777 AC_DEFINE_UNQUOTED(SUPERUSER_PATH, "$withval") 2813 AC_DEFINE_UNQUOTED(SUPERUSER_PATH, "$withval")
2778 superuser_path=$withval 2814 superuser_path=$withval
2779 fi 2815 fi
@@ -2809,7 +2845,7 @@ BSD_AUTH_MSG=no
2809AC_ARG_WITH(bsd-auth, 2845AC_ARG_WITH(bsd-auth,
2810 [ --with-bsd-auth Enable BSD auth support], 2846 [ --with-bsd-auth Enable BSD auth support],
2811 [ 2847 [
2812 if test "x$withval" != "xno" ; then 2848 if test "x$withval" != "xno" ; then
2813 AC_DEFINE(BSD_AUTH) 2849 AC_DEFINE(BSD_AUTH)
2814 BSD_AUTH_MSG=yes 2850 BSD_AUTH_MSG=yes
2815 fi 2851 fi
@@ -2819,7 +2855,7 @@ AC_ARG_WITH(bsd-auth,
2819# Where to place sshd.pid 2855# Where to place sshd.pid
2820piddir=/var/run 2856piddir=/var/run
2821# make sure the directory exists 2857# make sure the directory exists
2822if test ! -d $piddir ; then 2858if test ! -d $piddir ; then
2823 piddir=`eval echo ${sysconfdir}` 2859 piddir=`eval echo ${sysconfdir}`
2824 case $piddir in 2860 case $piddir in
2825 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;; 2861 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
@@ -2829,9 +2865,10 @@ fi
2829AC_ARG_WITH(pid-dir, 2865AC_ARG_WITH(pid-dir,
2830 [ --with-pid-dir=PATH Specify location of ssh.pid file], 2866 [ --with-pid-dir=PATH Specify location of ssh.pid file],
2831 [ 2867 [
2832 if test "x$withval" != "xno" ; then 2868 if test -n "$withval" && test "x$withval" != "xno" && \
2869 test "x${withval}" != "xyes"; then
2833 piddir=$withval 2870 piddir=$withval
2834 if test ! -d $piddir ; then 2871 if test ! -d $piddir ; then
2835 AC_MSG_WARN([** no $piddir directory on this system **]) 2872 AC_MSG_WARN([** no $piddir directory on this system **])
2836 fi 2873 fi
2837 fi 2874 fi
@@ -2909,9 +2946,9 @@ AC_ARG_ENABLE(pututxline,
2909AC_ARG_WITH(lastlog, 2946AC_ARG_WITH(lastlog,
2910 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]], 2947 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
2911 [ 2948 [
2912 if test "x$withval" = "xno" ; then 2949 if test "x$withval" = "xno" ; then
2913 AC_DEFINE(DISABLE_LASTLOG) 2950 AC_DEFINE(DISABLE_LASTLOG)
2914 else 2951 elif test -n "$withval" && test "x${withval}" != "xyes"; then
2915 conf_lastlog_location=$withval 2952 conf_lastlog_location=$withval
2916 fi 2953 fi
2917 ] 2954 ]
@@ -2978,7 +3015,7 @@ fi
2978 3015
2979if test -n "$conf_lastlog_location"; then 3016if test -n "$conf_lastlog_location"; then
2980 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location") 3017 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location")
2981fi 3018fi
2982 3019
2983dnl utmp detection 3020dnl utmp detection
2984AC_MSG_CHECKING([if your system defines UTMP_FILE]) 3021AC_MSG_CHECKING([if your system defines UTMP_FILE])
@@ -3008,7 +3045,7 @@ if test -z "$conf_utmp_location"; then
3008fi 3045fi
3009if test -n "$conf_utmp_location"; then 3046if test -n "$conf_utmp_location"; then
3010 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location") 3047 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location")
3011fi 3048fi
3012 3049
3013dnl wtmp detection 3050dnl wtmp detection
3014AC_MSG_CHECKING([if your system defines WTMP_FILE]) 3051AC_MSG_CHECKING([if your system defines WTMP_FILE])
@@ -3038,7 +3075,7 @@ if test -z "$conf_wtmp_location"; then
3038fi 3075fi
3039if test -n "$conf_wtmp_location"; then 3076if test -n "$conf_wtmp_location"; then
3040 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location") 3077 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location")
3041fi 3078fi
3042 3079
3043 3080
3044dnl utmpx detection - I don't know any system so perverse as to require 3081dnl utmpx detection - I don't know any system so perverse as to require
@@ -3066,7 +3103,7 @@ if test -z "$conf_utmpx_location"; then
3066 fi 3103 fi
3067else 3104else
3068 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location") 3105 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location")
3069fi 3106fi
3070 3107
3071dnl wtmpx detection 3108dnl wtmpx detection
3072AC_MSG_CHECKING([if your system defines WTMPX_FILE]) 3109AC_MSG_CHECKING([if your system defines WTMPX_FILE])
@@ -3091,7 +3128,7 @@ if test -z "$conf_wtmpx_location"; then
3091 fi 3128 fi
3092else 3129else
3093 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location") 3130 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location")
3094fi 3131fi
3095 3132
3096 3133
3097if test ! -z "$blibpath" ; then 3134if test ! -z "$blibpath" ; then