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