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