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