blob: 007a95ee9d500dc4b405a3872d2e7e4a050d2cb9 [file] [log] [blame]
Ben Lindstrom19d7b8d2001-08-16 00:09:49 +00001# $Id: configure.in,v 1.307 2001/08/16 00:09:50 mouring Exp $
Damien Millere9cf3572001-02-09 12:55:35 +11002
Damien Millerab18c411999-11-11 10:40:23 +11003AC_INIT(ssh.c)
Damien Miller7f6ea021999-10-28 13:25:17 +10004
5AC_CONFIG_HEADER(config.h)
Damien Miller856799b2000-03-15 21:18:10 +11006AC_PROG_CC
Damien Miller76112de1999-12-21 11:18:08 +11007AC_CANONICAL_HOST
Damien Miller4df5c762001-02-28 08:14:22 +11008AC_C_BIGENDIAN
Damien Miller7f6ea021999-10-28 13:25:17 +10009
Damien Millera22ba012000-03-02 23:09:20 +110010# Checks for programs.
Damien Millerab18c411999-11-11 10:40:23 +110011AC_PROG_CPP
Damien Miller7f6ea021999-10-28 13:25:17 +100012AC_PROG_RANLIB
Damien Millerd8087f61999-11-25 12:31:26 +110013AC_PROG_INSTALL
Ben Lindstrom582d3982001-02-06 22:54:30 +000014AC_PATH_PROG(AR, ar)
Tim Riceb8fbb8e2001-04-21 14:31:52 -070015AC_PATH_PROGS(PERL, perl5 perl)
Damien Millere79334a1999-12-29 10:03:37 +110016AC_SUBST(PERL)
Damien Miller8d1fd572000-05-17 21:34:07 +100017AC_PATH_PROG(ENT, ent)
18AC_SUBST(ENT)
Damien Miller78315eb2000-09-29 23:01:36 +110019AC_PATH_PROGS(FILEPRIV, filepriv, true, /sbin:/usr/sbin)
Damien Miller4864e8f2001-02-08 10:07:08 +110020AC_PATH_PROG(TEST_MINUS_S_SH, bash)
21AC_PATH_PROG(TEST_MINUS_S_SH, ksh)
22AC_PATH_PROG(TEST_MINUS_S_SH, sh)
Damien Miller2e1b0821999-12-25 10:11:29 +110023
Damien Miller3f62aba2000-11-29 11:56:35 +110024if test -z "$AR" ; then
25 AC_MSG_ERROR([*** 'ar' missing, please install or fix your \$PATH ***])
26fi
27
Damien Millerad833b32000-08-23 10:46:23 +100028# Use LOGIN_PROGRAM from environment if possible
29if test ! -z "$LOGIN_PROGRAM" ; then
30 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM")
31else
32 # Search for login
33 AC_PATH_PROG(LOGIN_PROGRAM_FALLBACK, login)
34 if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
35 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM_FALLBACK")
36 fi
37fi
38
Damien Miller166bd442000-03-16 10:48:25 +110039if test -z "$LD" ; then
40 LD=$CC
41fi
42AC_SUBST(LD)
43
Damien Miller166bd442000-03-16 10:48:25 +110044AC_C_INLINE
Damien Miller649d9992001-06-27 23:35:51 +100045if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
46 CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wno-uninitialized"
Damien Miller166bd442000-03-16 10:48:25 +110047fi
48
Damien Millera22ba012000-03-02 23:09:20 +110049# Check for some target-specific stuff
Damien Miller76112de1999-12-21 11:18:08 +110050case "$host" in
Damien Miller75b1d102000-01-07 14:01:41 +110051*-*-aix*)
52 AFS_LIBS="-lld"
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +000053 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Millerdb819592000-03-14 13:44:01 +110054 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Damien Milleredb82922000-06-20 13:25:52 +100055 if (test "$LD" != "gcc" && test -z "$blibpath"); then
Damien Miller29ea30d2000-03-17 10:54:15 +110056 blibpath="/usr/lib:/lib:/usr/local/lib"
57 fi
Damien Millerd2c208a2000-05-17 22:00:02 +100058 AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)])
Damien Millereca71f82000-01-20 22:38:27 +110059 AC_DEFINE(BROKEN_GETADDRINFO)
andre60f3c982000-06-03 16:18:19 +000060 dnl AIX handles lastlog as part of its login message
61 AC_DEFINE(DISABLE_LASTLOG)
Damien Miller75b1d102000-01-07 14:01:41 +110062 ;;
Damien Millerbac2d8a2000-09-05 16:13:06 +110063*-*-cygwin*)
Damien Milleref767ac2000-10-17 23:14:08 +110064 LIBS="$LIBS -lregex /usr/lib/textmode.o"
Damien Millerbac2d8a2000-09-05 16:13:06 +110065 AC_DEFINE(HAVE_CYGWIN)
Ben Lindstromca60a9b2001-05-17 03:32:50 +000066 AC_DEFINE(USE_PIPES)
Damien Millerbac2d8a2000-09-05 16:13:06 +110067 AC_DEFINE(DISABLE_SHADOW)
68 AC_DEFINE(IPV4_DEFAULT)
69 AC_DEFINE(IP_TOS_IS_BROKEN)
Ben Lindstrom38e60932001-02-24 00:55:04 +000070 AC_DEFINE(NO_X11_UNIX_SOCKETS)
Damien Millerbac2d8a2000-09-05 16:13:06 +110071 no_libsocket=1
72 no_libnsl=1
73 ;;
Ben Lindstrom58055132001-02-15 18:34:29 +000074*-*-dgux*)
75 AC_DEFINE(IP_TOS_IS_BROKEN)
76 ;;
Ben Lindstromfed7bb42001-07-15 18:30:42 +000077*-*-darwin*)
78 AC_DEFINE(BROKEN_GETADDRINFO)
79 ;;
Damien Miller76112de1999-12-21 11:18:08 +110080*-*-hpux10*)
81 if test -z "$GCC"; then
Damien Millerfda78d92000-05-20 15:33:44 +100082 CFLAGS="$CFLAGS -Ae"
Damien Miller76112de1999-12-21 11:18:08 +110083 fi
Kevin Steves315f8b72001-06-28 00:24:41 +000084 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
Damien Miller9a947342000-08-30 10:03:33 +110085 IPADDR_IN_DISPLAY=yes
Damien Millerb0785672000-08-23 09:10:39 +100086 AC_DEFINE(USE_PIPES)
Damien Miller8a1e6a62000-09-16 15:55:52 +110087 AC_DEFINE(DISABLE_SHADOW)
Damien Millerd6f204d2000-09-23 13:57:27 +110088 AC_DEFINE(DISABLE_UTMP)
Kevin Steves8848b242000-10-18 13:11:44 +000089 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
Kevin Steves315f8b72001-06-28 00:24:41 +000090 LIBS="$LIBS -lxnet -lsec"
Damien Miller76112de1999-12-21 11:18:08 +110091 ;;
Damien Miller1bead332000-04-30 00:47:29 +100092*-*-hpux11*)
Kevin Steves6a7b0de2001-06-27 16:32:24 +000093 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
Damien Miller9a947342000-08-30 10:03:33 +110094 IPADDR_IN_DISPLAY=yes
Damien Miller82cf0ce2000-12-20 13:34:48 +110095 AC_DEFINE(PAM_SUN_CODEBASE)
Damien Miller5552d7a2000-08-30 09:53:24 +110096 AC_DEFINE(USE_PIPES)
Damien Miller8a1e6a62000-09-16 15:55:52 +110097 AC_DEFINE(DISABLE_SHADOW)
Damien Millerd6f204d2000-09-23 13:57:27 +110098 AC_DEFINE(DISABLE_UTMP)
Kevin Steves8848b242000-10-18 13:11:44 +000099 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
Kevin Steves6a7b0de2001-06-27 16:32:24 +0000100 LIBS="$LIBS -lxnet -lsec"
Damien Miller1bead332000-04-30 00:47:29 +1000101 ;;
Damien Millerbeb4ba51999-12-28 15:09:35 +1100102*-*-irix5*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000103 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller9e110892000-06-07 21:05:46 +1000104 LDFLAGS="$LDFLAGS"
Damien Miller190d5a82000-09-30 09:43:19 +1100105 PATH="$PATH:/usr/etc"
Damien Miller1808f382000-01-06 12:03:12 +1100106 no_libsocket=1
107 no_libnsl=1
Damien Miller11fa2cc2000-08-16 10:35:58 +1000108 AC_DEFINE(BROKEN_INET_NTOA)
Damien Miller1808f382000-01-06 12:03:12 +1100109 ;;
110*-*-irix6*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000111 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller9e110892000-06-07 21:05:46 +1000112 LDFLAGS="$LDFLAGS"
Damien Miller190d5a82000-09-30 09:43:19 +1100113 PATH="$PATH:/usr/etc"
Damien Miller91606b12000-06-28 08:22:29 +1000114 AC_DEFINE(WITH_IRIX_ARRAY)
115 AC_DEFINE(WITH_IRIX_PROJECT)
116 AC_DEFINE(WITH_IRIX_AUDIT)
Ben Lindstrom4a1d9162000-11-21 10:45:31 +0000117 AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)])
Damien Millerbeb4ba51999-12-28 15:09:35 +1100118 no_libsocket=1
119 no_libnsl=1
Damien Miller11fa2cc2000-08-16 10:35:58 +1000120 AC_DEFINE(BROKEN_INET_NTOA)
Damien Millerbeb4ba51999-12-28 15:09:35 +1100121 ;;
Damien Millerb29ea912000-01-15 14:12:03 +1100122*-*-linux*)
123 no_dev_ptmx=1
Damien Millera64b57a2001-01-17 10:44:13 +1100124 check_for_libcrypt_later=1
Damien Miller7bcb0892000-03-11 20:45:40 +1100125 AC_DEFINE(DONT_TRY_OTHER_AF)
Damien Miller4e997202000-07-09 21:21:52 +1000126 AC_DEFINE(PAM_TTY_KLUDGE)
Damien Miller7bcb0892000-03-11 20:45:40 +1100127 inet6_default_4in6=yes
Damien Millerb29ea912000-01-15 14:12:03 +1100128 ;;
Ben Lindstromb5628642000-10-18 00:02:25 +0000129mips-sony-bsd|mips-sony-newsos4)
130 AC_DEFINE(HAVE_NEWS4)
131 SONY=1
132 AC_CHECK_LIB(iberty, xatexit, AC_DEFINE(HAVE_XATEXIT),
Damien Miller5dfe9762001-02-16 12:05:39 +1100133 AC_MSG_ERROR([*** libiberty missing - please install first or check config.log ***])
Ben Lindstromb5628642000-10-18 00:02:25 +0000134 )
135 ;;
Damien Milleree1c0b32000-01-21 00:18:15 +1100136*-*-netbsd*)
Damien Millera22ba012000-03-02 23:09:20 +1100137 need_dash_r=1
Damien Milleree1c0b32000-01-21 00:18:15 +1100138 ;;
Damien Millerfbd884a2001-02-27 08:39:07 +1100139*-*-freebsd*)
140 check_for_libcrypt_later=1
141 ;;
Damien Miller0f91b4e2000-06-18 15:43:25 +1000142*-next-*)
Damien Miller0f91b4e2000-06-18 15:43:25 +1000143 conf_lastlog_location="/usr/adm/lastlog"
Damien Millere5192fa2000-08-29 14:30:37 +1100144 conf_utmp_location=/etc/utmp
145 conf_wtmp_location=/usr/adm/wtmp
146 MAIL=/usr/spool/mail
Damien Miller0f91b4e2000-06-18 15:43:25 +1000147 AC_DEFINE(HAVE_NEXT)
Ben Lindstromb4df15d2000-10-15 00:17:36 +0000148 AC_DEFINE(BROKEN_REALPATH)
Ben Lindstrom76020ba2000-10-25 16:55:00 +0000149 AC_DEFINE(USE_PIPES)
Damien Millerfbd884a2001-02-27 08:39:07 +1100150 AC_DEFINE(BROKEN_SAVED_UIDS)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000151 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Ben Lindstrom321ae732000-12-31 15:00:23 +0000152 CFLAGS="$CFLAGS"
Damien Miller0f91b4e2000-06-18 15:43:25 +1000153 ;;
Damien Miller75b1d102000-01-07 14:01:41 +1100154*-*-solaris*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000155 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Ben Lindstrom866488b2001-02-20 18:22:38 +0000156 LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib"
Damien Millera22ba012000-03-02 23:09:20 +1100157 need_dash_r=1
Damien Miller82cf0ce2000-12-20 13:34:48 +1100158 AC_DEFINE(PAM_SUN_CODEBASE)
Ben Lindstrom97c677d2001-05-08 20:33:05 +0000159 AC_DEFINE(LOGIN_NEEDS_UTMPX)
160 AC_DEFINE(LOGIN_NEEDS_TERM)
andre2ff7b5d2000-06-03 14:57:40 +0000161 # hardwire lastlog location (can't detect it on some versions)
162 conf_lastlog_location="/var/adm/lastlog"
Damien Millera1cb6442000-06-09 11:58:35 +1000163 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
164 sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'`
165 if test "$sol2ver" -ge 8; then
166 AC_MSG_RESULT(yes)
167 AC_DEFINE(DISABLE_UTMP)
168 AC_DEFINE(DISABLE_WTMP)
169 else
170 AC_MSG_RESULT(no)
171 fi
Damien Miller75b1d102000-01-07 14:01:41 +1100172 ;;
Damien Millerdfc83f42000-05-20 15:02:59 +1000173*-*-sunos4*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000174 CPPFLAGS="$CPPFLAGS -DSUNOS4"
Damien Millerdfc83f42000-05-20 15:02:59 +1000175 AC_CHECK_FUNCS(getpwanam)
Damien Miller82cf0ce2000-12-20 13:34:48 +1100176 AC_DEFINE(PAM_SUN_CODEBASE)
Damien Miller877d8ea2001-02-18 15:29:28 +1100177 AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
Damien Miller36ccb5c2000-08-09 16:34:27 +1000178 conf_utmp_location=/etc/utmp
179 conf_wtmp_location=/var/adm/wtmp
180 conf_lastlog_location=/var/adm/lastlog
Damien Millerb0785672000-08-23 09:10:39 +1000181 AC_DEFINE(USE_PIPES)
Damien Millerdfc83f42000-05-20 15:02:59 +1000182 ;;
Ben Lindstrom603bdfd2001-02-12 07:29:45 +0000183*-ncr-sysv*)
184 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
185 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Ben Lindstrom603bdfd2001-02-12 07:29:45 +0000186 LIBS="$LIBS -lc89 -lnsl -lgen -lsocket"
Ben Lindstrom34328342001-04-23 22:39:42 +0000187 AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
Ben Lindstrom603bdfd2001-02-12 07:29:45 +0000188 ;;
Damien Miller2ae714f2000-07-11 09:29:50 +1000189*-sni-sysv*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000190 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller2ae714f2000-07-11 09:29:50 +1000191 LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/ucblib"
Damien Millerfd9885e2001-01-10 08:16:53 +1100192 IPADDR_IN_DISPLAY=yes
193 AC_DEFINE(USE_PIPES)
Damien Miller2ae714f2000-07-11 09:29:50 +1000194 AC_DEFINE(IP_TOS_IS_BROKEN)
Kevin Steves52dd4682001-03-08 18:26:57 +0000195 AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
Damien Millerb2dc28e2000-07-12 09:18:33 +1000196 LIBS="$LIBS -lgen -lnsl -lucb"
Damien Miller2ae714f2000-07-11 09:29:50 +1000197 ;;
Damien Miller78315eb2000-09-29 23:01:36 +1100198*-*-sysv4.2*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000199 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller78315eb2000-09-29 23:01:36 +1100200 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Damien Miller78315eb2000-09-29 23:01:36 +1100201 enable_suid_ssh=no
Damien Miller5dfe9762001-02-16 12:05:39 +1100202 AC_DEFINE(USE_PIPES)
Damien Miller78315eb2000-09-29 23:01:36 +1100203 ;;
204*-*-sysv5*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000205 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller78315eb2000-09-29 23:01:36 +1100206 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Damien Miller78315eb2000-09-29 23:01:36 +1100207 enable_suid_ssh=no
Damien Miller5dfe9762001-02-16 12:05:39 +1100208 AC_DEFINE(USE_PIPES)
Damien Miller78315eb2000-09-29 23:01:36 +1100209 ;;
Damien Miller75b1d102000-01-07 14:01:41 +1100210*-*-sysv*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000211 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Millerdb819592000-03-14 13:44:01 +1100212 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Damien Miller75b1d102000-01-07 14:01:41 +1100213 LIBS="$LIBS -lgen -lsocket"
214 ;;
Damien Miller78315eb2000-09-29 23:01:36 +1100215*-*-sco3.2v4*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000216 CPPFLAGS="$CPPFLAGS -Dftruncate=chsize -I/usr/local/include"
Damien Miller78315eb2000-09-29 23:01:36 +1100217 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Ben Lindstrom980754c2000-11-12 00:04:24 +0000218 LIBS="$LIBS -lgen -lsocket -los -lprot -lx -ltinfo -lm"
Damien Miller78315eb2000-09-29 23:01:36 +1100219 rsh_path="/usr/bin/rcmd"
Damien Miller5dfe9762001-02-16 12:05:39 +1100220 RANLIB=true
221 no_dev_ptmx=1
222 AC_DEFINE(BROKEN_SYS_TERMIO_H)
223 AC_DEFINE(USE_PIPES)
Damien Miller78315eb2000-09-29 23:01:36 +1100224 AC_DEFINE(HAVE_SCO_PROTECTED_PW)
Ben Lindstrom980754c2000-11-12 00:04:24 +0000225 AC_DEFINE(DISABLE_SHADOW)
Ben Lindstrom3ad650a2001-01-03 06:02:51 +0000226 AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
Damien Millerfbd884a2001-02-27 08:39:07 +1100227 AC_DEFINE(BROKEN_SAVED_UIDS)
Damien Miller217f5672001-02-16 12:12:41 +1100228 AC_CHECK_FUNCS(getluid setluid)
Tim Rice07183b82001-04-25 21:40:28 -0700229 MANTYPE=man
Damien Miller78315eb2000-09-29 23:01:36 +1100230 ;;
231*-*-sco3.2v5*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000232 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Millera66626b2000-06-13 18:57:53 +1000233 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Damien Miller5dfe9762001-02-16 12:05:39 +1100234 LIBS="$LIBS -lprot -lx -ltinfo -lm"
Damien Millera66626b2000-06-13 18:57:53 +1000235 no_dev_ptmx=1
Damien Miller78315eb2000-09-29 23:01:36 +1100236 rsh_path="/usr/bin/rcmd"
Damien Miller5dfe9762001-02-16 12:05:39 +1100237 AC_DEFINE(USE_PIPES)
Damien Miller78315eb2000-09-29 23:01:36 +1100238 AC_DEFINE(HAVE_SCO_PROTECTED_PW)
Ben Lindstrom980754c2000-11-12 00:04:24 +0000239 AC_DEFINE(DISABLE_SHADOW)
Ben Lindstrom42717bf2000-12-28 15:46:20 +0000240 AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
Damien Miller217f5672001-02-16 12:12:41 +1100241 AC_CHECK_FUNCS(getluid setluid)
Tim Rice07183b82001-04-25 21:40:28 -0700242 MANTYPE=man
Damien Millera66626b2000-06-13 18:57:53 +1000243 ;;
Ben Lindstromd9e08242001-07-22 19:32:00 +0000244*-*-unicos*)
Tim Ricee991e3c2001-08-07 15:29:07 -0700245 no_libsocket=1
246 no_libnsl=1
Ben Lindstromd9e08242001-07-22 19:32:00 +0000247 AC_DEFINE(USE_PIPES)
Tim Ricee991e3c2001-08-07 15:29:07 -0700248 LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal,-L/usr/local/lib"
249 LIBS="$LIBS -lgen -lrsc"
250 ;;
Damien Millerb8c656e2000-06-28 15:22:41 +1000251*-dec-osf*)
Ben Lindstrom72af2ef2001-05-08 20:42:28 +0000252 AC_MSG_CHECKING(for Digital Unix SIA)
253 no_osfsia=""
254 AC_ARG_WITH(osfsia,
255 [ --with-osfsia Enable Digital Unix SIA],
256 [
257 if test "x$withval" = "xno" ; then
258 AC_MSG_RESULT(disabled)
259 no_osfsia=1
260 fi
261 ],
262 )
263 if test -z "$no_osfsia" ; then
Damien Millerb8c656e2000-06-28 15:22:41 +1000264 if test -f /etc/sia/matrix.conf; then
265 AC_MSG_RESULT(yes)
266 AC_DEFINE(HAVE_OSF_SIA)
267 AC_DEFINE(DISABLE_LOGIN)
268 LIBS="$LIBS -lsecurity -ldb -lm -laud"
269 else
270 AC_MSG_RESULT(no)
271 fi
272 fi
273 ;;
Ben Lindstrom19d7b8d2001-08-16 00:09:49 +0000274
275*-*-nto-qnx)
276 AC_DEFINE(USE_PIPES)
277 AC_DEFINE(NO_X11_UNIX_SOCKETS)
278 AC_DEFINE(MISSING_NFDBITS)
279 AC_DEFINE(MISSING_HOWMANY)
280 AC_DEFINE(MISSING_FD_MASK)
281 ;;
Damien Miller76112de1999-12-21 11:18:08 +1100282esac
283
Damien Millere37bfc12000-06-05 09:37:43 +1000284# Allow user to specify flags
285AC_ARG_WITH(cflags,
286 [ --with-cflags Specify additional flags to pass to compiler],
287 [
288 if test "x$withval" != "xno" ; then
289 CFLAGS="$CFLAGS $withval"
290 fi
291 ]
292)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000293AC_ARG_WITH(cppflags,
294 [ --with-cppflags Specify additional flags to pass to preprocessor] ,
295 [
296 if test "x$withval" != "xno"; then
297 CPPFLAGS="$CPPFLAGS $withval"
298 fi
299 ]
300)
Damien Millere37bfc12000-06-05 09:37:43 +1000301AC_ARG_WITH(ldflags,
Ben Lindstrom2ed98182000-11-06 07:15:43 +0000302 [ --with-ldflags Specify additional flags to pass to linker],
Damien Millere37bfc12000-06-05 09:37:43 +1000303 [
304 if test "x$withval" != "xno" ; then
305 LDFLAGS="$LDFLAGS $withval"
306 fi
307 ]
308)
309AC_ARG_WITH(libs,
310 [ --with-libs Specify additional libraries to link with],
311 [
312 if test "x$withval" != "xno" ; then
313 LIBS="$LIBS $withval"
314 fi
315 ]
316)
317
Ben Lindstrom4e5a0aa2001-02-15 18:16:22 +0000318AC_ARG_WITH(pcre,
319 [ --with-pcre Override built in regex library with pcre],
320 [
321
322 AC_CHECK_LIB(pcre, pcre_info,
323 [
324 AC_DEFINE(HAVE_LIBPCRE)
325 LIBS="$LIBS -lpcreposix -lpcre"
326 no_comp_check="yes"
327 ],
328 [ AC_MSG_ERROR([*** Can not locate pcre libraries.]) ]
329 )
330 ]
331)
Damien Millere37bfc12000-06-05 09:37:43 +1000332
Damien Millera22ba012000-03-02 23:09:20 +1100333# Checks for libraries.
Damien Miller22d5aa72001-02-18 12:49:57 +1100334if test -z "$no_libnsl" ; then
Ben Lindstrom3ad650a2001-01-03 06:02:51 +0000335 AC_CHECK_LIB(nsl, yp_match, , )
336fi
Damien Miller22d5aa72001-02-18 12:49:57 +1100337if test -z "$no_libsocket" ; then
Ben Lindstrom3ad650a2001-01-03 06:02:51 +0000338 AC_CHECK_LIB(socket, main, , )
339fi
340
Damien Millerdf288022001-02-18 13:07:07 +1100341dnl SCO OS3 needs this for libwrap
342AC_CHECK_LIB(rpc, innetgr, LIBS="-lrpc -lyp -lrpc $LIBS" , , -lyp -lrpc)
343
Ben Lindstrom3ad650a2001-01-03 06:02:51 +0000344AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen")
Damien Miller5dfe9762001-02-16 12:05:39 +1100345AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first or check config.log ***]))
Damien Millerab18c411999-11-11 10:40:23 +1100346AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil")
Damien Miller6f9c3372000-10-25 10:06:04 +1100347
Ben Lindstrom4e5a0aa2001-02-15 18:16:22 +0000348# We don't want to check if we did an pcre override.
349if test -z "$no_comp_check" ; then
350 AC_CHECK_FUNC(regcomp,
351 [ AC_DEFINE(HAVE_REGCOMP)],
352 [
353 AC_CHECK_LIB(pcre, pcre_info,
354 [
355 AC_DEFINE(HAVE_LIBPCRE)
356 LIBS="$LIBS -lpcreposix -lpcre"
357 ],
358 [
359 AC_MSG_ERROR([*** No regex library found.])
360 ])
361 ]
362 )
363fi
Damien Millerab18c411999-11-11 10:40:23 +1100364
Ben Lindstrom3ad650a2001-01-03 06:02:51 +0000365dnl UnixWare 2.x
366AC_CHECK_FUNC(strcasecmp,
367 [], [ AC_CHECK_LIB(resolv, strcasecmp, LIBS="$LIBS -lresolv") ]
368)
369AC_CHECK_FUNC(utimes,
370 [], [ AC_CHECK_LIB(c89, utimes, LIBS="$LIBS -lc89") ]
371)
Damien Millerab18c411999-11-11 10:40:23 +1100372
Ben Lindstrom8697e082001-02-24 21:41:10 +0000373AC_FUNC_STRFTIME
374
Damien Millera22ba012000-03-02 23:09:20 +1100375# Checks for header files.
Ben Lindstrom19d7b8d2001-08-16 00:09:49 +0000376AC_CHECK_HEADERS(bstring.h crypt.h endian.h floatingpoint.h getopt.h glob.h lastlog.h libgen.h limits.h login.h login_cap.h maillock.h netdb.h netgroup.h netinet/in_systm.h paths.h poll.h pty.h regex.h shadow.h security/pam_appl.h stdint.h strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/queue.h sys/select.h sys/stat.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h sys/un.h stddef.h time.h ttyent.h usersec.h util.h utime.h utmp.h utmpx.h vis.h)
Damien Miller3c027682001-03-14 11:39:45 +1100377
378# Check for ALTDIRFUNC glob() extension
379AC_MSG_CHECKING(for GLOB_ALTDIRFUNC support)
380AC_EGREP_CPP(FOUNDIT,
381 [
382 #include <glob.h>
383 #ifdef GLOB_ALTDIRFUNC
384 FOUNDIT
385 #endif
386 ],
387 [
388 AC_DEFINE(GLOB_HAS_ALTDIRFUNC)
389 AC_MSG_RESULT(yes)
390 ],
391 [
392 AC_MSG_RESULT(no)
393 ]
394)
Damien Millerab18c411999-11-11 10:40:23 +1100395
Ben Lindstrom45b14db2001-03-17 01:15:38 +0000396# Check for g.gl_matchc glob() extension
397AC_MSG_CHECKING(for gl_matchc field in glob_t)
398AC_EGREP_CPP(FOUNDIT,
399 [
400 #include <glob.h>
401 int main(void){glob_t g; g.gl_matchc = 1;}
402 ],
403 [
404 AC_DEFINE(GLOB_HAS_GL_MATCHC)
405 AC_MSG_RESULT(yes)
406 ],
407 [
408 AC_MSG_RESULT(no)
409 ]
410)
411
Damien Miller18bb4732001-03-28 14:35:30 +1000412AC_MSG_CHECKING([whether struct dirent allocates space for d_name])
413AC_TRY_RUN(
414 [
415#include <sys/types.h>
416#include <dirent.h>
417int main(void){struct dirent d;return(sizeof(d.d_name)<=sizeof(char));}
418 ],
419 [AC_MSG_RESULT(yes)],
420 [
421 AC_MSG_RESULT(no)
422 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME)
423 ]
424)
425
Damien Millerc547bf12001-02-16 10:18:12 +1100426# Check whether user wants S/Key support
427SKEY_MSG="no"
428AC_ARG_WITH(skey,
429 [ --with-skey=PATH Enable S/Key support],
430 [
431 if test "x$withval" != "xno" ; then
432
433 if test "x$withval" != "xyes" ; then
434 CPPFLAGS="$CPPFLAGS -I${withval}/include"
435 LDFLAGS="$LDFLAGS -L${withval}/lib"
436 fi
437
438 AC_DEFINE(SKEY)
439 LIBS="-lskey $LIBS"
440 SKEY_MSG="yes"
441
442 AC_CHECK_FUNC(skey_keyinfo,
443 [],
444 [
445 AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
446 ])
447 fi
448 ]
449)
450
451# Check whether user wants TCP wrappers support
452TCPW_MSG="no"
453AC_ARG_WITH(tcp-wrappers,
454 [ --with-tcp-wrappers Enable tcpwrappers support],
455 [
456 if test "x$withval" != "xno" ; then
457 saved_LIBS="$LIBS"
458 LIBS="-lwrap $LIBS"
459 AC_MSG_CHECKING(for libwrap)
460 AC_TRY_LINK(
461 [
462#include <tcpd.h>
463 int deny_severity = 0, allow_severity = 0;
464 ],
465 [hosts_access(0);],
466 [
467 AC_MSG_RESULT(yes)
468 AC_DEFINE(LIBWRAP)
469 TCPW_MSG="yes"
470 ],
471 [
472 AC_MSG_ERROR([*** libwrap missing])
473 ]
474 )
475 fi
476 ]
477)
478
Damien Millerad833b32000-08-23 10:46:23 +1000479dnl Checks for library functions.
Tim Ricee991e3c2001-08-07 15:29:07 -0700480AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_sa clock dirname fchown fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getopt getnameinfo getrlimit getrusage getttyent glob inet_aton inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty readpassphrase realpath rresvport_af setdtablesize setenv setegid seteuid setlogin setproctitle setresgid setreuid setrlimit setsid setvbuf sigaction sigvec snprintf strerror strlcat strlcpy strmode strsep sysconf tcgetpgrp utimes vsnprintf vhangup vis waitpid _getpty __b64_ntop)
Damien Millerad833b32000-08-23 10:46:23 +1000481dnl Checks for time functions
andre2ff7b5d2000-06-03 14:57:40 +0000482AC_CHECK_FUNCS(gettimeofday time)
Damien Millerad833b32000-08-23 10:46:23 +1000483dnl Checks for libutil functions
Ben Lindstrome2fb8d32000-12-28 00:07:07 +0000484AC_CHECK_HEADERS(libutil.h)
andre2ff7b5d2000-06-03 14:57:40 +0000485AC_CHECK_FUNCS(login logout updwtmp logwtmp)
Damien Millerad833b32000-08-23 10:46:23 +1000486dnl Checks for utmp functions
Ben Lindstrom2c467a22000-12-27 04:57:41 +0000487AC_CHECK_FUNCS(endutent getutent getutid getutline pututline setutent)
andre2ff7b5d2000-06-03 14:57:40 +0000488AC_CHECK_FUNCS(utmpname)
Damien Millerad833b32000-08-23 10:46:23 +1000489dnl Checks for utmpx functions
Ben Lindstrom2c467a22000-12-27 04:57:41 +0000490AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline pututxline )
andre2ff7b5d2000-06-03 14:57:40 +0000491AC_CHECK_FUNCS(setutxent utmpxname)
Damien Millercedfecc1999-11-15 14:36:53 +1100492
Damien Miller5fc85652000-07-09 23:53:07 +1000493AC_CHECK_FUNC(getuserattr,
494 [AC_DEFINE(HAVE_GETUSERATTR)],
495 [AC_CHECK_LIB(s, getuserattr, [LIBS="$LIBS -ls"; AC_DEFINE(HAVE_GETUSERATTR)])]
496)
497
Damien Miller04f80141999-11-19 15:32:34 +1100498AC_CHECK_FUNC(login,
499 [AC_DEFINE(HAVE_LOGIN)],
500 [AC_CHECK_LIB(bsd, login, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_LOGIN)])]
501)
502
503AC_CHECK_FUNC(daemon,
504 [AC_DEFINE(HAVE_DAEMON)],
505 [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
506)
507
Damien Miller9fb07e42000-03-05 16:22:59 +1100508AC_CHECK_FUNC(getpagesize,
509 [AC_DEFINE(HAVE_GETPAGESIZE)],
510 [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])]
511)
512
Damien Millercb170cb2000-07-01 16:52:55 +1000513# Check for broken snprintf
514if test "x$ac_cv_func_snprintf" = "xyes" ; then
515 AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
516 AC_TRY_RUN(
517 [
518#include <stdio.h>
519int main(void){char b[5];snprintf(b,5,"123456789");return(b[4]!='\0');}
520 ],
521 [AC_MSG_RESULT(yes)],
522 [
523 AC_MSG_RESULT(no)
524 AC_DEFINE(BROKEN_SNPRINTF)
525 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
526 ]
527 )
528fi
529
Damien Miller606f8802000-09-16 15:39:56 +1100530AC_FUNC_GETPGRP
531
Damien Millera64b57a2001-01-17 10:44:13 +1100532# Check for PAM libs
Damien Miller7b22d652000-06-18 14:07:04 +1000533PAM_MSG="no"
Damien Millera22ba012000-03-02 23:09:20 +1100534AC_ARG_WITH(pam,
Damien Millera64b57a2001-01-17 10:44:13 +1100535 [ --with-pam Enable PAM support ],
Damien Millera22ba012000-03-02 23:09:20 +1100536 [
Damien Millera64b57a2001-01-17 10:44:13 +1100537 if test "x$withval" != "xno" ; then
538 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" ; then
539 AC_MSG_ERROR([PAM headers not found])
540 fi
541
542 AC_CHECK_LIB(dl, dlopen, , )
543 AC_CHECK_LIB(pam, pam_set_item, , AC_MSG_ERROR([*** libpam missing]))
544 AC_CHECK_FUNCS(pam_getenvlist)
545
546 disable_shadow=yes
547 PAM_MSG="yes"
548
549 AC_DEFINE(USE_PAM)
Damien Millera22ba012000-03-02 23:09:20 +1100550 fi
551 ]
552)
Damien Millera22ba012000-03-02 23:09:20 +1100553
Damien Millera64b57a2001-01-17 10:44:13 +1100554# Check for older PAM
555if test "x$PAM_MSG" = "xyes" ; then
Damien Millera22ba012000-03-02 23:09:20 +1100556 # Check PAM strerror arguments (old PAM)
557 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
558 AC_TRY_COMPILE(
559 [
Damien Miller81171112000-04-23 11:14:01 +1000560#include <stdlib.h>
561#include <security/pam_appl.h>
Damien Millera22ba012000-03-02 23:09:20 +1100562 ],
563 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
564 [AC_MSG_RESULT(no)],
565 [
566 AC_DEFINE(HAVE_OLD_PAM)
567 AC_MSG_RESULT(yes)
Damien Miller7b22d652000-06-18 14:07:04 +1000568 PAM_MSG="yes (old library)"
Damien Millera22ba012000-03-02 23:09:20 +1100569 ]
Damien Millera64b57a2001-01-17 10:44:13 +1100570 )
Damien Millera22ba012000-03-02 23:09:20 +1100571fi
572
573# The big search for OpenSSL
574AC_ARG_WITH(ssl-dir,
575 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
576 [
Ben Lindstrom23e13712000-10-29 22:49:19 +0000577 if test "x$withval" != "xno" ; then
Damien Millera22ba012000-03-02 23:09:20 +1100578 tryssldir=$withval
579 fi
580 ]
581)
582
583saved_LIBS="$LIBS"
Damien Millera1ad4802000-03-15 10:04:54 +1100584saved_LDFLAGS="$LDFLAGS"
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000585saved_CPPFLAGS="$CPPFLAGS"
Damien Millera22ba012000-03-02 23:09:20 +1100586if test "x$prefix" != "xNONE" ; then
587 tryssldir="$tryssldir $prefix"
588fi
Damien Miller61e50f12000-05-08 20:49:37 +1000589AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [
Damien Millera1b61e12000-09-16 17:02:16 +1100590 for ssldir in $tryssldir "" /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
Damien Millerccdefb62001-02-19 12:56:39 +1100591 CPPFLAGS="$saved_CPPFLAGS"
592 LDFLAGS="$saved_LDFLAGS"
Damien Miller3b512e12000-05-17 23:29:18 +1000593 LIBS="$saved_LIBS -lcrypto"
Damien Millerccdefb62001-02-19 12:56:39 +1100594
595 # Skip directories if they don't exist
596 if test ! -z "$ssldir" -a ! -d "$ssldir" ; then
597 continue;
598 fi
599 if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then
600 # Try to use $ssldir/lib if it exists, otherwise
601 # $ssldir
602 if test -d "$ssldir/lib" ; then
Damien Millerb68af622001-03-28 21:05:26 +1000603 LDFLAGS="-L$ssldir/lib $saved_LDFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100604 if test ! -z "$need_dash_r" ; then
Damien Millerb68af622001-03-28 21:05:26 +1000605 LDFLAGS="-R$ssldir/lib $LDFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100606 fi
607 else
Damien Millerb68af622001-03-28 21:05:26 +1000608 LDFLAGS="-L$ssldir $saved_LDFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100609 if test ! -z "$need_dash_r" ; then
Damien Millerb68af622001-03-28 21:05:26 +1000610 LDFLAGS="-R$ssldir $LDFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100611 fi
612 fi
613 # Try to use $ssldir/include if it exists, otherwise
614 # $ssldir
615 if test -d "$ssldir/include" ; then
Damien Millerb68af622001-03-28 21:05:26 +1000616 CPPFLAGS="-I$ssldir/include $saved_CPPFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100617 else
Damien Millerb68af622001-03-28 21:05:26 +1000618 CPPFLAGS="-I$ssldir $saved_CPPFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100619 fi
620 fi
Damien Miller61e50f12000-05-08 20:49:37 +1000621
Damien Miller3b512e12000-05-17 23:29:18 +1000622 # Basic test to check for compatible version and correct linking
623 # *does not* test for RSA - that comes later.
624 AC_TRY_RUN(
625 [
Damien Millere59ce622000-05-01 20:54:17 +1000626#include <string.h>
627#include <openssl/rand.h>
Damien Miller81171112000-04-23 11:14:01 +1000628int main(void)
629{
Damien Miller3b512e12000-05-17 23:29:18 +1000630 char a[2048];
631 memset(a, 0, sizeof(a));
Damien Miller81171112000-04-23 11:14:01 +1000632 RAND_add(a, sizeof(a), sizeof(a));
Damien Miller3b512e12000-05-17 23:29:18 +1000633 return(RAND_status() <= 0);
Damien Miller81171112000-04-23 11:14:01 +1000634}
Damien Miller3b512e12000-05-17 23:29:18 +1000635 ],
636 [
637 found_crypto=1
638 break;
639 ], []
640 )
Damien Miller61e50f12000-05-08 20:49:37 +1000641
642 if test ! -z "$found_crypto" ; then
643 break;
644 fi
Damien Millerb85dcad2000-03-11 11:37:00 +1100645 done
646
Damien Miller61e50f12000-05-08 20:49:37 +1000647 if test -z "$found_crypto" ; then
Damien Miller5dfe9762001-02-16 12:05:39 +1100648 AC_MSG_ERROR([Could not find working OpenSSL library, please install or check config.log])
Damien Millerb85dcad2000-03-11 11:37:00 +1100649 fi
Damien Miller61e50f12000-05-08 20:49:37 +1000650 if test -z "$ssldir" ; then
651 ssldir="(system)"
652 fi
Damien Millera22ba012000-03-02 23:09:20 +1100653
Damien Miller61e50f12000-05-08 20:49:37 +1000654 ac_cv_openssldir=$ssldir
655])
656
Damien Milleredb82922000-06-20 13:25:52 +1000657if (test ! -z "$ac_cv_openssldir" && test "x$ac_cv_openssldir" != "x(system)") ; then
Damien Miller61e50f12000-05-08 20:49:37 +1000658 AC_DEFINE(HAVE_OPENSSL)
659 dnl Need to recover ssldir - test above runs in subshell
660 ssldir=$ac_cv_openssldir
Damien Millera64b57a2001-01-17 10:44:13 +1100661 if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then
Damien Millerccdefb62001-02-19 12:56:39 +1100662 # Try to use $ssldir/lib if it exists, otherwise
663 # $ssldir
664 if test -d "$ssldir/lib" ; then
Damien Millerb68af622001-03-28 21:05:26 +1000665 LDFLAGS="-L$ssldir/lib $saved_LDFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100666 if test ! -z "$need_dash_r" ; then
Damien Millerb68af622001-03-28 21:05:26 +1000667 LDFLAGS="-R$ssldir/lib $LDFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100668 fi
669 else
Damien Millerb68af622001-03-28 21:05:26 +1000670 LDFLAGS="-L$ssldir $saved_LDFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100671 if test ! -z "$need_dash_r" ; then
Damien Millerb68af622001-03-28 21:05:26 +1000672 LDFLAGS="-R$ssldir $LDFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100673 fi
Damien Millera64b57a2001-01-17 10:44:13 +1100674 fi
Damien Millerccdefb62001-02-19 12:56:39 +1100675 # Try to use $ssldir/include if it exists, otherwise
676 # $ssldir
677 if test -d "$ssldir/include" ; then
Damien Millerb68af622001-03-28 21:05:26 +1000678 CPPFLAGS="-I$ssldir/include $saved_CPPFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100679 else
Damien Millerb68af622001-03-28 21:05:26 +1000680 CPPFLAGS="-I$ssldir $saved_CPPFLAGS"
Damien Millera64b57a2001-01-17 10:44:13 +1100681 fi
Damien Miller29ea30d2000-03-17 10:54:15 +1100682 fi
Damien Millera22ba012000-03-02 23:09:20 +1100683fi
Damien Miller3b512e12000-05-17 23:29:18 +1000684LIBS="$saved_LIBS -lcrypto"
Damien Miller61e50f12000-05-08 20:49:37 +1000685
Damien Miller3b512e12000-05-17 23:29:18 +1000686# Now test RSA support
687saved_LIBS="$LIBS"
688AC_MSG_CHECKING([for RSA support])
689for WANTS_RSAREF in "" 1 ; do
690 if test -z "$WANTS_RSAREF" ; then
691 LIBS="$saved_LIBS"
692 else
693 LIBS="$saved_LIBS -lRSAglue -lrsaref"
694 fi
695 AC_TRY_RUN([
696#include <string.h>
697#include <openssl/rand.h>
698#include <openssl/rsa.h>
699#include <openssl/bn.h>
700#include <openssl/sha.h>
701int main(void)
702{
703 int num; RSA *key; static unsigned char p_in[] = "blahblah";
704 unsigned char c[256], p[256];
705 memset(c, 0, sizeof(c)); RAND_add(c, sizeof(c), sizeof(c));
706 if ((key=RSA_generate_key(512, 3, NULL, NULL))==NULL) return(1);
707 num = RSA_public_encrypt(sizeof(p_in) - 1, p_in, c, key, RSA_PKCS1_PADDING);
708 return(-1 == RSA_private_decrypt(num, c, p, key, RSA_PKCS1_PADDING));
709}
710 ],
711 [
712 rsa_works=1
713 break;
714 ], [])
715done
Ben Lindstrom23fec142001-06-09 02:16:28 +0000716LIBS="$saved_LIBS"
Damien Miller3b512e12000-05-17 23:29:18 +1000717
718if test ! -z "$no_rsa" ; then
719 AC_MSG_RESULT(disabled)
Damien Miller7b22d652000-06-18 14:07:04 +1000720 RSA_MSG="disabled"
Damien Miller3b512e12000-05-17 23:29:18 +1000721else
722 if test -z "$rsa_works" ; then
723 AC_MSG_WARN([*** No RSA support found *** ])
Damien Miller7b22d652000-06-18 14:07:04 +1000724 RSA_MSG="no"
Damien Miller3b512e12000-05-17 23:29:18 +1000725 else
726 if test -z "$WANTS_RSAREF" ; then
727 AC_MSG_RESULT(yes)
Damien Miller7b22d652000-06-18 14:07:04 +1000728 RSA_MSG="yes"
Damien Miller3b512e12000-05-17 23:29:18 +1000729 else
Damien Miller7b22d652000-06-18 14:07:04 +1000730 RSA_MSG="yes (using RSAref)"
Damien Miller3b512e12000-05-17 23:29:18 +1000731 AC_MSG_RESULT(using RSAref)
Ben Lindstrom23fec142001-06-09 02:16:28 +0000732 LIBS="$LIBS -lcrypto -lRSAglue -lrsaref"
Damien Miller3b512e12000-05-17 23:29:18 +1000733 fi
734 fi
735fi
Damien Millera22ba012000-03-02 23:09:20 +1100736
Damien Millera64b57a2001-01-17 10:44:13 +1100737# Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
738# version in OpenSSL. Skip this for PAM
739if test "x$PAM_MSG" = "xno" -a "x$check_for_libcrypt_later" = "x1"; then
Damien Miller95aa2d62001-03-01 09:16:11 +1100740 AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt")
Damien Millera64b57a2001-01-17 10:44:13 +1100741fi
742
Ben Lindstromb5628642000-10-18 00:02:25 +0000743# Cheap hack to ensure NEWS-OS libraries are arranged right.
744if test ! -z "$SONY" ; then
745 LIBS="$LIBS -liberty";
746fi
747
Damien Millera22ba012000-03-02 23:09:20 +1100748# Checks for data types
Damien Millere0f45742000-01-18 09:12:06 +1100749AC_CHECK_SIZEOF(char, 1)
Damien Millerc6398ef1999-11-20 12:18:40 +1100750AC_CHECK_SIZEOF(short int, 2)
751AC_CHECK_SIZEOF(int, 4)
752AC_CHECK_SIZEOF(long int, 4)
753AC_CHECK_SIZEOF(long long int, 8)
754
Damien Millera22ba012000-03-02 23:09:20 +1100755# More checks for data types
Damien Millercaf6dd62000-08-29 11:33:50 +1100756AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
757 AC_TRY_COMPILE(
758 [ #include <sys/types.h> ],
759 [ u_int a; a = 1;],
760 [ ac_cv_have_u_int="yes" ],
761 [ ac_cv_have_u_int="no" ]
762 )
763])
764if test "x$ac_cv_have_u_int" = "xyes" ; then
765 AC_DEFINE(HAVE_U_INT)
766 have_u_int=1
767fi
768
Damien Miller61e50f12000-05-08 20:49:37 +1000769AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
770 AC_TRY_COMPILE(
771 [ #include <sys/types.h> ],
772 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
773 [ ac_cv_have_intxx_t="yes" ],
774 [ ac_cv_have_intxx_t="no" ]
775 )
776])
777if test "x$ac_cv_have_intxx_t" = "xyes" ; then
778 AC_DEFINE(HAVE_INTXX_T)
779 have_intxx_t=1
780fi
Ben Lindstrom19d7b8d2001-08-16 00:09:49 +0000781
782if (test -z "$have_intxx_t" && \
783 test "x$ac_cv_header_stdint_h" = "xyes")
784then
785 AC_MSG_CHECKING([for intXX_t types in stdint.h])
786 AC_TRY_COMPILE(
787 [ #include <stdint.h> ],
788 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
789 [
790 AC_DEFINE(HAVE_INTXX_T)
791 AC_MSG_RESULT(yes)
792 ],
793 [ AC_MSG_RESULT(no) ]
794 )
795fi
796
Damien Miller578783e2000-09-23 14:12:24 +1100797AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
798 AC_TRY_COMPILE(
799 [ #include <sys/types.h> ],
800 [ int64_t a; a = 1;],
801 [ ac_cv_have_int64_t="yes" ],
802 [ ac_cv_have_int64_t="no" ]
803 )
804])
805if test "x$ac_cv_have_int64_t" = "xyes" ; then
806 AC_DEFINE(HAVE_INT64_T)
807 have_int64_t=1
808fi
809
Ben Lindstrom19d7b8d2001-08-16 00:09:49 +0000810if test -z "$have_int64_t" ; then
811 AC_MSG_CHECKING([for int64_t type in sys/socket.h])
812 AC_TRY_COMPILE(
813 [ #include <sys/socket.h> ],
814 [ int64_t a; a = 1],
815 [
816 AC_DEFINE(HAVE_INT64_T)
817 AC_MSG_RESULT(yes)
818 ],
819 [ AC_MSG_RESULT(no) ]
820 )
821fi
822
Damien Miller61e50f12000-05-08 20:49:37 +1000823AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
824 AC_TRY_COMPILE(
825 [ #include <sys/types.h> ],
826 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
827 [ ac_cv_have_u_intxx_t="yes" ],
828 [ ac_cv_have_u_intxx_t="no" ]
829 )
830])
831if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
832 AC_DEFINE(HAVE_U_INTXX_T)
833 have_u_intxx_t=1
834fi
Damien Millerc6398ef1999-11-20 12:18:40 +1100835
Ben Lindstrom19d7b8d2001-08-16 00:09:49 +0000836if test -z "$have_u_intxx_t" ; then
837 AC_MSG_CHECKING([for u_intXX_t types in sys/socket.h])
838 AC_TRY_COMPILE(
839 [ #include <sys/socket.h> ],
840 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
841 [
842 AC_DEFINE(HAVE_U_INTXX_T)
843 AC_MSG_RESULT(yes)
844 ],
845 [ AC_MSG_RESULT(no) ]
846 )
847fi
848
Damien Miller578783e2000-09-23 14:12:24 +1100849AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
850 AC_TRY_COMPILE(
851 [ #include <sys/types.h> ],
852 [ u_int64_t a; a = 1;],
853 [ ac_cv_have_u_int64_t="yes" ],
854 [ ac_cv_have_u_int64_t="no" ]
855 )
856])
857if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
858 AC_DEFINE(HAVE_U_INT64_T)
859 have_u_int64_t=1
860fi
861
Ben Lindstrom19d7b8d2001-08-16 00:09:49 +0000862if test -z "$have_u_intxx_t" ; then
863 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
864 AC_TRY_COMPILE(
865 [
866#include <sys/types.h>
867 ],
868 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
869 [ ac_cv_have_uintxx_t="yes" ],
870 [ ac_cv_have_uintxx_t="no" ]
871 )
872 ])
873 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
874 AC_DEFINE(HAVE_UINTXX_T)
875 fi
876fi
877
878if test -z "$have_uintxx_t" ; then
879 AC_MSG_CHECKING([for uintXX_t types in stdint.h])
880 AC_TRY_COMPILE(
881 [ #include <stdint.h> ],
882 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;],
883 [
884 AC_DEFINE(HAVE_UINTXX_T)
885 AC_MSG_RESULT(yes)
886 ],
887 [ AC_MSG_RESULT(no) ]
888 )
889fi
890
Damien Milleredb82922000-06-20 13:25:52 +1000891if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
892 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
Damien Millerb29ea912000-01-15 14:12:03 +1100893then
894 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
895 AC_TRY_COMPILE(
Damien Miller61e50f12000-05-08 20:49:37 +1000896 [
897#include <sys/bitypes.h>
898 ],
Damien Millerb29ea912000-01-15 14:12:03 +1100899 [
Damien Miller70494d12000-04-03 15:57:06 +1000900 int8_t a; int16_t b; int32_t c;
901 u_int8_t e; u_int16_t f; u_int32_t g;
902 a = b = c = e = f = g = 1;
Damien Millerb29ea912000-01-15 14:12:03 +1100903 ],
904 [
905 AC_DEFINE(HAVE_U_INTXX_T)
906 AC_DEFINE(HAVE_INTXX_T)
907 AC_MSG_RESULT(yes)
908 ],
909 [AC_MSG_RESULT(no)]
910 )
911fi
912
Damien Miller61e50f12000-05-08 20:49:37 +1000913AC_CACHE_CHECK([for socklen_t], ac_cv_have_socklen_t, [
914 AC_TRY_COMPILE(
915 [
Damien Miller81171112000-04-23 11:14:01 +1000916#include <sys/types.h>
917#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000918 ],
919 [socklen_t foo; foo = 1235;],
920 [ ac_cv_have_socklen_t="yes" ],
921 [ ac_cv_have_socklen_t="no" ]
922 )
923])
924if test "x$ac_cv_have_socklen_t" = "xyes" ; then
925 AC_DEFINE(HAVE_SOCKLEN_T)
926fi
Damien Miller74d0d4a1999-12-29 02:24:35 +1100927
Damien Miller61e50f12000-05-08 20:49:37 +1000928AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
929 AC_TRY_COMPILE(
930 [
931#include <sys/types.h>
932 ],
933 [ size_t foo; foo = 1235; ],
934 [ ac_cv_have_size_t="yes" ],
935 [ ac_cv_have_size_t="no" ]
936 )
937])
938if test "x$ac_cv_have_size_t" = "xyes" ; then
939 AC_DEFINE(HAVE_SIZE_T)
940fi
Damien Miller95058511999-12-29 10:36:45 +1100941
Damien Miller615f9392000-05-17 22:53:33 +1000942AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
943 AC_TRY_COMPILE(
944 [
945#include <sys/types.h>
946 ],
947 [ ssize_t foo; foo = 1235; ],
948 [ ac_cv_have_ssize_t="yes" ],
949 [ ac_cv_have_ssize_t="no" ]
950 )
951])
952if test "x$ac_cv_have_ssize_t" = "xyes" ; then
953 AC_DEFINE(HAVE_SSIZE_T)
954fi
955
Ben Lindstrom0d5af602001-01-09 00:50:29 +0000956AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [
957 AC_TRY_COMPILE(
958 [
959#include <time.h>
960 ],
961 [ clock_t foo; foo = 1235; ],
962 [ ac_cv_have_clock_t="yes" ],
963 [ ac_cv_have_clock_t="no" ]
964 )
965])
966if test "x$ac_cv_have_clock_t" = "xyes" ; then
967 AC_DEFINE(HAVE_CLOCK_T)
968fi
969
Damien Millerb54b40e2000-06-23 08:23:34 +1000970AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
971 AC_TRY_COMPILE(
972 [
973#include <sys/types.h>
974#include <sys/socket.h>
975 ],
976 [ sa_family_t foo; foo = 1235; ],
977 [ ac_cv_have_sa_family_t="yes" ],
Damien Miller78315eb2000-09-29 23:01:36 +1100978 [ AC_TRY_COMPILE(
979 [
980#include <sys/types.h>
981#include <sys/socket.h>
982#include <netinet/in.h>
983 ],
984 [ sa_family_t foo; foo = 1235; ],
985 [ ac_cv_have_sa_family_t="yes" ],
986
Damien Millerb54b40e2000-06-23 08:23:34 +1000987 [ ac_cv_have_sa_family_t="no" ]
Damien Miller78315eb2000-09-29 23:01:36 +1100988 )]
Damien Millerb54b40e2000-06-23 08:23:34 +1000989 )
990])
991if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
992 AC_DEFINE(HAVE_SA_FAMILY_T)
993fi
994
Damien Miller0f91b4e2000-06-18 15:43:25 +1000995AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
996 AC_TRY_COMPILE(
997 [
998#include <sys/types.h>
999 ],
1000 [ pid_t foo; foo = 1235; ],
1001 [ ac_cv_have_pid_t="yes" ],
1002 [ ac_cv_have_pid_t="no" ]
1003 )
1004])
1005if test "x$ac_cv_have_pid_t" = "xyes" ; then
1006 AC_DEFINE(HAVE_PID_T)
1007fi
1008
1009AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
1010 AC_TRY_COMPILE(
1011 [
1012#include <sys/types.h>
1013 ],
1014 [ mode_t foo; foo = 1235; ],
1015 [ ac_cv_have_mode_t="yes" ],
1016 [ ac_cv_have_mode_t="no" ]
1017 )
1018])
1019if test "x$ac_cv_have_mode_t" = "xyes" ; then
1020 AC_DEFINE(HAVE_MODE_T)
1021fi
1022
Damien Miller61e50f12000-05-08 20:49:37 +10001023
1024AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
1025 AC_TRY_COMPILE(
1026 [
Damien Miller81171112000-04-23 11:14:01 +10001027#include <sys/types.h>
1028#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +10001029 ],
1030 [ struct sockaddr_storage s; ],
1031 [ ac_cv_have_struct_sockaddr_storage="yes" ],
1032 [ ac_cv_have_struct_sockaddr_storage="no" ]
1033 )
1034])
1035if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
1036 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)
1037fi
Damien Miller34132e52000-01-14 15:45:46 +11001038
Damien Miller61e50f12000-05-08 20:49:37 +10001039AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
1040 AC_TRY_COMPILE(
1041 [
Damien Miller7b22d652000-06-18 14:07:04 +10001042#include <sys/types.h>
Damien Miller61e50f12000-05-08 20:49:37 +10001043#include <netinet/in.h>
1044 ],
1045 [ struct sockaddr_in6 s; s.sin6_family = 0; ],
1046 [ ac_cv_have_struct_sockaddr_in6="yes" ],
1047 [ ac_cv_have_struct_sockaddr_in6="no" ]
1048 )
1049])
1050if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
1051 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)
1052fi
Damien Miller34132e52000-01-14 15:45:46 +11001053
Damien Miller61e50f12000-05-08 20:49:37 +10001054AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
1055 AC_TRY_COMPILE(
1056 [
Damien Miller7b22d652000-06-18 14:07:04 +10001057#include <sys/types.h>
Damien Miller61e50f12000-05-08 20:49:37 +10001058#include <netinet/in.h>
1059 ],
1060 [ struct in6_addr s; s.s6_addr[0] = 0; ],
1061 [ ac_cv_have_struct_in6_addr="yes" ],
1062 [ ac_cv_have_struct_in6_addr="no" ]
1063 )
1064])
1065if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
1066 AC_DEFINE(HAVE_STRUCT_IN6_ADDR)
1067fi
Damien Miller34132e52000-01-14 15:45:46 +11001068
Damien Miller61e50f12000-05-08 20:49:37 +10001069AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
1070 AC_TRY_COMPILE(
1071 [
Damien Miller81171112000-04-23 11:14:01 +10001072#include <sys/types.h>
1073#include <sys/socket.h>
1074#include <netdb.h>
Damien Miller61e50f12000-05-08 20:49:37 +10001075 ],
1076 [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ],
1077 [ ac_cv_have_struct_addrinfo="yes" ],
1078 [ ac_cv_have_struct_addrinfo="no" ]
1079 )
1080])
1081if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
1082 AC_DEFINE(HAVE_STRUCT_ADDRINFO)
1083fi
1084
Ben Lindstrom42202bc2001-01-15 02:34:37 +00001085AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [
1086 AC_TRY_COMPILE(
1087 [ #include <sys/time.h> ],
1088 [ struct timeval tv; tv.tv_sec = 1;],
1089 [ ac_cv_have_struct_timeval="yes" ],
1090 [ ac_cv_have_struct_timeval="no" ]
1091 )
1092])
1093if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
1094 AC_DEFINE(HAVE_STRUCT_TIMEVAL)
1095 have_struct_timeval=1
1096fi
1097
Ben Lindstrom3ad650a2001-01-03 06:02:51 +00001098# If we don't have int64_t then we can't compile sftp-server. So don't
1099# even attempt to do it.
1100if test "x$ac_cv_have_int64_t" = "xno" -a \
1101 "x$ac_cv_sizeof_long_int" != "x8" -a \
1102 "x$ac_cv_sizeof_long_long_int" = "x0" ; then
1103 NO_SFTP='#'
Tim Ricebee3f222001-03-11 17:32:12 -08001104else
1105dnl test snprintf (broken on SCO w/gcc)
1106 AC_TRY_RUN(
1107 [
1108#include <stdio.h>
1109#include <string.h>
1110#ifdef HAVE_SNPRINTF
1111main()
1112{
1113 char buf[50];
1114 char expected_out[50];
1115 int mazsize = 50 ;
1116#if (SIZEOF_LONG_INT == 8)
1117 long int num = 0x7fffffffffffffff;
1118#else
Kevin Steves6482ec82001-07-15 02:09:28 +00001119 long long num = 0x7fffffffffffffffll;
Tim Ricebee3f222001-03-11 17:32:12 -08001120#endif
1121 strcpy(expected_out, "9223372036854775807");
1122 snprintf(buf, mazsize, "%lld", num);
1123 if(strcmp(buf, expected_out) != 0)
1124 exit(1);
1125 exit(0);
1126}
1127#else
1128main() { exit(0); }
1129#endif
1130 ], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ]
1131 )
Ben Lindstrom3ad650a2001-01-03 06:02:51 +00001132fi
Ben Lindstrom42202bc2001-01-15 02:34:37 +00001133AC_SUBST(NO_SFTP)
Ben Lindstrom3ad650a2001-01-03 06:02:51 +00001134
Damien Miller78315eb2000-09-29 23:01:36 +11001135dnl Checks for structure members
Damien Miller61e50f12000-05-08 20:49:37 +10001136OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
1137OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX)
1138OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX)
1139OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP)
1140OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP)
Damien Millerad1bc5f2000-05-20 14:53:09 +10001141OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX)
Damien Miller61e50f12000-05-08 20:49:37 +10001142OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP)
1143OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP)
Damien Miller8e81ed32000-07-01 13:17:42 +10001144OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmpx.h, HAVE_ID_IN_UTMPX)
Damien Miller61e50f12000-05-08 20:49:37 +10001145OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP)
1146OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX)
1147OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP)
1148OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX)
andre2ff7b5d2000-06-03 14:57:40 +00001149OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP)
1150OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP)
1151OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX)
1152OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX)
Damien Miller78315eb2000-09-29 23:01:36 +11001153AC_STRUCT_ST_BLKSIZE
andre2ff7b5d2000-06-03 14:57:40 +00001154
Damien Miller942da032000-08-18 13:59:06 +10001155AC_CACHE_CHECK([for sun_len field in struct sockaddr_un],
1156 ac_cv_have_sun_len_in_struct_sockaddr_un, [
1157 AC_TRY_COMPILE(
1158 [
1159#include <sys/types.h>
1160#include <sys/socket.h>
1161 ],
1162 [ struct sockaddr_un s; s.sun_len = 1; ],
1163 [ ac_cv_have_sun_len_in_struct_sockaddr_un="yes" ],
1164 [ ac_cv_have_sun_len_in_struct_sockaddr_un="no" ],
1165 )
1166])
1167if test "x$ac_cv_have_sun_len_in_struct_sockaddr_un" = "xyes" ; then
1168 AC_DEFINE(HAVE_SUN_LEN_IN_SOCKADDR_UN)
1169fi
1170
Damien Miller61e50f12000-05-08 20:49:37 +10001171AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
1172 ac_cv_have_ss_family_in_struct_ss, [
1173 AC_TRY_COMPILE(
1174 [
Damien Miller81171112000-04-23 11:14:01 +10001175#include <sys/types.h>
1176#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +10001177 ],
1178 [ struct sockaddr_storage s; s.ss_family = 1; ],
1179 [ ac_cv_have_ss_family_in_struct_ss="yes" ],
1180 [ ac_cv_have_ss_family_in_struct_ss="no" ],
1181 )
1182])
1183if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
1184 AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
1185fi
1186
Damien Miller61e50f12000-05-08 20:49:37 +10001187AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
1188 ac_cv_have___ss_family_in_struct_ss, [
1189 AC_TRY_COMPILE(
1190 [
Damien Miller81171112000-04-23 11:14:01 +10001191#include <sys/types.h>
1192#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +10001193 ],
1194 [ struct sockaddr_storage s; s.__ss_family = 1; ],
1195 [ ac_cv_have___ss_family_in_struct_ss="yes" ],
1196 [ ac_cv_have___ss_family_in_struct_ss="no" ]
1197 )
1198])
1199if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
1200 AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
1201fi
Damien Millerbf1c9b21999-12-09 10:16:54 +11001202
Damien Millerad833b32000-08-23 10:46:23 +10001203AC_CACHE_CHECK([for pw_class field in struct passwd],
1204 ac_cv_have_pw_class_in_struct_passwd, [
1205 AC_TRY_COMPILE(
1206 [
Damien Millerad833b32000-08-23 10:46:23 +10001207#include <pwd.h>
1208 ],
Kevin Steves48b7cc02000-10-07 13:24:00 +00001209 [ struct passwd p; p.pw_class = 0; ],
Damien Millerad833b32000-08-23 10:46:23 +10001210 [ ac_cv_have_pw_class_in_struct_passwd="yes" ],
1211 [ ac_cv_have_pw_class_in_struct_passwd="no" ]
1212 )
1213])
1214if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
1215 AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD)
1216fi
1217
Kevin Steves82456952001-06-22 21:14:18 +00001218AC_CACHE_CHECK([for pw_expire field in struct passwd],
1219 ac_cv_have_pw_expire_in_struct_passwd, [
1220 AC_TRY_COMPILE(
1221 [
1222#include <pwd.h>
1223 ],
1224 [ struct passwd p; p.pw_expire = 0; ],
1225 [ ac_cv_have_pw_expire_in_struct_passwd="yes" ],
1226 [ ac_cv_have_pw_expire_in_struct_passwd="no" ]
1227 )
1228])
1229if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then
1230 AC_DEFINE(HAVE_PW_EXPIRE_IN_PASSWD)
1231fi
1232
1233AC_CACHE_CHECK([for pw_change field in struct passwd],
1234 ac_cv_have_pw_change_in_struct_passwd, [
1235 AC_TRY_COMPILE(
1236 [
1237#include <pwd.h>
1238 ],
1239 [ struct passwd p; p.pw_change = 0; ],
1240 [ ac_cv_have_pw_change_in_struct_passwd="yes" ],
1241 [ ac_cv_have_pw_change_in_struct_passwd="no" ]
1242 )
1243])
1244if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then
1245 AC_DEFINE(HAVE_PW_CHANGE_IN_PASSWD)
1246fi
Damien Miller61e50f12000-05-08 20:49:37 +10001247
1248AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
1249 AC_TRY_LINK([],
1250 [ extern char *__progname; printf("%s", __progname); ],
1251 [ ac_cv_libc_defines___progname="yes" ],
1252 [ ac_cv_libc_defines___progname="no" ]
1253 )
1254])
1255if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
1256 AC_DEFINE(HAVE___PROGNAME)
1257fi
1258
Damien Miller4f8e6692001-07-14 13:22:53 +10001259AC_CACHE_CHECK([whether getopt has optreset support],
1260 ac_cv_have_getopt_optreset, [
1261 AC_TRY_LINK(
1262 [
1263#include <getopt.h>
1264 ],
1265 [ extern int optreset; optreset = 0; ],
1266 [ ac_cv_have_getopt_optreset="yes" ],
1267 [ ac_cv_have_getopt_optreset="no" ]
1268 )
1269])
1270if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
1271 AC_DEFINE(HAVE_GETOPT_OPTRESET)
1272fi
Damien Millera22ba012000-03-02 23:09:20 +11001273
Damien Millerecbb26d2000-07-15 14:59:14 +10001274AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
1275 AC_TRY_LINK([],
1276 [ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);],
1277 [ ac_cv_libc_defines_sys_errlist="yes" ],
1278 [ ac_cv_libc_defines_sys_errlist="no" ]
1279 )
1280])
1281if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
1282 AC_DEFINE(HAVE_SYS_ERRLIST)
1283fi
1284
1285
Damien Miller11fa2cc2000-08-16 10:35:58 +10001286AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [
1287 AC_TRY_LINK([],
1288 [ extern int sys_nerr; printf("%i", sys_nerr);],
1289 [ ac_cv_libc_defines_sys_nerr="yes" ],
1290 [ ac_cv_libc_defines_sys_nerr="no" ]
1291 )
1292])
1293if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
1294 AC_DEFINE(HAVE_SYS_NERR)
1295fi
1296
1297
Damien Millerc79bc0d2001-03-28 13:03:42 +10001298# Check whether user wants Kerberos support
1299KRB4_MSG="no"
1300AC_ARG_WITH(kerberos4,
1301 [ --with-kerberos4=PATH Enable Kerberos 4 support],
1302 [
1303 if test "x$withval" != "xno" ; then
1304
1305 if test "x$withval" != "xyes" ; then
1306 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1307 LDFLAGS="$LDFLAGS -L${withval}/lib"
1308 if test ! -z "$need_dash_r" ; then
1309 LDFLAGS="$LDFLAGS -R${withval}/lib"
1310 fi
1311 if test ! -z "$blibpath" ; then
1312 blibpath="$blibpath:${withval}/lib"
1313 fi
1314 else
1315 if test -d /usr/include/kerberosIV ; then
1316 CPPFLAGS="$CPPFLAGS -I/usr/include/kerberosIV"
1317 fi
1318 fi
1319
1320 AC_CHECK_HEADERS(krb.h)
Damien Millerc79bc0d2001-03-28 13:03:42 +10001321 if test "$ac_cv_header_krb_h" != yes; then
1322 AC_MSG_WARN([Cannot find krb.h, build may fail])
1323 fi
Damien Miller98344742001-03-28 14:37:06 +10001324 AC_CHECK_LIB(krb, main)
Damien Millerc79bc0d2001-03-28 13:03:42 +10001325 if test "$ac_cv_lib_krb_main" != yes; then
Damien Miller98344742001-03-28 14:37:06 +10001326 AC_CHECK_LIB(krb4, main)
1327 if test "$ac_cv_lib_krb4_main" != yes; then
1328 AC_MSG_WARN([Cannot find libkrb nor libkrb4, build may fail])
1329 else
1330 KLIBS="-lkrb4"
1331 fi
1332 else
1333 KLIBS="-lkrb"
Damien Millerc79bc0d2001-03-28 13:03:42 +10001334 fi
Damien Miller98344742001-03-28 14:37:06 +10001335 AC_CHECK_LIB(des, des_cbc_encrypt)
1336 if test "$ac_cv_lib_des_des_cbc_encrypt" != yes; then
1337 AC_CHECK_LIB(des425, des_cbc_encrypt)
1338 if test "$ac_cv_lib_des425_des_cbc_encrypt" != yes; then
1339 AC_MSG_WARN([Cannot find libdes nor libdes425, build may fail])
1340 else
1341 KLIBS="-ldes425"
1342 fi
1343 else
1344 KLIBS="-ldes"
1345 fi
Damien Millerc79bc0d2001-03-28 13:03:42 +10001346 AC_CHECK_LIB(resolv, dn_expand, , )
1347 KRB4=yes
1348 KRB4_MSG="yes"
1349 AC_DEFINE(KRB4)
1350 fi
1351 ]
1352)
1353
1354# Check whether user wants AFS support
1355AFS_MSG="no"
1356AC_ARG_WITH(afs,
1357 [ --with-afs=PATH Enable AFS support],
1358 [
1359 if test "x$withval" != "xno" ; then
1360
1361 if test "x$withval" != "xyes" ; then
1362 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1363 LDFLAGS="$LDFLAGS -L${withval}/lib"
1364 fi
1365
1366 if test -z "$KRB4" ; then
1367 AC_MSG_WARN([AFS requires Kerberos IV support, build may fail])
1368 fi
1369
1370 LIBS="-lkafs $LIBS"
1371 if test ! -z "$AFS_LIBS" ; then
1372 LIBS="$LIBS $AFS_LIBS"
1373 fi
1374 AC_DEFINE(AFS)
1375 AFS_MSG="yes"
1376 fi
1377 ]
1378)
1379LIBS="$LIBS $KLIBS"
1380
Damien Millera22ba012000-03-02 23:09:20 +11001381# Looking for programs, paths and files
1382AC_ARG_WITH(rsh,
1383 [ --with-rsh=PATH Specify path to remote shell program ],
1384 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001385 if test "x$withval" != "$no" ; then
Damien Miller90dcc052000-07-08 10:17:40 +10001386 rsh_path=$withval
Damien Millera22ba012000-03-02 23:09:20 +11001387 fi
1388 ],
1389 [
1390 AC_PATH_PROG(rsh_path, rsh)
1391 ]
1392)
1393
1394AC_ARG_WITH(xauth,
1395 [ --with-xauth=PATH Specify path to xauth program ],
1396 [
Ben Lindstrom76020ba2000-10-25 16:55:00 +00001397 if test "x$withval" != "xno" ; then
Damien Miller7b22d652000-06-18 14:07:04 +10001398 xauth_path=$withval
Damien Millera22ba012000-03-02 23:09:20 +11001399 fi
1400 ],
1401 [
Damien Miller78315eb2000-09-29 23:01:36 +11001402 AC_PATH_PROG(xauth_path, xauth,,$PATH:/usr/X/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/openwin/bin)
Damien Milleredb82922000-06-20 13:25:52 +10001403 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
Damien Millera22ba012000-03-02 23:09:20 +11001404 xauth_path="/usr/openwin/bin/xauth"
1405 fi
1406 ]
1407)
1408
Damien Millera19cf472000-11-29 13:28:50 +11001409if test -z "$xauth_path" ; then
1410 XAUTH_PATH="undefined"
1411 AC_SUBST(XAUTH_PATH)
1412else
Damien Millera22ba012000-03-02 23:09:20 +11001413 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
Damien Millera19cf472000-11-29 13:28:50 +11001414 XAUTH_PATH=$xauth_path
1415 AC_SUBST(XAUTH_PATH)
Damien Millera22ba012000-03-02 23:09:20 +11001416fi
1417if test ! -z "$rsh_path" ; then
1418 AC_DEFINE_UNQUOTED(RSH_PATH, "$rsh_path")
1419fi
1420
1421# Check for mail directory (last resort if we cannot get it from headers)
1422if test ! -z "$MAIL" ; then
1423 maildir=`dirname $MAIL`
1424 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
1425fi
1426
Damien Millera22ba012000-03-02 23:09:20 +11001427if test -z "$no_dev_ptmx" ; then
Damien Miller204ad072000-03-02 23:56:12 +11001428 AC_CHECK_FILE("/dev/ptmx",
1429 [
1430 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
1431 have_dev_ptmx=1
1432 ]
1433 )
Damien Millera22ba012000-03-02 23:09:20 +11001434fi
Damien Miller204ad072000-03-02 23:56:12 +11001435AC_CHECK_FILE("/dev/ptc",
1436 [
1437 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
1438 have_dev_ptc=1
1439 ]
1440)
1441
Damien Millera22ba012000-03-02 23:09:20 +11001442# Options from here on. Some of these are preset by platform above
1443
Damien Millera22ba012000-03-02 23:09:20 +11001444# Check for user-specified random device, otherwise check /dev/urandom
1445AC_ARG_WITH(random,
Damien Miller0736c4d2001-01-25 10:51:46 +11001446 [ --with-random=FILE read entropy from FILE (default=/dev/urandom)],
Damien Millera22ba012000-03-02 23:09:20 +11001447 [
Damien Miller040f3832000-04-03 14:50:43 +10001448 if test "x$withval" != "xno" ; then
1449 RANDOM_POOL="$withval";
1450 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
1451 fi
Damien Millera22ba012000-03-02 23:09:20 +11001452 ],
1453 [
1454 # Check for random device
1455 AC_CHECK_FILE("/dev/urandom",
1456 [
1457 RANDOM_POOL="/dev/urandom";
1458 AC_SUBST(RANDOM_POOL)
1459 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
1460 ]
1461 )
1462 ]
1463)
1464
Damien Millerd0ccb982001-03-04 00:29:20 +11001465# Check for PRNGD/EGD pool file
1466AC_ARG_WITH(prngd-port,
1467 [ --with-prngd-port=PORT read entropy from PRNGD/EGD localhost:PORT],
1468 [
1469 if test ! -z "$withval" -a "x$withval" != "xno" ; then
1470 PRNGD_PORT="$withval"
1471 AC_DEFINE_UNQUOTED(PRNGD_PORT, $PRNGD_PORT)
1472 fi
1473 ]
1474)
1475
1476# Check for PRNGD/EGD pool file
1477AC_ARG_WITH(prngd-socket,
1478 [ --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)],
Damien Millera22ba012000-03-02 23:09:20 +11001479 [
Damien Miller040f3832000-04-03 14:50:43 +10001480 if test "x$withval" != "xno" ; then
Damien Millerd0ccb982001-03-04 00:29:20 +11001481 PRNGD_SOCKET="$withval"
1482 AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET")
Damien Miller040f3832000-04-03 14:50:43 +10001483 fi
Damien Miller0736c4d2001-01-25 10:51:46 +11001484 ],
1485 [
1486 # Check for existing socket only if we don't have a random device already
1487 if test -z "$RANDOM_POOL" ; then
1488 AC_MSG_CHECKING(for PRNGD/EGD socket)
1489 # Insert other locations here
Tim Ricebee3f222001-03-11 17:32:12 -08001490 for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
Damien Millerd0ccb982001-03-04 00:29:20 +11001491 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
1492 PRNGD_SOCKET="$sock"
1493 AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET")
Damien Miller0736c4d2001-01-25 10:51:46 +11001494 break;
1495 fi
1496 done
Damien Millerd0ccb982001-03-04 00:29:20 +11001497 if test ! -z "$PRNGD_SOCKET" ; then
1498 AC_MSG_RESULT($PRNGD_SOCKET)
Damien Miller4864e8f2001-02-08 10:07:08 +11001499 else
1500 AC_MSG_RESULT(not found)
1501 fi
Damien Miller0736c4d2001-01-25 10:51:46 +11001502 fi
Damien Millera22ba012000-03-02 23:09:20 +11001503 ]
1504)
1505
Damien Miller0736c4d2001-01-25 10:51:46 +11001506
Damien Miller0437b332000-05-02 09:56:41 +10001507# detect pathnames for entropy gathering commands, if we need them
1508INSTALL_SSH_PRNG_CMDS=""
1509rm -f prng_commands
Damien Millerd0ccb982001-03-04 00:29:20 +11001510if (test -z "$RANDOM_POOL" && test -z "$PRNGD") ; then
Damien Miller11e37f62000-04-08 18:23:30 +10001511 # Use these commands to collect entropy
Damien Miller61e50f12000-05-08 20:49:37 +10001512 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
1513 OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
1514 OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
1515 OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
Ben Lindstromd9e08242001-07-22 19:32:00 +00001516 OSSH_PATH_ENTROPY_PROG(PROG_JSTAT, jstat)
Damien Miller61e50f12000-05-08 20:49:37 +10001517 OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
Ben Lindstrom6db66ff2001-08-06 23:29:16 +00001518 OSSH_PATH_ENTROPY_PROG(PROG_SAR, sar)
Damien Miller61e50f12000-05-08 20:49:37 +10001519 OSSH_PATH_ENTROPY_PROG(PROG_W, w)
1520 OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
1521 OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
1522 OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
1523 OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
1524 OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
1525 OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
1526 OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
1527 OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
Damien Miller0437b332000-05-02 09:56:41 +10001528
1529 INSTALL_SSH_PRNG_CMDS="yes"
Damien Miller11e37f62000-04-08 18:23:30 +10001530fi
Damien Miller0437b332000-05-02 09:56:41 +10001531AC_SUBST(INSTALL_SSH_PRNG_CMDS)
1532
Damien Miller11e37f62000-04-08 18:23:30 +10001533
Ben Lindstrom9841b0a2001-06-09 02:26:58 +00001534AC_ARG_WITH(mantype,
Damien Miller897741e2001-04-16 10:41:46 +10001535 [ --with-mantype=man|cat|doc Set man page type],
Damien Miller670a4b82000-01-22 13:53:11 +11001536 [
Damien Miller897741e2001-04-16 10:41:46 +10001537 case "$withval" in
1538 man|cat|doc)
1539 MANTYPE=$withval
1540 ;;
1541 *)
1542 AC_MSG_ERROR(invalid man type: $withval)
1543 ;;
1544 esac
Damien Miller670a4b82000-01-22 13:53:11 +11001545 ]
1546)
Ben Lindstrombc709922001-04-18 18:04:21 +00001547if test -z "$MANTYPE"; then
Tim Rice07183b82001-04-25 21:40:28 -07001548 AC_PATH_PROGS(NROFF, nroff awf, /bin/false, /usr/bin:/usr/ucb)
Ben Lindstrombc709922001-04-18 18:04:21 +00001549 if ${NROFF} -mdoc ${srcdir}/ssh.1 >/dev/null 2>&1; then
1550 MANTYPE=doc
1551 elif ${NROFF} -man ${srcdir}/ssh.1 >/dev/null 2>&1; then
1552 MANTYPE=man
1553 else
1554 MANTYPE=cat
1555 fi
1556fi
Damien Miller670a4b82000-01-22 13:53:11 +11001557AC_SUBST(MANTYPE)
Ben Lindstrombc709922001-04-18 18:04:21 +00001558if test "$MANTYPE" = "doc"; then
1559 mansubdir=man;
1560else
1561 mansubdir=$MANTYPE;
1562fi
1563AC_SUBST(mansubdir)
Damien Miller8bdeee21999-12-30 15:50:54 +11001564
Damien Millera22ba012000-03-02 23:09:20 +11001565# Check whether to enable MD5 passwords
Damien Miller7b22d652000-06-18 14:07:04 +10001566MD5_MSG="no"
Damien Millerf7c0f821999-11-22 22:31:49 +11001567AC_ARG_WITH(md5-passwords,
Damien Millerdd1c7ba1999-11-19 15:53:20 +11001568 [ --with-md5-passwords Enable use of MD5 passwords],
Damien Miller8bdeee21999-12-30 15:50:54 +11001569 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001570 if test "x$withval" != "xno" ; then
Damien Miller8bdeee21999-12-30 15:50:54 +11001571 AC_DEFINE(HAVE_MD5_PASSWORDS)
Damien Miller7b22d652000-06-18 14:07:04 +10001572 MD5_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +11001573 fi
1574 ]
Damien Millerdd1c7ba1999-11-19 15:53:20 +11001575)
1576
Damien Millera22ba012000-03-02 23:09:20 +11001577# Whether to disable shadow password support
Damien Miller76112de1999-12-21 11:18:08 +11001578AC_ARG_WITH(shadow,
1579 [ --without-shadow Disable shadow password support],
1580 [
1581 if test "x$withval" = "xno" ; then
1582 AC_DEFINE(DISABLE_SHADOW)
Damien Miller1f335fb2000-06-26 11:31:33 +10001583 disable_shadow=yes
Damien Miller76112de1999-12-21 11:18:08 +11001584 fi
1585 ]
1586)
1587
Damien Miller1f335fb2000-06-26 11:31:33 +10001588if test -z "$disable_shadow" ; then
1589 AC_MSG_CHECKING([if the systems has expire shadow information])
1590 AC_TRY_COMPILE(
1591 [
1592#include <sys/types.h>
1593#include <shadow.h>
1594 struct spwd sp;
1595 ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ],
1596 [ sp_expire_available=yes ], []
1597 )
1598
1599 if test "x$sp_expire_available" = "xyes" ; then
1600 AC_MSG_RESULT(yes)
1601 AC_DEFINE(HAS_SHADOW_EXPIRE)
1602 else
1603 AC_MSG_RESULT(no)
1604 fi
1605fi
1606
Damien Millera22ba012000-03-02 23:09:20 +11001607# Use ip address instead of hostname in $DISPLAY
Damien Miller9a947342000-08-30 10:03:33 +11001608if test ! -z "$IPADDR_IN_DISPLAY" ; then
1609 DISPLAY_HACK_MSG="yes"
1610 AC_DEFINE(IPADDR_IN_DISPLAY)
1611else
1612 DISPLAY_HACK_MSG="no"
1613 AC_ARG_WITH(ipaddr-display,
1614 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
1615 [
1616 if test "x$withval" != "xno" ; then
1617 AC_DEFINE(IPADDR_IN_DISPLAY)
1618 DISPLAY_HACK_MSG="yes"
1619 fi
1620 ]
1621 )
1622fi
Damien Miller76112de1999-12-21 11:18:08 +11001623
Damien Millera22ba012000-03-02 23:09:20 +11001624# Whether to mess with the default path
Damien Miller7b22d652000-06-18 14:07:04 +10001625SERVER_PATH_MSG="(default)"
Damien Millere7f626c1999-12-31 09:49:44 +11001626AC_ARG_WITH(default-path,
Damien Miller5a3e6831999-12-27 09:48:56 +11001627 [ --with-default-path=PATH Specify default \$PATH environment for server],
1628 [
1629 if test "x$withval" != "xno" ; then
Tim Rice59ea0a02001-03-10 13:50:45 -08001630 user_path="$withval"
Damien Miller7b22d652000-06-18 14:07:04 +10001631 SERVER_PATH_MSG="$withval"
Damien Miller5a3e6831999-12-27 09:48:56 +11001632 fi
Tim Rice59ea0a02001-03-10 13:50:45 -08001633 ],
1634 [
1635 AC_TRY_RUN(
1636 [
1637/* find out what STDPATH is */
1638#include <stdio.h>
Tim Rice59ea0a02001-03-10 13:50:45 -08001639#ifdef HAVE_PATHS_H
1640# include <paths.h>
1641#endif
1642#ifndef _PATH_STDPATH
1643# define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
1644#endif
1645#include <sys/types.h>
1646#include <sys/stat.h>
1647#include <fcntl.h>
1648#define DATA "conftest.stdpath"
1649
1650main()
1651{
1652 FILE *fd;
1653 int rc;
1654
1655 fd = fopen(DATA,"w");
1656 if(fd == NULL)
1657 exit(1);
1658
1659 if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0)
1660 exit(1);
1661
1662 exit(0);
1663}
1664 ], [ user_path=`cat conftest.stdpath` ],
1665 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ],
1666 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ]
1667 )
1668# make sure $bindir is in USER_PATH so scp will work
1669 t_bindir=`eval echo ${bindir}`
1670 case $t_bindir in
1671 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$prefix~"` ;;
1672 esac
1673 case $t_bindir in
1674 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$ac_default_prefix~"` ;;
1675 esac
1676 echo $user_path | grep ":$t_bindir" > /dev/null 2>&1
1677 if test $? -ne 0 ; then
1678 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1
1679 if test $? -ne 0 ; then
1680 user_path=$user_path:$t_bindir
1681 AC_MSG_RESULT(Adding $t_bindir to USER_PATH so scp will work)
1682 fi
1683 fi
Damien Miller5a3e6831999-12-27 09:48:56 +11001684 ]
1685)
Tim Rice59ea0a02001-03-10 13:50:45 -08001686AC_DEFINE_UNQUOTED(USER_PATH, "$user_path")
1687AC_SUBST(user_path)
Damien Miller5a3e6831999-12-27 09:48:56 +11001688
Damien Millera22ba012000-03-02 23:09:20 +11001689# Whether to force IPv4 by default (needed on broken glibc Linux)
Damien Miller7b22d652000-06-18 14:07:04 +10001690IPV4_HACK_MSG="no"
Damien Miller7d80e342000-01-19 14:36:49 +11001691AC_ARG_WITH(ipv4-default,
1692 [ --with-ipv4-default Use IPv4 by connections unless '-6' specified],
1693 [
1694 if test "x$withval" != "xno" ; then
1695 AC_DEFINE(IPV4_DEFAULT)
Damien Miller7b22d652000-06-18 14:07:04 +10001696 IPV4_HACK_MSG="yes"
Damien Miller7d80e342000-01-19 14:36:49 +11001697 fi
1698 ]
1699)
1700
Damien Miller61e50f12000-05-08 20:49:37 +10001701AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
Damien Miller7b22d652000-06-18 14:07:04 +10001702IPV4_IN6_HACK_MSG="no"
Damien Miller7bcb0892000-03-11 20:45:40 +11001703AC_ARG_WITH(4in6,
1704 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
1705 [
1706 if test "x$withval" != "xno" ; then
1707 AC_MSG_RESULT(yes)
1708 AC_DEFINE(IPV4_IN_IPV6)
Damien Miller7b22d652000-06-18 14:07:04 +10001709 IPV4_IN6_HACK_MSG="yes"
Damien Miller7bcb0892000-03-11 20:45:40 +11001710 else
1711 AC_MSG_RESULT(no)
1712 fi
1713 ],[
1714 if test "x$inet6_default_4in6" = "xyes"; then
1715 AC_MSG_RESULT([yes (default)])
1716 AC_DEFINE(IPV4_IN_IPV6)
Damien Miller7b22d652000-06-18 14:07:04 +10001717 IPV4_IN6_HACK_MSG="yes"
Damien Miller7bcb0892000-03-11 20:45:40 +11001718 else
1719 AC_MSG_RESULT([no (default)])
1720 fi
1721 ]
1722)
1723
Damien Miller60396b02001-02-18 17:01:00 +11001724# Whether to enable BSD auth support
1725AC_ARG_WITH(bsd-auth,
1726 [ --with-bsd-auth Enable BSD auth support],
1727 [
1728 if test "x$withval" != "xno" ; then
1729 AC_DEFINE(BSD_AUTH)
1730 bsd_auth=yes
1731 fi
1732 ]
1733)
1734
Damien Miller78315eb2000-09-29 23:01:36 +11001735AC_MSG_CHECKING(whether to install ssh as suid root)
1736AC_ARG_ENABLE(suid-ssh,
1737[ --enable-suid-ssh Install ssh as suid root (default)
1738 --disable-suid-ssh Install ssh without suid bit],
1739[ case "$enableval" in
1740 no)
1741 AC_MSG_RESULT(no)
1742 SSHMODE=0711
1743 ;;
1744 *) AC_MSG_RESULT(yes)
Ben Lindstrom8e2aa5b2001-07-24 17:00:13 +00001745 SSHMODE=4711
Damien Miller78315eb2000-09-29 23:01:36 +11001746 ;;
1747 esac ],
1748 AC_MSG_RESULT(yes)
Ben Lindstrom8e2aa5b2001-07-24 17:00:13 +00001749 SSHMODE=4711
Damien Miller78315eb2000-09-29 23:01:36 +11001750)
1751AC_SUBST(SSHMODE)
1752
1753
Damien Millera22ba012000-03-02 23:09:20 +11001754# Where to place sshd.pid
Damien Millerb13c73e2000-01-17 22:02:17 +11001755piddir=/var/run
Damien Miller5eed6a22000-01-16 12:05:18 +11001756AC_ARG_WITH(pid-dir,
1757 [ --with-pid-dir=PATH Specify location of ssh.pid file],
1758 [
1759 if test "x$withval" != "xno" ; then
Damien Millerb13c73e2000-01-17 22:02:17 +11001760 piddir=$withval
Damien Miller5eed6a22000-01-16 12:05:18 +11001761 fi
1762 ]
1763)
Damien Miller4018c192000-04-30 09:30:44 +10001764
Damien Miller78315eb2000-09-29 23:01:36 +11001765# make sure the directory exists
1766if test ! -d $piddir ; then
1767 piddir=`eval echo ${sysconfdir}`
1768 case $piddir in
1769 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
1770 esac
1771fi
1772
Ben Lindstrom226cfa02001-01-22 05:34:40 +00001773AC_DEFINE_UNQUOTED(_PATH_SSH_PIDDIR, "$piddir")
Damien Millerb13c73e2000-01-17 22:02:17 +11001774AC_SUBST(piddir)
Damien Miller5eed6a22000-01-16 12:05:18 +11001775
andre2ff7b5d2000-06-03 14:57:40 +00001776dnl allow user to disable some login recording features
1777AC_ARG_ENABLE(lastlog,
andre43ca7e22000-06-19 08:23:46 +00001778 [ --disable-lastlog disable use of lastlog even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001779 [ AC_DEFINE(DISABLE_LASTLOG) ]
1780)
1781AC_ARG_ENABLE(utmp,
andre43ca7e22000-06-19 08:23:46 +00001782 [ --disable-utmp disable use of utmp even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001783 [ AC_DEFINE(DISABLE_UTMP) ]
1784)
1785AC_ARG_ENABLE(utmpx,
andre43ca7e22000-06-19 08:23:46 +00001786 [ --disable-utmpx disable use of utmpx even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001787 [ AC_DEFINE(DISABLE_UTMPX) ]
1788)
1789AC_ARG_ENABLE(wtmp,
andre43ca7e22000-06-19 08:23:46 +00001790 [ --disable-wtmp disable use of wtmp even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001791 [ AC_DEFINE(DISABLE_WTMP) ]
1792)
1793AC_ARG_ENABLE(wtmpx,
andre43ca7e22000-06-19 08:23:46 +00001794 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001795 [ AC_DEFINE(DISABLE_WTMPX) ]
1796)
1797AC_ARG_ENABLE(libutil,
andre43ca7e22000-06-19 08:23:46 +00001798 [ --disable-libutil disable use of libutil (login() etc.) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001799 [ AC_DEFINE(DISABLE_LOGIN) ]
1800)
1801AC_ARG_ENABLE(pututline,
andre43ca7e22000-06-19 08:23:46 +00001802 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001803 [ AC_DEFINE(DISABLE_PUTUTLINE) ]
1804)
1805AC_ARG_ENABLE(pututxline,
andre43ca7e22000-06-19 08:23:46 +00001806 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001807 [ AC_DEFINE(DISABLE_PUTUTXLINE) ]
1808)
1809AC_ARG_WITH(lastlog,
andre43ca7e22000-06-19 08:23:46 +00001810 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
Damien Miller709528a2001-01-31 09:57:55 +11001811 [
1812 if test "x$withval" = "xno" ; then
1813 AC_DEFINE(DISABLE_LASTLOG)
1814 else
1815 conf_lastlog_location=$withval
1816 fi
1817 ]
1818)
andre2ff7b5d2000-06-03 14:57:40 +00001819
1820dnl lastlog, [uw]tmpx? detection
1821dnl NOTE: set the paths in the platform section to avoid the
1822dnl need for command-line parameters
1823dnl lastlog and [uw]tmp are subject to a file search if all else fails
1824
1825dnl lastlog detection
1826dnl NOTE: the code itself will detect if lastlog is a directory
1827AC_MSG_CHECKING([if your system defines LASTLOG_FILE])
1828AC_TRY_COMPILE([
1829#include <sys/types.h>
1830#include <utmp.h>
1831#ifdef HAVE_LASTLOG_H
1832# include <lastlog.h>
1833#endif
Damien Miller2994e082000-06-04 15:51:47 +10001834#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001835# include <paths.h>
1836#endif
Ben Lindstrom19d7b8d2001-08-16 00:09:49 +00001837#ifdef HAVE_LOGIN_H
1838# include <login.h>
1839#endif
andre2ff7b5d2000-06-03 14:57:40 +00001840 ],
1841 [ char *lastlog = LASTLOG_FILE; ],
1842 [ AC_MSG_RESULT(yes) ],
Damien Miller2994e082000-06-04 15:51:47 +10001843 [
1844 AC_MSG_RESULT(no)
1845 AC_MSG_CHECKING([if your system defines _PATH_LASTLOG])
1846 AC_TRY_COMPILE([
1847#include <sys/types.h>
1848#include <utmp.h>
1849#ifdef HAVE_LASTLOG_H
1850# include <lastlog.h>
1851#endif
1852#ifdef HAVE_PATHS_H
1853# include <paths.h>
1854#endif
1855 ],
1856 [ char *lastlog = _PATH_LASTLOG; ],
1857 [ AC_MSG_RESULT(yes) ],
1858 [
andree441aa32000-06-12 22:34:38 +00001859 AC_MSG_RESULT(no)
Damien Miller2994e082000-06-04 15:51:47 +10001860 system_lastlog_path=no
1861 ])
1862 ]
andre2ff7b5d2000-06-03 14:57:40 +00001863)
Damien Miller2994e082000-06-04 15:51:47 +10001864
andre2ff7b5d2000-06-03 14:57:40 +00001865if test -z "$conf_lastlog_location"; then
1866 if test x"$system_lastlog_path" = x"no" ; then
1867 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
Damien Milleredb82922000-06-20 13:25:52 +10001868 if (test -d "$f" || test -f "$f") ; then
andre2ff7b5d2000-06-03 14:57:40 +00001869 conf_lastlog_location=$f
1870 fi
1871 done
1872 if test -z "$conf_lastlog_location"; then
andre45cad512000-06-12 23:27:31 +00001873 AC_MSG_WARN([** Cannot find lastlog **])
1874 dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx
andre2ff7b5d2000-06-03 14:57:40 +00001875 fi
1876 fi
1877fi
1878
1879if test -n "$conf_lastlog_location"; then
1880 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location")
1881fi
1882
1883dnl utmp detection
1884AC_MSG_CHECKING([if your system defines UTMP_FILE])
1885AC_TRY_COMPILE([
1886#include <sys/types.h>
1887#include <utmp.h>
Damien Miller2994e082000-06-04 15:51:47 +10001888#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001889# include <paths.h>
1890#endif
1891 ],
1892 [ char *utmp = UTMP_FILE; ],
1893 [ AC_MSG_RESULT(yes) ],
1894 [ AC_MSG_RESULT(no)
1895 system_utmp_path=no ]
1896)
1897if test -z "$conf_utmp_location"; then
1898 if test x"$system_utmp_path" = x"no" ; then
1899 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
1900 if test -f $f ; then
1901 conf_utmp_location=$f
1902 fi
1903 done
1904 if test -z "$conf_utmp_location"; then
1905 AC_DEFINE(DISABLE_UTMP)
1906 fi
1907 fi
1908fi
1909if test -n "$conf_utmp_location"; then
1910 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location")
1911fi
1912
1913dnl wtmp detection
1914AC_MSG_CHECKING([if your system defines WTMP_FILE])
1915AC_TRY_COMPILE([
1916#include <sys/types.h>
1917#include <utmp.h>
Damien Miller2994e082000-06-04 15:51:47 +10001918#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001919# include <paths.h>
1920#endif
1921 ],
1922 [ char *wtmp = WTMP_FILE; ],
1923 [ AC_MSG_RESULT(yes) ],
1924 [ AC_MSG_RESULT(no)
1925 system_wtmp_path=no ]
1926)
1927if test -z "$conf_wtmp_location"; then
1928 if test x"$system_wtmp_path" = x"no" ; then
1929 for f in /usr/adm/wtmp /var/log/wtmp; do
1930 if test -f $f ; then
1931 conf_wtmp_location=$f
1932 fi
1933 done
1934 if test -z "$conf_wtmp_location"; then
1935 AC_DEFINE(DISABLE_WTMP)
1936 fi
1937 fi
1938fi
1939if test -n "$conf_wtmp_location"; then
1940 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location")
1941fi
1942
1943
1944dnl utmpx detection - I don't know any system so perverse as to require
1945dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out
1946dnl there, though.
1947AC_MSG_CHECKING([if your system defines UTMPX_FILE])
1948AC_TRY_COMPILE([
1949#include <sys/types.h>
1950#include <utmp.h>
1951#ifdef HAVE_UTMPX_H
1952#include <utmpx.h>
1953#endif
Damien Miller2994e082000-06-04 15:51:47 +10001954#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001955# include <paths.h>
1956#endif
1957 ],
1958 [ char *utmpx = UTMPX_FILE; ],
1959 [ AC_MSG_RESULT(yes) ],
1960 [ AC_MSG_RESULT(no)
1961 system_utmpx_path=no ]
1962)
1963if test -z "$conf_utmpx_location"; then
1964 if test x"$system_utmpx_path" = x"no" ; then
1965 AC_DEFINE(DISABLE_UTMPX)
1966 fi
1967else
1968 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location")
1969fi
1970
1971dnl wtmpx detection
1972AC_MSG_CHECKING([if your system defines WTMPX_FILE])
1973AC_TRY_COMPILE([
1974#include <sys/types.h>
1975#include <utmp.h>
1976#ifdef HAVE_UTMPX_H
1977#include <utmpx.h>
1978#endif
Damien Miller2994e082000-06-04 15:51:47 +10001979#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001980# include <paths.h>
1981#endif
1982 ],
1983 [ char *wtmpx = WTMPX_FILE; ],
1984 [ AC_MSG_RESULT(yes) ],
1985 [ AC_MSG_RESULT(no)
1986 system_wtmpx_path=no ]
1987)
1988if test -z "$conf_wtmpx_location"; then
1989 if test x"$system_wtmpx_path" = x"no" ; then
1990 AC_DEFINE(DISABLE_WTMPX)
1991 fi
1992else
1993 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location")
1994fi
1995
Damien Miller4018c192000-04-30 09:30:44 +10001996
1997# Change default command timeout for builtin PRNG
Damien Miller14c12cb2000-06-07 22:20:23 +10001998entropy_timeout=200
Damien Miller4018c192000-04-30 09:30:44 +10001999AC_ARG_WITH(entropy-timeout,
2000 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)],
2001 [
2002 if test "x$withval" != "xno" ; then
2003 entropy_timeout=$withval
2004 fi
2005 ]
2006)
2007AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout)
2008
2009
Damien Miller29ea30d2000-03-17 10:54:15 +11002010if test ! -z "$blibpath" ; then
2011 LDFLAGS="$LDFLAGS -blibpath:$blibpath"
2012 AC_MSG_WARN([Please check and edit -blibpath in LDFLAGS in Makefile])
2013fi
2014
Damien Millerbac2d8a2000-09-05 16:13:06 +11002015AC_EXEEXT
2016
Ben Lindstrom3c06f6a2001-01-31 21:52:01 +00002017AC_OUTPUT(Makefile openbsd-compat/Makefile ssh_prng_cmds)
Damien Miller0437b332000-05-02 09:56:41 +10002018
Damien Miller7b22d652000-06-18 14:07:04 +10002019# Print summary of options
2020
Damien Miller7b22d652000-06-18 14:07:04 +10002021if test ! -z "$RANDOM_POOL" ; then
2022 RAND_MSG="Device ($RANDOM_POOL)"
2023else
Damien Millerd0ccb982001-03-04 00:29:20 +11002024 if test ! -z "$PRNGD_PORT" ; then
2025 RAND_MSG="PRNGD/EGD (port localhost:$PRNGD_PORT)"
2026 elif test ! -z "$PRNGD_SOCKET" ; then
2027 RAND_MSG="PRNGD/EGD (socket $PRNGD_SOCKET)"
Damien Miller7b22d652000-06-18 14:07:04 +10002028 else
2029 RAND_MSG="Builtin (timeout $entropy_timeout)"
Damien Miller6f9c3372000-10-25 10:06:04 +11002030 BUILTIN_RNG=1
Damien Miller7b22d652000-06-18 14:07:04 +10002031 fi
2032fi
2033
2034# Someone please show me a better way :)
2035A=`eval echo ${prefix}` ; A=`eval echo ${A}`
2036B=`eval echo ${bindir}` ; B=`eval echo ${B}`
2037C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
2038D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
Kevin Stevese0f49142000-10-14 17:51:48 +00002039E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
Ben Lindstrombc709922001-04-18 18:04:21 +00002040F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
Damien Miller7b22d652000-06-18 14:07:04 +10002041G=`eval echo ${piddir}` ; G=`eval echo ${G}`
Tim Rice59ea0a02001-03-10 13:50:45 -08002042H=`eval echo ${user_path}` ; H=`eval echo ${H}`
Damien Miller7b22d652000-06-18 14:07:04 +10002043
2044echo ""
Kevin Steves393d2f72001-04-08 22:50:43 +00002045echo "OpenSSH has been configured with the following options:"
Damien Miller7b22d652000-06-18 14:07:04 +10002046echo " User binaries: $B"
2047echo " System binaries: $C"
2048echo " Configuration files: $D"
2049echo " Askpass program: $E"
2050echo " Manual pages: $F"
2051echo " PID file: $G"
Tim Rice59ea0a02001-03-10 13:50:45 -08002052echo " sshd default user PATH: $H"
Damien Miller7b22d652000-06-18 14:07:04 +10002053echo " Random number collection: $RAND_MSG"
Damien Miller897741e2001-04-16 10:41:46 +10002054echo " Manpage format: $MANTYPE"
Damien Miller7b22d652000-06-18 14:07:04 +10002055echo " PAM support: ${PAM_MSG}"
2056echo " KerberosIV support: $KRB4_MSG"
2057echo " AFS support: $AFS_MSG"
2058echo " S/KEY support: $SKEY_MSG"
2059echo " TCP Wrappers support: $TCPW_MSG"
2060echo " MD5 password support: $MD5_MSG"
2061echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
2062echo " Use IPv4 by default hack: $IPV4_HACK_MSG"
2063echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
2064
Damien Miller60396b02001-02-18 17:01:00 +11002065if test ! -z "$bsd_auth"; then
2066 echo " BSD Auth support: yes"
2067fi
2068
Damien Miller7b22d652000-06-18 14:07:04 +10002069echo ""
2070
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +00002071echo " Host: ${host}"
2072echo " Compiler: ${CC}"
2073echo " Compiler flags: ${CFLAGS}"
2074echo "Preprocessor flags: ${CPPFLAGS}"
2075echo " Linker flags: ${LDFLAGS}"
2076echo " Libraries: ${LIBS}"
Damien Miller7b22d652000-06-18 14:07:04 +10002077
2078echo ""
2079
Damien Miller82cf0ce2000-12-20 13:34:48 +11002080if test "x$PAM_MSG" = "xyes" ; then
2081 echo "PAM is enabled. You may need to install a PAM control file for sshd,"
2082 echo "otherwise password authentication may fail. Example PAM control files"
2083 echo "can be found in the contrib/ subdirectory"
2084 echo ""
2085fi
2086
Damien Miller6f9c3372000-10-25 10:06:04 +11002087if test ! -z "$BUILTIN_RNG" ; then
2088 echo "WARNING: you are using the builtin random number collection service."
2089 echo "Please read WARNING.RNG and request that your OS vendor includes"
2090 echo "/dev/random in future versions of their OS."
2091 echo ""
2092fi
Ben Lindstrom3ad650a2001-01-03 06:02:51 +00002093
2094if test ! -z "$NO_SFTP"; then
2095 echo "sftp-server will be disabled. Your compiler does not support"
2096 echo "64bit integers."
2097 echo ""
2098fi
Damien Miller60396b02001-02-18 17:01:00 +11002099