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