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