Tim Rice | 81ed518 | 2002-09-25 17:38:46 -0700 | [diff] [blame] | 1 | # $Id: configure.ac,v 1.89 2002/09/26 00:38:47 tim Exp $ |
Damien Miller | e9cf357 | 2001-02-09 12:55:35 +1100 | [diff] [blame] | 2 | |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 3 | AC_INIT |
| 4 | AC_CONFIG_SRCDIR([ssh.c]) |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 5 | |
| 6 | AC_CONFIG_HEADER(config.h) |
Damien Miller | 856799b | 2000-03-15 21:18:10 +1100 | [diff] [blame] | 7 | AC_PROG_CC |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 8 | AC_CANONICAL_HOST |
Damien Miller | 4df5c76 | 2001-02-28 08:14:22 +1100 | [diff] [blame] | 9 | AC_C_BIGENDIAN |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 10 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 11 | # Checks for programs. |
Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 12 | AC_PROG_CPP |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 13 | AC_PROG_RANLIB |
Damien Miller | d8087f6 | 1999-11-25 12:31:26 +1100 | [diff] [blame] | 14 | AC_PROG_INSTALL |
Ben Lindstrom | 582d398 | 2001-02-06 22:54:30 +0000 | [diff] [blame] | 15 | AC_PATH_PROG(AR, ar) |
Tim Rice | b8fbb8e | 2001-04-21 14:31:52 -0700 | [diff] [blame] | 16 | AC_PATH_PROGS(PERL, perl5 perl) |
Damien Miller | e79334a | 1999-12-29 10:03:37 +1100 | [diff] [blame] | 17 | AC_SUBST(PERL) |
Damien Miller | 8d1fd57 | 2000-05-17 21:34:07 +1000 | [diff] [blame] | 18 | AC_PATH_PROG(ENT, ent) |
| 19 | AC_SUBST(ENT) |
Damien Miller | 4864e8f | 2001-02-08 10:07:08 +1100 | [diff] [blame] | 20 | AC_PATH_PROG(TEST_MINUS_S_SH, bash) |
| 21 | AC_PATH_PROG(TEST_MINUS_S_SH, ksh) |
| 22 | AC_PATH_PROG(TEST_MINUS_S_SH, sh) |
Tim Rice | 0502a47 | 2002-05-08 16:04:14 -0700 | [diff] [blame] | 23 | AC_PATH_PROG(SH, sh) |
Damien Miller | 2e1b082 | 1999-12-25 10:11:29 +1100 | [diff] [blame] | 24 | |
Damien Miller | e8bb450 | 2001-09-25 16:39:35 +1000 | [diff] [blame] | 25 | # System features |
| 26 | AC_SYS_LARGEFILE |
| 27 | |
Damien Miller | 3f62aba | 2000-11-29 11:56:35 +1100 | [diff] [blame] | 28 | if test -z "$AR" ; then |
| 29 | AC_MSG_ERROR([*** 'ar' missing, please install or fix your \$PATH ***]) |
| 30 | fi |
| 31 | |
Damien Miller | ad833b3 | 2000-08-23 10:46:23 +1000 | [diff] [blame] | 32 | # Use LOGIN_PROGRAM from environment if possible |
| 33 | if test ! -z "$LOGIN_PROGRAM" ; then |
| 34 | AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM") |
| 35 | else |
| 36 | # Search for login |
| 37 | AC_PATH_PROG(LOGIN_PROGRAM_FALLBACK, login) |
| 38 | if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then |
| 39 | AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM_FALLBACK") |
| 40 | fi |
| 41 | fi |
| 42 | |
Damien Miller | 166bd44 | 2000-03-16 10:48:25 +1100 | [diff] [blame] | 43 | if test -z "$LD" ; then |
| 44 | LD=$CC |
| 45 | fi |
| 46 | AC_SUBST(LD) |
| 47 | |
Damien Miller | 166bd44 | 2000-03-16 10:48:25 +1100 | [diff] [blame] | 48 | AC_C_INLINE |
Damien Miller | 649d999 | 2001-06-27 23:35:51 +1000 | [diff] [blame] | 49 | if test "$GCC" = "yes" || test "$GCC" = "egcs"; then |
| 50 | CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wno-uninitialized" |
Damien Miller | 166bd44 | 2000-03-16 10:48:25 +1100 | [diff] [blame] | 51 | fi |
| 52 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 53 | # Check for some target-specific stuff |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 54 | case "$host" in |
Damien Miller | 75b1d10 | 2000-01-07 14:01:41 +1100 | [diff] [blame] | 55 | *-*-aix*) |
| 56 | AFS_LIBS="-lld" |
Ben Lindstrom | 28bfc0d | 2000-12-18 19:58:57 +0000 | [diff] [blame] | 57 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
Damien Miller | db81959 | 2000-03-14 13:44:01 +1100 | [diff] [blame] | 58 | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
Damien Miller | edb8292 | 2000-06-20 13:25:52 +1000 | [diff] [blame] | 59 | if (test "$LD" != "gcc" && test -z "$blibpath"); then |
Damien Miller | fa2bb69 | 2002-04-23 23:22:25 +1000 | [diff] [blame] | 60 | AC_MSG_CHECKING([if linkage editor ($LD) accepts -blibpath]) |
| 61 | saved_LDFLAGS="$LDFLAGS" |
| 62 | LDFLAGS="$LDFLAGS -blibpath:/usr/lib:/lib:/usr/local/lib" |
| 63 | AC_TRY_LINK([], |
| 64 | [], |
| 65 | [ |
| 66 | AC_MSG_RESULT(yes) |
| 67 | blibpath="/usr/lib:/lib:/usr/local/lib" |
| 68 | ], |
| 69 | [ AC_MSG_RESULT(no) ] |
| 70 | ) |
| 71 | LDFLAGS="$saved_LDFLAGS" |
Damien Miller | 29ea30d | 2000-03-17 10:54:15 +1100 | [diff] [blame] | 72 | fi |
Tim Rice | e958ed3 | 2002-07-05 07:12:33 -0700 | [diff] [blame] | 73 | AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)], |
| 74 | [AC_CHECK_LIB(s,authenticate, |
| 75 | [ AC_DEFINE(WITH_AIXAUTHENTICATE) |
| 76 | LIBS="$LIBS -ls" |
| 77 | ]) |
| 78 | ]) |
Damien Miller | eca71f8 | 2000-01-20 22:38:27 +1100 | [diff] [blame] | 79 | AC_DEFINE(BROKEN_GETADDRINFO) |
Damien Miller | f5fea44 | 2002-04-23 22:52:45 +1000 | [diff] [blame] | 80 | AC_DEFINE(BROKEN_REALPATH) |
andre | 60f3c98 | 2000-06-03 16:18:19 +0000 | [diff] [blame] | 81 | dnl AIX handles lastlog as part of its login message |
| 82 | AC_DEFINE(DISABLE_LASTLOG) |
Kevin Steves | 90d5de7 | 2002-06-22 18:51:48 +0000 | [diff] [blame] | 83 | AC_DEFINE(LOGIN_NEEDS_UTMPX) |
Damien Miller | 75b1d10 | 2000-01-07 14:01:41 +1100 | [diff] [blame] | 84 | ;; |
Damien Miller | bac2d8a | 2000-09-05 16:13:06 +1100 | [diff] [blame] | 85 | *-*-cygwin*) |
Tim Rice | fe1d100 | 2001-11-26 17:19:43 -0800 | [diff] [blame] | 86 | LIBS="$LIBS /usr/lib/textmode.o" |
Damien Miller | bac2d8a | 2000-09-05 16:13:06 +1100 | [diff] [blame] | 87 | AC_DEFINE(HAVE_CYGWIN) |
Ben Lindstrom | ca60a9b | 2001-05-17 03:32:50 +0000 | [diff] [blame] | 88 | AC_DEFINE(USE_PIPES) |
Damien Miller | bac2d8a | 2000-09-05 16:13:06 +1100 | [diff] [blame] | 89 | AC_DEFINE(DISABLE_SHADOW) |
| 90 | AC_DEFINE(IPV4_DEFAULT) |
| 91 | AC_DEFINE(IP_TOS_IS_BROKEN) |
Ben Lindstrom | 38e6093 | 2001-02-24 00:55:04 +0000 | [diff] [blame] | 92 | AC_DEFINE(NO_X11_UNIX_SOCKETS) |
Ben Lindstrom | 99a4e14 | 2002-07-09 14:06:40 +0000 | [diff] [blame] | 93 | AC_DEFINE(NO_IPPORT_RESERVED_CONCEPT) |
Tim Rice | 9dd3081 | 2002-07-07 13:43:36 -0700 | [diff] [blame] | 94 | AC_DEFINE(DISABLE_FD_PASSING) |
Ben Lindstrom | 837461b | 2002-06-12 16:57:14 +0000 | [diff] [blame] | 95 | AC_DEFINE(SETGROUPS_NOOP) |
Damien Miller | bac2d8a | 2000-09-05 16:13:06 +1100 | [diff] [blame] | 96 | ;; |
Ben Lindstrom | 5805513 | 2001-02-15 18:34:29 +0000 | [diff] [blame] | 97 | *-*-dgux*) |
| 98 | AC_DEFINE(IP_TOS_IS_BROKEN) |
| 99 | ;; |
Ben Lindstrom | fed7bb4 | 2001-07-15 18:30:42 +0000 | [diff] [blame] | 100 | *-*-darwin*) |
Damien Miller | fc93d4b | 2002-09-04 23:26:29 +1000 | [diff] [blame] | 101 | AC_MSG_CHECKING(if we have working getaddrinfo) |
| 102 | AC_TRY_RUN([#include <mach-o/dyld.h> |
| 103 | main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) |
| 104 | exit(0); |
| 105 | else |
| 106 | exit(1); |
| 107 | }], [AC_MSG_RESULT(working)], |
| 108 | [AC_MSG_RESULT(buggy) |
| 109 | AC_DEFINE(BROKEN_GETADDRINFO)], |
| 110 | [AC_MSG_RESULT(assume it is working)]) |
Ben Lindstrom | fed7bb4 | 2001-07-15 18:30:42 +0000 | [diff] [blame] | 111 | ;; |
Kevin Steves | 0ea1d9d | 2002-04-25 18:17:04 +0000 | [diff] [blame] | 112 | *-*-hpux10.26) |
| 113 | if test -z "$GCC"; then |
| 114 | CFLAGS="$CFLAGS -Ae" |
| 115 | fi |
| 116 | CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1" |
| 117 | IPADDR_IN_DISPLAY=yes |
| 118 | AC_DEFINE(HAVE_SECUREWARE) |
| 119 | AC_DEFINE(USE_PIPES) |
| 120 | AC_DEFINE(LOGIN_NO_ENDOPT) |
| 121 | AC_DEFINE(LOGIN_NEEDS_UTMPX) |
| 122 | AC_DEFINE(DISABLE_SHADOW) |
| 123 | AC_DEFINE(DISABLE_UTMP) |
| 124 | AC_DEFINE(SPT_TYPE,SPT_PSTAT) |
Tim Rice | f028f1e | 2002-07-19 12:41:10 -0700 | [diff] [blame] | 125 | LIBS="$LIBS -lsec -lsecpw" |
| 126 | AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])) |
Kevin Steves | 0ea1d9d | 2002-04-25 18:17:04 +0000 | [diff] [blame] | 127 | disable_ptmx_check=yes |
| 128 | ;; |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 129 | *-*-hpux10*) |
| 130 | if test -z "$GCC"; then |
Damien Miller | fda78d9 | 2000-05-20 15:33:44 +1000 | [diff] [blame] | 131 | CFLAGS="$CFLAGS -Ae" |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 132 | fi |
Kevin Steves | 315f8b7 | 2001-06-28 00:24:41 +0000 | [diff] [blame] | 133 | CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1" |
Damien Miller | 9a94734 | 2000-08-30 10:03:33 +1100 | [diff] [blame] | 134 | IPADDR_IN_DISPLAY=yes |
Damien Miller | b078567 | 2000-08-23 09:10:39 +1000 | [diff] [blame] | 135 | AC_DEFINE(USE_PIPES) |
Kevin Steves | 5feaaef | 2002-04-23 20:45:55 +0000 | [diff] [blame] | 136 | AC_DEFINE(LOGIN_NO_ENDOPT) |
| 137 | AC_DEFINE(LOGIN_NEEDS_UTMPX) |
Damien Miller | 8a1e6a6 | 2000-09-16 15:55:52 +1100 | [diff] [blame] | 138 | AC_DEFINE(DISABLE_SHADOW) |
Damien Miller | d6f204d | 2000-09-23 13:57:27 +1100 | [diff] [blame] | 139 | AC_DEFINE(DISABLE_UTMP) |
Kevin Steves | 8848b24 | 2000-10-18 13:11:44 +0000 | [diff] [blame] | 140 | AC_DEFINE(SPT_TYPE,SPT_PSTAT) |
Tim Rice | f028f1e | 2002-07-19 12:41:10 -0700 | [diff] [blame] | 141 | LIBS="$LIBS -lsec" |
| 142 | AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])) |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 143 | ;; |
Damien Miller | 1bead33 | 2000-04-30 00:47:29 +1000 | [diff] [blame] | 144 | *-*-hpux11*) |
Kevin Steves | 6a7b0de | 2001-06-27 16:32:24 +0000 | [diff] [blame] | 145 | CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1" |
Damien Miller | 9a94734 | 2000-08-30 10:03:33 +1100 | [diff] [blame] | 146 | IPADDR_IN_DISPLAY=yes |
Damien Miller | 82cf0ce | 2000-12-20 13:34:48 +1100 | [diff] [blame] | 147 | AC_DEFINE(PAM_SUN_CODEBASE) |
Damien Miller | 5552d7a | 2000-08-30 09:53:24 +1100 | [diff] [blame] | 148 | AC_DEFINE(USE_PIPES) |
Kevin Steves | 5feaaef | 2002-04-23 20:45:55 +0000 | [diff] [blame] | 149 | AC_DEFINE(LOGIN_NO_ENDOPT) |
| 150 | AC_DEFINE(LOGIN_NEEDS_UTMPX) |
Damien Miller | 8a1e6a6 | 2000-09-16 15:55:52 +1100 | [diff] [blame] | 151 | AC_DEFINE(DISABLE_SHADOW) |
Damien Miller | d6f204d | 2000-09-23 13:57:27 +1100 | [diff] [blame] | 152 | AC_DEFINE(DISABLE_UTMP) |
Kevin Steves | 8848b24 | 2000-10-18 13:11:44 +0000 | [diff] [blame] | 153 | AC_DEFINE(SPT_TYPE,SPT_PSTAT) |
Tim Rice | f028f1e | 2002-07-19 12:41:10 -0700 | [diff] [blame] | 154 | LIBS="$LIBS -lsec" |
| 155 | AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])) |
Damien Miller | 1bead33 | 2000-04-30 00:47:29 +1000 | [diff] [blame] | 156 | ;; |
Damien Miller | beb4ba5 | 1999-12-28 15:09:35 +1100 | [diff] [blame] | 157 | *-*-irix5*) |
Ben Lindstrom | 28bfc0d | 2000-12-18 19:58:57 +0000 | [diff] [blame] | 158 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
Damien Miller | 9e11089 | 2000-06-07 21:05:46 +1000 | [diff] [blame] | 159 | LDFLAGS="$LDFLAGS" |
Damien Miller | 190d5a8 | 2000-09-30 09:43:19 +1100 | [diff] [blame] | 160 | PATH="$PATH:/usr/etc" |
Damien Miller | 11fa2cc | 2000-08-16 10:35:58 +1000 | [diff] [blame] | 161 | AC_DEFINE(BROKEN_INET_NTOA) |
Damien Miller | f1b9d11 | 2002-04-23 23:09:19 +1000 | [diff] [blame] | 162 | AC_DEFINE(WITH_ABBREV_NO_TTY) |
Damien Miller | 1808f38 | 2000-01-06 12:03:12 +1100 | [diff] [blame] | 163 | ;; |
| 164 | *-*-irix6*) |
Ben Lindstrom | 28bfc0d | 2000-12-18 19:58:57 +0000 | [diff] [blame] | 165 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
Damien Miller | 9e11089 | 2000-06-07 21:05:46 +1000 | [diff] [blame] | 166 | LDFLAGS="$LDFLAGS" |
Damien Miller | 190d5a8 | 2000-09-30 09:43:19 +1100 | [diff] [blame] | 167 | PATH="$PATH:/usr/etc" |
Damien Miller | 91606b1 | 2000-06-28 08:22:29 +1000 | [diff] [blame] | 168 | AC_DEFINE(WITH_IRIX_ARRAY) |
| 169 | AC_DEFINE(WITH_IRIX_PROJECT) |
| 170 | AC_DEFINE(WITH_IRIX_AUDIT) |
Ben Lindstrom | 8ff2a8d | 2002-04-06 18:58:31 +0000 | [diff] [blame] | 171 | AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)]) |
Damien Miller | 11fa2cc | 2000-08-16 10:35:58 +1000 | [diff] [blame] | 172 | AC_DEFINE(BROKEN_INET_NTOA) |
Damien Miller | f1b9d11 | 2002-04-23 23:09:19 +1000 | [diff] [blame] | 173 | AC_DEFINE(WITH_ABBREV_NO_TTY) |
Damien Miller | beb4ba5 | 1999-12-28 15:09:35 +1100 | [diff] [blame] | 174 | ;; |
Damien Miller | b29ea91 | 2000-01-15 14:12:03 +1100 | [diff] [blame] | 175 | *-*-linux*) |
| 176 | no_dev_ptmx=1 |
Damien Miller | a64b57a | 2001-01-17 10:44:13 +1100 | [diff] [blame] | 177 | check_for_libcrypt_later=1 |
Damien Miller | 7bcb089 | 2000-03-11 20:45:40 +1100 | [diff] [blame] | 178 | AC_DEFINE(DONT_TRY_OTHER_AF) |
Damien Miller | 4e99720 | 2000-07-09 21:21:52 +1000 | [diff] [blame] | 179 | AC_DEFINE(PAM_TTY_KLUDGE) |
Damien Miller | 7bcb089 | 2000-03-11 20:45:40 +1100 | [diff] [blame] | 180 | inet6_default_4in6=yes |
Damien Miller | b29ea91 | 2000-01-15 14:12:03 +1100 | [diff] [blame] | 181 | ;; |
Ben Lindstrom | b562864 | 2000-10-18 00:02:25 +0000 | [diff] [blame] | 182 | mips-sony-bsd|mips-sony-newsos4) |
| 183 | AC_DEFINE(HAVE_NEWS4) |
| 184 | SONY=1 |
Ben Lindstrom | b562864 | 2000-10-18 00:02:25 +0000 | [diff] [blame] | 185 | ;; |
Damien Miller | ee1c0b3 | 2000-01-21 00:18:15 +1100 | [diff] [blame] | 186 | *-*-netbsd*) |
Damien Miller | fc93d4b | 2002-09-04 23:26:29 +1000 | [diff] [blame] | 187 | check_for_libcrypt_before=1 |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 188 | need_dash_r=1 |
Damien Miller | ee1c0b3 | 2000-01-21 00:18:15 +1100 | [diff] [blame] | 189 | ;; |
Damien Miller | fbd884a | 2001-02-27 08:39:07 +1100 | [diff] [blame] | 190 | *-*-freebsd*) |
| 191 | check_for_libcrypt_later=1 |
| 192 | ;; |
Damien Miller | 0f91b4e | 2000-06-18 15:43:25 +1000 | [diff] [blame] | 193 | *-next-*) |
Damien Miller | 0f91b4e | 2000-06-18 15:43:25 +1000 | [diff] [blame] | 194 | conf_lastlog_location="/usr/adm/lastlog" |
Damien Miller | e5192fa | 2000-08-29 14:30:37 +1100 | [diff] [blame] | 195 | conf_utmp_location=/etc/utmp |
| 196 | conf_wtmp_location=/usr/adm/wtmp |
| 197 | MAIL=/usr/spool/mail |
Damien Miller | 0f91b4e | 2000-06-18 15:43:25 +1000 | [diff] [blame] | 198 | AC_DEFINE(HAVE_NEXT) |
Ben Lindstrom | b4df15d | 2000-10-15 00:17:36 +0000 | [diff] [blame] | 199 | AC_DEFINE(BROKEN_REALPATH) |
Ben Lindstrom | 76020ba | 2000-10-25 16:55:00 +0000 | [diff] [blame] | 200 | AC_DEFINE(USE_PIPES) |
Damien Miller | fbd884a | 2001-02-27 08:39:07 +1100 | [diff] [blame] | 201 | AC_DEFINE(BROKEN_SAVED_UIDS) |
Ben Lindstrom | 28bfc0d | 2000-12-18 19:58:57 +0000 | [diff] [blame] | 202 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
Ben Lindstrom | 321ae73 | 2000-12-31 15:00:23 +0000 | [diff] [blame] | 203 | CFLAGS="$CFLAGS" |
Damien Miller | 0f91b4e | 2000-06-18 15:43:25 +1000 | [diff] [blame] | 204 | ;; |
Damien Miller | 75b1d10 | 2000-01-07 14:01:41 +1100 | [diff] [blame] | 205 | *-*-solaris*) |
Ben Lindstrom | 28bfc0d | 2000-12-18 19:58:57 +0000 | [diff] [blame] | 206 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
Ben Lindstrom | 866488b | 2001-02-20 18:22:38 +0000 | [diff] [blame] | 207 | LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib" |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 208 | need_dash_r=1 |
Damien Miller | 82cf0ce | 2000-12-20 13:34:48 +1100 | [diff] [blame] | 209 | AC_DEFINE(PAM_SUN_CODEBASE) |
Ben Lindstrom | 97c677d | 2001-05-08 20:33:05 +0000 | [diff] [blame] | 210 | AC_DEFINE(LOGIN_NEEDS_UTMPX) |
| 211 | AC_DEFINE(LOGIN_NEEDS_TERM) |
Ben Lindstrom | 9527671 | 2001-10-23 17:14:00 +0000 | [diff] [blame] | 212 | AC_DEFINE(PAM_TTY_KLUDGE) |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 213 | # hardwire lastlog location (can't detect it on some versions) |
| 214 | conf_lastlog_location="/var/adm/lastlog" |
Damien Miller | a1cb644 | 2000-06-09 11:58:35 +1000 | [diff] [blame] | 215 | AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x) |
| 216 | sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'` |
| 217 | if test "$sol2ver" -ge 8; then |
| 218 | AC_MSG_RESULT(yes) |
| 219 | AC_DEFINE(DISABLE_UTMP) |
| 220 | AC_DEFINE(DISABLE_WTMP) |
| 221 | else |
| 222 | AC_MSG_RESULT(no) |
| 223 | fi |
Damien Miller | 75b1d10 | 2000-01-07 14:01:41 +1100 | [diff] [blame] | 224 | ;; |
Damien Miller | dfc83f4 | 2000-05-20 15:02:59 +1000 | [diff] [blame] | 225 | *-*-sunos4*) |
Ben Lindstrom | 28bfc0d | 2000-12-18 19:58:57 +0000 | [diff] [blame] | 226 | CPPFLAGS="$CPPFLAGS -DSUNOS4" |
Damien Miller | dfc83f4 | 2000-05-20 15:02:59 +1000 | [diff] [blame] | 227 | AC_CHECK_FUNCS(getpwanam) |
Damien Miller | 82cf0ce | 2000-12-20 13:34:48 +1100 | [diff] [blame] | 228 | AC_DEFINE(PAM_SUN_CODEBASE) |
Damien Miller | 36ccb5c | 2000-08-09 16:34:27 +1000 | [diff] [blame] | 229 | conf_utmp_location=/etc/utmp |
| 230 | conf_wtmp_location=/var/adm/wtmp |
| 231 | conf_lastlog_location=/var/adm/lastlog |
Damien Miller | b078567 | 2000-08-23 09:10:39 +1000 | [diff] [blame] | 232 | AC_DEFINE(USE_PIPES) |
Damien Miller | dfc83f4 | 2000-05-20 15:02:59 +1000 | [diff] [blame] | 233 | ;; |
Ben Lindstrom | 603bdfd | 2001-02-12 07:29:45 +0000 | [diff] [blame] | 234 | *-ncr-sysv*) |
| 235 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
| 236 | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 237 | LIBS="$LIBS -lc89" |
Kevin Steves | 0bd4b34 | 2002-01-05 23:24:27 +0000 | [diff] [blame] | 238 | AC_DEFINE(USE_PIPES) |
Ben Lindstrom | 603bdfd | 2001-02-12 07:29:45 +0000 | [diff] [blame] | 239 | ;; |
Damien Miller | 2ae714f | 2000-07-11 09:29:50 +1000 | [diff] [blame] | 240 | *-sni-sysv*) |
Ben Lindstrom | 28bfc0d | 2000-12-18 19:58:57 +0000 | [diff] [blame] | 241 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
Tim Rice | ffdf4aa | 2001-10-27 10:45:36 -0700 | [diff] [blame] | 242 | # /usr/ucblib MUST NOT be searched on ReliantUNIX |
| 243 | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
Damien Miller | fd9885e | 2001-01-10 08:16:53 +1100 | [diff] [blame] | 244 | IPADDR_IN_DISPLAY=yes |
| 245 | AC_DEFINE(USE_PIPES) |
Damien Miller | 2ae714f | 2000-07-11 09:29:50 +1000 | [diff] [blame] | 246 | AC_DEFINE(IP_TOS_IS_BROKEN) |
Tim Rice | ffdf4aa | 2001-10-27 10:45:36 -0700 | [diff] [blame] | 247 | # /usr/ucblib/libucb.a no longer needed on ReliantUNIX |
| 248 | # Attention: always take care to bind libsocket and libnsl before libc, |
| 249 | # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog |
Damien Miller | 2ae714f | 2000-07-11 09:29:50 +1000 | [diff] [blame] | 250 | ;; |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 251 | *-*-sysv4.2*) |
Ben Lindstrom | 28bfc0d | 2000-12-18 19:58:57 +0000 | [diff] [blame] | 252 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 253 | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
Damien Miller | 5dfe976 | 2001-02-16 12:05:39 +1100 | [diff] [blame] | 254 | AC_DEFINE(USE_PIPES) |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 255 | ;; |
| 256 | *-*-sysv5*) |
Ben Lindstrom | 28bfc0d | 2000-12-18 19:58:57 +0000 | [diff] [blame] | 257 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 258 | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
Damien Miller | 5dfe976 | 2001-02-16 12:05:39 +1100 | [diff] [blame] | 259 | AC_DEFINE(USE_PIPES) |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 260 | ;; |
Damien Miller | 75b1d10 | 2000-01-07 14:01:41 +1100 | [diff] [blame] | 261 | *-*-sysv*) |
Ben Lindstrom | 28bfc0d | 2000-12-18 19:58:57 +0000 | [diff] [blame] | 262 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
Damien Miller | db81959 | 2000-03-14 13:44:01 +1100 | [diff] [blame] | 263 | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
Damien Miller | 75b1d10 | 2000-01-07 14:01:41 +1100 | [diff] [blame] | 264 | ;; |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 265 | *-*-sco3.2v4*) |
Ben Lindstrom | 28bfc0d | 2000-12-18 19:58:57 +0000 | [diff] [blame] | 266 | CPPFLAGS="$CPPFLAGS -Dftruncate=chsize -I/usr/local/include" |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 267 | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 268 | LIBS="$LIBS -los -lprot -lx -ltinfo -lm" |
Damien Miller | 5dfe976 | 2001-02-16 12:05:39 +1100 | [diff] [blame] | 269 | RANLIB=true |
| 270 | no_dev_ptmx=1 |
| 271 | AC_DEFINE(BROKEN_SYS_TERMIO_H) |
| 272 | AC_DEFINE(USE_PIPES) |
Kevin Steves | 0ea1d9d | 2002-04-25 18:17:04 +0000 | [diff] [blame] | 273 | AC_DEFINE(HAVE_SECUREWARE) |
Ben Lindstrom | 980754c | 2000-11-12 00:04:24 +0000 | [diff] [blame] | 274 | AC_DEFINE(DISABLE_SHADOW) |
Damien Miller | fbd884a | 2001-02-27 08:39:07 +1100 | [diff] [blame] | 275 | AC_DEFINE(BROKEN_SAVED_UIDS) |
Damien Miller | 217f567 | 2001-02-16 12:12:41 +1100 | [diff] [blame] | 276 | AC_CHECK_FUNCS(getluid setluid) |
Tim Rice | 07183b8 | 2001-04-25 21:40:28 -0700 | [diff] [blame] | 277 | MANTYPE=man |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 278 | do_sco3_extra_lib_check=yes |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 279 | ;; |
| 280 | *-*-sco3.2v5*) |
Ben Lindstrom | 28bfc0d | 2000-12-18 19:58:57 +0000 | [diff] [blame] | 281 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
Damien Miller | a66626b | 2000-06-13 18:57:53 +1000 | [diff] [blame] | 282 | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
Damien Miller | 5dfe976 | 2001-02-16 12:05:39 +1100 | [diff] [blame] | 283 | LIBS="$LIBS -lprot -lx -ltinfo -lm" |
Damien Miller | a66626b | 2000-06-13 18:57:53 +1000 | [diff] [blame] | 284 | no_dev_ptmx=1 |
Damien Miller | 5dfe976 | 2001-02-16 12:05:39 +1100 | [diff] [blame] | 285 | AC_DEFINE(USE_PIPES) |
Kevin Steves | 0ea1d9d | 2002-04-25 18:17:04 +0000 | [diff] [blame] | 286 | AC_DEFINE(HAVE_SECUREWARE) |
Ben Lindstrom | 980754c | 2000-11-12 00:04:24 +0000 | [diff] [blame] | 287 | AC_DEFINE(DISABLE_SHADOW) |
Tim Rice | 9dd3081 | 2002-07-07 13:43:36 -0700 | [diff] [blame] | 288 | AC_DEFINE(DISABLE_FD_PASSING) |
Damien Miller | 217f567 | 2001-02-16 12:12:41 +1100 | [diff] [blame] | 289 | AC_CHECK_FUNCS(getluid setluid) |
Tim Rice | 07183b8 | 2001-04-25 21:40:28 -0700 | [diff] [blame] | 290 | MANTYPE=man |
Damien Miller | a66626b | 2000-06-13 18:57:53 +1000 | [diff] [blame] | 291 | ;; |
Ben Lindstrom | 232ccf7 | 2002-07-22 23:34:25 +0000 | [diff] [blame] | 292 | *-*-unicosmk*) |
| 293 | no_libsocket=1 |
| 294 | no_libnsl=1 |
| 295 | AC_DEFINE(USE_PIPES) |
| 296 | AC_DEFINE(DISABLE_FD_PASSING) |
| 297 | LDFLAGS="$LDFLAGS" |
| 298 | LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm" |
| 299 | MANTYPE=cat |
Ben Lindstrom | 762104e | 2002-07-23 00:00:05 +0000 | [diff] [blame] | 300 | ;; |
Ben Lindstrom | d9e0824 | 2001-07-22 19:32:00 +0000 | [diff] [blame] | 301 | *-*-unicos*) |
Tim Rice | e991e3c | 2001-08-07 15:29:07 -0700 | [diff] [blame] | 302 | no_libsocket=1 |
| 303 | no_libnsl=1 |
Ben Lindstrom | d9e0824 | 2001-07-22 19:32:00 +0000 | [diff] [blame] | 304 | AC_DEFINE(USE_PIPES) |
Tim Rice | 9dd3081 | 2002-07-07 13:43:36 -0700 | [diff] [blame] | 305 | AC_DEFINE(DISABLE_FD_PASSING) |
Tim Rice | 81ed518 | 2002-09-25 17:38:46 -0700 | [diff] [blame] | 306 | AC_DEFINE(NO_SSH_LASTLOG) |
Ben Lindstrom | 232ccf7 | 2002-07-22 23:34:25 +0000 | [diff] [blame] | 307 | LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal" |
| 308 | LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm" |
| 309 | MANTYPE=cat |
Tim Rice | e991e3c | 2001-08-07 15:29:07 -0700 | [diff] [blame] | 310 | ;; |
Damien Miller | b8c656e | 2000-06-28 15:22:41 +1000 | [diff] [blame] | 311 | *-dec-osf*) |
Ben Lindstrom | 72af2ef | 2001-05-08 20:42:28 +0000 | [diff] [blame] | 312 | AC_MSG_CHECKING(for Digital Unix SIA) |
| 313 | no_osfsia="" |
| 314 | AC_ARG_WITH(osfsia, |
| 315 | [ --with-osfsia Enable Digital Unix SIA], |
| 316 | [ |
| 317 | if test "x$withval" = "xno" ; then |
| 318 | AC_MSG_RESULT(disabled) |
| 319 | no_osfsia=1 |
| 320 | fi |
| 321 | ], |
| 322 | ) |
| 323 | if test -z "$no_osfsia" ; then |
Damien Miller | b8c656e | 2000-06-28 15:22:41 +1000 | [diff] [blame] | 324 | if test -f /etc/sia/matrix.conf; then |
| 325 | AC_MSG_RESULT(yes) |
| 326 | AC_DEFINE(HAVE_OSF_SIA) |
| 327 | AC_DEFINE(DISABLE_LOGIN) |
| 328 | LIBS="$LIBS -lsecurity -ldb -lm -laud" |
| 329 | else |
| 330 | AC_MSG_RESULT(no) |
| 331 | fi |
| 332 | fi |
| 333 | ;; |
Ben Lindstrom | 19d7b8d | 2001-08-16 00:09:49 +0000 | [diff] [blame] | 334 | |
| 335 | *-*-nto-qnx) |
| 336 | AC_DEFINE(USE_PIPES) |
| 337 | AC_DEFINE(NO_X11_UNIX_SOCKETS) |
| 338 | AC_DEFINE(MISSING_NFDBITS) |
| 339 | AC_DEFINE(MISSING_HOWMANY) |
| 340 | AC_DEFINE(MISSING_FD_MASK) |
| 341 | ;; |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 342 | esac |
| 343 | |
Damien Miller | e37bfc1 | 2000-06-05 09:37:43 +1000 | [diff] [blame] | 344 | # Allow user to specify flags |
| 345 | AC_ARG_WITH(cflags, |
| 346 | [ --with-cflags Specify additional flags to pass to compiler], |
| 347 | [ |
| 348 | if test "x$withval" != "xno" ; then |
| 349 | CFLAGS="$CFLAGS $withval" |
| 350 | fi |
| 351 | ] |
| 352 | ) |
Ben Lindstrom | 28bfc0d | 2000-12-18 19:58:57 +0000 | [diff] [blame] | 353 | AC_ARG_WITH(cppflags, |
| 354 | [ --with-cppflags Specify additional flags to pass to preprocessor] , |
| 355 | [ |
| 356 | if test "x$withval" != "xno"; then |
| 357 | CPPFLAGS="$CPPFLAGS $withval" |
| 358 | fi |
| 359 | ] |
| 360 | ) |
Damien Miller | e37bfc1 | 2000-06-05 09:37:43 +1000 | [diff] [blame] | 361 | AC_ARG_WITH(ldflags, |
Ben Lindstrom | 2ed9818 | 2000-11-06 07:15:43 +0000 | [diff] [blame] | 362 | [ --with-ldflags Specify additional flags to pass to linker], |
Damien Miller | e37bfc1 | 2000-06-05 09:37:43 +1000 | [diff] [blame] | 363 | [ |
| 364 | if test "x$withval" != "xno" ; then |
| 365 | LDFLAGS="$LDFLAGS $withval" |
| 366 | fi |
| 367 | ] |
| 368 | ) |
| 369 | AC_ARG_WITH(libs, |
| 370 | [ --with-libs Specify additional libraries to link with], |
| 371 | [ |
| 372 | if test "x$withval" != "xno" ; then |
| 373 | LIBS="$LIBS $withval" |
| 374 | fi |
| 375 | ] |
| 376 | ) |
| 377 | |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 378 | # Checks for header files. |
| 379 | AC_CHECK_HEADERS(bstring.h crypt.h endian.h floatingpoint.h \ |
Tim Rice | 81ed518 | 2002-09-25 17:38:46 -0700 | [diff] [blame] | 380 | getopt.h glob.h ia.h lastlog.h limits.h login.h \ |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 381 | login_cap.h maillock.h netdb.h netgroup.h \ |
Damien Miller | f71d2a5 | 2002-05-13 15:14:08 +1000 | [diff] [blame] | 382 | netinet/in_systm.h paths.h pty.h readpassphrase.h \ |
Ben Lindstrom | 7577fd8 | 2002-03-08 03:11:07 +0000 | [diff] [blame] | 383 | rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \ |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 384 | strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h \ |
Kevin Steves | b1184bb | 2002-04-07 18:12:03 +0000 | [diff] [blame] | 385 | sys/mman.h sys/select.h sys/stat.h \ |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 386 | sys/stropts.h sys/sysmacros.h sys/time.h \ |
Tim Rice | 81ed518 | 2002-09-25 17:38:46 -0700 | [diff] [blame] | 387 | sys/un.h time.h tmpdir.h ttyent.h usersec.h \ |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 388 | util.h utime.h utmp.h utmpx.h) |
| 389 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 390 | # Checks for libraries. |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 391 | AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match)) |
| 392 | AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt)) |
Ben Lindstrom | 3ad650a | 2001-01-03 06:02:51 +0000 | [diff] [blame] | 393 | |
Damien Miller | df28802 | 2001-02-18 13:07:07 +1100 | [diff] [blame] | 394 | dnl SCO OS3 needs this for libwrap |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 395 | if test "x$with_tcp_wrappers" != "xno" ; then |
| 396 | if test "x$do_sco3_extra_lib_check" = "xyes" ; then |
| 397 | AC_CHECK_LIB(rpc, innetgr, LIBS="-lrpc -lyp -lrpc $LIBS" , , -lyp -lrpc) |
| 398 | fi |
| 399 | fi |
Damien Miller | df28802 | 2001-02-18 13:07:07 +1100 | [diff] [blame] | 400 | |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 401 | AC_CHECK_FUNC(getspnam, , |
| 402 | AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen")) |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 403 | |
Damien Miller | 150c8b5 | 2002-02-13 23:06:56 +1100 | [diff] [blame] | 404 | AC_ARG_WITH(rpath, |
| 405 | [ --without-rpath Disable auto-added -R linker paths], |
| 406 | [ |
| 407 | if test "x$withval" = "xno" ; then |
| 408 | need_dash_r="" |
| 409 | fi |
| 410 | if test "x$withval" = "xyes" ; then |
| 411 | need_dash_r=1 |
| 412 | fi |
| 413 | ] |
| 414 | ) |
| 415 | |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 416 | dnl zlib is required |
| 417 | AC_ARG_WITH(zlib, |
| 418 | [ --with-zlib=PATH Use zlib in PATH], |
| 419 | [ |
Kevin Steves | 7dc8197 | 2002-01-22 21:59:31 +0000 | [diff] [blame] | 420 | if test "x$withval" = "xno" ; then |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 421 | AC_MSG_ERROR([*** zlib is required ***]) |
| 422 | fi |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 423 | if test -d "$withval/lib"; then |
| 424 | if test -n "${need_dash_r}"; then |
Tim Rice | 02cebcd | 2001-10-25 10:01:30 -0700 | [diff] [blame] | 425 | LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 426 | else |
Tim Rice | 02cebcd | 2001-10-25 10:01:30 -0700 | [diff] [blame] | 427 | LDFLAGS="-L${withval}/lib ${LDFLAGS}" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 428 | fi |
| 429 | else |
| 430 | if test -n "${need_dash_r}"; then |
Tim Rice | 02cebcd | 2001-10-25 10:01:30 -0700 | [diff] [blame] | 431 | LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 432 | else |
Tim Rice | 02cebcd | 2001-10-25 10:01:30 -0700 | [diff] [blame] | 433 | LDFLAGS="-L${withval} ${LDFLAGS}" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 434 | fi |
| 435 | fi |
| 436 | if test -d "$withval/include"; then |
Tim Rice | 02cebcd | 2001-10-25 10:01:30 -0700 | [diff] [blame] | 437 | CPPFLAGS="-I${withval}/include ${CPPFLAGS}" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 438 | else |
Tim Rice | 02cebcd | 2001-10-25 10:01:30 -0700 | [diff] [blame] | 439 | CPPFLAGS="-I${withval} ${CPPFLAGS}" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 440 | fi |
| 441 | ] |
| 442 | ) |
| 443 | |
Tim Rice | 17b93e5 | 2001-10-23 22:36:54 -0700 | [diff] [blame] | 444 | AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first or check config.log ***])) |
Damien Miller | 6f9c337 | 2000-10-25 10:06:04 +1100 | [diff] [blame] | 445 | |
Ben Lindstrom | 3ad650a | 2001-01-03 06:02:51 +0000 | [diff] [blame] | 446 | dnl UnixWare 2.x |
| 447 | AC_CHECK_FUNC(strcasecmp, |
| 448 | [], [ AC_CHECK_LIB(resolv, strcasecmp, LIBS="$LIBS -lresolv") ] |
| 449 | ) |
| 450 | AC_CHECK_FUNC(utimes, |
Tim Rice | cbb9066 | 2002-07-08 19:17:10 -0700 | [diff] [blame] | 451 | [], [ AC_CHECK_LIB(c89, utimes, [AC_DEFINE(HAVE_UTIMES) |
| 452 | LIBS="$LIBS -lc89"]) ] |
Ben Lindstrom | 3ad650a | 2001-01-03 06:02:51 +0000 | [diff] [blame] | 453 | ) |
Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 454 | |
Tim Rice | e589a29 | 2001-11-03 11:09:32 -0800 | [diff] [blame] | 455 | dnl Checks for libutil functions |
| 456 | AC_CHECK_HEADERS(libutil.h) |
| 457 | AC_SEARCH_LIBS(login, util bsd, [AC_DEFINE(HAVE_LOGIN)]) |
| 458 | AC_CHECK_FUNCS(logout updwtmp logwtmp) |
| 459 | |
Ben Lindstrom | 8697e08 | 2001-02-24 21:41:10 +0000 | [diff] [blame] | 460 | AC_FUNC_STRFTIME |
| 461 | |
Damien Miller | 3c02768 | 2001-03-14 11:39:45 +1100 | [diff] [blame] | 462 | # Check for ALTDIRFUNC glob() extension |
| 463 | AC_MSG_CHECKING(for GLOB_ALTDIRFUNC support) |
| 464 | AC_EGREP_CPP(FOUNDIT, |
| 465 | [ |
| 466 | #include <glob.h> |
| 467 | #ifdef GLOB_ALTDIRFUNC |
| 468 | FOUNDIT |
| 469 | #endif |
| 470 | ], |
| 471 | [ |
| 472 | AC_DEFINE(GLOB_HAS_ALTDIRFUNC) |
| 473 | AC_MSG_RESULT(yes) |
| 474 | ], |
| 475 | [ |
| 476 | AC_MSG_RESULT(no) |
| 477 | ] |
| 478 | ) |
Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 479 | |
Ben Lindstrom | 45b14db | 2001-03-17 01:15:38 +0000 | [diff] [blame] | 480 | # Check for g.gl_matchc glob() extension |
| 481 | AC_MSG_CHECKING(for gl_matchc field in glob_t) |
| 482 | AC_EGREP_CPP(FOUNDIT, |
| 483 | [ |
| 484 | #include <glob.h> |
| 485 | int main(void){glob_t g; g.gl_matchc = 1;} |
| 486 | ], |
| 487 | [ |
| 488 | AC_DEFINE(GLOB_HAS_GL_MATCHC) |
| 489 | AC_MSG_RESULT(yes) |
| 490 | ], |
| 491 | [ |
| 492 | AC_MSG_RESULT(no) |
| 493 | ] |
| 494 | ) |
| 495 | |
Damien Miller | 18bb473 | 2001-03-28 14:35:30 +1000 | [diff] [blame] | 496 | AC_MSG_CHECKING([whether struct dirent allocates space for d_name]) |
| 497 | AC_TRY_RUN( |
| 498 | [ |
| 499 | #include <sys/types.h> |
| 500 | #include <dirent.h> |
Tim Rice | 2c961ce | 2002-09-23 16:54:10 -0700 | [diff] [blame] | 501 | int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));} |
Damien Miller | 18bb473 | 2001-03-28 14:35:30 +1000 | [diff] [blame] | 502 | ], |
| 503 | [AC_MSG_RESULT(yes)], |
| 504 | [ |
| 505 | AC_MSG_RESULT(no) |
| 506 | AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME) |
| 507 | ] |
| 508 | ) |
| 509 | |
Damien Miller | c547bf1 | 2001-02-16 10:18:12 +1100 | [diff] [blame] | 510 | # Check whether user wants S/Key support |
| 511 | SKEY_MSG="no" |
| 512 | AC_ARG_WITH(skey, |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 513 | [ --with-skey[[=PATH]] Enable S/Key support |
| 514 | (optionally in PATH)], |
Damien Miller | c547bf1 | 2001-02-16 10:18:12 +1100 | [diff] [blame] | 515 | [ |
| 516 | if test "x$withval" != "xno" ; then |
| 517 | |
| 518 | if test "x$withval" != "xyes" ; then |
| 519 | CPPFLAGS="$CPPFLAGS -I${withval}/include" |
| 520 | LDFLAGS="$LDFLAGS -L${withval}/lib" |
| 521 | fi |
| 522 | |
| 523 | AC_DEFINE(SKEY) |
| 524 | LIBS="-lskey $LIBS" |
| 525 | SKEY_MSG="yes" |
| 526 | |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 527 | AC_MSG_CHECKING([for s/key support]) |
| 528 | AC_TRY_RUN( |
Damien Miller | c547bf1 | 2001-02-16 10:18:12 +1100 | [diff] [blame] | 529 | [ |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 530 | #include <stdio.h> |
| 531 | #include <skey.h> |
Tim Rice | 2c961ce | 2002-09-23 16:54:10 -0700 | [diff] [blame] | 532 | int main() { char *ff = skey_keyinfo(""); ff=""; exit(0); } |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 533 | ], |
| 534 | [AC_MSG_RESULT(yes)], |
| 535 | [ |
| 536 | AC_MSG_RESULT(no) |
Damien Miller | c547bf1 | 2001-02-16 10:18:12 +1100 | [diff] [blame] | 537 | AC_MSG_ERROR([** Incomplete or missing s/key libraries.]) |
| 538 | ]) |
| 539 | fi |
| 540 | ] |
| 541 | ) |
| 542 | |
| 543 | # Check whether user wants TCP wrappers support |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 544 | TCPW_MSG="no" |
Damien Miller | c547bf1 | 2001-02-16 10:18:12 +1100 | [diff] [blame] | 545 | AC_ARG_WITH(tcp-wrappers, |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 546 | [ --with-tcp-wrappers[[=PATH]] Enable tcpwrappers support |
| 547 | (optionally in PATH)], |
Damien Miller | c547bf1 | 2001-02-16 10:18:12 +1100 | [diff] [blame] | 548 | [ |
| 549 | if test "x$withval" != "xno" ; then |
| 550 | saved_LIBS="$LIBS" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 551 | saved_LDFLAGS="$LDFLAGS" |
| 552 | saved_CPPFLAGS="$CPPFLAGS" |
| 553 | if test -n "${withval}" -a "${withval}" != "yes"; then |
| 554 | if test -d "${withval}/lib"; then |
| 555 | if test -n "${need_dash_r}"; then |
Tim Rice | 02cebcd | 2001-10-25 10:01:30 -0700 | [diff] [blame] | 556 | LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 557 | else |
Tim Rice | 02cebcd | 2001-10-25 10:01:30 -0700 | [diff] [blame] | 558 | LDFLAGS="-L${withval}/lib ${LDFLAGS}" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 559 | fi |
| 560 | else |
| 561 | if test -n "${need_dash_r}"; then |
Tim Rice | 02cebcd | 2001-10-25 10:01:30 -0700 | [diff] [blame] | 562 | LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 563 | else |
Tim Rice | 02cebcd | 2001-10-25 10:01:30 -0700 | [diff] [blame] | 564 | LDFLAGS="-L${withval} ${LDFLAGS}" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 565 | fi |
| 566 | fi |
| 567 | if test -d "${withval}/include"; then |
Tim Rice | 02cebcd | 2001-10-25 10:01:30 -0700 | [diff] [blame] | 568 | CPPFLAGS="-I${withval}/include ${CPPFLAGS}" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 569 | else |
Tim Rice | 02cebcd | 2001-10-25 10:01:30 -0700 | [diff] [blame] | 570 | CPPFLAGS="-I${withval} ${CPPFLAGS}" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 571 | fi |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 572 | fi |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 573 | LIBWRAP="-lwrap" |
| 574 | LIBS="$LIBWRAP $LIBS" |
Damien Miller | c547bf1 | 2001-02-16 10:18:12 +1100 | [diff] [blame] | 575 | AC_MSG_CHECKING(for libwrap) |
| 576 | AC_TRY_LINK( |
| 577 | [ |
| 578 | #include <tcpd.h> |
| 579 | int deny_severity = 0, allow_severity = 0; |
| 580 | ], |
| 581 | [hosts_access(0);], |
| 582 | [ |
| 583 | AC_MSG_RESULT(yes) |
| 584 | AC_DEFINE(LIBWRAP) |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 585 | AC_SUBST(LIBWRAP) |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 586 | TCPW_MSG="yes" |
Damien Miller | c547bf1 | 2001-02-16 10:18:12 +1100 | [diff] [blame] | 587 | ], |
| 588 | [ |
| 589 | AC_MSG_ERROR([*** libwrap missing]) |
| 590 | ] |
| 591 | ) |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 592 | LIBS="$saved_LIBS" |
Damien Miller | c547bf1 | 2001-02-16 10:18:12 +1100 | [diff] [blame] | 593 | fi |
| 594 | ] |
| 595 | ) |
| 596 | |
Damien Miller | ad833b3 | 2000-08-23 10:46:23 +1000 | [diff] [blame] | 597 | dnl Checks for library functions. |
Ben Lindstrom | fdee8ef | 2002-04-06 23:52:02 +0000 | [diff] [blame] | 598 | AC_CHECK_FUNCS(arc4random b64_ntop bcopy bindresvport_sa \ |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 599 | clock fchmod fchown freeaddrinfo futimes gai_strerror \ |
Damien Miller | 771721f | 2002-09-12 10:32:59 +1000 | [diff] [blame] | 600 | getaddrinfo getcwd getgrouplist getnameinfo getopt getpeereid\ |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 601 | getrlimit getrusage getttyent glob inet_aton inet_ntoa \ |
| 602 | inet_ntop innetgr login_getcapbool md5_crypt memmove \ |
Damien Miller | 594a71b | 2002-04-23 20:22:59 +1000 | [diff] [blame] | 603 | mkdtemp mmap ngetaddrinfo openpty ogetaddrinfo readpassphrase \ |
| 604 | realpath recvmsg rresvport_af sendmsg setdtablesize setegid \ |
Ben Lindstrom | 837461b | 2002-06-12 16:57:14 +0000 | [diff] [blame] | 605 | setenv seteuid setgroups setlogin setproctitle setresgid setreuid \ |
Ben Lindstrom | f0bfa83 | 2002-06-21 00:01:18 +0000 | [diff] [blame] | 606 | setrlimit setsid setpcred setvbuf sigaction sigvec snprintf \ |
| 607 | socketpair strerror strlcat strlcpy strmode strsep sysconf tcgetpgrp \ |
| 608 | truncate utimes vhangup vsnprintf waitpid __b64_ntop _getpty) |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 609 | |
| 610 | dnl IRIX and Solaris 2.5.1 have dirname() in libgen |
Tim Rice | 17b93e5 | 2001-10-23 22:36:54 -0700 | [diff] [blame] | 611 | AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[ |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 612 | AC_CHECK_LIB(gen, dirname,[ |
| 613 | AC_CACHE_CHECK([for broken dirname], |
| 614 | ac_cv_have_broken_dirname, [ |
Tim Rice | 17b93e5 | 2001-10-23 22:36:54 -0700 | [diff] [blame] | 615 | save_LIBS="$LIBS" |
| 616 | LIBS="$LIBS -lgen" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 617 | AC_TRY_RUN( |
| 618 | [ |
| 619 | #include <libgen.h> |
| 620 | #include <string.h> |
| 621 | |
| 622 | int main(int argc, char **argv) { |
| 623 | char *s, buf[32]; |
| 624 | |
| 625 | strncpy(buf,"/etc", 32); |
| 626 | s = dirname(buf); |
Tim Rice | 17b93e5 | 2001-10-23 22:36:54 -0700 | [diff] [blame] | 627 | if (!s || strncmp(s, "/", 32) != 0) { |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 628 | exit(1); |
| 629 | } else { |
| 630 | exit(0); |
| 631 | } |
| 632 | } |
| 633 | ], |
| 634 | [ ac_cv_have_broken_dirname="no" ], |
| 635 | [ ac_cv_have_broken_dirname="yes" ] |
| 636 | ) |
Tim Rice | 17b93e5 | 2001-10-23 22:36:54 -0700 | [diff] [blame] | 637 | LIBS="$save_LIBS" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 638 | ]) |
Tim Rice | 17b93e5 | 2001-10-23 22:36:54 -0700 | [diff] [blame] | 639 | if test "x$ac_cv_have_broken_dirname" = "xno" ; then |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 640 | LIBS="$LIBS -lgen" |
| 641 | AC_DEFINE(HAVE_DIRNAME) |
Tim Rice | 17b93e5 | 2001-10-23 22:36:54 -0700 | [diff] [blame] | 642 | AC_CHECK_HEADERS(libgen.h) |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 643 | fi |
| 644 | ]) |
| 645 | ]) |
| 646 | |
Damien Miller | ad833b3 | 2000-08-23 10:46:23 +1000 | [diff] [blame] | 647 | dnl Checks for time functions |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 648 | AC_CHECK_FUNCS(gettimeofday time) |
Damien Miller | ad833b3 | 2000-08-23 10:46:23 +1000 | [diff] [blame] | 649 | dnl Checks for utmp functions |
Ben Lindstrom | 2c467a2 | 2000-12-27 04:57:41 +0000 | [diff] [blame] | 650 | AC_CHECK_FUNCS(endutent getutent getutid getutline pututline setutent) |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 651 | AC_CHECK_FUNCS(utmpname) |
Damien Miller | ad833b3 | 2000-08-23 10:46:23 +1000 | [diff] [blame] | 652 | dnl Checks for utmpx functions |
Ben Lindstrom | 2c467a2 | 2000-12-27 04:57:41 +0000 | [diff] [blame] | 653 | AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline pututxline ) |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 654 | AC_CHECK_FUNCS(setutxent utmpxname) |
Damien Miller | cedfecc | 1999-11-15 14:36:53 +1100 | [diff] [blame] | 655 | |
Damien Miller | 04f8014 | 1999-11-19 15:32:34 +1100 | [diff] [blame] | 656 | AC_CHECK_FUNC(daemon, |
| 657 | [AC_DEFINE(HAVE_DAEMON)], |
| 658 | [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])] |
| 659 | ) |
| 660 | |
Damien Miller | 9fb07e4 | 2000-03-05 16:22:59 +1100 | [diff] [blame] | 661 | AC_CHECK_FUNC(getpagesize, |
| 662 | [AC_DEFINE(HAVE_GETPAGESIZE)], |
| 663 | [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])] |
| 664 | ) |
| 665 | |
Damien Miller | cb170cb | 2000-07-01 16:52:55 +1000 | [diff] [blame] | 666 | # Check for broken snprintf |
| 667 | if test "x$ac_cv_func_snprintf" = "xyes" ; then |
| 668 | AC_MSG_CHECKING([whether snprintf correctly terminates long strings]) |
| 669 | AC_TRY_RUN( |
| 670 | [ |
| 671 | #include <stdio.h> |
Tim Rice | 2c961ce | 2002-09-23 16:54:10 -0700 | [diff] [blame] | 672 | int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');} |
Damien Miller | cb170cb | 2000-07-01 16:52:55 +1000 | [diff] [blame] | 673 | ], |
| 674 | [AC_MSG_RESULT(yes)], |
| 675 | [ |
| 676 | AC_MSG_RESULT(no) |
| 677 | AC_DEFINE(BROKEN_SNPRINTF) |
| 678 | AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor]) |
| 679 | ] |
| 680 | ) |
| 681 | fi |
| 682 | |
Damien Miller | 606f880 | 2000-09-16 15:39:56 +1100 | [diff] [blame] | 683 | AC_FUNC_GETPGRP |
| 684 | |
Damien Miller | a64b57a | 2001-01-17 10:44:13 +1100 | [diff] [blame] | 685 | # Check for PAM libs |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 686 | PAM_MSG="no" |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 687 | AC_ARG_WITH(pam, |
Damien Miller | a64b57a | 2001-01-17 10:44:13 +1100 | [diff] [blame] | 688 | [ --with-pam Enable PAM support ], |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 689 | [ |
Damien Miller | a64b57a | 2001-01-17 10:44:13 +1100 | [diff] [blame] | 690 | if test "x$withval" != "xno" ; then |
| 691 | if test "x$ac_cv_header_security_pam_appl_h" != "xyes" ; then |
| 692 | AC_MSG_ERROR([PAM headers not found]) |
| 693 | fi |
| 694 | |
| 695 | AC_CHECK_LIB(dl, dlopen, , ) |
| 696 | AC_CHECK_LIB(pam, pam_set_item, , AC_MSG_ERROR([*** libpam missing])) |
| 697 | AC_CHECK_FUNCS(pam_getenvlist) |
| 698 | |
| 699 | disable_shadow=yes |
| 700 | PAM_MSG="yes" |
| 701 | |
| 702 | AC_DEFINE(USE_PAM) |
Tim Rice | 7d2d1f1 | 2002-02-26 22:05:11 -0800 | [diff] [blame] | 703 | if test $ac_cv_lib_dl_dlopen = yes; then |
| 704 | LIBPAM="-lpam -ldl" |
| 705 | else |
| 706 | LIBPAM="-lpam" |
| 707 | fi |
| 708 | AC_SUBST(LIBPAM) |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 709 | fi |
| 710 | ] |
| 711 | ) |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 712 | |
Damien Miller | a64b57a | 2001-01-17 10:44:13 +1100 | [diff] [blame] | 713 | # Check for older PAM |
| 714 | if test "x$PAM_MSG" = "xyes" ; then |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 715 | # Check PAM strerror arguments (old PAM) |
| 716 | AC_MSG_CHECKING([whether pam_strerror takes only one argument]) |
| 717 | AC_TRY_COMPILE( |
| 718 | [ |
Damien Miller | 8117111 | 2000-04-23 11:14:01 +1000 | [diff] [blame] | 719 | #include <stdlib.h> |
| 720 | #include <security/pam_appl.h> |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 721 | ], |
| 722 | [(void)pam_strerror((pam_handle_t *)NULL, -1);], |
| 723 | [AC_MSG_RESULT(no)], |
| 724 | [ |
| 725 | AC_DEFINE(HAVE_OLD_PAM) |
| 726 | AC_MSG_RESULT(yes) |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 727 | PAM_MSG="yes (old library)" |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 728 | ] |
Damien Miller | a64b57a | 2001-01-17 10:44:13 +1100 | [diff] [blame] | 729 | ) |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 730 | fi |
| 731 | |
Damien Miller | fc93d4b | 2002-09-04 23:26:29 +1000 | [diff] [blame] | 732 | # Some systems want crypt() from libcrypt, *not* the version in OpenSSL, |
| 733 | # because the system crypt() is more featureful. |
| 734 | if test "x$check_for_libcrypt_before" = "x1"; then |
| 735 | AC_CHECK_LIB(crypt, crypt) |
| 736 | fi |
| 737 | |
Tim Rice | aef7371 | 2002-05-11 13:17:42 -0700 | [diff] [blame] | 738 | # Search for OpenSSL |
| 739 | saved_CPPFLAGS="$CPPFLAGS" |
| 740 | saved_LDFLAGS="$LDFLAGS" |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 741 | AC_ARG_WITH(ssl-dir, |
| 742 | [ --with-ssl-dir=PATH Specify path to OpenSSL installation ], |
| 743 | [ |
Ben Lindstrom | 23e1371 | 2000-10-29 22:49:19 +0000 | [diff] [blame] | 744 | if test "x$withval" != "xno" ; then |
Tim Rice | aef7371 | 2002-05-11 13:17:42 -0700 | [diff] [blame] | 745 | if test -d "$withval/lib"; then |
| 746 | if test -n "${need_dash_r}"; then |
| 747 | LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}" |
| 748 | else |
| 749 | LDFLAGS="-L${withval}/lib ${LDFLAGS}" |
| 750 | fi |
| 751 | else |
| 752 | if test -n "${need_dash_r}"; then |
| 753 | LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}" |
| 754 | else |
| 755 | LDFLAGS="-L${withval} ${LDFLAGS}" |
| 756 | fi |
| 757 | fi |
| 758 | if test -d "$withval/include"; then |
| 759 | CPPFLAGS="-I${withval}/include ${CPPFLAGS}" |
| 760 | else |
| 761 | CPPFLAGS="-I${withval} ${CPPFLAGS}" |
| 762 | fi |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 763 | fi |
| 764 | ] |
| 765 | ) |
Tim Rice | aef7371 | 2002-05-11 13:17:42 -0700 | [diff] [blame] | 766 | LIBS="$LIBS -lcrypto" |
| 767 | AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL), |
Damien Miller | 3b512e1 | 2000-05-17 23:29:18 +1000 | [diff] [blame] | 768 | [ |
Tim Rice | aef7371 | 2002-05-11 13:17:42 -0700 | [diff] [blame] | 769 | dnl Check default openssl install dir |
| 770 | if test -n "${need_dash_r}"; then |
| 771 | LDFLAGS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib ${saved_LDFLAGS}" |
Damien Miller | 3b512e1 | 2000-05-17 23:29:18 +1000 | [diff] [blame] | 772 | else |
Tim Rice | aef7371 | 2002-05-11 13:17:42 -0700 | [diff] [blame] | 773 | LDFLAGS="-L/usr/local/ssl/lib ${saved_LDFLAGS}" |
Damien Miller | 3b512e1 | 2000-05-17 23:29:18 +1000 | [diff] [blame] | 774 | fi |
Tim Rice | aef7371 | 2002-05-11 13:17:42 -0700 | [diff] [blame] | 775 | CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}" |
| 776 | AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL), |
| 777 | [ |
| 778 | AC_MSG_ERROR([*** Can't find recent OpenSSL libcrypto (see config.log for details) ***]) |
| 779 | ] |
| 780 | ) |
| 781 | ] |
| 782 | ) |
| 783 | |
Tim Rice | d730b78 | 2002-08-13 18:52:10 -0700 | [diff] [blame] | 784 | # Determine OpenSSL header version |
| 785 | AC_MSG_CHECKING([OpenSSL header version]) |
| 786 | AC_TRY_RUN( |
| 787 | [ |
| 788 | #include <stdio.h> |
| 789 | #include <string.h> |
| 790 | #include <openssl/opensslv.h> |
| 791 | #define DATA "conftest.sslincver" |
| 792 | int main(void) { |
| 793 | FILE *fd; |
| 794 | int rc; |
| 795 | |
| 796 | fd = fopen(DATA,"w"); |
| 797 | if(fd == NULL) |
| 798 | exit(1); |
| 799 | |
| 800 | if ((rc = fprintf(fd ,"%x (%s)\n", OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_TEXT)) <0) |
| 801 | exit(1); |
| 802 | |
| 803 | exit(0); |
| 804 | } |
| 805 | ], |
| 806 | [ |
| 807 | ssl_header_ver=`cat conftest.sslincver` |
| 808 | AC_MSG_RESULT($ssl_header_ver) |
| 809 | ], |
| 810 | [ |
| 811 | AC_MSG_RESULT(not found) |
| 812 | AC_MSG_ERROR(OpenSSL version header not found.) |
| 813 | ] |
| 814 | ) |
| 815 | |
| 816 | # Determine OpenSSL library version |
| 817 | AC_MSG_CHECKING([OpenSSL library version]) |
| 818 | AC_TRY_RUN( |
| 819 | [ |
| 820 | #include <stdio.h> |
| 821 | #include <string.h> |
| 822 | #include <openssl/opensslv.h> |
| 823 | #include <openssl/crypto.h> |
| 824 | #define DATA "conftest.ssllibver" |
| 825 | int main(void) { |
| 826 | FILE *fd; |
| 827 | int rc; |
| 828 | |
| 829 | fd = fopen(DATA,"w"); |
| 830 | if(fd == NULL) |
| 831 | exit(1); |
| 832 | |
| 833 | if ((rc = fprintf(fd ,"%x (%s)\n", SSLeay(), SSLeay_version(SSLEAY_VERSION))) <0) |
| 834 | exit(1); |
| 835 | |
| 836 | exit(0); |
| 837 | } |
| 838 | ], |
| 839 | [ |
| 840 | ssl_library_ver=`cat conftest.ssllibver` |
| 841 | AC_MSG_RESULT($ssl_library_ver) |
| 842 | ], |
| 843 | [ |
| 844 | AC_MSG_RESULT(not found) |
| 845 | AC_MSG_ERROR(OpenSSL library not found.) |
| 846 | ] |
| 847 | ) |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 848 | |
Damien Miller | ec93237 | 2002-01-22 22:16:03 +1100 | [diff] [blame] | 849 | # Sanity check OpenSSL headers |
| 850 | AC_MSG_CHECKING([whether OpenSSL's headers match the library]) |
| 851 | AC_TRY_RUN( |
| 852 | [ |
| 853 | #include <string.h> |
| 854 | #include <openssl/opensslv.h> |
Tim Rice | 2c961ce | 2002-09-23 16:54:10 -0700 | [diff] [blame] | 855 | int main(void) { exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); } |
Damien Miller | ec93237 | 2002-01-22 22:16:03 +1100 | [diff] [blame] | 856 | ], |
| 857 | [ |
| 858 | AC_MSG_RESULT(yes) |
| 859 | ], |
| 860 | [ |
| 861 | AC_MSG_RESULT(no) |
| 862 | AC_MSG_ERROR(Your OpenSSL headers do not match your library) |
| 863 | ] |
| 864 | ) |
| 865 | |
Damien Miller | a64b57a | 2001-01-17 10:44:13 +1100 | [diff] [blame] | 866 | # Some Linux systems (Slackware) need crypt() from libcrypt, *not* the |
| 867 | # version in OpenSSL. Skip this for PAM |
| 868 | if test "x$PAM_MSG" = "xno" -a "x$check_for_libcrypt_later" = "x1"; then |
Damien Miller | 95aa2d6 | 2001-03-01 09:16:11 +1100 | [diff] [blame] | 869 | AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt") |
Damien Miller | a64b57a | 2001-01-17 10:44:13 +1100 | [diff] [blame] | 870 | fi |
| 871 | |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 872 | |
| 873 | ### Configure cryptographic random number support |
| 874 | |
| 875 | # Check wheter OpenSSL seeds itself |
| 876 | AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded]) |
| 877 | AC_TRY_RUN( |
| 878 | [ |
| 879 | #include <string.h> |
| 880 | #include <openssl/rand.h> |
Tim Rice | 2c961ce | 2002-09-23 16:54:10 -0700 | [diff] [blame] | 881 | int main(void) { exit(RAND_status() == 1 ? 0 : 1); } |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 882 | ], |
| 883 | [ |
| 884 | OPENSSL_SEEDS_ITSELF=yes |
| 885 | AC_MSG_RESULT(yes) |
| 886 | ], |
| 887 | [ |
| 888 | AC_MSG_RESULT(no) |
| 889 | # Default to use of the rand helper if OpenSSL doesn't |
| 890 | # seed itself |
| 891 | USE_RAND_HELPER=yes |
| 892 | ] |
| 893 | ) |
| 894 | |
| 895 | |
| 896 | # Do we want to force the use of the rand helper? |
| 897 | AC_ARG_WITH(rand-helper, |
| 898 | [ --with-rand-helper Use subprocess to gather strong randomness ], |
| 899 | [ |
| 900 | if test "x$withval" = "xno" ; then |
| 901 | # Force use of OpenSSL's internal RNG, even if |
| 902 | # the previous test showed it to be unseeded. |
| 903 | if test -z "$OPENSSL_SEEDS_ITSELF" ; then |
| 904 | AC_MSG_WARN([*** Forcing use of OpenSSL's non-self-seeding PRNG]) |
| 905 | OPENSSL_SEEDS_ITSELF=yes |
| 906 | USE_RAND_HELPER="" |
| 907 | fi |
| 908 | else |
| 909 | USE_RAND_HELPER=yes |
| 910 | fi |
| 911 | ], |
| 912 | ) |
| 913 | |
| 914 | # Which randomness source do we use? |
| 915 | if test ! -z "$OPENSSL_SEEDS_ITSELF" -a -z "$USE_RAND_HELPER" ; then |
| 916 | # OpenSSL only |
| 917 | AC_DEFINE(OPENSSL_PRNG_ONLY) |
| 918 | RAND_MSG="OpenSSL internal ONLY" |
| 919 | INSTALL_SSH_RAND_HELPER="" |
Tim Rice | 1e2c600 | 2002-01-30 22:14:03 -0800 | [diff] [blame] | 920 | elif test ! -z "$USE_RAND_HELPER" ; then |
| 921 | # install rand helper |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 922 | RAND_MSG="ssh-rand-helper" |
| 923 | INSTALL_SSH_RAND_HELPER="yes" |
| 924 | fi |
| 925 | AC_SUBST(INSTALL_SSH_RAND_HELPER) |
| 926 | |
| 927 | ### Configuration of ssh-rand-helper |
| 928 | |
| 929 | # PRNGD TCP socket |
| 930 | AC_ARG_WITH(prngd-port, |
| 931 | [ --with-prngd-port=PORT read entropy from PRNGD/EGD TCP localhost:PORT], |
| 932 | [ |
Damien Miller | e996d72 | 2002-01-23 11:20:59 +1100 | [diff] [blame] | 933 | case "$withval" in |
| 934 | no) |
| 935 | withval="" |
| 936 | ;; |
| 937 | [[0-9]]*) |
| 938 | ;; |
| 939 | *) |
| 940 | AC_MSG_ERROR(You must specify a numeric port number for --with-prngd-port) |
| 941 | ;; |
| 942 | esac |
| 943 | if test ! -z "$withval" ; then |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 944 | PRNGD_PORT="$withval" |
| 945 | AC_DEFINE_UNQUOTED(PRNGD_PORT, $PRNGD_PORT) |
| 946 | fi |
| 947 | ] |
| 948 | ) |
| 949 | |
| 950 | # PRNGD Unix domain socket |
| 951 | AC_ARG_WITH(prngd-socket, |
| 952 | [ --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)], |
| 953 | [ |
Damien Miller | e996d72 | 2002-01-23 11:20:59 +1100 | [diff] [blame] | 954 | case "$withval" in |
| 955 | yes) |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 956 | withval="/var/run/egd-pool" |
Damien Miller | e996d72 | 2002-01-23 11:20:59 +1100 | [diff] [blame] | 957 | ;; |
| 958 | no) |
| 959 | withval="" |
| 960 | ;; |
| 961 | /*) |
| 962 | ;; |
| 963 | *) |
| 964 | AC_MSG_ERROR(You must specify an absolute path to the entropy socket) |
| 965 | ;; |
| 966 | esac |
| 967 | |
| 968 | if test ! -z "$withval" ; then |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 969 | if test ! -z "$PRNGD_PORT" ; then |
| 970 | AC_MSG_ERROR(You may not specify both a PRNGD/EGD port and socket) |
| 971 | fi |
Damien Miller | 6385ba0 | 2002-01-23 08:12:36 +1100 | [diff] [blame] | 972 | if test ! -r "$withval" ; then |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 973 | AC_MSG_WARN(Entropy socket is not readable) |
| 974 | fi |
| 975 | PRNGD_SOCKET="$withval" |
| 976 | AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET") |
| 977 | fi |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 978 | ], |
| 979 | [ |
| 980 | # Check for existing socket only if we don't have a random device already |
| 981 | if test "$USE_RAND_HELPER" = yes ; then |
| 982 | AC_MSG_CHECKING(for PRNGD/EGD socket) |
| 983 | # Insert other locations here |
| 984 | for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do |
| 985 | if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then |
| 986 | PRNGD_SOCKET="$sock" |
| 987 | AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET") |
| 988 | break; |
| 989 | fi |
| 990 | done |
| 991 | if test ! -z "$PRNGD_SOCKET" ; then |
| 992 | AC_MSG_RESULT($PRNGD_SOCKET) |
| 993 | else |
| 994 | AC_MSG_RESULT(not found) |
| 995 | fi |
| 996 | fi |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 997 | ] |
| 998 | ) |
| 999 | |
| 1000 | # Change default command timeout for hashing entropy source |
| 1001 | entropy_timeout=200 |
| 1002 | AC_ARG_WITH(entropy-timeout, |
| 1003 | [ --with-entropy-timeout Specify entropy gathering command timeout (msec)], |
| 1004 | [ |
| 1005 | if test "x$withval" != "xno" ; then |
| 1006 | entropy_timeout=$withval |
| 1007 | fi |
| 1008 | ] |
| 1009 | ) |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 1010 | AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout) |
| 1011 | |
Damien Miller | d3f6ad2 | 2002-06-25 10:24:47 +1000 | [diff] [blame] | 1012 | SSH_PRIVSEP_USER=sshd |
Kevin Steves | 7ff9112 | 2002-04-07 19:22:54 +0000 | [diff] [blame] | 1013 | AC_ARG_WITH(privsep-user, |
Kevin Steves | c81e129 | 2002-05-13 03:51:40 +0000 | [diff] [blame] | 1014 | [ --with-privsep-user=user Specify non-privileged user for privilege separation], |
Kevin Steves | 7ff9112 | 2002-04-07 19:22:54 +0000 | [diff] [blame] | 1015 | [ |
| 1016 | if test -n "$withval"; then |
Damien Miller | d3f6ad2 | 2002-06-25 10:24:47 +1000 | [diff] [blame] | 1017 | SSH_PRIVSEP_USER=$withval |
Kevin Steves | 7ff9112 | 2002-04-07 19:22:54 +0000 | [diff] [blame] | 1018 | fi |
| 1019 | ] |
| 1020 | ) |
Damien Miller | d3f6ad2 | 2002-06-25 10:24:47 +1000 | [diff] [blame] | 1021 | AC_DEFINE_UNQUOTED(SSH_PRIVSEP_USER, "$SSH_PRIVSEP_USER") |
| 1022 | AC_SUBST(SSH_PRIVSEP_USER) |
Kevin Steves | 7ff9112 | 2002-04-07 19:22:54 +0000 | [diff] [blame] | 1023 | |
Tim Rice | 88f2ab5 | 2002-03-17 12:17:34 -0800 | [diff] [blame] | 1024 | # We do this little dance with the search path to insure |
| 1025 | # that programs that we select for use by installed programs |
| 1026 | # (which may be run by the super-user) come from trusted |
| 1027 | # locations before they come from the user's private area. |
| 1028 | # This should help avoid accidentally configuring some |
| 1029 | # random version of a program in someone's personal bin. |
| 1030 | |
| 1031 | OPATH=$PATH |
| 1032 | PATH=/bin:/usr/bin |
Tim Rice | ae49fe6 | 2002-04-12 10:26:21 -0700 | [diff] [blame] | 1033 | test -h /bin 2> /dev/null && PATH=/usr/bin |
Tim Rice | 88f2ab5 | 2002-03-17 12:17:34 -0800 | [diff] [blame] | 1034 | test -d /sbin && PATH=$PATH:/sbin |
| 1035 | test -d /usr/sbin && PATH=$PATH:/usr/sbin |
| 1036 | PATH=$PATH:/etc:$OPATH |
| 1037 | |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 1038 | # These programs are used by the command hashing source to gather entropy |
| 1039 | OSSH_PATH_ENTROPY_PROG(PROG_LS, ls) |
| 1040 | OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat) |
| 1041 | OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp) |
| 1042 | OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig) |
| 1043 | OSSH_PATH_ENTROPY_PROG(PROG_JSTAT, jstat) |
| 1044 | OSSH_PATH_ENTROPY_PROG(PROG_PS, ps) |
| 1045 | OSSH_PATH_ENTROPY_PROG(PROG_SAR, sar) |
| 1046 | OSSH_PATH_ENTROPY_PROG(PROG_W, w) |
| 1047 | OSSH_PATH_ENTROPY_PROG(PROG_WHO, who) |
| 1048 | OSSH_PATH_ENTROPY_PROG(PROG_LAST, last) |
| 1049 | OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog) |
| 1050 | OSSH_PATH_ENTROPY_PROG(PROG_DF, df) |
| 1051 | OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat) |
| 1052 | OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime) |
| 1053 | OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs) |
| 1054 | OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail) |
Tim Rice | 88f2ab5 | 2002-03-17 12:17:34 -0800 | [diff] [blame] | 1055 | # restore PATH |
| 1056 | PATH=$OPATH |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 1057 | |
| 1058 | # Where does ssh-rand-helper get its randomness from? |
| 1059 | INSTALL_SSH_PRNG_CMDS="" |
| 1060 | if test ! -z "$INSTALL_SSH_RAND_HELPER" ; then |
| 1061 | if test ! -z "$PRNGD_PORT" ; then |
| 1062 | RAND_HELPER_MSG="TCP localhost:$PRNGD_PORT" |
| 1063 | elif test ! -z "$PRNGD_SOCKET" ; then |
| 1064 | RAND_HELPER_MSG="Unix domain socket \"$PRNGD_SOCKET\"" |
| 1065 | else |
| 1066 | RAND_HELPER_MSG="Command hashing (timeout $entropy_timeout)" |
| 1067 | RAND_HELPER_CMDHASH=yes |
| 1068 | INSTALL_SSH_PRNG_CMDS="yes" |
| 1069 | fi |
| 1070 | fi |
| 1071 | AC_SUBST(INSTALL_SSH_PRNG_CMDS) |
| 1072 | |
| 1073 | |
Ben Lindstrom | b562864 | 2000-10-18 00:02:25 +0000 | [diff] [blame] | 1074 | # Cheap hack to ensure NEWS-OS libraries are arranged right. |
| 1075 | if test ! -z "$SONY" ; then |
| 1076 | LIBS="$LIBS -liberty"; |
| 1077 | fi |
| 1078 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1079 | # Checks for data types |
Damien Miller | e0f4574 | 2000-01-18 09:12:06 +1100 | [diff] [blame] | 1080 | AC_CHECK_SIZEOF(char, 1) |
Damien Miller | c6398ef | 1999-11-20 12:18:40 +1100 | [diff] [blame] | 1081 | AC_CHECK_SIZEOF(short int, 2) |
| 1082 | AC_CHECK_SIZEOF(int, 4) |
| 1083 | AC_CHECK_SIZEOF(long int, 4) |
| 1084 | AC_CHECK_SIZEOF(long long int, 8) |
| 1085 | |
Damien Miller | fa2bb69 | 2002-04-23 23:22:25 +1000 | [diff] [blame] | 1086 | # Sanity check long long for some platforms (AIX) |
| 1087 | if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then |
| 1088 | ac_cv_sizeof_long_long_int=0 |
| 1089 | fi |
| 1090 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1091 | # More checks for data types |
Damien Miller | caf6dd6 | 2000-08-29 11:33:50 +1100 | [diff] [blame] | 1092 | AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [ |
| 1093 | AC_TRY_COMPILE( |
| 1094 | [ #include <sys/types.h> ], |
| 1095 | [ u_int a; a = 1;], |
| 1096 | [ ac_cv_have_u_int="yes" ], |
| 1097 | [ ac_cv_have_u_int="no" ] |
| 1098 | ) |
| 1099 | ]) |
| 1100 | if test "x$ac_cv_have_u_int" = "xyes" ; then |
| 1101 | AC_DEFINE(HAVE_U_INT) |
| 1102 | have_u_int=1 |
| 1103 | fi |
| 1104 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1105 | AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [ |
| 1106 | AC_TRY_COMPILE( |
| 1107 | [ #include <sys/types.h> ], |
| 1108 | [ int8_t a; int16_t b; int32_t c; a = b = c = 1;], |
| 1109 | [ ac_cv_have_intxx_t="yes" ], |
| 1110 | [ ac_cv_have_intxx_t="no" ] |
| 1111 | ) |
| 1112 | ]) |
| 1113 | if test "x$ac_cv_have_intxx_t" = "xyes" ; then |
| 1114 | AC_DEFINE(HAVE_INTXX_T) |
| 1115 | have_intxx_t=1 |
| 1116 | fi |
Ben Lindstrom | 19d7b8d | 2001-08-16 00:09:49 +0000 | [diff] [blame] | 1117 | |
| 1118 | if (test -z "$have_intxx_t" && \ |
| 1119 | test "x$ac_cv_header_stdint_h" = "xyes") |
| 1120 | then |
| 1121 | AC_MSG_CHECKING([for intXX_t types in stdint.h]) |
| 1122 | AC_TRY_COMPILE( |
| 1123 | [ #include <stdint.h> ], |
| 1124 | [ int8_t a; int16_t b; int32_t c; a = b = c = 1;], |
| 1125 | [ |
| 1126 | AC_DEFINE(HAVE_INTXX_T) |
| 1127 | AC_MSG_RESULT(yes) |
| 1128 | ], |
| 1129 | [ AC_MSG_RESULT(no) ] |
| 1130 | ) |
| 1131 | fi |
| 1132 | |
Damien Miller | 578783e | 2000-09-23 14:12:24 +1100 | [diff] [blame] | 1133 | AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [ |
| 1134 | AC_TRY_COMPILE( |
Tim Rice | 907881e | 2002-07-18 11:44:50 -0700 | [diff] [blame] | 1135 | [ |
| 1136 | #include <sys/types.h> |
| 1137 | #ifdef HAVE_STDINT_H |
| 1138 | # include <stdint.h> |
| 1139 | #endif |
| 1140 | #include <sys/socket.h> |
| 1141 | #ifdef HAVE_SYS_BITYPES_H |
| 1142 | # include <sys/bitypes.h> |
| 1143 | #endif |
| 1144 | ], |
Damien Miller | 578783e | 2000-09-23 14:12:24 +1100 | [diff] [blame] | 1145 | [ int64_t a; a = 1;], |
| 1146 | [ ac_cv_have_int64_t="yes" ], |
| 1147 | [ ac_cv_have_int64_t="no" ] |
| 1148 | ) |
| 1149 | ]) |
| 1150 | if test "x$ac_cv_have_int64_t" = "xyes" ; then |
| 1151 | AC_DEFINE(HAVE_INT64_T) |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 1152 | fi |
| 1153 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1154 | AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [ |
| 1155 | AC_TRY_COMPILE( |
| 1156 | [ #include <sys/types.h> ], |
| 1157 | [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;], |
| 1158 | [ ac_cv_have_u_intxx_t="yes" ], |
| 1159 | [ ac_cv_have_u_intxx_t="no" ] |
| 1160 | ) |
| 1161 | ]) |
| 1162 | if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then |
| 1163 | AC_DEFINE(HAVE_U_INTXX_T) |
| 1164 | have_u_intxx_t=1 |
| 1165 | fi |
Damien Miller | c6398ef | 1999-11-20 12:18:40 +1100 | [diff] [blame] | 1166 | |
Ben Lindstrom | 19d7b8d | 2001-08-16 00:09:49 +0000 | [diff] [blame] | 1167 | if test -z "$have_u_intxx_t" ; then |
| 1168 | AC_MSG_CHECKING([for u_intXX_t types in sys/socket.h]) |
| 1169 | AC_TRY_COMPILE( |
| 1170 | [ #include <sys/socket.h> ], |
| 1171 | [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;], |
| 1172 | [ |
| 1173 | AC_DEFINE(HAVE_U_INTXX_T) |
| 1174 | AC_MSG_RESULT(yes) |
| 1175 | ], |
| 1176 | [ AC_MSG_RESULT(no) ] |
| 1177 | ) |
| 1178 | fi |
| 1179 | |
Damien Miller | 578783e | 2000-09-23 14:12:24 +1100 | [diff] [blame] | 1180 | AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [ |
| 1181 | AC_TRY_COMPILE( |
| 1182 | [ #include <sys/types.h> ], |
| 1183 | [ u_int64_t a; a = 1;], |
| 1184 | [ ac_cv_have_u_int64_t="yes" ], |
| 1185 | [ ac_cv_have_u_int64_t="no" ] |
| 1186 | ) |
| 1187 | ]) |
| 1188 | if test "x$ac_cv_have_u_int64_t" = "xyes" ; then |
| 1189 | AC_DEFINE(HAVE_U_INT64_T) |
| 1190 | have_u_int64_t=1 |
| 1191 | fi |
| 1192 | |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 1193 | if test -z "$have_u_int64_t" ; then |
| 1194 | AC_MSG_CHECKING([for u_int64_t type in sys/bitypes.h]) |
| 1195 | AC_TRY_COMPILE( |
| 1196 | [ #include <sys/bitypes.h> ], |
| 1197 | [ u_int64_t a; a = 1], |
| 1198 | [ |
| 1199 | AC_DEFINE(HAVE_U_INT64_T) |
| 1200 | AC_MSG_RESULT(yes) |
| 1201 | ], |
| 1202 | [ AC_MSG_RESULT(no) ] |
| 1203 | ) |
| 1204 | fi |
| 1205 | |
Ben Lindstrom | 19d7b8d | 2001-08-16 00:09:49 +0000 | [diff] [blame] | 1206 | if test -z "$have_u_intxx_t" ; then |
| 1207 | AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [ |
| 1208 | AC_TRY_COMPILE( |
| 1209 | [ |
| 1210 | #include <sys/types.h> |
| 1211 | ], |
| 1212 | [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ], |
| 1213 | [ ac_cv_have_uintxx_t="yes" ], |
| 1214 | [ ac_cv_have_uintxx_t="no" ] |
| 1215 | ) |
| 1216 | ]) |
| 1217 | if test "x$ac_cv_have_uintxx_t" = "xyes" ; then |
| 1218 | AC_DEFINE(HAVE_UINTXX_T) |
| 1219 | fi |
| 1220 | fi |
| 1221 | |
| 1222 | if test -z "$have_uintxx_t" ; then |
| 1223 | AC_MSG_CHECKING([for uintXX_t types in stdint.h]) |
| 1224 | AC_TRY_COMPILE( |
| 1225 | [ #include <stdint.h> ], |
| 1226 | [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;], |
| 1227 | [ |
| 1228 | AC_DEFINE(HAVE_UINTXX_T) |
| 1229 | AC_MSG_RESULT(yes) |
| 1230 | ], |
| 1231 | [ AC_MSG_RESULT(no) ] |
| 1232 | ) |
| 1233 | fi |
| 1234 | |
Damien Miller | edb8292 | 2000-06-20 13:25:52 +1000 | [diff] [blame] | 1235 | if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \ |
| 1236 | test "x$ac_cv_header_sys_bitypes_h" = "xyes") |
Damien Miller | b29ea91 | 2000-01-15 14:12:03 +1100 | [diff] [blame] | 1237 | then |
| 1238 | AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h]) |
| 1239 | AC_TRY_COMPILE( |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1240 | [ |
| 1241 | #include <sys/bitypes.h> |
| 1242 | ], |
Damien Miller | b29ea91 | 2000-01-15 14:12:03 +1100 | [diff] [blame] | 1243 | [ |
Damien Miller | 70494d1 | 2000-04-03 15:57:06 +1000 | [diff] [blame] | 1244 | int8_t a; int16_t b; int32_t c; |
| 1245 | u_int8_t e; u_int16_t f; u_int32_t g; |
| 1246 | a = b = c = e = f = g = 1; |
Damien Miller | b29ea91 | 2000-01-15 14:12:03 +1100 | [diff] [blame] | 1247 | ], |
| 1248 | [ |
| 1249 | AC_DEFINE(HAVE_U_INTXX_T) |
| 1250 | AC_DEFINE(HAVE_INTXX_T) |
| 1251 | AC_MSG_RESULT(yes) |
| 1252 | ], |
| 1253 | [AC_MSG_RESULT(no)] |
| 1254 | ) |
| 1255 | fi |
| 1256 | |
Damien Miller | 58be738 | 2001-09-15 21:31:54 +1000 | [diff] [blame] | 1257 | |
| 1258 | AC_CACHE_CHECK([for u_char], ac_cv_have_u_char, [ |
| 1259 | AC_TRY_COMPILE( |
| 1260 | [ |
| 1261 | #include <sys/types.h> |
| 1262 | ], |
| 1263 | [ u_char foo; foo = 125; ], |
| 1264 | [ ac_cv_have_u_char="yes" ], |
| 1265 | [ ac_cv_have_u_char="no" ] |
| 1266 | ) |
| 1267 | ]) |
| 1268 | if test "x$ac_cv_have_u_char" = "xyes" ; then |
| 1269 | AC_DEFINE(HAVE_U_CHAR) |
| 1270 | fi |
| 1271 | |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 1272 | TYPE_SOCKLEN_T |
Damien Miller | 74d0d4a | 1999-12-29 02:24:35 +1100 | [diff] [blame] | 1273 | |
Tim Rice | 200a5c0 | 2002-02-26 22:12:34 -0800 | [diff] [blame] | 1274 | AC_CHECK_TYPES(sig_atomic_t,,,[#include <signal.h>]) |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 1275 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1276 | AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [ |
| 1277 | AC_TRY_COMPILE( |
| 1278 | [ |
| 1279 | #include <sys/types.h> |
| 1280 | ], |
| 1281 | [ size_t foo; foo = 1235; ], |
| 1282 | [ ac_cv_have_size_t="yes" ], |
| 1283 | [ ac_cv_have_size_t="no" ] |
| 1284 | ) |
| 1285 | ]) |
| 1286 | if test "x$ac_cv_have_size_t" = "xyes" ; then |
| 1287 | AC_DEFINE(HAVE_SIZE_T) |
| 1288 | fi |
Damien Miller | 9505851 | 1999-12-29 10:36:45 +1100 | [diff] [blame] | 1289 | |
Damien Miller | 615f939 | 2000-05-17 22:53:33 +1000 | [diff] [blame] | 1290 | AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [ |
| 1291 | AC_TRY_COMPILE( |
| 1292 | [ |
| 1293 | #include <sys/types.h> |
| 1294 | ], |
| 1295 | [ ssize_t foo; foo = 1235; ], |
| 1296 | [ ac_cv_have_ssize_t="yes" ], |
| 1297 | [ ac_cv_have_ssize_t="no" ] |
| 1298 | ) |
| 1299 | ]) |
| 1300 | if test "x$ac_cv_have_ssize_t" = "xyes" ; then |
| 1301 | AC_DEFINE(HAVE_SSIZE_T) |
| 1302 | fi |
| 1303 | |
Ben Lindstrom | 0d5af60 | 2001-01-09 00:50:29 +0000 | [diff] [blame] | 1304 | AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [ |
| 1305 | AC_TRY_COMPILE( |
| 1306 | [ |
| 1307 | #include <time.h> |
| 1308 | ], |
| 1309 | [ clock_t foo; foo = 1235; ], |
| 1310 | [ ac_cv_have_clock_t="yes" ], |
| 1311 | [ ac_cv_have_clock_t="no" ] |
| 1312 | ) |
| 1313 | ]) |
| 1314 | if test "x$ac_cv_have_clock_t" = "xyes" ; then |
| 1315 | AC_DEFINE(HAVE_CLOCK_T) |
| 1316 | fi |
| 1317 | |
Damien Miller | b54b40e | 2000-06-23 08:23:34 +1000 | [diff] [blame] | 1318 | AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [ |
| 1319 | AC_TRY_COMPILE( |
| 1320 | [ |
| 1321 | #include <sys/types.h> |
| 1322 | #include <sys/socket.h> |
| 1323 | ], |
| 1324 | [ sa_family_t foo; foo = 1235; ], |
| 1325 | [ ac_cv_have_sa_family_t="yes" ], |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 1326 | [ AC_TRY_COMPILE( |
| 1327 | [ |
| 1328 | #include <sys/types.h> |
| 1329 | #include <sys/socket.h> |
| 1330 | #include <netinet/in.h> |
| 1331 | ], |
| 1332 | [ sa_family_t foo; foo = 1235; ], |
| 1333 | [ ac_cv_have_sa_family_t="yes" ], |
| 1334 | |
Damien Miller | b54b40e | 2000-06-23 08:23:34 +1000 | [diff] [blame] | 1335 | [ ac_cv_have_sa_family_t="no" ] |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 1336 | )] |
Damien Miller | b54b40e | 2000-06-23 08:23:34 +1000 | [diff] [blame] | 1337 | ) |
| 1338 | ]) |
| 1339 | if test "x$ac_cv_have_sa_family_t" = "xyes" ; then |
| 1340 | AC_DEFINE(HAVE_SA_FAMILY_T) |
| 1341 | fi |
| 1342 | |
Damien Miller | 0f91b4e | 2000-06-18 15:43:25 +1000 | [diff] [blame] | 1343 | AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [ |
| 1344 | AC_TRY_COMPILE( |
| 1345 | [ |
| 1346 | #include <sys/types.h> |
| 1347 | ], |
| 1348 | [ pid_t foo; foo = 1235; ], |
| 1349 | [ ac_cv_have_pid_t="yes" ], |
| 1350 | [ ac_cv_have_pid_t="no" ] |
| 1351 | ) |
| 1352 | ]) |
| 1353 | if test "x$ac_cv_have_pid_t" = "xyes" ; then |
| 1354 | AC_DEFINE(HAVE_PID_T) |
| 1355 | fi |
| 1356 | |
| 1357 | AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [ |
| 1358 | AC_TRY_COMPILE( |
| 1359 | [ |
| 1360 | #include <sys/types.h> |
| 1361 | ], |
| 1362 | [ mode_t foo; foo = 1235; ], |
| 1363 | [ ac_cv_have_mode_t="yes" ], |
| 1364 | [ ac_cv_have_mode_t="no" ] |
| 1365 | ) |
| 1366 | ]) |
| 1367 | if test "x$ac_cv_have_mode_t" = "xyes" ; then |
| 1368 | AC_DEFINE(HAVE_MODE_T) |
| 1369 | fi |
| 1370 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1371 | |
| 1372 | AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [ |
| 1373 | AC_TRY_COMPILE( |
| 1374 | [ |
Damien Miller | 8117111 | 2000-04-23 11:14:01 +1000 | [diff] [blame] | 1375 | #include <sys/types.h> |
| 1376 | #include <sys/socket.h> |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1377 | ], |
| 1378 | [ struct sockaddr_storage s; ], |
| 1379 | [ ac_cv_have_struct_sockaddr_storage="yes" ], |
| 1380 | [ ac_cv_have_struct_sockaddr_storage="no" ] |
| 1381 | ) |
| 1382 | ]) |
| 1383 | if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then |
| 1384 | AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE) |
| 1385 | fi |
Damien Miller | 34132e5 | 2000-01-14 15:45:46 +1100 | [diff] [blame] | 1386 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1387 | AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [ |
| 1388 | AC_TRY_COMPILE( |
| 1389 | [ |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1390 | #include <sys/types.h> |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1391 | #include <netinet/in.h> |
| 1392 | ], |
| 1393 | [ struct sockaddr_in6 s; s.sin6_family = 0; ], |
| 1394 | [ ac_cv_have_struct_sockaddr_in6="yes" ], |
| 1395 | [ ac_cv_have_struct_sockaddr_in6="no" ] |
| 1396 | ) |
| 1397 | ]) |
| 1398 | if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then |
| 1399 | AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6) |
| 1400 | fi |
Damien Miller | 34132e5 | 2000-01-14 15:45:46 +1100 | [diff] [blame] | 1401 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1402 | AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [ |
| 1403 | AC_TRY_COMPILE( |
| 1404 | [ |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1405 | #include <sys/types.h> |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1406 | #include <netinet/in.h> |
| 1407 | ], |
| 1408 | [ struct in6_addr s; s.s6_addr[0] = 0; ], |
| 1409 | [ ac_cv_have_struct_in6_addr="yes" ], |
| 1410 | [ ac_cv_have_struct_in6_addr="no" ] |
| 1411 | ) |
| 1412 | ]) |
| 1413 | if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then |
| 1414 | AC_DEFINE(HAVE_STRUCT_IN6_ADDR) |
| 1415 | fi |
Damien Miller | 34132e5 | 2000-01-14 15:45:46 +1100 | [diff] [blame] | 1416 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1417 | AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [ |
| 1418 | AC_TRY_COMPILE( |
| 1419 | [ |
Damien Miller | 8117111 | 2000-04-23 11:14:01 +1000 | [diff] [blame] | 1420 | #include <sys/types.h> |
| 1421 | #include <sys/socket.h> |
| 1422 | #include <netdb.h> |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1423 | ], |
| 1424 | [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ], |
| 1425 | [ ac_cv_have_struct_addrinfo="yes" ], |
| 1426 | [ ac_cv_have_struct_addrinfo="no" ] |
| 1427 | ) |
| 1428 | ]) |
| 1429 | if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then |
| 1430 | AC_DEFINE(HAVE_STRUCT_ADDRINFO) |
| 1431 | fi |
| 1432 | |
Ben Lindstrom | 42202bc | 2001-01-15 02:34:37 +0000 | [diff] [blame] | 1433 | AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [ |
| 1434 | AC_TRY_COMPILE( |
| 1435 | [ #include <sys/time.h> ], |
| 1436 | [ struct timeval tv; tv.tv_sec = 1;], |
| 1437 | [ ac_cv_have_struct_timeval="yes" ], |
| 1438 | [ ac_cv_have_struct_timeval="no" ] |
| 1439 | ) |
| 1440 | ]) |
| 1441 | if test "x$ac_cv_have_struct_timeval" = "xyes" ; then |
| 1442 | AC_DEFINE(HAVE_STRUCT_TIMEVAL) |
| 1443 | have_struct_timeval=1 |
| 1444 | fi |
| 1445 | |
Ben Lindstrom | 3ad650a | 2001-01-03 06:02:51 +0000 | [diff] [blame] | 1446 | # If we don't have int64_t then we can't compile sftp-server. So don't |
| 1447 | # even attempt to do it. |
| 1448 | if test "x$ac_cv_have_int64_t" = "xno" -a \ |
| 1449 | "x$ac_cv_sizeof_long_int" != "x8" -a \ |
| 1450 | "x$ac_cv_sizeof_long_long_int" = "x0" ; then |
| 1451 | NO_SFTP='#' |
Tim Rice | bee3f22 | 2001-03-11 17:32:12 -0800 | [diff] [blame] | 1452 | else |
| 1453 | dnl test snprintf (broken on SCO w/gcc) |
| 1454 | AC_TRY_RUN( |
| 1455 | [ |
| 1456 | #include <stdio.h> |
| 1457 | #include <string.h> |
| 1458 | #ifdef HAVE_SNPRINTF |
| 1459 | main() |
| 1460 | { |
| 1461 | char buf[50]; |
| 1462 | char expected_out[50]; |
| 1463 | int mazsize = 50 ; |
| 1464 | #if (SIZEOF_LONG_INT == 8) |
| 1465 | long int num = 0x7fffffffffffffff; |
| 1466 | #else |
Kevin Steves | 6482ec8 | 2001-07-15 02:09:28 +0000 | [diff] [blame] | 1467 | long long num = 0x7fffffffffffffffll; |
Tim Rice | bee3f22 | 2001-03-11 17:32:12 -0800 | [diff] [blame] | 1468 | #endif |
| 1469 | strcpy(expected_out, "9223372036854775807"); |
| 1470 | snprintf(buf, mazsize, "%lld", num); |
| 1471 | if(strcmp(buf, expected_out) != 0) |
| 1472 | exit(1); |
| 1473 | exit(0); |
| 1474 | } |
| 1475 | #else |
| 1476 | main() { exit(0); } |
| 1477 | #endif |
| 1478 | ], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ] |
| 1479 | ) |
Ben Lindstrom | 3ad650a | 2001-01-03 06:02:51 +0000 | [diff] [blame] | 1480 | fi |
Ben Lindstrom | 42202bc | 2001-01-15 02:34:37 +0000 | [diff] [blame] | 1481 | AC_SUBST(NO_SFTP) |
Ben Lindstrom | 3ad650a | 2001-01-03 06:02:51 +0000 | [diff] [blame] | 1482 | |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 1483 | dnl Checks for structure members |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1484 | OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP) |
| 1485 | OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX) |
| 1486 | OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX) |
| 1487 | OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP) |
| 1488 | OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP) |
Damien Miller | ad1bc5f | 2000-05-20 14:53:09 +1000 | [diff] [blame] | 1489 | OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX) |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1490 | OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP) |
| 1491 | OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP) |
Damien Miller | 8e81ed3 | 2000-07-01 13:17:42 +1000 | [diff] [blame] | 1492 | OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmpx.h, HAVE_ID_IN_UTMPX) |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1493 | OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP) |
| 1494 | OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX) |
| 1495 | OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP) |
| 1496 | OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX) |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 1497 | OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP) |
| 1498 | OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP) |
| 1499 | OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX) |
| 1500 | OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX) |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 1501 | |
| 1502 | AC_CHECK_MEMBERS([struct stat.st_blksize]) |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 1503 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1504 | AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage], |
| 1505 | ac_cv_have_ss_family_in_struct_ss, [ |
| 1506 | AC_TRY_COMPILE( |
| 1507 | [ |
Damien Miller | 8117111 | 2000-04-23 11:14:01 +1000 | [diff] [blame] | 1508 | #include <sys/types.h> |
| 1509 | #include <sys/socket.h> |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1510 | ], |
| 1511 | [ struct sockaddr_storage s; s.ss_family = 1; ], |
| 1512 | [ ac_cv_have_ss_family_in_struct_ss="yes" ], |
| 1513 | [ ac_cv_have_ss_family_in_struct_ss="no" ], |
| 1514 | ) |
| 1515 | ]) |
| 1516 | if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then |
| 1517 | AC_DEFINE(HAVE_SS_FAMILY_IN_SS) |
| 1518 | fi |
| 1519 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1520 | AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage], |
| 1521 | ac_cv_have___ss_family_in_struct_ss, [ |
| 1522 | AC_TRY_COMPILE( |
| 1523 | [ |
Damien Miller | 8117111 | 2000-04-23 11:14:01 +1000 | [diff] [blame] | 1524 | #include <sys/types.h> |
| 1525 | #include <sys/socket.h> |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1526 | ], |
| 1527 | [ struct sockaddr_storage s; s.__ss_family = 1; ], |
| 1528 | [ ac_cv_have___ss_family_in_struct_ss="yes" ], |
| 1529 | [ ac_cv_have___ss_family_in_struct_ss="no" ] |
| 1530 | ) |
| 1531 | ]) |
| 1532 | if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then |
| 1533 | AC_DEFINE(HAVE___SS_FAMILY_IN_SS) |
| 1534 | fi |
Damien Miller | bf1c9b2 | 1999-12-09 10:16:54 +1100 | [diff] [blame] | 1535 | |
Damien Miller | ad833b3 | 2000-08-23 10:46:23 +1000 | [diff] [blame] | 1536 | AC_CACHE_CHECK([for pw_class field in struct passwd], |
| 1537 | ac_cv_have_pw_class_in_struct_passwd, [ |
| 1538 | AC_TRY_COMPILE( |
| 1539 | [ |
Damien Miller | ad833b3 | 2000-08-23 10:46:23 +1000 | [diff] [blame] | 1540 | #include <pwd.h> |
| 1541 | ], |
Kevin Steves | 48b7cc0 | 2000-10-07 13:24:00 +0000 | [diff] [blame] | 1542 | [ struct passwd p; p.pw_class = 0; ], |
Damien Miller | ad833b3 | 2000-08-23 10:46:23 +1000 | [diff] [blame] | 1543 | [ ac_cv_have_pw_class_in_struct_passwd="yes" ], |
| 1544 | [ ac_cv_have_pw_class_in_struct_passwd="no" ] |
| 1545 | ) |
| 1546 | ]) |
| 1547 | if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then |
| 1548 | AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD) |
| 1549 | fi |
| 1550 | |
Kevin Steves | 8245695 | 2001-06-22 21:14:18 +0000 | [diff] [blame] | 1551 | AC_CACHE_CHECK([for pw_expire field in struct passwd], |
| 1552 | ac_cv_have_pw_expire_in_struct_passwd, [ |
| 1553 | AC_TRY_COMPILE( |
| 1554 | [ |
| 1555 | #include <pwd.h> |
| 1556 | ], |
| 1557 | [ struct passwd p; p.pw_expire = 0; ], |
| 1558 | [ ac_cv_have_pw_expire_in_struct_passwd="yes" ], |
| 1559 | [ ac_cv_have_pw_expire_in_struct_passwd="no" ] |
| 1560 | ) |
| 1561 | ]) |
| 1562 | if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then |
| 1563 | AC_DEFINE(HAVE_PW_EXPIRE_IN_PASSWD) |
| 1564 | fi |
| 1565 | |
| 1566 | AC_CACHE_CHECK([for pw_change field in struct passwd], |
| 1567 | ac_cv_have_pw_change_in_struct_passwd, [ |
| 1568 | AC_TRY_COMPILE( |
| 1569 | [ |
| 1570 | #include <pwd.h> |
| 1571 | ], |
| 1572 | [ struct passwd p; p.pw_change = 0; ], |
| 1573 | [ ac_cv_have_pw_change_in_struct_passwd="yes" ], |
| 1574 | [ ac_cv_have_pw_change_in_struct_passwd="no" ] |
| 1575 | ) |
| 1576 | ]) |
| 1577 | if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then |
| 1578 | AC_DEFINE(HAVE_PW_CHANGE_IN_PASSWD) |
| 1579 | fi |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1580 | |
Tim Rice | 28bbb0c | 2002-05-27 17:37:32 -0700 | [diff] [blame] | 1581 | dnl make sure we're using the real structure members and not defines |
Kevin Steves | 939c9db | 2002-03-22 17:23:25 +0000 | [diff] [blame] | 1582 | AC_CACHE_CHECK([for msg_accrights field in struct msghdr], |
| 1583 | ac_cv_have_accrights_in_msghdr, [ |
Tim Rice | 28bbb0c | 2002-05-27 17:37:32 -0700 | [diff] [blame] | 1584 | AC_TRY_RUN( |
Kevin Steves | 939c9db | 2002-03-22 17:23:25 +0000 | [diff] [blame] | 1585 | [ |
Tim Rice | ae49fe6 | 2002-04-12 10:26:21 -0700 | [diff] [blame] | 1586 | #include <sys/types.h> |
Kevin Steves | 939c9db | 2002-03-22 17:23:25 +0000 | [diff] [blame] | 1587 | #include <sys/socket.h> |
| 1588 | #include <sys/uio.h> |
Tim Rice | 28bbb0c | 2002-05-27 17:37:32 -0700 | [diff] [blame] | 1589 | int main() { |
| 1590 | #ifdef msg_accrights |
| 1591 | exit(1); |
| 1592 | #endif |
| 1593 | struct msghdr m; |
| 1594 | m.msg_accrights = 0; |
| 1595 | exit(0); |
| 1596 | } |
Kevin Steves | 939c9db | 2002-03-22 17:23:25 +0000 | [diff] [blame] | 1597 | ], |
Kevin Steves | 939c9db | 2002-03-22 17:23:25 +0000 | [diff] [blame] | 1598 | [ ac_cv_have_accrights_in_msghdr="yes" ], |
| 1599 | [ ac_cv_have_accrights_in_msghdr="no" ] |
| 1600 | ) |
| 1601 | ]) |
| 1602 | if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then |
| 1603 | AC_DEFINE(HAVE_ACCRIGHTS_IN_MSGHDR) |
| 1604 | fi |
| 1605 | |
Kevin Steves | a44e035 | 2002-04-07 16:18:03 +0000 | [diff] [blame] | 1606 | AC_CACHE_CHECK([for msg_control field in struct msghdr], |
| 1607 | ac_cv_have_control_in_msghdr, [ |
Tim Rice | 28bbb0c | 2002-05-27 17:37:32 -0700 | [diff] [blame] | 1608 | AC_TRY_RUN( |
Kevin Steves | a44e035 | 2002-04-07 16:18:03 +0000 | [diff] [blame] | 1609 | [ |
Tim Rice | ae49fe6 | 2002-04-12 10:26:21 -0700 | [diff] [blame] | 1610 | #include <sys/types.h> |
Kevin Steves | a44e035 | 2002-04-07 16:18:03 +0000 | [diff] [blame] | 1611 | #include <sys/socket.h> |
| 1612 | #include <sys/uio.h> |
Tim Rice | 28bbb0c | 2002-05-27 17:37:32 -0700 | [diff] [blame] | 1613 | int main() { |
| 1614 | #ifdef msg_control |
| 1615 | exit(1); |
| 1616 | #endif |
| 1617 | struct msghdr m; |
| 1618 | m.msg_control = 0; |
| 1619 | exit(0); |
| 1620 | } |
Kevin Steves | a44e035 | 2002-04-07 16:18:03 +0000 | [diff] [blame] | 1621 | ], |
Kevin Steves | a44e035 | 2002-04-07 16:18:03 +0000 | [diff] [blame] | 1622 | [ ac_cv_have_control_in_msghdr="yes" ], |
| 1623 | [ ac_cv_have_control_in_msghdr="no" ] |
| 1624 | ) |
| 1625 | ]) |
| 1626 | if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then |
| 1627 | AC_DEFINE(HAVE_CONTROL_IN_MSGHDR) |
| 1628 | fi |
| 1629 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1630 | AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [ |
| 1631 | AC_TRY_LINK([], |
| 1632 | [ extern char *__progname; printf("%s", __progname); ], |
| 1633 | [ ac_cv_libc_defines___progname="yes" ], |
| 1634 | [ ac_cv_libc_defines___progname="no" ] |
| 1635 | ) |
| 1636 | ]) |
| 1637 | if test "x$ac_cv_libc_defines___progname" = "xyes" ; then |
| 1638 | AC_DEFINE(HAVE___PROGNAME) |
| 1639 | fi |
| 1640 | |
Kevin Steves | 4846f4a | 2002-03-22 18:19:53 +0000 | [diff] [blame] | 1641 | AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNCTION__, [ |
| 1642 | AC_TRY_LINK([ |
| 1643 | #include <stdio.h> |
| 1644 | ], |
| 1645 | [ printf("%s", __FUNCTION__); ], |
| 1646 | [ ac_cv_cc_implements___FUNCTION__="yes" ], |
| 1647 | [ ac_cv_cc_implements___FUNCTION__="no" ] |
| 1648 | ) |
| 1649 | ]) |
| 1650 | if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then |
| 1651 | AC_DEFINE(HAVE___FUNCTION__) |
| 1652 | fi |
| 1653 | |
| 1654 | AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__, [ |
| 1655 | AC_TRY_LINK([ |
| 1656 | #include <stdio.h> |
| 1657 | ], |
| 1658 | [ printf("%s", __func__); ], |
| 1659 | [ ac_cv_cc_implements___func__="yes" ], |
| 1660 | [ ac_cv_cc_implements___func__="no" ] |
| 1661 | ) |
| 1662 | ]) |
| 1663 | if test "x$ac_cv_cc_implements___func__" = "xyes" ; then |
| 1664 | AC_DEFINE(HAVE___func__) |
| 1665 | fi |
| 1666 | |
Damien Miller | 4f8e669 | 2001-07-14 13:22:53 +1000 | [diff] [blame] | 1667 | AC_CACHE_CHECK([whether getopt has optreset support], |
| 1668 | ac_cv_have_getopt_optreset, [ |
| 1669 | AC_TRY_LINK( |
| 1670 | [ |
| 1671 | #include <getopt.h> |
| 1672 | ], |
| 1673 | [ extern int optreset; optreset = 0; ], |
| 1674 | [ ac_cv_have_getopt_optreset="yes" ], |
| 1675 | [ ac_cv_have_getopt_optreset="no" ] |
| 1676 | ) |
| 1677 | ]) |
| 1678 | if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then |
| 1679 | AC_DEFINE(HAVE_GETOPT_OPTRESET) |
| 1680 | fi |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1681 | |
Damien Miller | ecbb26d | 2000-07-15 14:59:14 +1000 | [diff] [blame] | 1682 | AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [ |
| 1683 | AC_TRY_LINK([], |
| 1684 | [ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);], |
| 1685 | [ ac_cv_libc_defines_sys_errlist="yes" ], |
| 1686 | [ ac_cv_libc_defines_sys_errlist="no" ] |
| 1687 | ) |
| 1688 | ]) |
| 1689 | if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then |
| 1690 | AC_DEFINE(HAVE_SYS_ERRLIST) |
| 1691 | fi |
| 1692 | |
| 1693 | |
Damien Miller | 11fa2cc | 2000-08-16 10:35:58 +1000 | [diff] [blame] | 1694 | AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [ |
| 1695 | AC_TRY_LINK([], |
| 1696 | [ extern int sys_nerr; printf("%i", sys_nerr);], |
| 1697 | [ ac_cv_libc_defines_sys_nerr="yes" ], |
| 1698 | [ ac_cv_libc_defines_sys_nerr="no" ] |
| 1699 | ) |
| 1700 | ]) |
| 1701 | if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then |
| 1702 | AC_DEFINE(HAVE_SYS_NERR) |
| 1703 | fi |
| 1704 | |
Damien Miller | 85de580 | 2001-09-18 14:01:11 +1000 | [diff] [blame] | 1705 | SCARD_MSG="no" |
Ben Lindstrom | a42694f | 2002-04-05 16:11:45 +0000 | [diff] [blame] | 1706 | |
| 1707 | # Check whether user wants sectok support |
| 1708 | AC_ARG_WITH(sectok, |
| 1709 | [ --with-sectok Enable smartcard support using libsectok], |
Damien Miller | 85de580 | 2001-09-18 14:01:11 +1000 | [diff] [blame] | 1710 | [ |
| 1711 | if test "x$withval" != "xno" ; then |
| 1712 | if test "x$withval" != "xyes" ; then |
| 1713 | CPPFLAGS="$CPPFLAGS -I${withval}" |
| 1714 | LDFLAGS="$LDFLAGS -L${withval}" |
| 1715 | if test ! -z "$need_dash_r" ; then |
| 1716 | LDFLAGS="$LDFLAGS -R${withval}" |
| 1717 | fi |
| 1718 | if test ! -z "$blibpath" ; then |
| 1719 | blibpath="$blibpath:${withval}" |
| 1720 | fi |
| 1721 | fi |
| 1722 | AC_CHECK_HEADERS(sectok.h) |
| 1723 | if test "$ac_cv_header_sectok_h" != yes; then |
| 1724 | AC_MSG_ERROR(Can't find sectok.h) |
| 1725 | fi |
| 1726 | AC_CHECK_LIB(sectok, sectok_open) |
| 1727 | if test "$ac_cv_lib_sectok_sectok_open" != yes; then |
| 1728 | AC_MSG_ERROR(Can't find libsectok) |
| 1729 | fi |
| 1730 | AC_DEFINE(SMARTCARD) |
Ben Lindstrom | a42694f | 2002-04-05 16:11:45 +0000 | [diff] [blame] | 1731 | AC_DEFINE(USE_SECTOK) |
| 1732 | SCARD_MSG="yes, using sectok" |
| 1733 | fi |
| 1734 | ] |
| 1735 | ) |
| 1736 | |
| 1737 | # Check whether user wants OpenSC support |
| 1738 | AC_ARG_WITH(opensc, |
Damien Miller | f6195f2 | 2002-04-23 22:48:46 +1000 | [diff] [blame] | 1739 | AC_HELP_STRING([--with-opensc=PFX], |
| 1740 | [Enable smartcard support using OpenSC]), |
| 1741 | opensc_config_prefix="$withval", opensc_config_prefix="") |
| 1742 | if test x$opensc_config_prefix != x ; then |
| 1743 | OPENSC_CONFIG=$opensc_config_prefix/bin/opensc-config |
| 1744 | AC_PATH_PROG(OPENSC_CONFIG, opensc-config, no) |
| 1745 | if test "$OPENSC_CONFIG" != "no"; then |
| 1746 | LIBOPENSC_CFLAGS=`$OPENSC_CONFIG --cflags` |
| 1747 | LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs` |
| 1748 | CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS" |
| 1749 | LDFLAGS="$LDFLAGS $LIBOPENSC_LIBS" |
| 1750 | AC_DEFINE(SMARTCARD) |
| 1751 | AC_DEFINE(USE_OPENSC) |
| 1752 | SCARD_MSG="yes, using OpenSC" |
| 1753 | fi |
| 1754 | fi |
Damien Miller | 85de580 | 2001-09-18 14:01:11 +1000 | [diff] [blame] | 1755 | |
Damien Miller | fd4c9ee | 2002-04-13 11:04:40 +1000 | [diff] [blame] | 1756 | # Check whether user wants Kerberos 5 support |
| 1757 | KRB5_MSG="no" |
| 1758 | AC_ARG_WITH(kerberos5, |
| 1759 | [ --with-kerberos5=PATH Enable Kerberos 5 support], |
| 1760 | [ |
| 1761 | if test "x$withval" != "xno" ; then |
| 1762 | if test "x$withval" = "xyes" ; then |
| 1763 | KRB5ROOT="/usr/local" |
| 1764 | else |
| 1765 | KRB5ROOT=${withval} |
| 1766 | fi |
| 1767 | CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include" |
| 1768 | LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib" |
| 1769 | AC_DEFINE(KRB5) |
| 1770 | KRB5_MSG="yes" |
| 1771 | AC_MSG_CHECKING(whether we are using Heimdal) |
| 1772 | AC_TRY_COMPILE([ #include <krb5.h> ], |
| 1773 | [ char *tmp = heimdal_version; ], |
| 1774 | [ AC_MSG_RESULT(yes) |
| 1775 | AC_DEFINE(HEIMDAL) |
| 1776 | K5LIBS="-lkrb5 -ldes -lcom_err -lasn1 -lroken" |
| 1777 | ], |
| 1778 | [ AC_MSG_RESULT(no) |
| 1779 | K5LIBS="-lkrb5 -lk5crypto -lcom_err" |
| 1780 | ] |
| 1781 | ) |
| 1782 | if test ! -z "$need_dash_r" ; then |
| 1783 | LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib" |
| 1784 | fi |
| 1785 | if test ! -z "$blibpath" ; then |
| 1786 | blibpath="$blibpath:${KRB5ROOT}/lib" |
| 1787 | fi |
| 1788 | AC_CHECK_LIB(resolv, dn_expand, , ) |
| 1789 | |
| 1790 | KRB5=yes |
| 1791 | fi |
| 1792 | ] |
| 1793 | ) |
| 1794 | # Check whether user wants Kerberos 4 support |
Damien Miller | c79bc0d | 2001-03-28 13:03:42 +1000 | [diff] [blame] | 1795 | KRB4_MSG="no" |
| 1796 | AC_ARG_WITH(kerberos4, |
| 1797 | [ --with-kerberos4=PATH Enable Kerberos 4 support], |
| 1798 | [ |
| 1799 | if test "x$withval" != "xno" ; then |
Damien Miller | c79bc0d | 2001-03-28 13:03:42 +1000 | [diff] [blame] | 1800 | if test "x$withval" != "xyes" ; then |
| 1801 | CPPFLAGS="$CPPFLAGS -I${withval}/include" |
| 1802 | LDFLAGS="$LDFLAGS -L${withval}/lib" |
| 1803 | if test ! -z "$need_dash_r" ; then |
| 1804 | LDFLAGS="$LDFLAGS -R${withval}/lib" |
| 1805 | fi |
| 1806 | if test ! -z "$blibpath" ; then |
| 1807 | blibpath="$blibpath:${withval}/lib" |
| 1808 | fi |
| 1809 | else |
| 1810 | if test -d /usr/include/kerberosIV ; then |
| 1811 | CPPFLAGS="$CPPFLAGS -I/usr/include/kerberosIV" |
| 1812 | fi |
| 1813 | fi |
| 1814 | |
| 1815 | AC_CHECK_HEADERS(krb.h) |
Damien Miller | c79bc0d | 2001-03-28 13:03:42 +1000 | [diff] [blame] | 1816 | if test "$ac_cv_header_krb_h" != yes; then |
| 1817 | AC_MSG_WARN([Cannot find krb.h, build may fail]) |
| 1818 | fi |
Damien Miller | 9834474 | 2001-03-28 14:37:06 +1000 | [diff] [blame] | 1819 | AC_CHECK_LIB(krb, main) |
Damien Miller | c79bc0d | 2001-03-28 13:03:42 +1000 | [diff] [blame] | 1820 | if test "$ac_cv_lib_krb_main" != yes; then |
Damien Miller | 9834474 | 2001-03-28 14:37:06 +1000 | [diff] [blame] | 1821 | AC_CHECK_LIB(krb4, main) |
| 1822 | if test "$ac_cv_lib_krb4_main" != yes; then |
| 1823 | AC_MSG_WARN([Cannot find libkrb nor libkrb4, build may fail]) |
| 1824 | else |
| 1825 | KLIBS="-lkrb4" |
| 1826 | fi |
| 1827 | else |
| 1828 | KLIBS="-lkrb" |
Damien Miller | c79bc0d | 2001-03-28 13:03:42 +1000 | [diff] [blame] | 1829 | fi |
Damien Miller | 9834474 | 2001-03-28 14:37:06 +1000 | [diff] [blame] | 1830 | AC_CHECK_LIB(des, des_cbc_encrypt) |
| 1831 | if test "$ac_cv_lib_des_des_cbc_encrypt" != yes; then |
| 1832 | AC_CHECK_LIB(des425, des_cbc_encrypt) |
| 1833 | if test "$ac_cv_lib_des425_des_cbc_encrypt" != yes; then |
| 1834 | AC_MSG_WARN([Cannot find libdes nor libdes425, build may fail]) |
| 1835 | else |
| 1836 | KLIBS="-ldes425" |
| 1837 | fi |
| 1838 | else |
| 1839 | KLIBS="-ldes" |
| 1840 | fi |
Damien Miller | c79bc0d | 2001-03-28 13:03:42 +1000 | [diff] [blame] | 1841 | AC_CHECK_LIB(resolv, dn_expand, , ) |
| 1842 | KRB4=yes |
| 1843 | KRB4_MSG="yes" |
| 1844 | AC_DEFINE(KRB4) |
| 1845 | fi |
| 1846 | ] |
| 1847 | ) |
| 1848 | |
| 1849 | # Check whether user wants AFS support |
| 1850 | AFS_MSG="no" |
| 1851 | AC_ARG_WITH(afs, |
| 1852 | [ --with-afs=PATH Enable AFS support], |
| 1853 | [ |
| 1854 | if test "x$withval" != "xno" ; then |
| 1855 | |
| 1856 | if test "x$withval" != "xyes" ; then |
| 1857 | CPPFLAGS="$CPPFLAGS -I${withval}/include" |
| 1858 | LDFLAGS="$LDFLAGS -L${withval}/lib" |
| 1859 | fi |
| 1860 | |
| 1861 | if test -z "$KRB4" ; then |
| 1862 | AC_MSG_WARN([AFS requires Kerberos IV support, build may fail]) |
| 1863 | fi |
| 1864 | |
| 1865 | LIBS="-lkafs $LIBS" |
| 1866 | if test ! -z "$AFS_LIBS" ; then |
| 1867 | LIBS="$LIBS $AFS_LIBS" |
| 1868 | fi |
| 1869 | AC_DEFINE(AFS) |
| 1870 | AFS_MSG="yes" |
| 1871 | fi |
| 1872 | ] |
| 1873 | ) |
Damien Miller | fd4c9ee | 2002-04-13 11:04:40 +1000 | [diff] [blame] | 1874 | LIBS="$LIBS $KLIBS $K5LIBS" |
Damien Miller | c79bc0d | 2001-03-28 13:03:42 +1000 | [diff] [blame] | 1875 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1876 | # Looking for programs, paths and files |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1877 | |
Damien Miller | f58c672 | 2002-05-13 13:15:42 +1000 | [diff] [blame] | 1878 | PRIVSEP_PATH=/var/empty |
| 1879 | AC_ARG_WITH(privsep-path, |
Tim Rice | cbb9066 | 2002-07-08 19:17:10 -0700 | [diff] [blame] | 1880 | [ --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)], |
Damien Miller | f58c672 | 2002-05-13 13:15:42 +1000 | [diff] [blame] | 1881 | [ |
| 1882 | if test "x$withval" != "$no" ; then |
| 1883 | PRIVSEP_PATH=$withval |
| 1884 | fi |
| 1885 | ] |
| 1886 | ) |
| 1887 | AC_SUBST(PRIVSEP_PATH) |
| 1888 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1889 | AC_ARG_WITH(xauth, |
| 1890 | [ --with-xauth=PATH Specify path to xauth program ], |
| 1891 | [ |
Ben Lindstrom | 76020ba | 2000-10-25 16:55:00 +0000 | [diff] [blame] | 1892 | if test "x$withval" != "xno" ; then |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1893 | xauth_path=$withval |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1894 | fi |
| 1895 | ], |
| 1896 | [ |
Tim Rice | e22be3b | 2002-07-17 19:20:07 -0700 | [diff] [blame] | 1897 | TestPath="$PATH" |
| 1898 | TestPath="${TestPath}${PATH_SEPARATOR}/usr/X/bin" |
| 1899 | TestPath="${TestPath}${PATH_SEPARATOR}/usr/bin/X11" |
| 1900 | TestPath="${TestPath}${PATH_SEPARATOR}/usr/X11R6/bin" |
| 1901 | TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin" |
| 1902 | AC_PATH_PROG(xauth_path, xauth, , $TestPath) |
Damien Miller | edb8292 | 2000-06-20 13:25:52 +1000 | [diff] [blame] | 1903 | if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1904 | xauth_path="/usr/openwin/bin/xauth" |
| 1905 | fi |
| 1906 | ] |
| 1907 | ) |
| 1908 | |
Damien Miller | a19cf47 | 2000-11-29 13:28:50 +1100 | [diff] [blame] | 1909 | if test -z "$xauth_path" ; then |
| 1910 | XAUTH_PATH="undefined" |
| 1911 | AC_SUBST(XAUTH_PATH) |
| 1912 | else |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1913 | AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path") |
Damien Miller | a19cf47 | 2000-11-29 13:28:50 +1100 | [diff] [blame] | 1914 | XAUTH_PATH=$xauth_path |
| 1915 | AC_SUBST(XAUTH_PATH) |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1916 | fi |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1917 | |
| 1918 | # Check for mail directory (last resort if we cannot get it from headers) |
| 1919 | if test ! -z "$MAIL" ; then |
| 1920 | maildir=`dirname $MAIL` |
| 1921 | AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir") |
| 1922 | fi |
| 1923 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1924 | if test -z "$no_dev_ptmx" ; then |
Kevin Steves | 0ea1d9d | 2002-04-25 18:17:04 +0000 | [diff] [blame] | 1925 | if test "x$disable_ptmx_check" != "xyes" ; then |
| 1926 | AC_CHECK_FILE("/dev/ptmx", |
| 1927 | [ |
| 1928 | AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX) |
| 1929 | have_dev_ptmx=1 |
| 1930 | ] |
| 1931 | ) |
| 1932 | fi |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1933 | fi |
Damien Miller | 204ad07 | 2000-03-02 23:56:12 +1100 | [diff] [blame] | 1934 | AC_CHECK_FILE("/dev/ptc", |
| 1935 | [ |
| 1936 | AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC) |
| 1937 | have_dev_ptc=1 |
| 1938 | ] |
| 1939 | ) |
| 1940 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1941 | # Options from here on. Some of these are preset by platform above |
Ben Lindstrom | 9841b0a | 2001-06-09 02:26:58 +0000 | [diff] [blame] | 1942 | AC_ARG_WITH(mantype, |
Damien Miller | 897741e | 2001-04-16 10:41:46 +1000 | [diff] [blame] | 1943 | [ --with-mantype=man|cat|doc Set man page type], |
Damien Miller | 670a4b8 | 2000-01-22 13:53:11 +1100 | [diff] [blame] | 1944 | [ |
Damien Miller | 897741e | 2001-04-16 10:41:46 +1000 | [diff] [blame] | 1945 | case "$withval" in |
| 1946 | man|cat|doc) |
| 1947 | MANTYPE=$withval |
| 1948 | ;; |
| 1949 | *) |
| 1950 | AC_MSG_ERROR(invalid man type: $withval) |
| 1951 | ;; |
| 1952 | esac |
Damien Miller | 670a4b8 | 2000-01-22 13:53:11 +1100 | [diff] [blame] | 1953 | ] |
| 1954 | ) |
Ben Lindstrom | bc70992 | 2001-04-18 18:04:21 +0000 | [diff] [blame] | 1955 | if test -z "$MANTYPE"; then |
Tim Rice | e22be3b | 2002-07-17 19:20:07 -0700 | [diff] [blame] | 1956 | TestPath="/usr/bin${PATH_SEPARATOR}/usr/ucb" |
| 1957 | AC_PATH_PROGS(NROFF, nroff awf, /bin/false, $TestPath) |
Ben Lindstrom | bc70992 | 2001-04-18 18:04:21 +0000 | [diff] [blame] | 1958 | if ${NROFF} -mdoc ${srcdir}/ssh.1 >/dev/null 2>&1; then |
| 1959 | MANTYPE=doc |
| 1960 | elif ${NROFF} -man ${srcdir}/ssh.1 >/dev/null 2>&1; then |
| 1961 | MANTYPE=man |
| 1962 | else |
| 1963 | MANTYPE=cat |
| 1964 | fi |
| 1965 | fi |
Damien Miller | 670a4b8 | 2000-01-22 13:53:11 +1100 | [diff] [blame] | 1966 | AC_SUBST(MANTYPE) |
Ben Lindstrom | bc70992 | 2001-04-18 18:04:21 +0000 | [diff] [blame] | 1967 | if test "$MANTYPE" = "doc"; then |
| 1968 | mansubdir=man; |
| 1969 | else |
| 1970 | mansubdir=$MANTYPE; |
| 1971 | fi |
| 1972 | AC_SUBST(mansubdir) |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 1973 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1974 | # Check whether to enable MD5 passwords |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1975 | MD5_MSG="no" |
Damien Miller | f7c0f82 | 1999-11-22 22:31:49 +1100 | [diff] [blame] | 1976 | AC_ARG_WITH(md5-passwords, |
Damien Miller | dd1c7ba | 1999-11-19 15:53:20 +1100 | [diff] [blame] | 1977 | [ --with-md5-passwords Enable use of MD5 passwords], |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 1978 | [ |
Damien Miller | b85dcad | 2000-03-11 11:37:00 +1100 | [diff] [blame] | 1979 | if test "x$withval" != "xno" ; then |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 1980 | AC_DEFINE(HAVE_MD5_PASSWORDS) |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1981 | MD5_MSG="yes" |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 1982 | fi |
| 1983 | ] |
Damien Miller | dd1c7ba | 1999-11-19 15:53:20 +1100 | [diff] [blame] | 1984 | ) |
| 1985 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1986 | # Whether to disable shadow password support |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 1987 | AC_ARG_WITH(shadow, |
| 1988 | [ --without-shadow Disable shadow password support], |
| 1989 | [ |
| 1990 | if test "x$withval" = "xno" ; then |
| 1991 | AC_DEFINE(DISABLE_SHADOW) |
Damien Miller | 1f335fb | 2000-06-26 11:31:33 +1000 | [diff] [blame] | 1992 | disable_shadow=yes |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 1993 | fi |
| 1994 | ] |
| 1995 | ) |
| 1996 | |
Damien Miller | 1f335fb | 2000-06-26 11:31:33 +1000 | [diff] [blame] | 1997 | if test -z "$disable_shadow" ; then |
| 1998 | AC_MSG_CHECKING([if the systems has expire shadow information]) |
| 1999 | AC_TRY_COMPILE( |
| 2000 | [ |
| 2001 | #include <sys/types.h> |
| 2002 | #include <shadow.h> |
| 2003 | struct spwd sp; |
| 2004 | ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ], |
| 2005 | [ sp_expire_available=yes ], [] |
| 2006 | ) |
| 2007 | |
| 2008 | if test "x$sp_expire_available" = "xyes" ; then |
| 2009 | AC_MSG_RESULT(yes) |
| 2010 | AC_DEFINE(HAS_SHADOW_EXPIRE) |
| 2011 | else |
| 2012 | AC_MSG_RESULT(no) |
| 2013 | fi |
| 2014 | fi |
| 2015 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 2016 | # Use ip address instead of hostname in $DISPLAY |
Damien Miller | 9a94734 | 2000-08-30 10:03:33 +1100 | [diff] [blame] | 2017 | if test ! -z "$IPADDR_IN_DISPLAY" ; then |
| 2018 | DISPLAY_HACK_MSG="yes" |
| 2019 | AC_DEFINE(IPADDR_IN_DISPLAY) |
| 2020 | else |
| 2021 | DISPLAY_HACK_MSG="no" |
| 2022 | AC_ARG_WITH(ipaddr-display, |
| 2023 | [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY], |
| 2024 | [ |
| 2025 | if test "x$withval" != "xno" ; then |
| 2026 | AC_DEFINE(IPADDR_IN_DISPLAY) |
| 2027 | DISPLAY_HACK_MSG="yes" |
| 2028 | fi |
| 2029 | ] |
| 2030 | ) |
| 2031 | fi |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 2032 | |
Tim Rice | 43a1c13 | 2002-04-17 21:19:14 -0700 | [diff] [blame] | 2033 | dnl BSD systems use /etc/login.conf so --with-default-path= has no effect |
| 2034 | if test $ac_cv_func_login_getcapbool = "yes" -a \ |
| 2035 | $ac_cv_header_login_cap_h = "yes" ; then |
| 2036 | USES_LOGIN_CONF=yes |
| 2037 | fi |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 2038 | # Whether to mess with the default path |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 2039 | SERVER_PATH_MSG="(default)" |
Damien Miller | e7f626c | 1999-12-31 09:49:44 +1100 | [diff] [blame] | 2040 | AC_ARG_WITH(default-path, |
Damien Miller | f71d2a5 | 2002-05-13 15:14:08 +1000 | [diff] [blame] | 2041 | [ --with-default-path= Specify default \$PATH environment for server], |
Damien Miller | 5a3e683 | 1999-12-27 09:48:56 +1100 | [diff] [blame] | 2042 | [ |
Tim Rice | 43a1c13 | 2002-04-17 21:19:14 -0700 | [diff] [blame] | 2043 | if test "$USES_LOGIN_CONF" = "yes" ; then |
| 2044 | AC_MSG_WARN([ |
| 2045 | --with-default-path=PATH has no effect on this system. |
| 2046 | Edit /etc/login.conf instead.]) |
| 2047 | elif test "x$withval" != "xno" ; then |
Tim Rice | 59ea0a0 | 2001-03-10 13:50:45 -0800 | [diff] [blame] | 2048 | user_path="$withval" |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 2049 | SERVER_PATH_MSG="$withval" |
Damien Miller | 5a3e683 | 1999-12-27 09:48:56 +1100 | [diff] [blame] | 2050 | fi |
Tim Rice | 59ea0a0 | 2001-03-10 13:50:45 -0800 | [diff] [blame] | 2051 | ], |
Tim Rice | 43a1c13 | 2002-04-17 21:19:14 -0700 | [diff] [blame] | 2052 | [ if test "$USES_LOGIN_CONF" = "yes" ; then |
| 2053 | AC_MSG_WARN([Make sure the path to scp is in /etc/login.conf]) |
| 2054 | else |
Tim Rice | 59ea0a0 | 2001-03-10 13:50:45 -0800 | [diff] [blame] | 2055 | AC_TRY_RUN( |
| 2056 | [ |
| 2057 | /* find out what STDPATH is */ |
| 2058 | #include <stdio.h> |
Tim Rice | 59ea0a0 | 2001-03-10 13:50:45 -0800 | [diff] [blame] | 2059 | #ifdef HAVE_PATHS_H |
| 2060 | # include <paths.h> |
| 2061 | #endif |
| 2062 | #ifndef _PATH_STDPATH |
| 2063 | # define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin" |
| 2064 | #endif |
| 2065 | #include <sys/types.h> |
| 2066 | #include <sys/stat.h> |
| 2067 | #include <fcntl.h> |
| 2068 | #define DATA "conftest.stdpath" |
| 2069 | |
| 2070 | main() |
| 2071 | { |
| 2072 | FILE *fd; |
| 2073 | int rc; |
| 2074 | |
| 2075 | fd = fopen(DATA,"w"); |
| 2076 | if(fd == NULL) |
| 2077 | exit(1); |
| 2078 | |
| 2079 | if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0) |
| 2080 | exit(1); |
| 2081 | |
| 2082 | exit(0); |
| 2083 | } |
| 2084 | ], [ user_path=`cat conftest.stdpath` ], |
| 2085 | [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ], |
| 2086 | [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ] |
| 2087 | ) |
| 2088 | # make sure $bindir is in USER_PATH so scp will work |
| 2089 | t_bindir=`eval echo ${bindir}` |
| 2090 | case $t_bindir in |
| 2091 | NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$prefix~"` ;; |
| 2092 | esac |
| 2093 | case $t_bindir in |
| 2094 | NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$ac_default_prefix~"` ;; |
| 2095 | esac |
| 2096 | echo $user_path | grep ":$t_bindir" > /dev/null 2>&1 |
| 2097 | if test $? -ne 0 ; then |
| 2098 | echo $user_path | grep "^$t_bindir" > /dev/null 2>&1 |
| 2099 | if test $? -ne 0 ; then |
| 2100 | user_path=$user_path:$t_bindir |
| 2101 | AC_MSG_RESULT(Adding $t_bindir to USER_PATH so scp will work) |
| 2102 | fi |
| 2103 | fi |
Tim Rice | 43a1c13 | 2002-04-17 21:19:14 -0700 | [diff] [blame] | 2104 | fi ] |
Damien Miller | 5a3e683 | 1999-12-27 09:48:56 +1100 | [diff] [blame] | 2105 | ) |
Tim Rice | 43a1c13 | 2002-04-17 21:19:14 -0700 | [diff] [blame] | 2106 | if test "$USES_LOGIN_CONF" != "yes" ; then |
| 2107 | AC_DEFINE_UNQUOTED(USER_PATH, "$user_path") |
| 2108 | AC_SUBST(user_path) |
| 2109 | fi |
Damien Miller | 5a3e683 | 1999-12-27 09:48:56 +1100 | [diff] [blame] | 2110 | |
Damien Miller | a18bbd3 | 2002-05-13 10:48:57 +1000 | [diff] [blame] | 2111 | # Set superuser path separately to user path |
Damien Miller | a18bbd3 | 2002-05-13 10:48:57 +1000 | [diff] [blame] | 2112 | AC_ARG_WITH(superuser-path, |
| 2113 | [ --with-superuser-path= Specify different path for super-user], |
| 2114 | [ |
| 2115 | if test "x$withval" != "xno" ; then |
| 2116 | AC_DEFINE_UNQUOTED(SUPERUSER_PATH, "$withval") |
| 2117 | superuser_path=$withval |
| 2118 | fi |
| 2119 | ] |
| 2120 | ) |
| 2121 | |
| 2122 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 2123 | # Whether to force IPv4 by default (needed on broken glibc Linux) |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 2124 | IPV4_HACK_MSG="no" |
Damien Miller | 7d80e34 | 2000-01-19 14:36:49 +1100 | [diff] [blame] | 2125 | AC_ARG_WITH(ipv4-default, |
| 2126 | [ --with-ipv4-default Use IPv4 by connections unless '-6' specified], |
| 2127 | [ |
| 2128 | if test "x$withval" != "xno" ; then |
| 2129 | AC_DEFINE(IPV4_DEFAULT) |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 2130 | IPV4_HACK_MSG="yes" |
Damien Miller | 7d80e34 | 2000-01-19 14:36:49 +1100 | [diff] [blame] | 2131 | fi |
| 2132 | ] |
| 2133 | ) |
| 2134 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 2135 | AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses]) |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 2136 | IPV4_IN6_HACK_MSG="no" |
Damien Miller | 7bcb089 | 2000-03-11 20:45:40 +1100 | [diff] [blame] | 2137 | AC_ARG_WITH(4in6, |
| 2138 | [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses], |
| 2139 | [ |
| 2140 | if test "x$withval" != "xno" ; then |
| 2141 | AC_MSG_RESULT(yes) |
| 2142 | AC_DEFINE(IPV4_IN_IPV6) |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 2143 | IPV4_IN6_HACK_MSG="yes" |
Damien Miller | 7bcb089 | 2000-03-11 20:45:40 +1100 | [diff] [blame] | 2144 | else |
| 2145 | AC_MSG_RESULT(no) |
| 2146 | fi |
| 2147 | ],[ |
| 2148 | if test "x$inet6_default_4in6" = "xyes"; then |
| 2149 | AC_MSG_RESULT([yes (default)]) |
| 2150 | AC_DEFINE(IPV4_IN_IPV6) |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 2151 | IPV4_IN6_HACK_MSG="yes" |
Damien Miller | 7bcb089 | 2000-03-11 20:45:40 +1100 | [diff] [blame] | 2152 | else |
| 2153 | AC_MSG_RESULT([no (default)]) |
| 2154 | fi |
| 2155 | ] |
| 2156 | ) |
| 2157 | |
Damien Miller | 60396b0 | 2001-02-18 17:01:00 +1100 | [diff] [blame] | 2158 | # Whether to enable BSD auth support |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 2159 | BSD_AUTH_MSG=no |
Damien Miller | 60396b0 | 2001-02-18 17:01:00 +1100 | [diff] [blame] | 2160 | AC_ARG_WITH(bsd-auth, |
| 2161 | [ --with-bsd-auth Enable BSD auth support], |
| 2162 | [ |
| 2163 | if test "x$withval" != "xno" ; then |
| 2164 | AC_DEFINE(BSD_AUTH) |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 2165 | BSD_AUTH_MSG=yes |
Damien Miller | 60396b0 | 2001-02-18 17:01:00 +1100 | [diff] [blame] | 2166 | fi |
| 2167 | ] |
| 2168 | ) |
| 2169 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 2170 | # Where to place sshd.pid |
Damien Miller | b13c73e | 2000-01-17 22:02:17 +1100 | [diff] [blame] | 2171 | piddir=/var/run |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 2172 | # make sure the directory exists |
| 2173 | if test ! -d $piddir ; then |
| 2174 | piddir=`eval echo ${sysconfdir}` |
| 2175 | case $piddir in |
| 2176 | NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;; |
| 2177 | esac |
| 2178 | fi |
| 2179 | |
Tim Rice | 88f2ab5 | 2002-03-17 12:17:34 -0800 | [diff] [blame] | 2180 | AC_ARG_WITH(pid-dir, |
| 2181 | [ --with-pid-dir=PATH Specify location of ssh.pid file], |
| 2182 | [ |
| 2183 | if test "x$withval" != "xno" ; then |
| 2184 | piddir=$withval |
| 2185 | if test ! -d $piddir ; then |
| 2186 | AC_MSG_WARN([** no $piddir directory on this system **]) |
| 2187 | fi |
| 2188 | fi |
| 2189 | ] |
| 2190 | ) |
| 2191 | |
Ben Lindstrom | 226cfa0 | 2001-01-22 05:34:40 +0000 | [diff] [blame] | 2192 | AC_DEFINE_UNQUOTED(_PATH_SSH_PIDDIR, "$piddir") |
Damien Miller | b13c73e | 2000-01-17 22:02:17 +1100 | [diff] [blame] | 2193 | AC_SUBST(piddir) |
Damien Miller | 5eed6a2 | 2000-01-16 12:05:18 +1100 | [diff] [blame] | 2194 | |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2195 | dnl allow user to disable some login recording features |
| 2196 | AC_ARG_ENABLE(lastlog, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 2197 | [ --disable-lastlog disable use of lastlog even if detected [no]], |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2198 | [ AC_DEFINE(DISABLE_LASTLOG) ] |
| 2199 | ) |
| 2200 | AC_ARG_ENABLE(utmp, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 2201 | [ --disable-utmp disable use of utmp even if detected [no]], |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2202 | [ AC_DEFINE(DISABLE_UTMP) ] |
| 2203 | ) |
| 2204 | AC_ARG_ENABLE(utmpx, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 2205 | [ --disable-utmpx disable use of utmpx even if detected [no]], |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2206 | [ AC_DEFINE(DISABLE_UTMPX) ] |
| 2207 | ) |
| 2208 | AC_ARG_ENABLE(wtmp, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 2209 | [ --disable-wtmp disable use of wtmp even if detected [no]], |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2210 | [ AC_DEFINE(DISABLE_WTMP) ] |
| 2211 | ) |
| 2212 | AC_ARG_ENABLE(wtmpx, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 2213 | [ --disable-wtmpx disable use of wtmpx even if detected [no]], |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2214 | [ AC_DEFINE(DISABLE_WTMPX) ] |
| 2215 | ) |
| 2216 | AC_ARG_ENABLE(libutil, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 2217 | [ --disable-libutil disable use of libutil (login() etc.) [no]], |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2218 | [ AC_DEFINE(DISABLE_LOGIN) ] |
| 2219 | ) |
| 2220 | AC_ARG_ENABLE(pututline, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 2221 | [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]], |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2222 | [ AC_DEFINE(DISABLE_PUTUTLINE) ] |
| 2223 | ) |
| 2224 | AC_ARG_ENABLE(pututxline, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 2225 | [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]], |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2226 | [ AC_DEFINE(DISABLE_PUTUTXLINE) ] |
| 2227 | ) |
| 2228 | AC_ARG_WITH(lastlog, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 2229 | [ --with-lastlog=FILE|DIR specify lastlog location [common locations]], |
Damien Miller | 709528a | 2001-01-31 09:57:55 +1100 | [diff] [blame] | 2230 | [ |
| 2231 | if test "x$withval" = "xno" ; then |
| 2232 | AC_DEFINE(DISABLE_LASTLOG) |
| 2233 | else |
| 2234 | conf_lastlog_location=$withval |
| 2235 | fi |
| 2236 | ] |
| 2237 | ) |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2238 | |
| 2239 | dnl lastlog, [uw]tmpx? detection |
| 2240 | dnl NOTE: set the paths in the platform section to avoid the |
| 2241 | dnl need for command-line parameters |
| 2242 | dnl lastlog and [uw]tmp are subject to a file search if all else fails |
| 2243 | |
| 2244 | dnl lastlog detection |
| 2245 | dnl NOTE: the code itself will detect if lastlog is a directory |
| 2246 | AC_MSG_CHECKING([if your system defines LASTLOG_FILE]) |
| 2247 | AC_TRY_COMPILE([ |
| 2248 | #include <sys/types.h> |
| 2249 | #include <utmp.h> |
| 2250 | #ifdef HAVE_LASTLOG_H |
| 2251 | # include <lastlog.h> |
| 2252 | #endif |
Damien Miller | 2994e08 | 2000-06-04 15:51:47 +1000 | [diff] [blame] | 2253 | #ifdef HAVE_PATHS_H |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2254 | # include <paths.h> |
| 2255 | #endif |
Ben Lindstrom | 19d7b8d | 2001-08-16 00:09:49 +0000 | [diff] [blame] | 2256 | #ifdef HAVE_LOGIN_H |
| 2257 | # include <login.h> |
| 2258 | #endif |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2259 | ], |
| 2260 | [ char *lastlog = LASTLOG_FILE; ], |
| 2261 | [ AC_MSG_RESULT(yes) ], |
Damien Miller | 2994e08 | 2000-06-04 15:51:47 +1000 | [diff] [blame] | 2262 | [ |
| 2263 | AC_MSG_RESULT(no) |
| 2264 | AC_MSG_CHECKING([if your system defines _PATH_LASTLOG]) |
| 2265 | AC_TRY_COMPILE([ |
| 2266 | #include <sys/types.h> |
| 2267 | #include <utmp.h> |
| 2268 | #ifdef HAVE_LASTLOG_H |
| 2269 | # include <lastlog.h> |
| 2270 | #endif |
| 2271 | #ifdef HAVE_PATHS_H |
| 2272 | # include <paths.h> |
| 2273 | #endif |
| 2274 | ], |
| 2275 | [ char *lastlog = _PATH_LASTLOG; ], |
| 2276 | [ AC_MSG_RESULT(yes) ], |
| 2277 | [ |
andre | e441aa3 | 2000-06-12 22:34:38 +0000 | [diff] [blame] | 2278 | AC_MSG_RESULT(no) |
Damien Miller | 2994e08 | 2000-06-04 15:51:47 +1000 | [diff] [blame] | 2279 | system_lastlog_path=no |
| 2280 | ]) |
| 2281 | ] |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2282 | ) |
Damien Miller | 2994e08 | 2000-06-04 15:51:47 +1000 | [diff] [blame] | 2283 | |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2284 | if test -z "$conf_lastlog_location"; then |
| 2285 | if test x"$system_lastlog_path" = x"no" ; then |
| 2286 | for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do |
Damien Miller | edb8292 | 2000-06-20 13:25:52 +1000 | [diff] [blame] | 2287 | if (test -d "$f" || test -f "$f") ; then |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2288 | conf_lastlog_location=$f |
| 2289 | fi |
| 2290 | done |
| 2291 | if test -z "$conf_lastlog_location"; then |
andre | 45cad51 | 2000-06-12 23:27:31 +0000 | [diff] [blame] | 2292 | AC_MSG_WARN([** Cannot find lastlog **]) |
| 2293 | dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2294 | fi |
| 2295 | fi |
| 2296 | fi |
| 2297 | |
| 2298 | if test -n "$conf_lastlog_location"; then |
| 2299 | AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location") |
| 2300 | fi |
| 2301 | |
| 2302 | dnl utmp detection |
| 2303 | AC_MSG_CHECKING([if your system defines UTMP_FILE]) |
| 2304 | AC_TRY_COMPILE([ |
| 2305 | #include <sys/types.h> |
| 2306 | #include <utmp.h> |
Damien Miller | 2994e08 | 2000-06-04 15:51:47 +1000 | [diff] [blame] | 2307 | #ifdef HAVE_PATHS_H |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2308 | # include <paths.h> |
| 2309 | #endif |
| 2310 | ], |
| 2311 | [ char *utmp = UTMP_FILE; ], |
| 2312 | [ AC_MSG_RESULT(yes) ], |
| 2313 | [ AC_MSG_RESULT(no) |
| 2314 | system_utmp_path=no ] |
| 2315 | ) |
| 2316 | if test -z "$conf_utmp_location"; then |
| 2317 | if test x"$system_utmp_path" = x"no" ; then |
| 2318 | for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do |
| 2319 | if test -f $f ; then |
| 2320 | conf_utmp_location=$f |
| 2321 | fi |
| 2322 | done |
| 2323 | if test -z "$conf_utmp_location"; then |
| 2324 | AC_DEFINE(DISABLE_UTMP) |
| 2325 | fi |
| 2326 | fi |
| 2327 | fi |
| 2328 | if test -n "$conf_utmp_location"; then |
| 2329 | AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location") |
| 2330 | fi |
| 2331 | |
| 2332 | dnl wtmp detection |
| 2333 | AC_MSG_CHECKING([if your system defines WTMP_FILE]) |
| 2334 | AC_TRY_COMPILE([ |
| 2335 | #include <sys/types.h> |
| 2336 | #include <utmp.h> |
Damien Miller | 2994e08 | 2000-06-04 15:51:47 +1000 | [diff] [blame] | 2337 | #ifdef HAVE_PATHS_H |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2338 | # include <paths.h> |
| 2339 | #endif |
| 2340 | ], |
| 2341 | [ char *wtmp = WTMP_FILE; ], |
| 2342 | [ AC_MSG_RESULT(yes) ], |
| 2343 | [ AC_MSG_RESULT(no) |
| 2344 | system_wtmp_path=no ] |
| 2345 | ) |
| 2346 | if test -z "$conf_wtmp_location"; then |
| 2347 | if test x"$system_wtmp_path" = x"no" ; then |
| 2348 | for f in /usr/adm/wtmp /var/log/wtmp; do |
| 2349 | if test -f $f ; then |
| 2350 | conf_wtmp_location=$f |
| 2351 | fi |
| 2352 | done |
| 2353 | if test -z "$conf_wtmp_location"; then |
| 2354 | AC_DEFINE(DISABLE_WTMP) |
| 2355 | fi |
| 2356 | fi |
| 2357 | fi |
| 2358 | if test -n "$conf_wtmp_location"; then |
| 2359 | AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location") |
| 2360 | fi |
| 2361 | |
| 2362 | |
| 2363 | dnl utmpx detection - I don't know any system so perverse as to require |
| 2364 | dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out |
| 2365 | dnl there, though. |
| 2366 | AC_MSG_CHECKING([if your system defines UTMPX_FILE]) |
| 2367 | AC_TRY_COMPILE([ |
| 2368 | #include <sys/types.h> |
| 2369 | #include <utmp.h> |
| 2370 | #ifdef HAVE_UTMPX_H |
| 2371 | #include <utmpx.h> |
| 2372 | #endif |
Damien Miller | 2994e08 | 2000-06-04 15:51:47 +1000 | [diff] [blame] | 2373 | #ifdef HAVE_PATHS_H |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2374 | # include <paths.h> |
| 2375 | #endif |
| 2376 | ], |
| 2377 | [ char *utmpx = UTMPX_FILE; ], |
| 2378 | [ AC_MSG_RESULT(yes) ], |
| 2379 | [ AC_MSG_RESULT(no) |
| 2380 | system_utmpx_path=no ] |
| 2381 | ) |
| 2382 | if test -z "$conf_utmpx_location"; then |
| 2383 | if test x"$system_utmpx_path" = x"no" ; then |
| 2384 | AC_DEFINE(DISABLE_UTMPX) |
| 2385 | fi |
| 2386 | else |
| 2387 | AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location") |
| 2388 | fi |
| 2389 | |
| 2390 | dnl wtmpx detection |
| 2391 | AC_MSG_CHECKING([if your system defines WTMPX_FILE]) |
| 2392 | AC_TRY_COMPILE([ |
| 2393 | #include <sys/types.h> |
| 2394 | #include <utmp.h> |
| 2395 | #ifdef HAVE_UTMPX_H |
| 2396 | #include <utmpx.h> |
| 2397 | #endif |
Damien Miller | 2994e08 | 2000-06-04 15:51:47 +1000 | [diff] [blame] | 2398 | #ifdef HAVE_PATHS_H |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2399 | # include <paths.h> |
| 2400 | #endif |
| 2401 | ], |
| 2402 | [ char *wtmpx = WTMPX_FILE; ], |
| 2403 | [ AC_MSG_RESULT(yes) ], |
| 2404 | [ AC_MSG_RESULT(no) |
| 2405 | system_wtmpx_path=no ] |
| 2406 | ) |
| 2407 | if test -z "$conf_wtmpx_location"; then |
| 2408 | if test x"$system_wtmpx_path" = x"no" ; then |
| 2409 | AC_DEFINE(DISABLE_WTMPX) |
| 2410 | fi |
| 2411 | else |
| 2412 | AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location") |
| 2413 | fi |
| 2414 | |
Damien Miller | 4018c19 | 2000-04-30 09:30:44 +1000 | [diff] [blame] | 2415 | |
Damien Miller | 29ea30d | 2000-03-17 10:54:15 +1100 | [diff] [blame] | 2416 | if test ! -z "$blibpath" ; then |
| 2417 | LDFLAGS="$LDFLAGS -blibpath:$blibpath" |
| 2418 | AC_MSG_WARN([Please check and edit -blibpath in LDFLAGS in Makefile]) |
| 2419 | fi |
| 2420 | |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 2421 | dnl remove pam and dl because they are in $LIBPAM |
| 2422 | if test "$PAM_MSG" = yes ; then |
Tim Rice | 7d2d1f1 | 2002-02-26 22:05:11 -0800 | [diff] [blame] | 2423 | LIBS=`echo $LIBS | sed 's/-lpam //'` |
| 2424 | fi |
| 2425 | if test "$ac_cv_lib_pam_pam_set_item" = yes ; then |
| 2426 | LIBS=`echo $LIBS | sed 's/-ldl //'` |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 2427 | fi |
| 2428 | |
Damien Miller | bac2d8a | 2000-09-05 16:13:06 +1100 | [diff] [blame] | 2429 | AC_EXEEXT |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 2430 | AC_CONFIG_FILES([Makefile openbsd-compat/Makefile scard/Makefile ssh_prng_cmds]) |
| 2431 | AC_OUTPUT |
Damien Miller | 0437b33 | 2000-05-02 09:56:41 +1000 | [diff] [blame] | 2432 | |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 2433 | # Print summary of options |
| 2434 | |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 2435 | # Someone please show me a better way :) |
| 2436 | A=`eval echo ${prefix}` ; A=`eval echo ${A}` |
| 2437 | B=`eval echo ${bindir}` ; B=`eval echo ${B}` |
| 2438 | C=`eval echo ${sbindir}` ; C=`eval echo ${C}` |
| 2439 | D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}` |
Kevin Steves | e0f4914 | 2000-10-14 17:51:48 +0000 | [diff] [blame] | 2440 | E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}` |
Ben Lindstrom | bc70992 | 2001-04-18 18:04:21 +0000 | [diff] [blame] | 2441 | F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}` |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 2442 | G=`eval echo ${piddir}` ; G=`eval echo ${G}` |
Damien Miller | f58c672 | 2002-05-13 13:15:42 +1000 | [diff] [blame] | 2443 | H=`eval echo ${PRIVSEP_PATH}` ; H=`eval echo ${H}` |
| 2444 | I=`eval echo ${user_path}` ; I=`eval echo ${I}` |
| 2445 | J=`eval echo ${superuser_path}` ; J=`eval echo ${J}` |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 2446 | |
| 2447 | echo "" |
Kevin Steves | 393d2f7 | 2001-04-08 22:50:43 +0000 | [diff] [blame] | 2448 | echo "OpenSSH has been configured with the following options:" |
Damien Miller | f58c672 | 2002-05-13 13:15:42 +1000 | [diff] [blame] | 2449 | echo " User binaries: $B" |
| 2450 | echo " System binaries: $C" |
| 2451 | echo " Configuration files: $D" |
| 2452 | echo " Askpass program: $E" |
| 2453 | echo " Manual pages: $F" |
| 2454 | echo " PID file: $G" |
| 2455 | echo " Privilege separation chroot path: $H" |
Tim Rice | 43a1c13 | 2002-04-17 21:19:14 -0700 | [diff] [blame] | 2456 | if test "$USES_LOGIN_CONF" = "yes" ; then |
Damien Miller | f58c672 | 2002-05-13 13:15:42 +1000 | [diff] [blame] | 2457 | echo " At runtime, sshd will use the path defined in /etc/login.conf" |
Tim Rice | 43a1c13 | 2002-04-17 21:19:14 -0700 | [diff] [blame] | 2458 | else |
Damien Miller | f58c672 | 2002-05-13 13:15:42 +1000 | [diff] [blame] | 2459 | echo " sshd default user PATH: $I" |
Tim Rice | 43a1c13 | 2002-04-17 21:19:14 -0700 | [diff] [blame] | 2460 | fi |
Damien Miller | a18bbd3 | 2002-05-13 10:48:57 +1000 | [diff] [blame] | 2461 | if test ! -z "$superuser_path" ; then |
Damien Miller | f58c672 | 2002-05-13 13:15:42 +1000 | [diff] [blame] | 2462 | echo " sshd superuser user PATH: $J" |
Damien Miller | a18bbd3 | 2002-05-13 10:48:57 +1000 | [diff] [blame] | 2463 | fi |
Damien Miller | f58c672 | 2002-05-13 13:15:42 +1000 | [diff] [blame] | 2464 | echo " Manpage format: $MANTYPE" |
| 2465 | echo " PAM support: ${PAM_MSG}" |
| 2466 | echo " KerberosIV support: $KRB4_MSG" |
| 2467 | echo " KerberosV support: $KRB5_MSG" |
| 2468 | echo " Smartcard support: $SCARD_MSG" |
| 2469 | echo " AFS support: $AFS_MSG" |
| 2470 | echo " S/KEY support: $SKEY_MSG" |
| 2471 | echo " TCP Wrappers support: $TCPW_MSG" |
| 2472 | echo " MD5 password support: $MD5_MSG" |
Damien Miller | 903e115 | 2002-05-13 14:41:31 +1000 | [diff] [blame] | 2473 | echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG" |
Damien Miller | f58c672 | 2002-05-13 13:15:42 +1000 | [diff] [blame] | 2474 | echo " Use IPv4 by default hack: $IPV4_HACK_MSG" |
| 2475 | echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG" |
| 2476 | echo " BSD Auth support: $BSD_AUTH_MSG" |
| 2477 | echo " Random number source: $RAND_MSG" |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 2478 | if test ! -z "$USE_RAND_HELPER" ; then |
Damien Miller | f58c672 | 2002-05-13 13:15:42 +1000 | [diff] [blame] | 2479 | echo " ssh-rand-helper collects from: $RAND_HELPER_MSG" |
Damien Miller | 60396b0 | 2001-02-18 17:01:00 +1100 | [diff] [blame] | 2480 | fi |
| 2481 | |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 2482 | echo "" |
| 2483 | |
Ben Lindstrom | 28bfc0d | 2000-12-18 19:58:57 +0000 | [diff] [blame] | 2484 | echo " Host: ${host}" |
| 2485 | echo " Compiler: ${CC}" |
| 2486 | echo " Compiler flags: ${CFLAGS}" |
| 2487 | echo "Preprocessor flags: ${CPPFLAGS}" |
| 2488 | echo " Linker flags: ${LDFLAGS}" |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 2489 | echo " Libraries: ${LIBWRAP} ${LIBPAM} ${LIBS}" |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 2490 | |
| 2491 | echo "" |
| 2492 | |
Damien Miller | 82cf0ce | 2000-12-20 13:34:48 +1100 | [diff] [blame] | 2493 | if test "x$PAM_MSG" = "xyes" ; then |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 2494 | echo "PAM is enabled. You may need to install a PAM control file " |
| 2495 | echo "for sshd, otherwise password authentication may fail. " |
| 2496 | echo "Example PAM control files can be found in the contrib/ " |
| 2497 | echo "subdirectory" |
Damien Miller | 6f9c337 | 2000-10-25 10:06:04 +1100 | [diff] [blame] | 2498 | echo "" |
| 2499 | fi |
Ben Lindstrom | 3ad650a | 2001-01-03 06:02:51 +0000 | [diff] [blame] | 2500 | |
| 2501 | if test ! -z "$NO_SFTP"; then |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 2502 | echo "sftp-server will be disabled. Your compiler does not " |
| 2503 | echo "support 64bit integers." |
| 2504 | echo "" |
| 2505 | fi |
| 2506 | |
| 2507 | if test ! -z "$RAND_HELPER_CMDHASH" ; then |
| 2508 | echo "WARNING: you are using the builtin random number collection " |
| 2509 | echo "service. Please read WARNING.RNG and request that your OS " |
| 2510 | echo "vendor includes kernel-based random number collection in " |
| 2511 | echo "future versions of your OS." |
Ben Lindstrom | 3ad650a | 2001-01-03 06:02:51 +0000 | [diff] [blame] | 2512 | echo "" |
| 2513 | fi |
Damien Miller | 60396b0 | 2001-02-18 17:01:00 +1100 | [diff] [blame] | 2514 | |