blob: a092aaadb2986548de17ab07884f79065abf4895 [file] [log] [blame]
Kevin Steves0ea1d9d2002-04-25 18:17:04 +00001# $Id: configure.ac,v 1.53 2002/04/25 18:17:05 stevesk Exp $
Damien Millere9cf3572001-02-09 12:55:35 +11002
Tim Rice13aae5e2001-10-21 17:53:58 -07003AC_INIT
4AC_CONFIG_SRCDIR([ssh.c])
Damien Miller7f6ea021999-10-28 13:25:17 +10005
6AC_CONFIG_HEADER(config.h)
Damien Miller856799b2000-03-15 21:18:10 +11007AC_PROG_CC
Damien Miller76112de1999-12-21 11:18:08 +11008AC_CANONICAL_HOST
Damien Miller4df5c762001-02-28 08:14:22 +11009AC_C_BIGENDIAN
Damien Miller7f6ea021999-10-28 13:25:17 +100010
Damien Millera22ba012000-03-02 23:09:20 +110011# Checks for programs.
Damien Millerab18c411999-11-11 10:40:23 +110012AC_PROG_CPP
Damien Miller7f6ea021999-10-28 13:25:17 +100013AC_PROG_RANLIB
Damien Millerd8087f61999-11-25 12:31:26 +110014AC_PROG_INSTALL
Ben Lindstrom582d3982001-02-06 22:54:30 +000015AC_PATH_PROG(AR, ar)
Tim Riceb8fbb8e2001-04-21 14:31:52 -070016AC_PATH_PROGS(PERL, perl5 perl)
Damien Millere79334a1999-12-29 10:03:37 +110017AC_SUBST(PERL)
Damien Miller8d1fd572000-05-17 21:34:07 +100018AC_PATH_PROG(ENT, ent)
19AC_SUBST(ENT)
Damien Miller78315eb2000-09-29 23:01:36 +110020AC_PATH_PROGS(FILEPRIV, filepriv, true, /sbin:/usr/sbin)
Damien Miller4864e8f2001-02-08 10:07:08 +110021AC_PATH_PROG(TEST_MINUS_S_SH, bash)
22AC_PATH_PROG(TEST_MINUS_S_SH, ksh)
23AC_PATH_PROG(TEST_MINUS_S_SH, sh)
Damien Miller2e1b0821999-12-25 10:11:29 +110024
Damien Millere8bb4502001-09-25 16:39:35 +100025# System features
26AC_SYS_LARGEFILE
27
Damien Miller3f62aba2000-11-29 11:56:35 +110028if test -z "$AR" ; then
29 AC_MSG_ERROR([*** 'ar' missing, please install or fix your \$PATH ***])
30fi
31
Damien Millerad833b32000-08-23 10:46:23 +100032# Use LOGIN_PROGRAM from environment if possible
33if test ! -z "$LOGIN_PROGRAM" ; then
34 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM")
35else
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
41fi
42
Damien Miller166bd442000-03-16 10:48:25 +110043if test -z "$LD" ; then
44 LD=$CC
45fi
46AC_SUBST(LD)
47
Damien Miller166bd442000-03-16 10:48:25 +110048AC_C_INLINE
Damien Miller649d9992001-06-27 23:35:51 +100049if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
50 CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wno-uninitialized"
Damien Miller166bd442000-03-16 10:48:25 +110051fi
52
Damien Millera22ba012000-03-02 23:09:20 +110053# Check for some target-specific stuff
Damien Miller76112de1999-12-21 11:18:08 +110054case "$host" in
Damien Miller75b1d102000-01-07 14:01:41 +110055*-*-aix*)
56 AFS_LIBS="-lld"
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +000057 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Millerdb819592000-03-14 13:44:01 +110058 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Damien Milleredb82922000-06-20 13:25:52 +100059 if (test "$LD" != "gcc" && test -z "$blibpath"); then
Damien Millerfa2bb692002-04-23 23:22:25 +100060 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 Miller29ea30d2000-03-17 10:54:15 +110072 fi
Damien Millerd2c208a2000-05-17 22:00:02 +100073 AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)])
Damien Millereca71f82000-01-20 22:38:27 +110074 AC_DEFINE(BROKEN_GETADDRINFO)
Damien Millerf5fea442002-04-23 22:52:45 +100075 AC_DEFINE(BROKEN_REALPATH)
andre60f3c982000-06-03 16:18:19 +000076 dnl AIX handles lastlog as part of its login message
77 AC_DEFINE(DISABLE_LASTLOG)
Damien Miller75b1d102000-01-07 14:01:41 +110078 ;;
Damien Millerbac2d8a2000-09-05 16:13:06 +110079*-*-cygwin*)
Tim Ricefe1d1002001-11-26 17:19:43 -080080 LIBS="$LIBS /usr/lib/textmode.o"
Damien Millerbac2d8a2000-09-05 16:13:06 +110081 AC_DEFINE(HAVE_CYGWIN)
Ben Lindstromca60a9b2001-05-17 03:32:50 +000082 AC_DEFINE(USE_PIPES)
Damien Millerbac2d8a2000-09-05 16:13:06 +110083 AC_DEFINE(DISABLE_SHADOW)
84 AC_DEFINE(IPV4_DEFAULT)
85 AC_DEFINE(IP_TOS_IS_BROKEN)
Ben Lindstrom38e60932001-02-24 00:55:04 +000086 AC_DEFINE(NO_X11_UNIX_SOCKETS)
Damien Millerbac2d8a2000-09-05 16:13:06 +110087 ;;
Ben Lindstrom58055132001-02-15 18:34:29 +000088*-*-dgux*)
89 AC_DEFINE(IP_TOS_IS_BROKEN)
90 ;;
Ben Lindstromfed7bb42001-07-15 18:30:42 +000091*-*-darwin*)
92 AC_DEFINE(BROKEN_GETADDRINFO)
93 ;;
Kevin Steves0ea1d9d2002-04-25 18:17:04 +000094*-*-hpux10.26)
95 if test -z "$GCC"; then
96 CFLAGS="$CFLAGS -Ae"
97 fi
98 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
99 IPADDR_IN_DISPLAY=yes
100 AC_DEFINE(HAVE_SECUREWARE)
101 AC_DEFINE(USE_PIPES)
102 AC_DEFINE(LOGIN_NO_ENDOPT)
103 AC_DEFINE(LOGIN_NEEDS_UTMPX)
104 AC_DEFINE(DISABLE_SHADOW)
105 AC_DEFINE(DISABLE_UTMP)
106 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
107 LIBS="$LIBS -lxnet -lsec -lsecpw"
108 disable_ptmx_check=yes
109 ;;
Damien Miller76112de1999-12-21 11:18:08 +1100110*-*-hpux10*)
111 if test -z "$GCC"; then
Damien Millerfda78d92000-05-20 15:33:44 +1000112 CFLAGS="$CFLAGS -Ae"
Damien Miller76112de1999-12-21 11:18:08 +1100113 fi
Kevin Steves315f8b72001-06-28 00:24:41 +0000114 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
Damien Miller9a947342000-08-30 10:03:33 +1100115 IPADDR_IN_DISPLAY=yes
Damien Millerb0785672000-08-23 09:10:39 +1000116 AC_DEFINE(USE_PIPES)
Kevin Steves5feaaef2002-04-23 20:45:55 +0000117 AC_DEFINE(LOGIN_NO_ENDOPT)
118 AC_DEFINE(LOGIN_NEEDS_UTMPX)
Damien Miller8a1e6a62000-09-16 15:55:52 +1100119 AC_DEFINE(DISABLE_SHADOW)
Damien Millerd6f204d2000-09-23 13:57:27 +1100120 AC_DEFINE(DISABLE_UTMP)
Kevin Steves8848b242000-10-18 13:11:44 +0000121 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
Kevin Steves315f8b72001-06-28 00:24:41 +0000122 LIBS="$LIBS -lxnet -lsec"
Damien Miller76112de1999-12-21 11:18:08 +1100123 ;;
Damien Miller1bead332000-04-30 00:47:29 +1000124*-*-hpux11*)
Kevin Steves6a7b0de2001-06-27 16:32:24 +0000125 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
Damien Miller9a947342000-08-30 10:03:33 +1100126 IPADDR_IN_DISPLAY=yes
Damien Miller82cf0ce2000-12-20 13:34:48 +1100127 AC_DEFINE(PAM_SUN_CODEBASE)
Damien Miller5552d7a2000-08-30 09:53:24 +1100128 AC_DEFINE(USE_PIPES)
Kevin Steves5feaaef2002-04-23 20:45:55 +0000129 AC_DEFINE(LOGIN_NO_ENDOPT)
130 AC_DEFINE(LOGIN_NEEDS_UTMPX)
Damien Miller8a1e6a62000-09-16 15:55:52 +1100131 AC_DEFINE(DISABLE_SHADOW)
Damien Millerd6f204d2000-09-23 13:57:27 +1100132 AC_DEFINE(DISABLE_UTMP)
Kevin Steves8848b242000-10-18 13:11:44 +0000133 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
Kevin Steves6a7b0de2001-06-27 16:32:24 +0000134 LIBS="$LIBS -lxnet -lsec"
Damien Miller1bead332000-04-30 00:47:29 +1000135 ;;
Damien Millerbeb4ba51999-12-28 15:09:35 +1100136*-*-irix5*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000137 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller9e110892000-06-07 21:05:46 +1000138 LDFLAGS="$LDFLAGS"
Damien Miller190d5a82000-09-30 09:43:19 +1100139 PATH="$PATH:/usr/etc"
Damien Miller11fa2cc2000-08-16 10:35:58 +1000140 AC_DEFINE(BROKEN_INET_NTOA)
Damien Millerf1b9d112002-04-23 23:09:19 +1000141 AC_DEFINE(WITH_ABBREV_NO_TTY)
Damien Miller1808f382000-01-06 12:03:12 +1100142 ;;
143*-*-irix6*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000144 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller9e110892000-06-07 21:05:46 +1000145 LDFLAGS="$LDFLAGS"
Damien Miller190d5a82000-09-30 09:43:19 +1100146 PATH="$PATH:/usr/etc"
Damien Miller91606b12000-06-28 08:22:29 +1000147 AC_DEFINE(WITH_IRIX_ARRAY)
148 AC_DEFINE(WITH_IRIX_PROJECT)
149 AC_DEFINE(WITH_IRIX_AUDIT)
Ben Lindstrom8ff2a8d2002-04-06 18:58:31 +0000150 AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)])
Damien Miller11fa2cc2000-08-16 10:35:58 +1000151 AC_DEFINE(BROKEN_INET_NTOA)
Damien Millerf1b9d112002-04-23 23:09:19 +1000152 AC_DEFINE(WITH_ABBREV_NO_TTY)
Damien Millerbeb4ba51999-12-28 15:09:35 +1100153 ;;
Damien Millerb29ea912000-01-15 14:12:03 +1100154*-*-linux*)
155 no_dev_ptmx=1
Damien Millera64b57a2001-01-17 10:44:13 +1100156 check_for_libcrypt_later=1
Damien Miller7bcb0892000-03-11 20:45:40 +1100157 AC_DEFINE(DONT_TRY_OTHER_AF)
Damien Miller4e997202000-07-09 21:21:52 +1000158 AC_DEFINE(PAM_TTY_KLUDGE)
Damien Miller7bcb0892000-03-11 20:45:40 +1100159 inet6_default_4in6=yes
Damien Millerb29ea912000-01-15 14:12:03 +1100160 ;;
Ben Lindstromb5628642000-10-18 00:02:25 +0000161mips-sony-bsd|mips-sony-newsos4)
162 AC_DEFINE(HAVE_NEWS4)
163 SONY=1
Ben Lindstromb5628642000-10-18 00:02:25 +0000164 ;;
Damien Milleree1c0b32000-01-21 00:18:15 +1100165*-*-netbsd*)
Damien Millera22ba012000-03-02 23:09:20 +1100166 need_dash_r=1
Damien Milleree1c0b32000-01-21 00:18:15 +1100167 ;;
Damien Millerfbd884a2001-02-27 08:39:07 +1100168*-*-freebsd*)
169 check_for_libcrypt_later=1
170 ;;
Damien Miller0f91b4e2000-06-18 15:43:25 +1000171*-next-*)
Damien Miller0f91b4e2000-06-18 15:43:25 +1000172 conf_lastlog_location="/usr/adm/lastlog"
Damien Millere5192fa2000-08-29 14:30:37 +1100173 conf_utmp_location=/etc/utmp
174 conf_wtmp_location=/usr/adm/wtmp
175 MAIL=/usr/spool/mail
Damien Miller0f91b4e2000-06-18 15:43:25 +1000176 AC_DEFINE(HAVE_NEXT)
Ben Lindstromb4df15d2000-10-15 00:17:36 +0000177 AC_DEFINE(BROKEN_REALPATH)
Ben Lindstrom76020ba2000-10-25 16:55:00 +0000178 AC_DEFINE(USE_PIPES)
Damien Millerfbd884a2001-02-27 08:39:07 +1100179 AC_DEFINE(BROKEN_SAVED_UIDS)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000180 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Ben Lindstrom321ae732000-12-31 15:00:23 +0000181 CFLAGS="$CFLAGS"
Damien Miller0f91b4e2000-06-18 15:43:25 +1000182 ;;
Damien Miller75b1d102000-01-07 14:01:41 +1100183*-*-solaris*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000184 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Ben Lindstrom866488b2001-02-20 18:22:38 +0000185 LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib"
Damien Millera22ba012000-03-02 23:09:20 +1100186 need_dash_r=1
Damien Miller82cf0ce2000-12-20 13:34:48 +1100187 AC_DEFINE(PAM_SUN_CODEBASE)
Ben Lindstrom97c677d2001-05-08 20:33:05 +0000188 AC_DEFINE(LOGIN_NEEDS_UTMPX)
189 AC_DEFINE(LOGIN_NEEDS_TERM)
Ben Lindstrom95276712001-10-23 17:14:00 +0000190 AC_DEFINE(PAM_TTY_KLUDGE)
andre2ff7b5d2000-06-03 14:57:40 +0000191 # hardwire lastlog location (can't detect it on some versions)
192 conf_lastlog_location="/var/adm/lastlog"
Damien Millera1cb6442000-06-09 11:58:35 +1000193 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
194 sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'`
195 if test "$sol2ver" -ge 8; then
196 AC_MSG_RESULT(yes)
197 AC_DEFINE(DISABLE_UTMP)
198 AC_DEFINE(DISABLE_WTMP)
199 else
200 AC_MSG_RESULT(no)
201 fi
Damien Miller75b1d102000-01-07 14:01:41 +1100202 ;;
Damien Millerdfc83f42000-05-20 15:02:59 +1000203*-*-sunos4*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000204 CPPFLAGS="$CPPFLAGS -DSUNOS4"
Damien Millerdfc83f42000-05-20 15:02:59 +1000205 AC_CHECK_FUNCS(getpwanam)
Damien Miller82cf0ce2000-12-20 13:34:48 +1100206 AC_DEFINE(PAM_SUN_CODEBASE)
Damien Miller36ccb5c2000-08-09 16:34:27 +1000207 conf_utmp_location=/etc/utmp
208 conf_wtmp_location=/var/adm/wtmp
209 conf_lastlog_location=/var/adm/lastlog
Damien Millerb0785672000-08-23 09:10:39 +1000210 AC_DEFINE(USE_PIPES)
Damien Millerdfc83f42000-05-20 15:02:59 +1000211 ;;
Ben Lindstrom603bdfd2001-02-12 07:29:45 +0000212*-ncr-sysv*)
213 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
214 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Tim Rice13aae5e2001-10-21 17:53:58 -0700215 LIBS="$LIBS -lc89"
Kevin Steves0bd4b342002-01-05 23:24:27 +0000216 AC_DEFINE(USE_PIPES)
Ben Lindstrom603bdfd2001-02-12 07:29:45 +0000217 ;;
Damien Miller2ae714f2000-07-11 09:29:50 +1000218*-sni-sysv*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000219 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Tim Riceffdf4aa2001-10-27 10:45:36 -0700220 # /usr/ucblib MUST NOT be searched on ReliantUNIX
221 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Damien Millerfd9885e2001-01-10 08:16:53 +1100222 IPADDR_IN_DISPLAY=yes
223 AC_DEFINE(USE_PIPES)
Damien Miller2ae714f2000-07-11 09:29:50 +1000224 AC_DEFINE(IP_TOS_IS_BROKEN)
Tim Riceffdf4aa2001-10-27 10:45:36 -0700225 # /usr/ucblib/libucb.a no longer needed on ReliantUNIX
226 # Attention: always take care to bind libsocket and libnsl before libc,
227 # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog
Damien Miller2ae714f2000-07-11 09:29:50 +1000228 ;;
Damien Miller78315eb2000-09-29 23:01:36 +1100229*-*-sysv4.2*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000230 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller78315eb2000-09-29 23:01:36 +1100231 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Tim Ricea4f7ae12001-09-17 14:34:33 -0700232# enable_suid_ssh=no
Damien Miller5dfe9762001-02-16 12:05:39 +1100233 AC_DEFINE(USE_PIPES)
Damien Miller78315eb2000-09-29 23:01:36 +1100234 ;;
235*-*-sysv5*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000236 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller78315eb2000-09-29 23:01:36 +1100237 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Tim Ricea4f7ae12001-09-17 14:34:33 -0700238# enable_suid_ssh=no
Damien Miller5dfe9762001-02-16 12:05:39 +1100239 AC_DEFINE(USE_PIPES)
Damien Miller78315eb2000-09-29 23:01:36 +1100240 ;;
Damien Miller75b1d102000-01-07 14:01:41 +1100241*-*-sysv*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000242 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Millerdb819592000-03-14 13:44:01 +1100243 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Damien Miller75b1d102000-01-07 14:01:41 +1100244 ;;
Damien Miller78315eb2000-09-29 23:01:36 +1100245*-*-sco3.2v4*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000246 CPPFLAGS="$CPPFLAGS -Dftruncate=chsize -I/usr/local/include"
Damien Miller78315eb2000-09-29 23:01:36 +1100247 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Tim Rice13aae5e2001-10-21 17:53:58 -0700248 LIBS="$LIBS -los -lprot -lx -ltinfo -lm"
Damien Miller78315eb2000-09-29 23:01:36 +1100249 rsh_path="/usr/bin/rcmd"
Damien Miller5dfe9762001-02-16 12:05:39 +1100250 RANLIB=true
251 no_dev_ptmx=1
252 AC_DEFINE(BROKEN_SYS_TERMIO_H)
253 AC_DEFINE(USE_PIPES)
Kevin Steves0ea1d9d2002-04-25 18:17:04 +0000254 AC_DEFINE(HAVE_SECUREWARE)
Ben Lindstrom980754c2000-11-12 00:04:24 +0000255 AC_DEFINE(DISABLE_SHADOW)
Damien Millerfbd884a2001-02-27 08:39:07 +1100256 AC_DEFINE(BROKEN_SAVED_UIDS)
Damien Miller217f5672001-02-16 12:12:41 +1100257 AC_CHECK_FUNCS(getluid setluid)
Tim Rice07183b82001-04-25 21:40:28 -0700258 MANTYPE=man
Tim Rice13aae5e2001-10-21 17:53:58 -0700259 do_sco3_extra_lib_check=yes
Damien Miller78315eb2000-09-29 23:01:36 +1100260 ;;
261*-*-sco3.2v5*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000262 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Millera66626b2000-06-13 18:57:53 +1000263 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Damien Miller5dfe9762001-02-16 12:05:39 +1100264 LIBS="$LIBS -lprot -lx -ltinfo -lm"
Damien Millera66626b2000-06-13 18:57:53 +1000265 no_dev_ptmx=1
Damien Miller78315eb2000-09-29 23:01:36 +1100266 rsh_path="/usr/bin/rcmd"
Damien Miller5dfe9762001-02-16 12:05:39 +1100267 AC_DEFINE(USE_PIPES)
Kevin Steves0ea1d9d2002-04-25 18:17:04 +0000268 AC_DEFINE(HAVE_SECUREWARE)
Ben Lindstrom980754c2000-11-12 00:04:24 +0000269 AC_DEFINE(DISABLE_SHADOW)
Damien Miller217f5672001-02-16 12:12:41 +1100270 AC_CHECK_FUNCS(getluid setluid)
Tim Rice07183b82001-04-25 21:40:28 -0700271 MANTYPE=man
Damien Millera66626b2000-06-13 18:57:53 +1000272 ;;
Ben Lindstromd9e08242001-07-22 19:32:00 +0000273*-*-unicos*)
Tim Ricee991e3c2001-08-07 15:29:07 -0700274 no_libsocket=1
275 no_libnsl=1
Ben Lindstromd9e08242001-07-22 19:32:00 +0000276 AC_DEFINE(USE_PIPES)
Tim Ricee991e3c2001-08-07 15:29:07 -0700277 LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal,-L/usr/local/lib"
278 LIBS="$LIBS -lgen -lrsc"
279 ;;
Damien Millerb8c656e2000-06-28 15:22:41 +1000280*-dec-osf*)
Ben Lindstrom72af2ef2001-05-08 20:42:28 +0000281 AC_MSG_CHECKING(for Digital Unix SIA)
282 no_osfsia=""
283 AC_ARG_WITH(osfsia,
284 [ --with-osfsia Enable Digital Unix SIA],
285 [
286 if test "x$withval" = "xno" ; then
287 AC_MSG_RESULT(disabled)
288 no_osfsia=1
289 fi
290 ],
291 )
292 if test -z "$no_osfsia" ; then
Damien Millerb8c656e2000-06-28 15:22:41 +1000293 if test -f /etc/sia/matrix.conf; then
294 AC_MSG_RESULT(yes)
295 AC_DEFINE(HAVE_OSF_SIA)
296 AC_DEFINE(DISABLE_LOGIN)
297 LIBS="$LIBS -lsecurity -ldb -lm -laud"
298 else
299 AC_MSG_RESULT(no)
300 fi
301 fi
302 ;;
Ben Lindstrom19d7b8d2001-08-16 00:09:49 +0000303
304*-*-nto-qnx)
305 AC_DEFINE(USE_PIPES)
306 AC_DEFINE(NO_X11_UNIX_SOCKETS)
307 AC_DEFINE(MISSING_NFDBITS)
308 AC_DEFINE(MISSING_HOWMANY)
309 AC_DEFINE(MISSING_FD_MASK)
310 ;;
Damien Miller76112de1999-12-21 11:18:08 +1100311esac
312
Damien Millere37bfc12000-06-05 09:37:43 +1000313# Allow user to specify flags
314AC_ARG_WITH(cflags,
315 [ --with-cflags Specify additional flags to pass to compiler],
316 [
317 if test "x$withval" != "xno" ; then
318 CFLAGS="$CFLAGS $withval"
319 fi
320 ]
321)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000322AC_ARG_WITH(cppflags,
323 [ --with-cppflags Specify additional flags to pass to preprocessor] ,
324 [
325 if test "x$withval" != "xno"; then
326 CPPFLAGS="$CPPFLAGS $withval"
327 fi
328 ]
329)
Damien Millere37bfc12000-06-05 09:37:43 +1000330AC_ARG_WITH(ldflags,
Ben Lindstrom2ed98182000-11-06 07:15:43 +0000331 [ --with-ldflags Specify additional flags to pass to linker],
Damien Millere37bfc12000-06-05 09:37:43 +1000332 [
333 if test "x$withval" != "xno" ; then
334 LDFLAGS="$LDFLAGS $withval"
335 fi
336 ]
337)
338AC_ARG_WITH(libs,
339 [ --with-libs Specify additional libraries to link with],
340 [
341 if test "x$withval" != "xno" ; then
342 LIBS="$LIBS $withval"
343 fi
344 ]
345)
346
Tim Rice4cec93f2002-02-26 08:40:48 -0800347# Checks for header files.
348AC_CHECK_HEADERS(bstring.h crypt.h endian.h floatingpoint.h \
349 getopt.h glob.h lastlog.h limits.h login.h \
350 login_cap.h maillock.h netdb.h netgroup.h \
Kevin Stevesb1184bb2002-04-07 18:12:03 +0000351 netinet/in_systm.h paths.h pty.h \
Ben Lindstrom7577fd82002-03-08 03:11:07 +0000352 rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \
Tim Rice4cec93f2002-02-26 08:40:48 -0800353 strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h \
Kevin Stevesb1184bb2002-04-07 18:12:03 +0000354 sys/mman.h sys/select.h sys/stat.h \
Tim Rice4cec93f2002-02-26 08:40:48 -0800355 sys/stropts.h sys/sysmacros.h sys/time.h \
Kevin Steves117b06d2002-03-30 17:55:21 +0000356 sys/un.h time.h ttyent.h usersec.h \
Tim Rice4cec93f2002-02-26 08:40:48 -0800357 util.h utime.h utmp.h utmpx.h)
358
Damien Millera22ba012000-03-02 23:09:20 +1100359# Checks for libraries.
Tim Rice13aae5e2001-10-21 17:53:58 -0700360AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match))
361AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
Ben Lindstrom3ad650a2001-01-03 06:02:51 +0000362
Damien Millerdf288022001-02-18 13:07:07 +1100363dnl SCO OS3 needs this for libwrap
Tim Rice13aae5e2001-10-21 17:53:58 -0700364if test "x$with_tcp_wrappers" != "xno" ; then
365 if test "x$do_sco3_extra_lib_check" = "xyes" ; then
366 AC_CHECK_LIB(rpc, innetgr, LIBS="-lrpc -lyp -lrpc $LIBS" , , -lyp -lrpc)
367 fi
368fi
Damien Millerdf288022001-02-18 13:07:07 +1100369
Tim Rice13aae5e2001-10-21 17:53:58 -0700370AC_CHECK_FUNC(getspnam, ,
371 AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen"))
Tim Rice13aae5e2001-10-21 17:53:58 -0700372
Damien Miller150c8b52002-02-13 23:06:56 +1100373AC_ARG_WITH(rpath,
374 [ --without-rpath Disable auto-added -R linker paths],
375 [
376 if test "x$withval" = "xno" ; then
377 need_dash_r=""
378 fi
379 if test "x$withval" = "xyes" ; then
380 need_dash_r=1
381 fi
382 ]
383)
384
Tim Rice13aae5e2001-10-21 17:53:58 -0700385dnl zlib is required
386AC_ARG_WITH(zlib,
387 [ --with-zlib=PATH Use zlib in PATH],
388 [
Kevin Steves7dc81972002-01-22 21:59:31 +0000389 if test "x$withval" = "xno" ; then
Damien Miller6c21c512002-01-22 21:57:53 +1100390 AC_MSG_ERROR([*** zlib is required ***])
391 fi
Tim Rice13aae5e2001-10-21 17:53:58 -0700392 if test -d "$withval/lib"; then
393 if test -n "${need_dash_r}"; then
Tim Rice02cebcd2001-10-25 10:01:30 -0700394 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700395 else
Tim Rice02cebcd2001-10-25 10:01:30 -0700396 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700397 fi
398 else
399 if test -n "${need_dash_r}"; then
Tim Rice02cebcd2001-10-25 10:01:30 -0700400 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700401 else
Tim Rice02cebcd2001-10-25 10:01:30 -0700402 LDFLAGS="-L${withval} ${LDFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700403 fi
404 fi
405 if test -d "$withval/include"; then
Tim Rice02cebcd2001-10-25 10:01:30 -0700406 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700407 else
Tim Rice02cebcd2001-10-25 10:01:30 -0700408 CPPFLAGS="-I${withval} ${CPPFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700409 fi
410 ]
411)
412
Tim Rice17b93e52001-10-23 22:36:54 -0700413AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first or check config.log ***]))
Damien Miller6f9c3372000-10-25 10:06:04 +1100414
Ben Lindstrom3ad650a2001-01-03 06:02:51 +0000415dnl UnixWare 2.x
416AC_CHECK_FUNC(strcasecmp,
417 [], [ AC_CHECK_LIB(resolv, strcasecmp, LIBS="$LIBS -lresolv") ]
418)
419AC_CHECK_FUNC(utimes,
420 [], [ AC_CHECK_LIB(c89, utimes, LIBS="$LIBS -lc89") ]
421)
Damien Millerab18c411999-11-11 10:40:23 +1100422
Tim Ricee589a292001-11-03 11:09:32 -0800423dnl Checks for libutil functions
424AC_CHECK_HEADERS(libutil.h)
425AC_SEARCH_LIBS(login, util bsd, [AC_DEFINE(HAVE_LOGIN)])
426AC_CHECK_FUNCS(logout updwtmp logwtmp)
427
Ben Lindstrom8697e082001-02-24 21:41:10 +0000428AC_FUNC_STRFTIME
429
Damien Miller3c027682001-03-14 11:39:45 +1100430# Check for ALTDIRFUNC glob() extension
431AC_MSG_CHECKING(for GLOB_ALTDIRFUNC support)
432AC_EGREP_CPP(FOUNDIT,
433 [
434 #include <glob.h>
435 #ifdef GLOB_ALTDIRFUNC
436 FOUNDIT
437 #endif
438 ],
439 [
440 AC_DEFINE(GLOB_HAS_ALTDIRFUNC)
441 AC_MSG_RESULT(yes)
442 ],
443 [
444 AC_MSG_RESULT(no)
445 ]
446)
Damien Millerab18c411999-11-11 10:40:23 +1100447
Ben Lindstrom45b14db2001-03-17 01:15:38 +0000448# Check for g.gl_matchc glob() extension
449AC_MSG_CHECKING(for gl_matchc field in glob_t)
450AC_EGREP_CPP(FOUNDIT,
451 [
452 #include <glob.h>
453 int main(void){glob_t g; g.gl_matchc = 1;}
454 ],
455 [
456 AC_DEFINE(GLOB_HAS_GL_MATCHC)
457 AC_MSG_RESULT(yes)
458 ],
459 [
460 AC_MSG_RESULT(no)
461 ]
462)
463
Damien Miller18bb4732001-03-28 14:35:30 +1000464AC_MSG_CHECKING([whether struct dirent allocates space for d_name])
465AC_TRY_RUN(
466 [
467#include <sys/types.h>
468#include <dirent.h>
469int main(void){struct dirent d;return(sizeof(d.d_name)<=sizeof(char));}
470 ],
471 [AC_MSG_RESULT(yes)],
472 [
473 AC_MSG_RESULT(no)
474 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME)
475 ]
476)
477
Damien Millerc547bf12001-02-16 10:18:12 +1100478# Check whether user wants S/Key support
479SKEY_MSG="no"
480AC_ARG_WITH(skey,
Tim Rice13aae5e2001-10-21 17:53:58 -0700481 [ --with-skey[[=PATH]] Enable S/Key support
482 (optionally in PATH)],
Damien Millerc547bf12001-02-16 10:18:12 +1100483 [
484 if test "x$withval" != "xno" ; then
485
486 if test "x$withval" != "xyes" ; then
487 CPPFLAGS="$CPPFLAGS -I${withval}/include"
488 LDFLAGS="$LDFLAGS -L${withval}/lib"
489 fi
490
491 AC_DEFINE(SKEY)
492 LIBS="-lskey $LIBS"
493 SKEY_MSG="yes"
494
Tim Rice4cec93f2002-02-26 08:40:48 -0800495 AC_MSG_CHECKING([for s/key support])
496 AC_TRY_RUN(
Damien Millerc547bf12001-02-16 10:18:12 +1100497 [
Tim Rice4cec93f2002-02-26 08:40:48 -0800498#include <stdio.h>
499#include <skey.h>
500int main() { char *ff = skey_keyinfo(""); ff=""; return 0; }
501 ],
502 [AC_MSG_RESULT(yes)],
503 [
504 AC_MSG_RESULT(no)
Damien Millerc547bf12001-02-16 10:18:12 +1100505 AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
506 ])
507 fi
508 ]
509)
510
511# Check whether user wants TCP wrappers support
Tim Rice13aae5e2001-10-21 17:53:58 -0700512TCPW_MSG="no"
Damien Millerc547bf12001-02-16 10:18:12 +1100513AC_ARG_WITH(tcp-wrappers,
Tim Rice13aae5e2001-10-21 17:53:58 -0700514 [ --with-tcp-wrappers[[=PATH]] Enable tcpwrappers support
515 (optionally in PATH)],
Damien Millerc547bf12001-02-16 10:18:12 +1100516 [
517 if test "x$withval" != "xno" ; then
518 saved_LIBS="$LIBS"
Tim Rice13aae5e2001-10-21 17:53:58 -0700519 saved_LDFLAGS="$LDFLAGS"
520 saved_CPPFLAGS="$CPPFLAGS"
521 if test -n "${withval}" -a "${withval}" != "yes"; then
522 if test -d "${withval}/lib"; then
523 if test -n "${need_dash_r}"; then
Tim Rice02cebcd2001-10-25 10:01:30 -0700524 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700525 else
Tim Rice02cebcd2001-10-25 10:01:30 -0700526 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700527 fi
528 else
529 if test -n "${need_dash_r}"; then
Tim Rice02cebcd2001-10-25 10:01:30 -0700530 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700531 else
Tim Rice02cebcd2001-10-25 10:01:30 -0700532 LDFLAGS="-L${withval} ${LDFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700533 fi
534 fi
535 if test -d "${withval}/include"; then
Tim Rice02cebcd2001-10-25 10:01:30 -0700536 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700537 else
Tim Rice02cebcd2001-10-25 10:01:30 -0700538 CPPFLAGS="-I${withval} ${CPPFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700539 fi
Tim Rice13aae5e2001-10-21 17:53:58 -0700540 fi
Tim Rice4cec93f2002-02-26 08:40:48 -0800541 LIBWRAP="-lwrap"
542 LIBS="$LIBWRAP $LIBS"
Damien Millerc547bf12001-02-16 10:18:12 +1100543 AC_MSG_CHECKING(for libwrap)
544 AC_TRY_LINK(
545 [
546#include <tcpd.h>
547 int deny_severity = 0, allow_severity = 0;
548 ],
549 [hosts_access(0);],
550 [
551 AC_MSG_RESULT(yes)
552 AC_DEFINE(LIBWRAP)
Tim Rice4cec93f2002-02-26 08:40:48 -0800553 AC_SUBST(LIBWRAP)
Tim Rice13aae5e2001-10-21 17:53:58 -0700554 TCPW_MSG="yes"
Damien Millerc547bf12001-02-16 10:18:12 +1100555 ],
556 [
557 AC_MSG_ERROR([*** libwrap missing])
558 ]
559 )
Tim Rice4cec93f2002-02-26 08:40:48 -0800560 LIBS="$saved_LIBS"
Damien Millerc547bf12001-02-16 10:18:12 +1100561 fi
562 ]
563)
564
Damien Millerad833b32000-08-23 10:46:23 +1000565dnl Checks for library functions.
Ben Lindstromfdee8ef2002-04-06 23:52:02 +0000566AC_CHECK_FUNCS(arc4random b64_ntop bcopy bindresvport_sa \
Tim Rice13aae5e2001-10-21 17:53:58 -0700567 clock fchmod fchown freeaddrinfo futimes gai_strerror \
568 getaddrinfo getcwd getgrouplist getnameinfo getopt \
569 getrlimit getrusage getttyent glob inet_aton inet_ntoa \
570 inet_ntop innetgr login_getcapbool md5_crypt memmove \
Damien Miller594a71b2002-04-23 20:22:59 +1000571 mkdtemp mmap ngetaddrinfo openpty ogetaddrinfo readpassphrase \
572 realpath recvmsg rresvport_af sendmsg setdtablesize setegid \
573 setenv seteuid setlogin setproctitle setresgid setreuid setrlimit \
Kevin Stevese0f2ca42002-04-10 23:17:05 +0000574 setsid setvbuf sigaction sigvec snprintf socketpair strerror \
Tim Rice13aae5e2001-10-21 17:53:58 -0700575 strlcat strlcpy strmode strsep sysconf tcgetpgrp utimes \
576 vhangup vsnprintf waitpid __b64_ntop _getpty)
577
578dnl IRIX and Solaris 2.5.1 have dirname() in libgen
Tim Rice17b93e52001-10-23 22:36:54 -0700579AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[
Tim Rice13aae5e2001-10-21 17:53:58 -0700580 AC_CHECK_LIB(gen, dirname,[
581 AC_CACHE_CHECK([for broken dirname],
582 ac_cv_have_broken_dirname, [
Tim Rice17b93e52001-10-23 22:36:54 -0700583 save_LIBS="$LIBS"
584 LIBS="$LIBS -lgen"
Tim Rice13aae5e2001-10-21 17:53:58 -0700585 AC_TRY_RUN(
586 [
587#include <libgen.h>
588#include <string.h>
589
590int main(int argc, char **argv) {
591 char *s, buf[32];
592
593 strncpy(buf,"/etc", 32);
594 s = dirname(buf);
Tim Rice17b93e52001-10-23 22:36:54 -0700595 if (!s || strncmp(s, "/", 32) != 0) {
Tim Rice13aae5e2001-10-21 17:53:58 -0700596 exit(1);
597 } else {
598 exit(0);
599 }
600}
601 ],
602 [ ac_cv_have_broken_dirname="no" ],
603 [ ac_cv_have_broken_dirname="yes" ]
604 )
Tim Rice17b93e52001-10-23 22:36:54 -0700605 LIBS="$save_LIBS"
Tim Rice13aae5e2001-10-21 17:53:58 -0700606 ])
Tim Rice17b93e52001-10-23 22:36:54 -0700607 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
Tim Rice13aae5e2001-10-21 17:53:58 -0700608 LIBS="$LIBS -lgen"
609 AC_DEFINE(HAVE_DIRNAME)
Tim Rice17b93e52001-10-23 22:36:54 -0700610 AC_CHECK_HEADERS(libgen.h)
Tim Rice13aae5e2001-10-21 17:53:58 -0700611 fi
612 ])
613])
614
Damien Millerad833b32000-08-23 10:46:23 +1000615dnl Checks for time functions
andre2ff7b5d2000-06-03 14:57:40 +0000616AC_CHECK_FUNCS(gettimeofday time)
Damien Millerad833b32000-08-23 10:46:23 +1000617dnl Checks for utmp functions
Ben Lindstrom2c467a22000-12-27 04:57:41 +0000618AC_CHECK_FUNCS(endutent getutent getutid getutline pututline setutent)
andre2ff7b5d2000-06-03 14:57:40 +0000619AC_CHECK_FUNCS(utmpname)
Damien Millerad833b32000-08-23 10:46:23 +1000620dnl Checks for utmpx functions
Ben Lindstrom2c467a22000-12-27 04:57:41 +0000621AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline pututxline )
andre2ff7b5d2000-06-03 14:57:40 +0000622AC_CHECK_FUNCS(setutxent utmpxname)
Damien Millercedfecc1999-11-15 14:36:53 +1100623
Damien Miller5fc85652000-07-09 23:53:07 +1000624AC_CHECK_FUNC(getuserattr,
625 [AC_DEFINE(HAVE_GETUSERATTR)],
626 [AC_CHECK_LIB(s, getuserattr, [LIBS="$LIBS -ls"; AC_DEFINE(HAVE_GETUSERATTR)])]
627)
628
Damien Miller04f80141999-11-19 15:32:34 +1100629AC_CHECK_FUNC(daemon,
630 [AC_DEFINE(HAVE_DAEMON)],
631 [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
632)
633
Damien Miller9fb07e42000-03-05 16:22:59 +1100634AC_CHECK_FUNC(getpagesize,
635 [AC_DEFINE(HAVE_GETPAGESIZE)],
636 [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])]
637)
638
Damien Millercb170cb2000-07-01 16:52:55 +1000639# Check for broken snprintf
640if test "x$ac_cv_func_snprintf" = "xyes" ; then
641 AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
642 AC_TRY_RUN(
643 [
644#include <stdio.h>
645int main(void){char b[5];snprintf(b,5,"123456789");return(b[4]!='\0');}
646 ],
647 [AC_MSG_RESULT(yes)],
648 [
649 AC_MSG_RESULT(no)
650 AC_DEFINE(BROKEN_SNPRINTF)
651 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
652 ]
653 )
654fi
655
Damien Miller606f8802000-09-16 15:39:56 +1100656AC_FUNC_GETPGRP
657
Damien Millera64b57a2001-01-17 10:44:13 +1100658# Check for PAM libs
Damien Miller7b22d652000-06-18 14:07:04 +1000659PAM_MSG="no"
Damien Millera22ba012000-03-02 23:09:20 +1100660AC_ARG_WITH(pam,
Damien Millera64b57a2001-01-17 10:44:13 +1100661 [ --with-pam Enable PAM support ],
Damien Millera22ba012000-03-02 23:09:20 +1100662 [
Damien Millera64b57a2001-01-17 10:44:13 +1100663 if test "x$withval" != "xno" ; then
664 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" ; then
665 AC_MSG_ERROR([PAM headers not found])
666 fi
667
668 AC_CHECK_LIB(dl, dlopen, , )
669 AC_CHECK_LIB(pam, pam_set_item, , AC_MSG_ERROR([*** libpam missing]))
670 AC_CHECK_FUNCS(pam_getenvlist)
671
672 disable_shadow=yes
673 PAM_MSG="yes"
674
675 AC_DEFINE(USE_PAM)
Tim Rice7d2d1f12002-02-26 22:05:11 -0800676 if test $ac_cv_lib_dl_dlopen = yes; then
677 LIBPAM="-lpam -ldl"
678 else
679 LIBPAM="-lpam"
680 fi
681 AC_SUBST(LIBPAM)
Damien Millera22ba012000-03-02 23:09:20 +1100682 fi
683 ]
684)
Damien Millera22ba012000-03-02 23:09:20 +1100685
Damien Millera64b57a2001-01-17 10:44:13 +1100686# Check for older PAM
687if test "x$PAM_MSG" = "xyes" ; then
Damien Millera22ba012000-03-02 23:09:20 +1100688 # Check PAM strerror arguments (old PAM)
689 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
690 AC_TRY_COMPILE(
691 [
Damien Miller81171112000-04-23 11:14:01 +1000692#include <stdlib.h>
693#include <security/pam_appl.h>
Damien Millera22ba012000-03-02 23:09:20 +1100694 ],
695 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
696 [AC_MSG_RESULT(no)],
697 [
698 AC_DEFINE(HAVE_OLD_PAM)
699 AC_MSG_RESULT(yes)
Damien Miller7b22d652000-06-18 14:07:04 +1000700 PAM_MSG="yes (old library)"
Damien Millera22ba012000-03-02 23:09:20 +1100701 ]
Damien Millera64b57a2001-01-17 10:44:13 +1100702 )
Damien Millera22ba012000-03-02 23:09:20 +1100703fi
704
705# The big search for OpenSSL
706AC_ARG_WITH(ssl-dir,
707 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
708 [
Ben Lindstrom23e13712000-10-29 22:49:19 +0000709 if test "x$withval" != "xno" ; then
Damien Millera22ba012000-03-02 23:09:20 +1100710 tryssldir=$withval
711 fi
712 ]
713)
714
715saved_LIBS="$LIBS"
Damien Millera1ad4802000-03-15 10:04:54 +1100716saved_LDFLAGS="$LDFLAGS"
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000717saved_CPPFLAGS="$CPPFLAGS"
Damien Millera22ba012000-03-02 23:09:20 +1100718if test "x$prefix" != "xNONE" ; then
719 tryssldir="$tryssldir $prefix"
720fi
Damien Miller61e50f12000-05-08 20:49:37 +1000721AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [
Damien Millera1b61e12000-09-16 17:02:16 +1100722 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 +1100723 CPPFLAGS="$saved_CPPFLAGS"
724 LDFLAGS="$saved_LDFLAGS"
Damien Miller3b512e12000-05-17 23:29:18 +1000725 LIBS="$saved_LIBS -lcrypto"
Damien Millerccdefb62001-02-19 12:56:39 +1100726
727 # Skip directories if they don't exist
728 if test ! -z "$ssldir" -a ! -d "$ssldir" ; then
729 continue;
730 fi
731 if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then
732 # Try to use $ssldir/lib if it exists, otherwise
733 # $ssldir
734 if test -d "$ssldir/lib" ; then
Damien Millerb68af622001-03-28 21:05:26 +1000735 LDFLAGS="-L$ssldir/lib $saved_LDFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100736 if test ! -z "$need_dash_r" ; then
Damien Millerb68af622001-03-28 21:05:26 +1000737 LDFLAGS="-R$ssldir/lib $LDFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100738 fi
739 else
Damien Millerb68af622001-03-28 21:05:26 +1000740 LDFLAGS="-L$ssldir $saved_LDFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100741 if test ! -z "$need_dash_r" ; then
Damien Millerb68af622001-03-28 21:05:26 +1000742 LDFLAGS="-R$ssldir $LDFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100743 fi
744 fi
745 # Try to use $ssldir/include if it exists, otherwise
746 # $ssldir
747 if test -d "$ssldir/include" ; then
Damien Millerb68af622001-03-28 21:05:26 +1000748 CPPFLAGS="-I$ssldir/include $saved_CPPFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100749 else
Damien Millerb68af622001-03-28 21:05:26 +1000750 CPPFLAGS="-I$ssldir $saved_CPPFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100751 fi
752 fi
Damien Miller61e50f12000-05-08 20:49:37 +1000753
Damien Miller3b512e12000-05-17 23:29:18 +1000754 # Basic test to check for compatible version and correct linking
755 # *does not* test for RSA - that comes later.
756 AC_TRY_RUN(
757 [
Damien Millere59ce622000-05-01 20:54:17 +1000758#include <string.h>
759#include <openssl/rand.h>
Damien Miller81171112000-04-23 11:14:01 +1000760int main(void)
761{
Damien Miller3b512e12000-05-17 23:29:18 +1000762 char a[2048];
763 memset(a, 0, sizeof(a));
Damien Miller81171112000-04-23 11:14:01 +1000764 RAND_add(a, sizeof(a), sizeof(a));
Damien Miller3b512e12000-05-17 23:29:18 +1000765 return(RAND_status() <= 0);
Damien Miller81171112000-04-23 11:14:01 +1000766}
Damien Miller3b512e12000-05-17 23:29:18 +1000767 ],
768 [
769 found_crypto=1
770 break;
771 ], []
772 )
Damien Miller61e50f12000-05-08 20:49:37 +1000773
774 if test ! -z "$found_crypto" ; then
775 break;
776 fi
Damien Millerb85dcad2000-03-11 11:37:00 +1100777 done
778
Damien Miller61e50f12000-05-08 20:49:37 +1000779 if test -z "$found_crypto" ; then
Damien Miller5dfe9762001-02-16 12:05:39 +1100780 AC_MSG_ERROR([Could not find working OpenSSL library, please install or check config.log])
Damien Millerb85dcad2000-03-11 11:37:00 +1100781 fi
Damien Miller61e50f12000-05-08 20:49:37 +1000782 if test -z "$ssldir" ; then
783 ssldir="(system)"
784 fi
Damien Millera22ba012000-03-02 23:09:20 +1100785
Damien Miller61e50f12000-05-08 20:49:37 +1000786 ac_cv_openssldir=$ssldir
787])
788
Damien Milleredb82922000-06-20 13:25:52 +1000789if (test ! -z "$ac_cv_openssldir" && test "x$ac_cv_openssldir" != "x(system)") ; then
Damien Miller61e50f12000-05-08 20:49:37 +1000790 AC_DEFINE(HAVE_OPENSSL)
791 dnl Need to recover ssldir - test above runs in subshell
792 ssldir=$ac_cv_openssldir
Damien Millera64b57a2001-01-17 10:44:13 +1100793 if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then
Damien Millerccdefb62001-02-19 12:56:39 +1100794 # Try to use $ssldir/lib if it exists, otherwise
795 # $ssldir
796 if test -d "$ssldir/lib" ; then
Damien Millerb68af622001-03-28 21:05:26 +1000797 LDFLAGS="-L$ssldir/lib $saved_LDFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100798 if test ! -z "$need_dash_r" ; then
Damien Millerb68af622001-03-28 21:05:26 +1000799 LDFLAGS="-R$ssldir/lib $LDFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100800 fi
801 else
Damien Millerb68af622001-03-28 21:05:26 +1000802 LDFLAGS="-L$ssldir $saved_LDFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100803 if test ! -z "$need_dash_r" ; then
Damien Millerb68af622001-03-28 21:05:26 +1000804 LDFLAGS="-R$ssldir $LDFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100805 fi
Damien Millera64b57a2001-01-17 10:44:13 +1100806 fi
Damien Millerccdefb62001-02-19 12:56:39 +1100807 # Try to use $ssldir/include if it exists, otherwise
808 # $ssldir
809 if test -d "$ssldir/include" ; then
Damien Millerb68af622001-03-28 21:05:26 +1000810 CPPFLAGS="-I$ssldir/include $saved_CPPFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100811 else
Damien Millerb68af622001-03-28 21:05:26 +1000812 CPPFLAGS="-I$ssldir $saved_CPPFLAGS"
Damien Millera64b57a2001-01-17 10:44:13 +1100813 fi
Damien Miller29ea30d2000-03-17 10:54:15 +1100814 fi
Damien Millera22ba012000-03-02 23:09:20 +1100815fi
Damien Miller3b512e12000-05-17 23:29:18 +1000816LIBS="$saved_LIBS -lcrypto"
Damien Miller61e50f12000-05-08 20:49:37 +1000817
Damien Miller3b512e12000-05-17 23:29:18 +1000818# Now test RSA support
819saved_LIBS="$LIBS"
820AC_MSG_CHECKING([for RSA support])
821for WANTS_RSAREF in "" 1 ; do
822 if test -z "$WANTS_RSAREF" ; then
823 LIBS="$saved_LIBS"
824 else
825 LIBS="$saved_LIBS -lRSAglue -lrsaref"
826 fi
827 AC_TRY_RUN([
828#include <string.h>
829#include <openssl/rand.h>
830#include <openssl/rsa.h>
831#include <openssl/bn.h>
832#include <openssl/sha.h>
833int main(void)
834{
835 int num; RSA *key; static unsigned char p_in[] = "blahblah";
836 unsigned char c[256], p[256];
837 memset(c, 0, sizeof(c)); RAND_add(c, sizeof(c), sizeof(c));
838 if ((key=RSA_generate_key(512, 3, NULL, NULL))==NULL) return(1);
839 num = RSA_public_encrypt(sizeof(p_in) - 1, p_in, c, key, RSA_PKCS1_PADDING);
840 return(-1 == RSA_private_decrypt(num, c, p, key, RSA_PKCS1_PADDING));
841}
842 ],
843 [
844 rsa_works=1
845 break;
846 ], [])
847done
Ben Lindstrom23fec142001-06-09 02:16:28 +0000848LIBS="$saved_LIBS"
Damien Miller3b512e12000-05-17 23:29:18 +1000849
850if test ! -z "$no_rsa" ; then
851 AC_MSG_RESULT(disabled)
Damien Miller7b22d652000-06-18 14:07:04 +1000852 RSA_MSG="disabled"
Damien Miller3b512e12000-05-17 23:29:18 +1000853else
854 if test -z "$rsa_works" ; then
855 AC_MSG_WARN([*** No RSA support found *** ])
Damien Miller7b22d652000-06-18 14:07:04 +1000856 RSA_MSG="no"
Damien Miller3b512e12000-05-17 23:29:18 +1000857 else
858 if test -z "$WANTS_RSAREF" ; then
859 AC_MSG_RESULT(yes)
Damien Miller7b22d652000-06-18 14:07:04 +1000860 RSA_MSG="yes"
Damien Miller3b512e12000-05-17 23:29:18 +1000861 else
Damien Miller7b22d652000-06-18 14:07:04 +1000862 RSA_MSG="yes (using RSAref)"
Damien Miller3b512e12000-05-17 23:29:18 +1000863 AC_MSG_RESULT(using RSAref)
Ben Lindstrom23fec142001-06-09 02:16:28 +0000864 LIBS="$LIBS -lcrypto -lRSAglue -lrsaref"
Damien Miller3b512e12000-05-17 23:29:18 +1000865 fi
866 fi
867fi
Damien Millera22ba012000-03-02 23:09:20 +1100868
Damien Millerec932372002-01-22 22:16:03 +1100869# Sanity check OpenSSL headers
870AC_MSG_CHECKING([whether OpenSSL's headers match the library])
871AC_TRY_RUN(
872 [
873#include <string.h>
874#include <openssl/opensslv.h>
875int main(void) { return(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); }
876 ],
877 [
878 AC_MSG_RESULT(yes)
879 ],
880 [
881 AC_MSG_RESULT(no)
882 AC_MSG_ERROR(Your OpenSSL headers do not match your library)
883 ]
884)
885
Damien Millera64b57a2001-01-17 10:44:13 +1100886# Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
887# version in OpenSSL. Skip this for PAM
888if test "x$PAM_MSG" = "xno" -a "x$check_for_libcrypt_later" = "x1"; then
Damien Miller95aa2d62001-03-01 09:16:11 +1100889 AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt")
Damien Millera64b57a2001-01-17 10:44:13 +1100890fi
891
Damien Miller6c21c512002-01-22 21:57:53 +1100892
893### Configure cryptographic random number support
894
895# Check wheter OpenSSL seeds itself
896AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded])
897AC_TRY_RUN(
898 [
899#include <string.h>
900#include <openssl/rand.h>
901int main(void) { return(RAND_status() == 1 ? 0 : 1); }
902 ],
903 [
904 OPENSSL_SEEDS_ITSELF=yes
905 AC_MSG_RESULT(yes)
906 ],
907 [
908 AC_MSG_RESULT(no)
909 # Default to use of the rand helper if OpenSSL doesn't
910 # seed itself
911 USE_RAND_HELPER=yes
912 ]
913)
914
915
916# Do we want to force the use of the rand helper?
917AC_ARG_WITH(rand-helper,
918 [ --with-rand-helper Use subprocess to gather strong randomness ],
919 [
920 if test "x$withval" = "xno" ; then
921 # Force use of OpenSSL's internal RNG, even if
922 # the previous test showed it to be unseeded.
923 if test -z "$OPENSSL_SEEDS_ITSELF" ; then
924 AC_MSG_WARN([*** Forcing use of OpenSSL's non-self-seeding PRNG])
925 OPENSSL_SEEDS_ITSELF=yes
926 USE_RAND_HELPER=""
927 fi
928 else
929 USE_RAND_HELPER=yes
930 fi
931 ],
932)
933
934# Which randomness source do we use?
935if test ! -z "$OPENSSL_SEEDS_ITSELF" -a -z "$USE_RAND_HELPER" ; then
936 # OpenSSL only
937 AC_DEFINE(OPENSSL_PRNG_ONLY)
938 RAND_MSG="OpenSSL internal ONLY"
939 INSTALL_SSH_RAND_HELPER=""
Tim Rice1e2c6002002-01-30 22:14:03 -0800940elif test ! -z "$USE_RAND_HELPER" ; then
941 # install rand helper
Damien Miller6c21c512002-01-22 21:57:53 +1100942 RAND_MSG="ssh-rand-helper"
943 INSTALL_SSH_RAND_HELPER="yes"
944fi
945AC_SUBST(INSTALL_SSH_RAND_HELPER)
946
947### Configuration of ssh-rand-helper
948
949# PRNGD TCP socket
950AC_ARG_WITH(prngd-port,
951 [ --with-prngd-port=PORT read entropy from PRNGD/EGD TCP localhost:PORT],
952 [
Damien Millere996d722002-01-23 11:20:59 +1100953 case "$withval" in
954 no)
955 withval=""
956 ;;
957 [[0-9]]*)
958 ;;
959 *)
960 AC_MSG_ERROR(You must specify a numeric port number for --with-prngd-port)
961 ;;
962 esac
963 if test ! -z "$withval" ; then
Damien Miller6c21c512002-01-22 21:57:53 +1100964 PRNGD_PORT="$withval"
965 AC_DEFINE_UNQUOTED(PRNGD_PORT, $PRNGD_PORT)
966 fi
967 ]
968)
969
970# PRNGD Unix domain socket
971AC_ARG_WITH(prngd-socket,
972 [ --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)],
973 [
Damien Millere996d722002-01-23 11:20:59 +1100974 case "$withval" in
975 yes)
Damien Miller6c21c512002-01-22 21:57:53 +1100976 withval="/var/run/egd-pool"
Damien Millere996d722002-01-23 11:20:59 +1100977 ;;
978 no)
979 withval=""
980 ;;
981 /*)
982 ;;
983 *)
984 AC_MSG_ERROR(You must specify an absolute path to the entropy socket)
985 ;;
986 esac
987
988 if test ! -z "$withval" ; then
Damien Miller6c21c512002-01-22 21:57:53 +1100989 if test ! -z "$PRNGD_PORT" ; then
990 AC_MSG_ERROR(You may not specify both a PRNGD/EGD port and socket)
991 fi
Damien Miller6385ba02002-01-23 08:12:36 +1100992 if test ! -r "$withval" ; then
Damien Miller6c21c512002-01-22 21:57:53 +1100993 AC_MSG_WARN(Entropy socket is not readable)
994 fi
995 PRNGD_SOCKET="$withval"
996 AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET")
997 fi
Tim Rice4cec93f2002-02-26 08:40:48 -0800998 ],
999 [
1000 # Check for existing socket only if we don't have a random device already
1001 if test "$USE_RAND_HELPER" = yes ; then
1002 AC_MSG_CHECKING(for PRNGD/EGD socket)
1003 # Insert other locations here
1004 for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
1005 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
1006 PRNGD_SOCKET="$sock"
1007 AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET")
1008 break;
1009 fi
1010 done
1011 if test ! -z "$PRNGD_SOCKET" ; then
1012 AC_MSG_RESULT($PRNGD_SOCKET)
1013 else
1014 AC_MSG_RESULT(not found)
1015 fi
1016 fi
Damien Miller6c21c512002-01-22 21:57:53 +11001017 ]
1018)
1019
1020# Change default command timeout for hashing entropy source
1021entropy_timeout=200
1022AC_ARG_WITH(entropy-timeout,
1023 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)],
1024 [
1025 if test "x$withval" != "xno" ; then
1026 entropy_timeout=$withval
1027 fi
1028 ]
1029)
Damien Miller6c21c512002-01-22 21:57:53 +11001030AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout)
1031
Kevin Steves7ff91122002-04-07 19:22:54 +00001032ssh_privsep_user=sshd
1033AC_ARG_WITH(privsep-user,
1034 [ --with-privsep-user Specify non-privileged user for privilege separation],
1035 [
1036 if test -n "$withval"; then
1037 ssh_privsep_user=$withval
1038 fi
1039 ]
1040)
Kevin Steves4e0bb522002-04-07 19:44:14 +00001041AC_DEFINE_UNQUOTED(SSH_PRIVSEP_USER, "$ssh_privsep_user")
Kevin Steves7ff91122002-04-07 19:22:54 +00001042
Tim Rice88f2ab52002-03-17 12:17:34 -08001043# We do this little dance with the search path to insure
1044# that programs that we select for use by installed programs
1045# (which may be run by the super-user) come from trusted
1046# locations before they come from the user's private area.
1047# This should help avoid accidentally configuring some
1048# random version of a program in someone's personal bin.
1049
1050OPATH=$PATH
1051PATH=/bin:/usr/bin
Tim Riceae49fe62002-04-12 10:26:21 -07001052test -h /bin 2> /dev/null && PATH=/usr/bin
Tim Rice88f2ab52002-03-17 12:17:34 -08001053test -d /sbin && PATH=$PATH:/sbin
1054test -d /usr/sbin && PATH=$PATH:/usr/sbin
1055PATH=$PATH:/etc:$OPATH
1056
Damien Miller6c21c512002-01-22 21:57:53 +11001057# These programs are used by the command hashing source to gather entropy
1058OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
1059OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
1060OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
1061OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
1062OSSH_PATH_ENTROPY_PROG(PROG_JSTAT, jstat)
1063OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
1064OSSH_PATH_ENTROPY_PROG(PROG_SAR, sar)
1065OSSH_PATH_ENTROPY_PROG(PROG_W, w)
1066OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
1067OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
1068OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
1069OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
1070OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
1071OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
1072OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
1073OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
Tim Rice88f2ab52002-03-17 12:17:34 -08001074# restore PATH
1075PATH=$OPATH
Damien Miller6c21c512002-01-22 21:57:53 +11001076
1077# Where does ssh-rand-helper get its randomness from?
1078INSTALL_SSH_PRNG_CMDS=""
1079if test ! -z "$INSTALL_SSH_RAND_HELPER" ; then
1080 if test ! -z "$PRNGD_PORT" ; then
1081 RAND_HELPER_MSG="TCP localhost:$PRNGD_PORT"
1082 elif test ! -z "$PRNGD_SOCKET" ; then
1083 RAND_HELPER_MSG="Unix domain socket \"$PRNGD_SOCKET\""
1084 else
1085 RAND_HELPER_MSG="Command hashing (timeout $entropy_timeout)"
1086 RAND_HELPER_CMDHASH=yes
1087 INSTALL_SSH_PRNG_CMDS="yes"
1088 fi
1089fi
1090AC_SUBST(INSTALL_SSH_PRNG_CMDS)
1091
1092
Ben Lindstromb5628642000-10-18 00:02:25 +00001093# Cheap hack to ensure NEWS-OS libraries are arranged right.
1094if test ! -z "$SONY" ; then
1095 LIBS="$LIBS -liberty";
1096fi
1097
Damien Millera22ba012000-03-02 23:09:20 +11001098# Checks for data types
Damien Millere0f45742000-01-18 09:12:06 +11001099AC_CHECK_SIZEOF(char, 1)
Damien Millerc6398ef1999-11-20 12:18:40 +11001100AC_CHECK_SIZEOF(short int, 2)
1101AC_CHECK_SIZEOF(int, 4)
1102AC_CHECK_SIZEOF(long int, 4)
1103AC_CHECK_SIZEOF(long long int, 8)
1104
Damien Millerfa2bb692002-04-23 23:22:25 +10001105# Sanity check long long for some platforms (AIX)
1106if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then
1107 ac_cv_sizeof_long_long_int=0
1108fi
1109
Damien Millera22ba012000-03-02 23:09:20 +11001110# More checks for data types
Damien Millercaf6dd62000-08-29 11:33:50 +11001111AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1112 AC_TRY_COMPILE(
1113 [ #include <sys/types.h> ],
1114 [ u_int a; a = 1;],
1115 [ ac_cv_have_u_int="yes" ],
1116 [ ac_cv_have_u_int="no" ]
1117 )
1118])
1119if test "x$ac_cv_have_u_int" = "xyes" ; then
1120 AC_DEFINE(HAVE_U_INT)
1121 have_u_int=1
1122fi
1123
Damien Miller61e50f12000-05-08 20:49:37 +10001124AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1125 AC_TRY_COMPILE(
1126 [ #include <sys/types.h> ],
1127 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1128 [ ac_cv_have_intxx_t="yes" ],
1129 [ ac_cv_have_intxx_t="no" ]
1130 )
1131])
1132if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1133 AC_DEFINE(HAVE_INTXX_T)
1134 have_intxx_t=1
1135fi
Ben Lindstrom19d7b8d2001-08-16 00:09:49 +00001136
1137if (test -z "$have_intxx_t" && \
1138 test "x$ac_cv_header_stdint_h" = "xyes")
1139then
1140 AC_MSG_CHECKING([for intXX_t types in stdint.h])
1141 AC_TRY_COMPILE(
1142 [ #include <stdint.h> ],
1143 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1144 [
1145 AC_DEFINE(HAVE_INTXX_T)
1146 AC_MSG_RESULT(yes)
1147 ],
1148 [ AC_MSG_RESULT(no) ]
1149 )
1150fi
1151
Damien Miller578783e2000-09-23 14:12:24 +11001152AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1153 AC_TRY_COMPILE(
1154 [ #include <sys/types.h> ],
1155 [ int64_t a; a = 1;],
1156 [ ac_cv_have_int64_t="yes" ],
1157 [ ac_cv_have_int64_t="no" ]
1158 )
1159])
1160if test "x$ac_cv_have_int64_t" = "xyes" ; then
1161 AC_DEFINE(HAVE_INT64_T)
1162 have_int64_t=1
1163fi
1164
Ben Lindstrom19d7b8d2001-08-16 00:09:49 +00001165if test -z "$have_int64_t" ; then
1166 AC_MSG_CHECKING([for int64_t type in sys/socket.h])
1167 AC_TRY_COMPILE(
1168 [ #include <sys/socket.h> ],
1169 [ int64_t a; a = 1],
1170 [
1171 AC_DEFINE(HAVE_INT64_T)
1172 AC_MSG_RESULT(yes)
1173 ],
1174 [ AC_MSG_RESULT(no) ]
1175 )
1176fi
1177
Tim Rice4cec93f2002-02-26 08:40:48 -08001178if test -z "$have_int64_t" ; then
1179 AC_MSG_CHECKING([for int64_t type in sys/bitypes.h])
1180 AC_TRY_COMPILE(
1181 [ #include <sys/bitypes.h> ],
1182 [ int64_t a; a = 1],
1183 [
1184 AC_DEFINE(HAVE_INT64_T)
1185 AC_MSG_RESULT(yes)
1186 ],
1187 [ AC_MSG_RESULT(no) ]
1188 )
1189fi
1190
Damien Miller61e50f12000-05-08 20:49:37 +10001191AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1192 AC_TRY_COMPILE(
1193 [ #include <sys/types.h> ],
1194 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1195 [ ac_cv_have_u_intxx_t="yes" ],
1196 [ ac_cv_have_u_intxx_t="no" ]
1197 )
1198])
1199if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1200 AC_DEFINE(HAVE_U_INTXX_T)
1201 have_u_intxx_t=1
1202fi
Damien Millerc6398ef1999-11-20 12:18:40 +11001203
Ben Lindstrom19d7b8d2001-08-16 00:09:49 +00001204if test -z "$have_u_intxx_t" ; then
1205 AC_MSG_CHECKING([for u_intXX_t types in sys/socket.h])
1206 AC_TRY_COMPILE(
1207 [ #include <sys/socket.h> ],
1208 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1209 [
1210 AC_DEFINE(HAVE_U_INTXX_T)
1211 AC_MSG_RESULT(yes)
1212 ],
1213 [ AC_MSG_RESULT(no) ]
1214 )
1215fi
1216
Damien Miller578783e2000-09-23 14:12:24 +11001217AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1218 AC_TRY_COMPILE(
1219 [ #include <sys/types.h> ],
1220 [ u_int64_t a; a = 1;],
1221 [ ac_cv_have_u_int64_t="yes" ],
1222 [ ac_cv_have_u_int64_t="no" ]
1223 )
1224])
1225if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1226 AC_DEFINE(HAVE_U_INT64_T)
1227 have_u_int64_t=1
1228fi
1229
Tim Rice4cec93f2002-02-26 08:40:48 -08001230if test -z "$have_u_int64_t" ; then
1231 AC_MSG_CHECKING([for u_int64_t type in sys/bitypes.h])
1232 AC_TRY_COMPILE(
1233 [ #include <sys/bitypes.h> ],
1234 [ u_int64_t a; a = 1],
1235 [
1236 AC_DEFINE(HAVE_U_INT64_T)
1237 AC_MSG_RESULT(yes)
1238 ],
1239 [ AC_MSG_RESULT(no) ]
1240 )
1241fi
1242
Ben Lindstrom19d7b8d2001-08-16 00:09:49 +00001243if test -z "$have_u_intxx_t" ; then
1244 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1245 AC_TRY_COMPILE(
1246 [
1247#include <sys/types.h>
1248 ],
1249 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
1250 [ ac_cv_have_uintxx_t="yes" ],
1251 [ ac_cv_have_uintxx_t="no" ]
1252 )
1253 ])
1254 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1255 AC_DEFINE(HAVE_UINTXX_T)
1256 fi
1257fi
1258
1259if test -z "$have_uintxx_t" ; then
1260 AC_MSG_CHECKING([for uintXX_t types in stdint.h])
1261 AC_TRY_COMPILE(
1262 [ #include <stdint.h> ],
1263 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;],
1264 [
1265 AC_DEFINE(HAVE_UINTXX_T)
1266 AC_MSG_RESULT(yes)
1267 ],
1268 [ AC_MSG_RESULT(no) ]
1269 )
1270fi
1271
Damien Milleredb82922000-06-20 13:25:52 +10001272if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1273 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
Damien Millerb29ea912000-01-15 14:12:03 +11001274then
1275 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1276 AC_TRY_COMPILE(
Damien Miller61e50f12000-05-08 20:49:37 +10001277 [
1278#include <sys/bitypes.h>
1279 ],
Damien Millerb29ea912000-01-15 14:12:03 +11001280 [
Damien Miller70494d12000-04-03 15:57:06 +10001281 int8_t a; int16_t b; int32_t c;
1282 u_int8_t e; u_int16_t f; u_int32_t g;
1283 a = b = c = e = f = g = 1;
Damien Millerb29ea912000-01-15 14:12:03 +11001284 ],
1285 [
1286 AC_DEFINE(HAVE_U_INTXX_T)
1287 AC_DEFINE(HAVE_INTXX_T)
1288 AC_MSG_RESULT(yes)
1289 ],
1290 [AC_MSG_RESULT(no)]
1291 )
1292fi
1293
Damien Miller58be7382001-09-15 21:31:54 +10001294
1295AC_CACHE_CHECK([for u_char], ac_cv_have_u_char, [
1296 AC_TRY_COMPILE(
1297 [
1298#include <sys/types.h>
1299 ],
1300 [ u_char foo; foo = 125; ],
1301 [ ac_cv_have_u_char="yes" ],
1302 [ ac_cv_have_u_char="no" ]
1303 )
1304])
1305if test "x$ac_cv_have_u_char" = "xyes" ; then
1306 AC_DEFINE(HAVE_U_CHAR)
1307fi
1308
Tim Rice13aae5e2001-10-21 17:53:58 -07001309TYPE_SOCKLEN_T
Damien Miller74d0d4a1999-12-29 02:24:35 +11001310
Tim Rice200a5c02002-02-26 22:12:34 -08001311AC_CHECK_TYPES(sig_atomic_t,,,[#include <signal.h>])
Tim Rice4cec93f2002-02-26 08:40:48 -08001312
Damien Miller61e50f12000-05-08 20:49:37 +10001313AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
1314 AC_TRY_COMPILE(
1315 [
1316#include <sys/types.h>
1317 ],
1318 [ size_t foo; foo = 1235; ],
1319 [ ac_cv_have_size_t="yes" ],
1320 [ ac_cv_have_size_t="no" ]
1321 )
1322])
1323if test "x$ac_cv_have_size_t" = "xyes" ; then
1324 AC_DEFINE(HAVE_SIZE_T)
1325fi
Damien Miller95058511999-12-29 10:36:45 +11001326
Damien Miller615f9392000-05-17 22:53:33 +10001327AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
1328 AC_TRY_COMPILE(
1329 [
1330#include <sys/types.h>
1331 ],
1332 [ ssize_t foo; foo = 1235; ],
1333 [ ac_cv_have_ssize_t="yes" ],
1334 [ ac_cv_have_ssize_t="no" ]
1335 )
1336])
1337if test "x$ac_cv_have_ssize_t" = "xyes" ; then
1338 AC_DEFINE(HAVE_SSIZE_T)
1339fi
1340
Ben Lindstrom0d5af602001-01-09 00:50:29 +00001341AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [
1342 AC_TRY_COMPILE(
1343 [
1344#include <time.h>
1345 ],
1346 [ clock_t foo; foo = 1235; ],
1347 [ ac_cv_have_clock_t="yes" ],
1348 [ ac_cv_have_clock_t="no" ]
1349 )
1350])
1351if test "x$ac_cv_have_clock_t" = "xyes" ; then
1352 AC_DEFINE(HAVE_CLOCK_T)
1353fi
1354
Damien Millerb54b40e2000-06-23 08:23:34 +10001355AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
1356 AC_TRY_COMPILE(
1357 [
1358#include <sys/types.h>
1359#include <sys/socket.h>
1360 ],
1361 [ sa_family_t foo; foo = 1235; ],
1362 [ ac_cv_have_sa_family_t="yes" ],
Damien Miller78315eb2000-09-29 23:01:36 +11001363 [ AC_TRY_COMPILE(
1364 [
1365#include <sys/types.h>
1366#include <sys/socket.h>
1367#include <netinet/in.h>
1368 ],
1369 [ sa_family_t foo; foo = 1235; ],
1370 [ ac_cv_have_sa_family_t="yes" ],
1371
Damien Millerb54b40e2000-06-23 08:23:34 +10001372 [ ac_cv_have_sa_family_t="no" ]
Damien Miller78315eb2000-09-29 23:01:36 +11001373 )]
Damien Millerb54b40e2000-06-23 08:23:34 +10001374 )
1375])
1376if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
1377 AC_DEFINE(HAVE_SA_FAMILY_T)
1378fi
1379
Damien Miller0f91b4e2000-06-18 15:43:25 +10001380AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
1381 AC_TRY_COMPILE(
1382 [
1383#include <sys/types.h>
1384 ],
1385 [ pid_t foo; foo = 1235; ],
1386 [ ac_cv_have_pid_t="yes" ],
1387 [ ac_cv_have_pid_t="no" ]
1388 )
1389])
1390if test "x$ac_cv_have_pid_t" = "xyes" ; then
1391 AC_DEFINE(HAVE_PID_T)
1392fi
1393
1394AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
1395 AC_TRY_COMPILE(
1396 [
1397#include <sys/types.h>
1398 ],
1399 [ mode_t foo; foo = 1235; ],
1400 [ ac_cv_have_mode_t="yes" ],
1401 [ ac_cv_have_mode_t="no" ]
1402 )
1403])
1404if test "x$ac_cv_have_mode_t" = "xyes" ; then
1405 AC_DEFINE(HAVE_MODE_T)
1406fi
1407
Damien Miller61e50f12000-05-08 20:49:37 +10001408
1409AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
1410 AC_TRY_COMPILE(
1411 [
Damien Miller81171112000-04-23 11:14:01 +10001412#include <sys/types.h>
1413#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +10001414 ],
1415 [ struct sockaddr_storage s; ],
1416 [ ac_cv_have_struct_sockaddr_storage="yes" ],
1417 [ ac_cv_have_struct_sockaddr_storage="no" ]
1418 )
1419])
1420if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
1421 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)
1422fi
Damien Miller34132e52000-01-14 15:45:46 +11001423
Damien Miller61e50f12000-05-08 20:49:37 +10001424AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
1425 AC_TRY_COMPILE(
1426 [
Damien Miller7b22d652000-06-18 14:07:04 +10001427#include <sys/types.h>
Damien Miller61e50f12000-05-08 20:49:37 +10001428#include <netinet/in.h>
1429 ],
1430 [ struct sockaddr_in6 s; s.sin6_family = 0; ],
1431 [ ac_cv_have_struct_sockaddr_in6="yes" ],
1432 [ ac_cv_have_struct_sockaddr_in6="no" ]
1433 )
1434])
1435if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
1436 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)
1437fi
Damien Miller34132e52000-01-14 15:45:46 +11001438
Damien Miller61e50f12000-05-08 20:49:37 +10001439AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
1440 AC_TRY_COMPILE(
1441 [
Damien Miller7b22d652000-06-18 14:07:04 +10001442#include <sys/types.h>
Damien Miller61e50f12000-05-08 20:49:37 +10001443#include <netinet/in.h>
1444 ],
1445 [ struct in6_addr s; s.s6_addr[0] = 0; ],
1446 [ ac_cv_have_struct_in6_addr="yes" ],
1447 [ ac_cv_have_struct_in6_addr="no" ]
1448 )
1449])
1450if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
1451 AC_DEFINE(HAVE_STRUCT_IN6_ADDR)
1452fi
Damien Miller34132e52000-01-14 15:45:46 +11001453
Damien Miller61e50f12000-05-08 20:49:37 +10001454AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
1455 AC_TRY_COMPILE(
1456 [
Damien Miller81171112000-04-23 11:14:01 +10001457#include <sys/types.h>
1458#include <sys/socket.h>
1459#include <netdb.h>
Damien Miller61e50f12000-05-08 20:49:37 +10001460 ],
1461 [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ],
1462 [ ac_cv_have_struct_addrinfo="yes" ],
1463 [ ac_cv_have_struct_addrinfo="no" ]
1464 )
1465])
1466if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
1467 AC_DEFINE(HAVE_STRUCT_ADDRINFO)
1468fi
1469
Ben Lindstrom42202bc2001-01-15 02:34:37 +00001470AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [
1471 AC_TRY_COMPILE(
1472 [ #include <sys/time.h> ],
1473 [ struct timeval tv; tv.tv_sec = 1;],
1474 [ ac_cv_have_struct_timeval="yes" ],
1475 [ ac_cv_have_struct_timeval="no" ]
1476 )
1477])
1478if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
1479 AC_DEFINE(HAVE_STRUCT_TIMEVAL)
1480 have_struct_timeval=1
1481fi
1482
Ben Lindstrom3ad650a2001-01-03 06:02:51 +00001483# If we don't have int64_t then we can't compile sftp-server. So don't
1484# even attempt to do it.
1485if test "x$ac_cv_have_int64_t" = "xno" -a \
1486 "x$ac_cv_sizeof_long_int" != "x8" -a \
1487 "x$ac_cv_sizeof_long_long_int" = "x0" ; then
1488 NO_SFTP='#'
Tim Ricebee3f222001-03-11 17:32:12 -08001489else
1490dnl test snprintf (broken on SCO w/gcc)
1491 AC_TRY_RUN(
1492 [
1493#include <stdio.h>
1494#include <string.h>
1495#ifdef HAVE_SNPRINTF
1496main()
1497{
1498 char buf[50];
1499 char expected_out[50];
1500 int mazsize = 50 ;
1501#if (SIZEOF_LONG_INT == 8)
1502 long int num = 0x7fffffffffffffff;
1503#else
Kevin Steves6482ec82001-07-15 02:09:28 +00001504 long long num = 0x7fffffffffffffffll;
Tim Ricebee3f222001-03-11 17:32:12 -08001505#endif
1506 strcpy(expected_out, "9223372036854775807");
1507 snprintf(buf, mazsize, "%lld", num);
1508 if(strcmp(buf, expected_out) != 0)
1509 exit(1);
1510 exit(0);
1511}
1512#else
1513main() { exit(0); }
1514#endif
1515 ], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ]
1516 )
Ben Lindstrom3ad650a2001-01-03 06:02:51 +00001517fi
Ben Lindstrom42202bc2001-01-15 02:34:37 +00001518AC_SUBST(NO_SFTP)
Ben Lindstrom3ad650a2001-01-03 06:02:51 +00001519
Damien Miller78315eb2000-09-29 23:01:36 +11001520dnl Checks for structure members
Damien Miller61e50f12000-05-08 20:49:37 +10001521OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
1522OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX)
1523OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX)
1524OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP)
1525OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP)
Damien Millerad1bc5f2000-05-20 14:53:09 +10001526OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX)
Damien Miller61e50f12000-05-08 20:49:37 +10001527OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP)
1528OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP)
Damien Miller8e81ed32000-07-01 13:17:42 +10001529OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmpx.h, HAVE_ID_IN_UTMPX)
Damien Miller61e50f12000-05-08 20:49:37 +10001530OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP)
1531OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX)
1532OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP)
1533OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX)
andre2ff7b5d2000-06-03 14:57:40 +00001534OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP)
1535OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP)
1536OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX)
1537OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX)
Tim Rice13aae5e2001-10-21 17:53:58 -07001538
1539AC_CHECK_MEMBERS([struct stat.st_blksize])
andre2ff7b5d2000-06-03 14:57:40 +00001540
Damien Miller61e50f12000-05-08 20:49:37 +10001541AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
1542 ac_cv_have_ss_family_in_struct_ss, [
1543 AC_TRY_COMPILE(
1544 [
Damien Miller81171112000-04-23 11:14:01 +10001545#include <sys/types.h>
1546#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +10001547 ],
1548 [ struct sockaddr_storage s; s.ss_family = 1; ],
1549 [ ac_cv_have_ss_family_in_struct_ss="yes" ],
1550 [ ac_cv_have_ss_family_in_struct_ss="no" ],
1551 )
1552])
1553if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
1554 AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
1555fi
1556
Damien Miller61e50f12000-05-08 20:49:37 +10001557AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
1558 ac_cv_have___ss_family_in_struct_ss, [
1559 AC_TRY_COMPILE(
1560 [
Damien Miller81171112000-04-23 11:14:01 +10001561#include <sys/types.h>
1562#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +10001563 ],
1564 [ struct sockaddr_storage s; s.__ss_family = 1; ],
1565 [ ac_cv_have___ss_family_in_struct_ss="yes" ],
1566 [ ac_cv_have___ss_family_in_struct_ss="no" ]
1567 )
1568])
1569if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
1570 AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
1571fi
Damien Millerbf1c9b21999-12-09 10:16:54 +11001572
Damien Millerad833b32000-08-23 10:46:23 +10001573AC_CACHE_CHECK([for pw_class field in struct passwd],
1574 ac_cv_have_pw_class_in_struct_passwd, [
1575 AC_TRY_COMPILE(
1576 [
Damien Millerad833b32000-08-23 10:46:23 +10001577#include <pwd.h>
1578 ],
Kevin Steves48b7cc02000-10-07 13:24:00 +00001579 [ struct passwd p; p.pw_class = 0; ],
Damien Millerad833b32000-08-23 10:46:23 +10001580 [ ac_cv_have_pw_class_in_struct_passwd="yes" ],
1581 [ ac_cv_have_pw_class_in_struct_passwd="no" ]
1582 )
1583])
1584if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
1585 AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD)
1586fi
1587
Kevin Steves82456952001-06-22 21:14:18 +00001588AC_CACHE_CHECK([for pw_expire field in struct passwd],
1589 ac_cv_have_pw_expire_in_struct_passwd, [
1590 AC_TRY_COMPILE(
1591 [
1592#include <pwd.h>
1593 ],
1594 [ struct passwd p; p.pw_expire = 0; ],
1595 [ ac_cv_have_pw_expire_in_struct_passwd="yes" ],
1596 [ ac_cv_have_pw_expire_in_struct_passwd="no" ]
1597 )
1598])
1599if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then
1600 AC_DEFINE(HAVE_PW_EXPIRE_IN_PASSWD)
1601fi
1602
1603AC_CACHE_CHECK([for pw_change field in struct passwd],
1604 ac_cv_have_pw_change_in_struct_passwd, [
1605 AC_TRY_COMPILE(
1606 [
1607#include <pwd.h>
1608 ],
1609 [ struct passwd p; p.pw_change = 0; ],
1610 [ ac_cv_have_pw_change_in_struct_passwd="yes" ],
1611 [ ac_cv_have_pw_change_in_struct_passwd="no" ]
1612 )
1613])
1614if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then
1615 AC_DEFINE(HAVE_PW_CHANGE_IN_PASSWD)
1616fi
Damien Miller61e50f12000-05-08 20:49:37 +10001617
Kevin Steves939c9db2002-03-22 17:23:25 +00001618AC_CACHE_CHECK([for msg_accrights field in struct msghdr],
1619 ac_cv_have_accrights_in_msghdr, [
1620 AC_TRY_COMPILE(
1621 [
Tim Riceae49fe62002-04-12 10:26:21 -07001622#include <sys/types.h>
Kevin Steves939c9db2002-03-22 17:23:25 +00001623#include <sys/socket.h>
1624#include <sys/uio.h>
1625 ],
1626 [ struct msghdr m; m.msg_accrights = 0; ],
1627 [ ac_cv_have_accrights_in_msghdr="yes" ],
1628 [ ac_cv_have_accrights_in_msghdr="no" ]
1629 )
1630])
1631if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
1632 AC_DEFINE(HAVE_ACCRIGHTS_IN_MSGHDR)
1633fi
1634
Kevin Stevesa44e0352002-04-07 16:18:03 +00001635AC_CACHE_CHECK([for msg_control field in struct msghdr],
1636 ac_cv_have_control_in_msghdr, [
1637 AC_TRY_COMPILE(
1638 [
Tim Riceae49fe62002-04-12 10:26:21 -07001639#include <sys/types.h>
Kevin Stevesa44e0352002-04-07 16:18:03 +00001640#include <sys/socket.h>
1641#include <sys/uio.h>
1642 ],
1643 [ struct msghdr m; m.msg_control = 0; ],
1644 [ ac_cv_have_control_in_msghdr="yes" ],
1645 [ ac_cv_have_control_in_msghdr="no" ]
1646 )
1647])
1648if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
1649 AC_DEFINE(HAVE_CONTROL_IN_MSGHDR)
1650fi
1651
Damien Miller61e50f12000-05-08 20:49:37 +10001652AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
1653 AC_TRY_LINK([],
1654 [ extern char *__progname; printf("%s", __progname); ],
1655 [ ac_cv_libc_defines___progname="yes" ],
1656 [ ac_cv_libc_defines___progname="no" ]
1657 )
1658])
1659if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
1660 AC_DEFINE(HAVE___PROGNAME)
1661fi
1662
Kevin Steves4846f4a2002-03-22 18:19:53 +00001663AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNCTION__, [
1664 AC_TRY_LINK([
1665#include <stdio.h>
1666],
1667 [ printf("%s", __FUNCTION__); ],
1668 [ ac_cv_cc_implements___FUNCTION__="yes" ],
1669 [ ac_cv_cc_implements___FUNCTION__="no" ]
1670 )
1671])
1672if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
1673 AC_DEFINE(HAVE___FUNCTION__)
1674fi
1675
1676AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__, [
1677 AC_TRY_LINK([
1678#include <stdio.h>
1679],
1680 [ printf("%s", __func__); ],
1681 [ ac_cv_cc_implements___func__="yes" ],
1682 [ ac_cv_cc_implements___func__="no" ]
1683 )
1684])
1685if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
1686 AC_DEFINE(HAVE___func__)
1687fi
1688
Damien Miller4f8e6692001-07-14 13:22:53 +10001689AC_CACHE_CHECK([whether getopt has optreset support],
1690 ac_cv_have_getopt_optreset, [
1691 AC_TRY_LINK(
1692 [
1693#include <getopt.h>
1694 ],
1695 [ extern int optreset; optreset = 0; ],
1696 [ ac_cv_have_getopt_optreset="yes" ],
1697 [ ac_cv_have_getopt_optreset="no" ]
1698 )
1699])
1700if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
1701 AC_DEFINE(HAVE_GETOPT_OPTRESET)
1702fi
Damien Millera22ba012000-03-02 23:09:20 +11001703
Damien Millerecbb26d2000-07-15 14:59:14 +10001704AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
1705 AC_TRY_LINK([],
1706 [ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);],
1707 [ ac_cv_libc_defines_sys_errlist="yes" ],
1708 [ ac_cv_libc_defines_sys_errlist="no" ]
1709 )
1710])
1711if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
1712 AC_DEFINE(HAVE_SYS_ERRLIST)
1713fi
1714
1715
Damien Miller11fa2cc2000-08-16 10:35:58 +10001716AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [
1717 AC_TRY_LINK([],
1718 [ extern int sys_nerr; printf("%i", sys_nerr);],
1719 [ ac_cv_libc_defines_sys_nerr="yes" ],
1720 [ ac_cv_libc_defines_sys_nerr="no" ]
1721 )
1722])
1723if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
1724 AC_DEFINE(HAVE_SYS_NERR)
1725fi
1726
Damien Miller85de5802001-09-18 14:01:11 +10001727SCARD_MSG="no"
Ben Lindstroma42694f2002-04-05 16:11:45 +00001728
1729# Check whether user wants sectok support
1730AC_ARG_WITH(sectok,
1731 [ --with-sectok Enable smartcard support using libsectok],
Damien Miller85de5802001-09-18 14:01:11 +10001732 [
1733 if test "x$withval" != "xno" ; then
1734 if test "x$withval" != "xyes" ; then
1735 CPPFLAGS="$CPPFLAGS -I${withval}"
1736 LDFLAGS="$LDFLAGS -L${withval}"
1737 if test ! -z "$need_dash_r" ; then
1738 LDFLAGS="$LDFLAGS -R${withval}"
1739 fi
1740 if test ! -z "$blibpath" ; then
1741 blibpath="$blibpath:${withval}"
1742 fi
1743 fi
1744 AC_CHECK_HEADERS(sectok.h)
1745 if test "$ac_cv_header_sectok_h" != yes; then
1746 AC_MSG_ERROR(Can't find sectok.h)
1747 fi
1748 AC_CHECK_LIB(sectok, sectok_open)
1749 if test "$ac_cv_lib_sectok_sectok_open" != yes; then
1750 AC_MSG_ERROR(Can't find libsectok)
1751 fi
1752 AC_DEFINE(SMARTCARD)
Ben Lindstroma42694f2002-04-05 16:11:45 +00001753 AC_DEFINE(USE_SECTOK)
1754 SCARD_MSG="yes, using sectok"
1755 fi
1756 ]
1757)
1758
1759# Check whether user wants OpenSC support
1760AC_ARG_WITH(opensc,
Damien Millerf6195f22002-04-23 22:48:46 +10001761 AC_HELP_STRING([--with-opensc=PFX],
1762 [Enable smartcard support using OpenSC]),
1763 opensc_config_prefix="$withval", opensc_config_prefix="")
1764if test x$opensc_config_prefix != x ; then
1765 OPENSC_CONFIG=$opensc_config_prefix/bin/opensc-config
1766 AC_PATH_PROG(OPENSC_CONFIG, opensc-config, no)
1767 if test "$OPENSC_CONFIG" != "no"; then
1768 LIBOPENSC_CFLAGS=`$OPENSC_CONFIG --cflags`
1769 LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs`
1770 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS"
1771 LDFLAGS="$LDFLAGS $LIBOPENSC_LIBS"
1772 AC_DEFINE(SMARTCARD)
1773 AC_DEFINE(USE_OPENSC)
1774 SCARD_MSG="yes, using OpenSC"
1775 fi
1776fi
Damien Miller85de5802001-09-18 14:01:11 +10001777
Damien Millerfd4c9ee2002-04-13 11:04:40 +10001778# Check whether user wants Kerberos 5 support
1779KRB5_MSG="no"
1780AC_ARG_WITH(kerberos5,
1781 [ --with-kerberos5=PATH Enable Kerberos 5 support],
1782 [
1783 if test "x$withval" != "xno" ; then
1784 if test "x$withval" = "xyes" ; then
1785 KRB5ROOT="/usr/local"
1786 else
1787 KRB5ROOT=${withval}
1788 fi
1789 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
1790 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
1791 AC_DEFINE(KRB5)
1792 KRB5_MSG="yes"
1793 AC_MSG_CHECKING(whether we are using Heimdal)
1794 AC_TRY_COMPILE([ #include <krb5.h> ],
1795 [ char *tmp = heimdal_version; ],
1796 [ AC_MSG_RESULT(yes)
1797 AC_DEFINE(HEIMDAL)
1798 K5LIBS="-lkrb5 -ldes -lcom_err -lasn1 -lroken"
1799 ],
1800 [ AC_MSG_RESULT(no)
1801 K5LIBS="-lkrb5 -lk5crypto -lcom_err"
1802 ]
1803 )
1804 if test ! -z "$need_dash_r" ; then
1805 LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib"
1806 fi
1807 if test ! -z "$blibpath" ; then
1808 blibpath="$blibpath:${KRB5ROOT}/lib"
1809 fi
1810 AC_CHECK_LIB(resolv, dn_expand, , )
1811
1812 KRB5=yes
1813 fi
1814 ]
1815)
1816# Check whether user wants Kerberos 4 support
Damien Millerc79bc0d2001-03-28 13:03:42 +10001817KRB4_MSG="no"
1818AC_ARG_WITH(kerberos4,
1819 [ --with-kerberos4=PATH Enable Kerberos 4 support],
1820 [
1821 if test "x$withval" != "xno" ; then
Damien Millerc79bc0d2001-03-28 13:03:42 +10001822 if test "x$withval" != "xyes" ; then
1823 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1824 LDFLAGS="$LDFLAGS -L${withval}/lib"
1825 if test ! -z "$need_dash_r" ; then
1826 LDFLAGS="$LDFLAGS -R${withval}/lib"
1827 fi
1828 if test ! -z "$blibpath" ; then
1829 blibpath="$blibpath:${withval}/lib"
1830 fi
1831 else
1832 if test -d /usr/include/kerberosIV ; then
1833 CPPFLAGS="$CPPFLAGS -I/usr/include/kerberosIV"
1834 fi
1835 fi
1836
1837 AC_CHECK_HEADERS(krb.h)
Damien Millerc79bc0d2001-03-28 13:03:42 +10001838 if test "$ac_cv_header_krb_h" != yes; then
1839 AC_MSG_WARN([Cannot find krb.h, build may fail])
1840 fi
Damien Miller98344742001-03-28 14:37:06 +10001841 AC_CHECK_LIB(krb, main)
Damien Millerc79bc0d2001-03-28 13:03:42 +10001842 if test "$ac_cv_lib_krb_main" != yes; then
Damien Miller98344742001-03-28 14:37:06 +10001843 AC_CHECK_LIB(krb4, main)
1844 if test "$ac_cv_lib_krb4_main" != yes; then
1845 AC_MSG_WARN([Cannot find libkrb nor libkrb4, build may fail])
1846 else
1847 KLIBS="-lkrb4"
1848 fi
1849 else
1850 KLIBS="-lkrb"
Damien Millerc79bc0d2001-03-28 13:03:42 +10001851 fi
Damien Miller98344742001-03-28 14:37:06 +10001852 AC_CHECK_LIB(des, des_cbc_encrypt)
1853 if test "$ac_cv_lib_des_des_cbc_encrypt" != yes; then
1854 AC_CHECK_LIB(des425, des_cbc_encrypt)
1855 if test "$ac_cv_lib_des425_des_cbc_encrypt" != yes; then
1856 AC_MSG_WARN([Cannot find libdes nor libdes425, build may fail])
1857 else
1858 KLIBS="-ldes425"
1859 fi
1860 else
1861 KLIBS="-ldes"
1862 fi
Damien Millerc79bc0d2001-03-28 13:03:42 +10001863 AC_CHECK_LIB(resolv, dn_expand, , )
1864 KRB4=yes
1865 KRB4_MSG="yes"
1866 AC_DEFINE(KRB4)
1867 fi
1868 ]
1869)
1870
1871# Check whether user wants AFS support
1872AFS_MSG="no"
1873AC_ARG_WITH(afs,
1874 [ --with-afs=PATH Enable AFS support],
1875 [
1876 if test "x$withval" != "xno" ; then
1877
1878 if test "x$withval" != "xyes" ; then
1879 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1880 LDFLAGS="$LDFLAGS -L${withval}/lib"
1881 fi
1882
1883 if test -z "$KRB4" ; then
1884 AC_MSG_WARN([AFS requires Kerberos IV support, build may fail])
1885 fi
1886
1887 LIBS="-lkafs $LIBS"
1888 if test ! -z "$AFS_LIBS" ; then
1889 LIBS="$LIBS $AFS_LIBS"
1890 fi
1891 AC_DEFINE(AFS)
1892 AFS_MSG="yes"
1893 fi
1894 ]
1895)
Damien Millerfd4c9ee2002-04-13 11:04:40 +10001896LIBS="$LIBS $KLIBS $K5LIBS"
Damien Millerc79bc0d2001-03-28 13:03:42 +10001897
Damien Millera22ba012000-03-02 23:09:20 +11001898# Looking for programs, paths and files
1899AC_ARG_WITH(rsh,
1900 [ --with-rsh=PATH Specify path to remote shell program ],
1901 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001902 if test "x$withval" != "$no" ; then
Damien Miller90dcc052000-07-08 10:17:40 +10001903 rsh_path=$withval
Damien Millera22ba012000-03-02 23:09:20 +11001904 fi
1905 ],
1906 [
1907 AC_PATH_PROG(rsh_path, rsh)
1908 ]
1909)
1910
1911AC_ARG_WITH(xauth,
1912 [ --with-xauth=PATH Specify path to xauth program ],
1913 [
Ben Lindstrom76020ba2000-10-25 16:55:00 +00001914 if test "x$withval" != "xno" ; then
Damien Miller7b22d652000-06-18 14:07:04 +10001915 xauth_path=$withval
Damien Millera22ba012000-03-02 23:09:20 +11001916 fi
1917 ],
1918 [
Damien Miller78315eb2000-09-29 23:01:36 +11001919 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 +10001920 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
Damien Millera22ba012000-03-02 23:09:20 +11001921 xauth_path="/usr/openwin/bin/xauth"
1922 fi
1923 ]
1924)
1925
Damien Millera19cf472000-11-29 13:28:50 +11001926if test -z "$xauth_path" ; then
1927 XAUTH_PATH="undefined"
1928 AC_SUBST(XAUTH_PATH)
1929else
Damien Millera22ba012000-03-02 23:09:20 +11001930 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
Damien Millera19cf472000-11-29 13:28:50 +11001931 XAUTH_PATH=$xauth_path
1932 AC_SUBST(XAUTH_PATH)
Damien Millera22ba012000-03-02 23:09:20 +11001933fi
1934if test ! -z "$rsh_path" ; then
1935 AC_DEFINE_UNQUOTED(RSH_PATH, "$rsh_path")
1936fi
1937
1938# Check for mail directory (last resort if we cannot get it from headers)
1939if test ! -z "$MAIL" ; then
1940 maildir=`dirname $MAIL`
1941 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
1942fi
1943
Damien Millera22ba012000-03-02 23:09:20 +11001944if test -z "$no_dev_ptmx" ; then
Kevin Steves0ea1d9d2002-04-25 18:17:04 +00001945 if test "x$disable_ptmx_check" != "xyes" ; then
1946 AC_CHECK_FILE("/dev/ptmx",
1947 [
1948 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
1949 have_dev_ptmx=1
1950 ]
1951 )
1952 fi
Damien Millera22ba012000-03-02 23:09:20 +11001953fi
Damien Miller204ad072000-03-02 23:56:12 +11001954AC_CHECK_FILE("/dev/ptc",
1955 [
1956 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
1957 have_dev_ptc=1
1958 ]
1959)
1960
Damien Millera22ba012000-03-02 23:09:20 +11001961# Options from here on. Some of these are preset by platform above
Ben Lindstrom9841b0a2001-06-09 02:26:58 +00001962AC_ARG_WITH(mantype,
Damien Miller897741e2001-04-16 10:41:46 +10001963 [ --with-mantype=man|cat|doc Set man page type],
Damien Miller670a4b82000-01-22 13:53:11 +11001964 [
Damien Miller897741e2001-04-16 10:41:46 +10001965 case "$withval" in
1966 man|cat|doc)
1967 MANTYPE=$withval
1968 ;;
1969 *)
1970 AC_MSG_ERROR(invalid man type: $withval)
1971 ;;
1972 esac
Damien Miller670a4b82000-01-22 13:53:11 +11001973 ]
1974)
Ben Lindstrombc709922001-04-18 18:04:21 +00001975if test -z "$MANTYPE"; then
Tim Rice07183b82001-04-25 21:40:28 -07001976 AC_PATH_PROGS(NROFF, nroff awf, /bin/false, /usr/bin:/usr/ucb)
Ben Lindstrombc709922001-04-18 18:04:21 +00001977 if ${NROFF} -mdoc ${srcdir}/ssh.1 >/dev/null 2>&1; then
1978 MANTYPE=doc
1979 elif ${NROFF} -man ${srcdir}/ssh.1 >/dev/null 2>&1; then
1980 MANTYPE=man
1981 else
1982 MANTYPE=cat
1983 fi
1984fi
Damien Miller670a4b82000-01-22 13:53:11 +11001985AC_SUBST(MANTYPE)
Ben Lindstrombc709922001-04-18 18:04:21 +00001986if test "$MANTYPE" = "doc"; then
1987 mansubdir=man;
1988else
1989 mansubdir=$MANTYPE;
1990fi
1991AC_SUBST(mansubdir)
Damien Miller8bdeee21999-12-30 15:50:54 +11001992
Damien Millera22ba012000-03-02 23:09:20 +11001993# Check whether to enable MD5 passwords
Damien Miller7b22d652000-06-18 14:07:04 +10001994MD5_MSG="no"
Damien Millerf7c0f821999-11-22 22:31:49 +11001995AC_ARG_WITH(md5-passwords,
Damien Millerdd1c7ba1999-11-19 15:53:20 +11001996 [ --with-md5-passwords Enable use of MD5 passwords],
Damien Miller8bdeee21999-12-30 15:50:54 +11001997 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001998 if test "x$withval" != "xno" ; then
Damien Miller8bdeee21999-12-30 15:50:54 +11001999 AC_DEFINE(HAVE_MD5_PASSWORDS)
Damien Miller7b22d652000-06-18 14:07:04 +10002000 MD5_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +11002001 fi
2002 ]
Damien Millerdd1c7ba1999-11-19 15:53:20 +11002003)
2004
Damien Millera22ba012000-03-02 23:09:20 +11002005# Whether to disable shadow password support
Damien Miller76112de1999-12-21 11:18:08 +11002006AC_ARG_WITH(shadow,
2007 [ --without-shadow Disable shadow password support],
2008 [
2009 if test "x$withval" = "xno" ; then
2010 AC_DEFINE(DISABLE_SHADOW)
Damien Miller1f335fb2000-06-26 11:31:33 +10002011 disable_shadow=yes
Damien Miller76112de1999-12-21 11:18:08 +11002012 fi
2013 ]
2014)
2015
Damien Miller1f335fb2000-06-26 11:31:33 +10002016if test -z "$disable_shadow" ; then
2017 AC_MSG_CHECKING([if the systems has expire shadow information])
2018 AC_TRY_COMPILE(
2019 [
2020#include <sys/types.h>
2021#include <shadow.h>
2022 struct spwd sp;
2023 ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ],
2024 [ sp_expire_available=yes ], []
2025 )
2026
2027 if test "x$sp_expire_available" = "xyes" ; then
2028 AC_MSG_RESULT(yes)
2029 AC_DEFINE(HAS_SHADOW_EXPIRE)
2030 else
2031 AC_MSG_RESULT(no)
2032 fi
2033fi
2034
Damien Millera22ba012000-03-02 23:09:20 +11002035# Use ip address instead of hostname in $DISPLAY
Damien Miller9a947342000-08-30 10:03:33 +11002036if test ! -z "$IPADDR_IN_DISPLAY" ; then
2037 DISPLAY_HACK_MSG="yes"
2038 AC_DEFINE(IPADDR_IN_DISPLAY)
2039else
2040 DISPLAY_HACK_MSG="no"
2041 AC_ARG_WITH(ipaddr-display,
2042 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
2043 [
2044 if test "x$withval" != "xno" ; then
2045 AC_DEFINE(IPADDR_IN_DISPLAY)
2046 DISPLAY_HACK_MSG="yes"
2047 fi
2048 ]
2049 )
2050fi
Damien Miller76112de1999-12-21 11:18:08 +11002051
Tim Rice43a1c132002-04-17 21:19:14 -07002052dnl BSD systems use /etc/login.conf so --with-default-path= has no effect
2053if test $ac_cv_func_login_getcapbool = "yes" -a \
2054 $ac_cv_header_login_cap_h = "yes" ; then
2055 USES_LOGIN_CONF=yes
2056fi
Damien Millera22ba012000-03-02 23:09:20 +11002057# Whether to mess with the default path
Damien Miller7b22d652000-06-18 14:07:04 +10002058SERVER_PATH_MSG="(default)"
Damien Millere7f626c1999-12-31 09:49:44 +11002059AC_ARG_WITH(default-path,
Damien Miller5a3e6831999-12-27 09:48:56 +11002060 [ --with-default-path=PATH Specify default \$PATH environment for server],
2061 [
Tim Rice43a1c132002-04-17 21:19:14 -07002062 if test "$USES_LOGIN_CONF" = "yes" ; then
2063 AC_MSG_WARN([
2064--with-default-path=PATH has no effect on this system.
2065Edit /etc/login.conf instead.])
2066 elif test "x$withval" != "xno" ; then
Tim Rice59ea0a02001-03-10 13:50:45 -08002067 user_path="$withval"
Damien Miller7b22d652000-06-18 14:07:04 +10002068 SERVER_PATH_MSG="$withval"
Damien Miller5a3e6831999-12-27 09:48:56 +11002069 fi
Tim Rice59ea0a02001-03-10 13:50:45 -08002070 ],
Tim Rice43a1c132002-04-17 21:19:14 -07002071 [ if test "$USES_LOGIN_CONF" = "yes" ; then
2072 AC_MSG_WARN([Make sure the path to scp is in /etc/login.conf])
2073 else
Tim Rice59ea0a02001-03-10 13:50:45 -08002074 AC_TRY_RUN(
2075 [
2076/* find out what STDPATH is */
2077#include <stdio.h>
Tim Rice59ea0a02001-03-10 13:50:45 -08002078#ifdef HAVE_PATHS_H
2079# include <paths.h>
2080#endif
2081#ifndef _PATH_STDPATH
2082# define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
2083#endif
2084#include <sys/types.h>
2085#include <sys/stat.h>
2086#include <fcntl.h>
2087#define DATA "conftest.stdpath"
2088
2089main()
2090{
2091 FILE *fd;
2092 int rc;
2093
2094 fd = fopen(DATA,"w");
2095 if(fd == NULL)
2096 exit(1);
2097
2098 if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0)
2099 exit(1);
2100
2101 exit(0);
2102}
2103 ], [ user_path=`cat conftest.stdpath` ],
2104 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ],
2105 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ]
2106 )
2107# make sure $bindir is in USER_PATH so scp will work
2108 t_bindir=`eval echo ${bindir}`
2109 case $t_bindir in
2110 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$prefix~"` ;;
2111 esac
2112 case $t_bindir in
2113 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$ac_default_prefix~"` ;;
2114 esac
2115 echo $user_path | grep ":$t_bindir" > /dev/null 2>&1
2116 if test $? -ne 0 ; then
2117 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1
2118 if test $? -ne 0 ; then
2119 user_path=$user_path:$t_bindir
2120 AC_MSG_RESULT(Adding $t_bindir to USER_PATH so scp will work)
2121 fi
2122 fi
Tim Rice43a1c132002-04-17 21:19:14 -07002123 fi ]
Damien Miller5a3e6831999-12-27 09:48:56 +11002124)
Tim Rice43a1c132002-04-17 21:19:14 -07002125if test "$USES_LOGIN_CONF" != "yes" ; then
2126 AC_DEFINE_UNQUOTED(USER_PATH, "$user_path")
2127 AC_SUBST(user_path)
2128fi
Damien Miller5a3e6831999-12-27 09:48:56 +11002129
Damien Millera22ba012000-03-02 23:09:20 +11002130# Whether to force IPv4 by default (needed on broken glibc Linux)
Damien Miller7b22d652000-06-18 14:07:04 +10002131IPV4_HACK_MSG="no"
Damien Miller7d80e342000-01-19 14:36:49 +11002132AC_ARG_WITH(ipv4-default,
2133 [ --with-ipv4-default Use IPv4 by connections unless '-6' specified],
2134 [
2135 if test "x$withval" != "xno" ; then
2136 AC_DEFINE(IPV4_DEFAULT)
Damien Miller7b22d652000-06-18 14:07:04 +10002137 IPV4_HACK_MSG="yes"
Damien Miller7d80e342000-01-19 14:36:49 +11002138 fi
2139 ]
2140)
2141
Damien Miller61e50f12000-05-08 20:49:37 +10002142AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
Damien Miller7b22d652000-06-18 14:07:04 +10002143IPV4_IN6_HACK_MSG="no"
Damien Miller7bcb0892000-03-11 20:45:40 +11002144AC_ARG_WITH(4in6,
2145 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
2146 [
2147 if test "x$withval" != "xno" ; then
2148 AC_MSG_RESULT(yes)
2149 AC_DEFINE(IPV4_IN_IPV6)
Damien Miller7b22d652000-06-18 14:07:04 +10002150 IPV4_IN6_HACK_MSG="yes"
Damien Miller7bcb0892000-03-11 20:45:40 +11002151 else
2152 AC_MSG_RESULT(no)
2153 fi
2154 ],[
2155 if test "x$inet6_default_4in6" = "xyes"; then
2156 AC_MSG_RESULT([yes (default)])
2157 AC_DEFINE(IPV4_IN_IPV6)
Damien Miller7b22d652000-06-18 14:07:04 +10002158 IPV4_IN6_HACK_MSG="yes"
Damien Miller7bcb0892000-03-11 20:45:40 +11002159 else
2160 AC_MSG_RESULT([no (default)])
2161 fi
2162 ]
2163)
2164
Damien Miller60396b02001-02-18 17:01:00 +11002165# Whether to enable BSD auth support
Damien Miller6c21c512002-01-22 21:57:53 +11002166BSD_AUTH_MSG=no
Damien Miller60396b02001-02-18 17:01:00 +11002167AC_ARG_WITH(bsd-auth,
2168 [ --with-bsd-auth Enable BSD auth support],
2169 [
2170 if test "x$withval" != "xno" ; then
2171 AC_DEFINE(BSD_AUTH)
Damien Miller6c21c512002-01-22 21:57:53 +11002172 BSD_AUTH_MSG=yes
Damien Miller60396b02001-02-18 17:01:00 +11002173 fi
2174 ]
2175)
2176
Damien Miller78315eb2000-09-29 23:01:36 +11002177AC_MSG_CHECKING(whether to install ssh as suid root)
2178AC_ARG_ENABLE(suid-ssh,
2179[ --enable-suid-ssh Install ssh as suid root (default)
2180 --disable-suid-ssh Install ssh without suid bit],
2181[ case "$enableval" in
2182 no)
2183 AC_MSG_RESULT(no)
2184 SSHMODE=0711
2185 ;;
2186 *) AC_MSG_RESULT(yes)
Ben Lindstrom8e2aa5b2001-07-24 17:00:13 +00002187 SSHMODE=4711
Damien Miller78315eb2000-09-29 23:01:36 +11002188 ;;
2189 esac ],
2190 AC_MSG_RESULT(yes)
Ben Lindstrom8e2aa5b2001-07-24 17:00:13 +00002191 SSHMODE=4711
Damien Miller78315eb2000-09-29 23:01:36 +11002192)
2193AC_SUBST(SSHMODE)
2194
2195
Damien Millera22ba012000-03-02 23:09:20 +11002196# Where to place sshd.pid
Damien Millerb13c73e2000-01-17 22:02:17 +11002197piddir=/var/run
Damien Miller78315eb2000-09-29 23:01:36 +11002198# make sure the directory exists
2199if test ! -d $piddir ; then
2200 piddir=`eval echo ${sysconfdir}`
2201 case $piddir in
2202 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
2203 esac
2204fi
2205
Tim Rice88f2ab52002-03-17 12:17:34 -08002206AC_ARG_WITH(pid-dir,
2207 [ --with-pid-dir=PATH Specify location of ssh.pid file],
2208 [
2209 if test "x$withval" != "xno" ; then
2210 piddir=$withval
2211 if test ! -d $piddir ; then
2212 AC_MSG_WARN([** no $piddir directory on this system **])
2213 fi
2214 fi
2215 ]
2216)
2217
Ben Lindstrom226cfa02001-01-22 05:34:40 +00002218AC_DEFINE_UNQUOTED(_PATH_SSH_PIDDIR, "$piddir")
Damien Millerb13c73e2000-01-17 22:02:17 +11002219AC_SUBST(piddir)
Damien Miller5eed6a22000-01-16 12:05:18 +11002220
andre2ff7b5d2000-06-03 14:57:40 +00002221dnl allow user to disable some login recording features
2222AC_ARG_ENABLE(lastlog,
andre43ca7e22000-06-19 08:23:46 +00002223 [ --disable-lastlog disable use of lastlog even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00002224 [ AC_DEFINE(DISABLE_LASTLOG) ]
2225)
2226AC_ARG_ENABLE(utmp,
andre43ca7e22000-06-19 08:23:46 +00002227 [ --disable-utmp disable use of utmp even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00002228 [ AC_DEFINE(DISABLE_UTMP) ]
2229)
2230AC_ARG_ENABLE(utmpx,
andre43ca7e22000-06-19 08:23:46 +00002231 [ --disable-utmpx disable use of utmpx even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00002232 [ AC_DEFINE(DISABLE_UTMPX) ]
2233)
2234AC_ARG_ENABLE(wtmp,
andre43ca7e22000-06-19 08:23:46 +00002235 [ --disable-wtmp disable use of wtmp even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00002236 [ AC_DEFINE(DISABLE_WTMP) ]
2237)
2238AC_ARG_ENABLE(wtmpx,
andre43ca7e22000-06-19 08:23:46 +00002239 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00002240 [ AC_DEFINE(DISABLE_WTMPX) ]
2241)
2242AC_ARG_ENABLE(libutil,
andre43ca7e22000-06-19 08:23:46 +00002243 [ --disable-libutil disable use of libutil (login() etc.) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00002244 [ AC_DEFINE(DISABLE_LOGIN) ]
2245)
2246AC_ARG_ENABLE(pututline,
andre43ca7e22000-06-19 08:23:46 +00002247 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00002248 [ AC_DEFINE(DISABLE_PUTUTLINE) ]
2249)
2250AC_ARG_ENABLE(pututxline,
andre43ca7e22000-06-19 08:23:46 +00002251 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00002252 [ AC_DEFINE(DISABLE_PUTUTXLINE) ]
2253)
2254AC_ARG_WITH(lastlog,
andre43ca7e22000-06-19 08:23:46 +00002255 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
Damien Miller709528a2001-01-31 09:57:55 +11002256 [
2257 if test "x$withval" = "xno" ; then
2258 AC_DEFINE(DISABLE_LASTLOG)
2259 else
2260 conf_lastlog_location=$withval
2261 fi
2262 ]
2263)
andre2ff7b5d2000-06-03 14:57:40 +00002264
2265dnl lastlog, [uw]tmpx? detection
2266dnl NOTE: set the paths in the platform section to avoid the
2267dnl need for command-line parameters
2268dnl lastlog and [uw]tmp are subject to a file search if all else fails
2269
2270dnl lastlog detection
2271dnl NOTE: the code itself will detect if lastlog is a directory
2272AC_MSG_CHECKING([if your system defines LASTLOG_FILE])
2273AC_TRY_COMPILE([
2274#include <sys/types.h>
2275#include <utmp.h>
2276#ifdef HAVE_LASTLOG_H
2277# include <lastlog.h>
2278#endif
Damien Miller2994e082000-06-04 15:51:47 +10002279#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00002280# include <paths.h>
2281#endif
Ben Lindstrom19d7b8d2001-08-16 00:09:49 +00002282#ifdef HAVE_LOGIN_H
2283# include <login.h>
2284#endif
andre2ff7b5d2000-06-03 14:57:40 +00002285 ],
2286 [ char *lastlog = LASTLOG_FILE; ],
2287 [ AC_MSG_RESULT(yes) ],
Damien Miller2994e082000-06-04 15:51:47 +10002288 [
2289 AC_MSG_RESULT(no)
2290 AC_MSG_CHECKING([if your system defines _PATH_LASTLOG])
2291 AC_TRY_COMPILE([
2292#include <sys/types.h>
2293#include <utmp.h>
2294#ifdef HAVE_LASTLOG_H
2295# include <lastlog.h>
2296#endif
2297#ifdef HAVE_PATHS_H
2298# include <paths.h>
2299#endif
2300 ],
2301 [ char *lastlog = _PATH_LASTLOG; ],
2302 [ AC_MSG_RESULT(yes) ],
2303 [
andree441aa32000-06-12 22:34:38 +00002304 AC_MSG_RESULT(no)
Damien Miller2994e082000-06-04 15:51:47 +10002305 system_lastlog_path=no
2306 ])
2307 ]
andre2ff7b5d2000-06-03 14:57:40 +00002308)
Damien Miller2994e082000-06-04 15:51:47 +10002309
andre2ff7b5d2000-06-03 14:57:40 +00002310if test -z "$conf_lastlog_location"; then
2311 if test x"$system_lastlog_path" = x"no" ; then
2312 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
Damien Milleredb82922000-06-20 13:25:52 +10002313 if (test -d "$f" || test -f "$f") ; then
andre2ff7b5d2000-06-03 14:57:40 +00002314 conf_lastlog_location=$f
2315 fi
2316 done
2317 if test -z "$conf_lastlog_location"; then
andre45cad512000-06-12 23:27:31 +00002318 AC_MSG_WARN([** Cannot find lastlog **])
2319 dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx
andre2ff7b5d2000-06-03 14:57:40 +00002320 fi
2321 fi
2322fi
2323
2324if test -n "$conf_lastlog_location"; then
2325 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location")
2326fi
2327
2328dnl utmp detection
2329AC_MSG_CHECKING([if your system defines UTMP_FILE])
2330AC_TRY_COMPILE([
2331#include <sys/types.h>
2332#include <utmp.h>
Damien Miller2994e082000-06-04 15:51:47 +10002333#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00002334# include <paths.h>
2335#endif
2336 ],
2337 [ char *utmp = UTMP_FILE; ],
2338 [ AC_MSG_RESULT(yes) ],
2339 [ AC_MSG_RESULT(no)
2340 system_utmp_path=no ]
2341)
2342if test -z "$conf_utmp_location"; then
2343 if test x"$system_utmp_path" = x"no" ; then
2344 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
2345 if test -f $f ; then
2346 conf_utmp_location=$f
2347 fi
2348 done
2349 if test -z "$conf_utmp_location"; then
2350 AC_DEFINE(DISABLE_UTMP)
2351 fi
2352 fi
2353fi
2354if test -n "$conf_utmp_location"; then
2355 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location")
2356fi
2357
2358dnl wtmp detection
2359AC_MSG_CHECKING([if your system defines WTMP_FILE])
2360AC_TRY_COMPILE([
2361#include <sys/types.h>
2362#include <utmp.h>
Damien Miller2994e082000-06-04 15:51:47 +10002363#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00002364# include <paths.h>
2365#endif
2366 ],
2367 [ char *wtmp = WTMP_FILE; ],
2368 [ AC_MSG_RESULT(yes) ],
2369 [ AC_MSG_RESULT(no)
2370 system_wtmp_path=no ]
2371)
2372if test -z "$conf_wtmp_location"; then
2373 if test x"$system_wtmp_path" = x"no" ; then
2374 for f in /usr/adm/wtmp /var/log/wtmp; do
2375 if test -f $f ; then
2376 conf_wtmp_location=$f
2377 fi
2378 done
2379 if test -z "$conf_wtmp_location"; then
2380 AC_DEFINE(DISABLE_WTMP)
2381 fi
2382 fi
2383fi
2384if test -n "$conf_wtmp_location"; then
2385 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location")
2386fi
2387
2388
2389dnl utmpx detection - I don't know any system so perverse as to require
2390dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out
2391dnl there, though.
2392AC_MSG_CHECKING([if your system defines UTMPX_FILE])
2393AC_TRY_COMPILE([
2394#include <sys/types.h>
2395#include <utmp.h>
2396#ifdef HAVE_UTMPX_H
2397#include <utmpx.h>
2398#endif
Damien Miller2994e082000-06-04 15:51:47 +10002399#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00002400# include <paths.h>
2401#endif
2402 ],
2403 [ char *utmpx = UTMPX_FILE; ],
2404 [ AC_MSG_RESULT(yes) ],
2405 [ AC_MSG_RESULT(no)
2406 system_utmpx_path=no ]
2407)
2408if test -z "$conf_utmpx_location"; then
2409 if test x"$system_utmpx_path" = x"no" ; then
2410 AC_DEFINE(DISABLE_UTMPX)
2411 fi
2412else
2413 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location")
2414fi
2415
2416dnl wtmpx detection
2417AC_MSG_CHECKING([if your system defines WTMPX_FILE])
2418AC_TRY_COMPILE([
2419#include <sys/types.h>
2420#include <utmp.h>
2421#ifdef HAVE_UTMPX_H
2422#include <utmpx.h>
2423#endif
Damien Miller2994e082000-06-04 15:51:47 +10002424#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00002425# include <paths.h>
2426#endif
2427 ],
2428 [ char *wtmpx = WTMPX_FILE; ],
2429 [ AC_MSG_RESULT(yes) ],
2430 [ AC_MSG_RESULT(no)
2431 system_wtmpx_path=no ]
2432)
2433if test -z "$conf_wtmpx_location"; then
2434 if test x"$system_wtmpx_path" = x"no" ; then
2435 AC_DEFINE(DISABLE_WTMPX)
2436 fi
2437else
2438 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location")
2439fi
2440
Damien Miller4018c192000-04-30 09:30:44 +10002441
Damien Miller29ea30d2000-03-17 10:54:15 +11002442if test ! -z "$blibpath" ; then
2443 LDFLAGS="$LDFLAGS -blibpath:$blibpath"
2444 AC_MSG_WARN([Please check and edit -blibpath in LDFLAGS in Makefile])
2445fi
2446
Tim Rice4cec93f2002-02-26 08:40:48 -08002447dnl remove pam and dl because they are in $LIBPAM
2448if test "$PAM_MSG" = yes ; then
Tim Rice7d2d1f12002-02-26 22:05:11 -08002449 LIBS=`echo $LIBS | sed 's/-lpam //'`
2450fi
2451if test "$ac_cv_lib_pam_pam_set_item" = yes ; then
2452 LIBS=`echo $LIBS | sed 's/-ldl //'`
Tim Rice4cec93f2002-02-26 08:40:48 -08002453fi
2454
Damien Millerbac2d8a2000-09-05 16:13:06 +11002455AC_EXEEXT
Tim Rice13aae5e2001-10-21 17:53:58 -07002456AC_CONFIG_FILES([Makefile openbsd-compat/Makefile scard/Makefile ssh_prng_cmds])
2457AC_OUTPUT
Damien Miller0437b332000-05-02 09:56:41 +10002458
Damien Miller7b22d652000-06-18 14:07:04 +10002459# Print summary of options
2460
Damien Miller7b22d652000-06-18 14:07:04 +10002461# Someone please show me a better way :)
2462A=`eval echo ${prefix}` ; A=`eval echo ${A}`
2463B=`eval echo ${bindir}` ; B=`eval echo ${B}`
2464C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
2465D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
Kevin Stevese0f49142000-10-14 17:51:48 +00002466E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
Ben Lindstrombc709922001-04-18 18:04:21 +00002467F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
Damien Miller7b22d652000-06-18 14:07:04 +10002468G=`eval echo ${piddir}` ; G=`eval echo ${G}`
Tim Rice59ea0a02001-03-10 13:50:45 -08002469H=`eval echo ${user_path}` ; H=`eval echo ${H}`
Damien Miller7b22d652000-06-18 14:07:04 +10002470
2471echo ""
Kevin Steves393d2f72001-04-08 22:50:43 +00002472echo "OpenSSH has been configured with the following options:"
Damien Miller7b22d652000-06-18 14:07:04 +10002473echo " User binaries: $B"
2474echo " System binaries: $C"
2475echo " Configuration files: $D"
2476echo " Askpass program: $E"
2477echo " Manual pages: $F"
2478echo " PID file: $G"
Tim Rice43a1c132002-04-17 21:19:14 -07002479if test "$USES_LOGIN_CONF" = "yes" ; then
2480echo " At runtime, sshd will use the path defined in /etc/login.conf"
2481else
Tim Rice59ea0a02001-03-10 13:50:45 -08002482echo " sshd default user PATH: $H"
Tim Rice43a1c132002-04-17 21:19:14 -07002483fi
Damien Miller897741e2001-04-16 10:41:46 +10002484echo " Manpage format: $MANTYPE"
Damien Miller7b22d652000-06-18 14:07:04 +10002485echo " PAM support: ${PAM_MSG}"
2486echo " KerberosIV support: $KRB4_MSG"
Damien Millerfd4c9ee2002-04-13 11:04:40 +10002487echo " KerberosV support: $KRB5_MSG"
Damien Miller85de5802001-09-18 14:01:11 +10002488echo " Smartcard support: $SCARD_MSG"
Damien Miller7b22d652000-06-18 14:07:04 +10002489echo " AFS support: $AFS_MSG"
2490echo " S/KEY support: $SKEY_MSG"
2491echo " TCP Wrappers support: $TCPW_MSG"
2492echo " MD5 password support: $MD5_MSG"
2493echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
2494echo " Use IPv4 by default hack: $IPV4_HACK_MSG"
2495echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
Damien Miller6c21c512002-01-22 21:57:53 +11002496echo " BSD Auth support: $BSD_AUTH_MSG"
2497echo " Random number source: $RAND_MSG"
2498if test ! -z "$USE_RAND_HELPER" ; then
2499 echo " ssh-rand-helper collects from: $RAND_HELPER_MSG"
Damien Miller60396b02001-02-18 17:01:00 +11002500fi
2501
Damien Miller7b22d652000-06-18 14:07:04 +10002502echo ""
2503
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +00002504echo " Host: ${host}"
2505echo " Compiler: ${CC}"
2506echo " Compiler flags: ${CFLAGS}"
2507echo "Preprocessor flags: ${CPPFLAGS}"
2508echo " Linker flags: ${LDFLAGS}"
Tim Rice4cec93f2002-02-26 08:40:48 -08002509echo " Libraries: ${LIBWRAP} ${LIBPAM} ${LIBS}"
Damien Miller7b22d652000-06-18 14:07:04 +10002510
2511echo ""
2512
Damien Miller82cf0ce2000-12-20 13:34:48 +11002513if test "x$PAM_MSG" = "xyes" ; then
Damien Miller6c21c512002-01-22 21:57:53 +11002514 echo "PAM is enabled. You may need to install a PAM control file "
2515 echo "for sshd, otherwise password authentication may fail. "
2516 echo "Example PAM control files can be found in the contrib/ "
2517 echo "subdirectory"
Damien Miller6f9c3372000-10-25 10:06:04 +11002518 echo ""
2519fi
Ben Lindstrom3ad650a2001-01-03 06:02:51 +00002520
2521if test ! -z "$NO_SFTP"; then
Damien Miller6c21c512002-01-22 21:57:53 +11002522 echo "sftp-server will be disabled. Your compiler does not "
2523 echo "support 64bit integers."
2524 echo ""
2525fi
2526
2527if test ! -z "$RAND_HELPER_CMDHASH" ; then
2528 echo "WARNING: you are using the builtin random number collection "
2529 echo "service. Please read WARNING.RNG and request that your OS "
2530 echo "vendor includes kernel-based random number collection in "
2531 echo "future versions of your OS."
Ben Lindstrom3ad650a2001-01-03 06:02:51 +00002532 echo ""
2533fi
Damien Miller60396b02001-02-18 17:01:00 +11002534