blob: 91a0a72f3d0079d7dfaf7f660bf0347ac2030c2d [file] [log] [blame]
Kevin Steves5feaaef2002-04-23 20:45:55 +00001# $Id: configure.ac,v 1.52 2002/04/23 20:45:56 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 ;;
Damien Miller76112de1999-12-21 11:18:08 +110094*-*-hpux10*)
95 if test -z "$GCC"; then
Damien Millerfda78d92000-05-20 15:33:44 +100096 CFLAGS="$CFLAGS -Ae"
Damien Miller76112de1999-12-21 11:18:08 +110097 fi
Kevin Steves315f8b72001-06-28 00:24:41 +000098 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
Damien Miller9a947342000-08-30 10:03:33 +110099 IPADDR_IN_DISPLAY=yes
Damien Millerb0785672000-08-23 09:10:39 +1000100 AC_DEFINE(USE_PIPES)
Kevin Steves5feaaef2002-04-23 20:45:55 +0000101 AC_DEFINE(LOGIN_NO_ENDOPT)
102 AC_DEFINE(LOGIN_NEEDS_UTMPX)
Damien Miller8a1e6a62000-09-16 15:55:52 +1100103 AC_DEFINE(DISABLE_SHADOW)
Damien Millerd6f204d2000-09-23 13:57:27 +1100104 AC_DEFINE(DISABLE_UTMP)
Kevin Steves8848b242000-10-18 13:11:44 +0000105 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
Kevin Steves315f8b72001-06-28 00:24:41 +0000106 LIBS="$LIBS -lxnet -lsec"
Damien Miller76112de1999-12-21 11:18:08 +1100107 ;;
Damien Miller1bead332000-04-30 00:47:29 +1000108*-*-hpux11*)
Kevin Steves6a7b0de2001-06-27 16:32:24 +0000109 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
Damien Miller9a947342000-08-30 10:03:33 +1100110 IPADDR_IN_DISPLAY=yes
Damien Miller82cf0ce2000-12-20 13:34:48 +1100111 AC_DEFINE(PAM_SUN_CODEBASE)
Damien Miller5552d7a2000-08-30 09:53:24 +1100112 AC_DEFINE(USE_PIPES)
Kevin Steves5feaaef2002-04-23 20:45:55 +0000113 AC_DEFINE(LOGIN_NO_ENDOPT)
114 AC_DEFINE(LOGIN_NEEDS_UTMPX)
Damien Miller8a1e6a62000-09-16 15:55:52 +1100115 AC_DEFINE(DISABLE_SHADOW)
Damien Millerd6f204d2000-09-23 13:57:27 +1100116 AC_DEFINE(DISABLE_UTMP)
Kevin Steves8848b242000-10-18 13:11:44 +0000117 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
Kevin Steves6a7b0de2001-06-27 16:32:24 +0000118 LIBS="$LIBS -lxnet -lsec"
Damien Miller1bead332000-04-30 00:47:29 +1000119 ;;
Damien Millerbeb4ba51999-12-28 15:09:35 +1100120*-*-irix5*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000121 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller9e110892000-06-07 21:05:46 +1000122 LDFLAGS="$LDFLAGS"
Damien Miller190d5a82000-09-30 09:43:19 +1100123 PATH="$PATH:/usr/etc"
Damien Miller11fa2cc2000-08-16 10:35:58 +1000124 AC_DEFINE(BROKEN_INET_NTOA)
Damien Millerf1b9d112002-04-23 23:09:19 +1000125 AC_DEFINE(WITH_ABBREV_NO_TTY)
Damien Miller1808f382000-01-06 12:03:12 +1100126 ;;
127*-*-irix6*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000128 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller9e110892000-06-07 21:05:46 +1000129 LDFLAGS="$LDFLAGS"
Damien Miller190d5a82000-09-30 09:43:19 +1100130 PATH="$PATH:/usr/etc"
Damien Miller91606b12000-06-28 08:22:29 +1000131 AC_DEFINE(WITH_IRIX_ARRAY)
132 AC_DEFINE(WITH_IRIX_PROJECT)
133 AC_DEFINE(WITH_IRIX_AUDIT)
Ben Lindstrom8ff2a8d2002-04-06 18:58:31 +0000134 AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)])
Damien Miller11fa2cc2000-08-16 10:35:58 +1000135 AC_DEFINE(BROKEN_INET_NTOA)
Damien Millerf1b9d112002-04-23 23:09:19 +1000136 AC_DEFINE(WITH_ABBREV_NO_TTY)
Damien Millerbeb4ba51999-12-28 15:09:35 +1100137 ;;
Damien Millerb29ea912000-01-15 14:12:03 +1100138*-*-linux*)
139 no_dev_ptmx=1
Damien Millera64b57a2001-01-17 10:44:13 +1100140 check_for_libcrypt_later=1
Damien Miller7bcb0892000-03-11 20:45:40 +1100141 AC_DEFINE(DONT_TRY_OTHER_AF)
Damien Miller4e997202000-07-09 21:21:52 +1000142 AC_DEFINE(PAM_TTY_KLUDGE)
Damien Miller7bcb0892000-03-11 20:45:40 +1100143 inet6_default_4in6=yes
Damien Millerb29ea912000-01-15 14:12:03 +1100144 ;;
Ben Lindstromb5628642000-10-18 00:02:25 +0000145mips-sony-bsd|mips-sony-newsos4)
146 AC_DEFINE(HAVE_NEWS4)
147 SONY=1
Ben Lindstromb5628642000-10-18 00:02:25 +0000148 ;;
Damien Milleree1c0b32000-01-21 00:18:15 +1100149*-*-netbsd*)
Damien Millera22ba012000-03-02 23:09:20 +1100150 need_dash_r=1
Damien Milleree1c0b32000-01-21 00:18:15 +1100151 ;;
Damien Millerfbd884a2001-02-27 08:39:07 +1100152*-*-freebsd*)
153 check_for_libcrypt_later=1
154 ;;
Damien Miller0f91b4e2000-06-18 15:43:25 +1000155*-next-*)
Damien Miller0f91b4e2000-06-18 15:43:25 +1000156 conf_lastlog_location="/usr/adm/lastlog"
Damien Millere5192fa2000-08-29 14:30:37 +1100157 conf_utmp_location=/etc/utmp
158 conf_wtmp_location=/usr/adm/wtmp
159 MAIL=/usr/spool/mail
Damien Miller0f91b4e2000-06-18 15:43:25 +1000160 AC_DEFINE(HAVE_NEXT)
Ben Lindstromb4df15d2000-10-15 00:17:36 +0000161 AC_DEFINE(BROKEN_REALPATH)
Ben Lindstrom76020ba2000-10-25 16:55:00 +0000162 AC_DEFINE(USE_PIPES)
Damien Millerfbd884a2001-02-27 08:39:07 +1100163 AC_DEFINE(BROKEN_SAVED_UIDS)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000164 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Ben Lindstrom321ae732000-12-31 15:00:23 +0000165 CFLAGS="$CFLAGS"
Damien Miller0f91b4e2000-06-18 15:43:25 +1000166 ;;
Damien Miller75b1d102000-01-07 14:01:41 +1100167*-*-solaris*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000168 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Ben Lindstrom866488b2001-02-20 18:22:38 +0000169 LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib"
Damien Millera22ba012000-03-02 23:09:20 +1100170 need_dash_r=1
Damien Miller82cf0ce2000-12-20 13:34:48 +1100171 AC_DEFINE(PAM_SUN_CODEBASE)
Ben Lindstrom97c677d2001-05-08 20:33:05 +0000172 AC_DEFINE(LOGIN_NEEDS_UTMPX)
173 AC_DEFINE(LOGIN_NEEDS_TERM)
Ben Lindstrom95276712001-10-23 17:14:00 +0000174 AC_DEFINE(PAM_TTY_KLUDGE)
andre2ff7b5d2000-06-03 14:57:40 +0000175 # hardwire lastlog location (can't detect it on some versions)
176 conf_lastlog_location="/var/adm/lastlog"
Damien Millera1cb6442000-06-09 11:58:35 +1000177 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
178 sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'`
179 if test "$sol2ver" -ge 8; then
180 AC_MSG_RESULT(yes)
181 AC_DEFINE(DISABLE_UTMP)
182 AC_DEFINE(DISABLE_WTMP)
183 else
184 AC_MSG_RESULT(no)
185 fi
Damien Miller75b1d102000-01-07 14:01:41 +1100186 ;;
Damien Millerdfc83f42000-05-20 15:02:59 +1000187*-*-sunos4*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000188 CPPFLAGS="$CPPFLAGS -DSUNOS4"
Damien Millerdfc83f42000-05-20 15:02:59 +1000189 AC_CHECK_FUNCS(getpwanam)
Damien Miller82cf0ce2000-12-20 13:34:48 +1100190 AC_DEFINE(PAM_SUN_CODEBASE)
Damien Miller36ccb5c2000-08-09 16:34:27 +1000191 conf_utmp_location=/etc/utmp
192 conf_wtmp_location=/var/adm/wtmp
193 conf_lastlog_location=/var/adm/lastlog
Damien Millerb0785672000-08-23 09:10:39 +1000194 AC_DEFINE(USE_PIPES)
Damien Millerdfc83f42000-05-20 15:02:59 +1000195 ;;
Ben Lindstrom603bdfd2001-02-12 07:29:45 +0000196*-ncr-sysv*)
197 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
198 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Tim Rice13aae5e2001-10-21 17:53:58 -0700199 LIBS="$LIBS -lc89"
Kevin Steves0bd4b342002-01-05 23:24:27 +0000200 AC_DEFINE(USE_PIPES)
Ben Lindstrom603bdfd2001-02-12 07:29:45 +0000201 ;;
Damien Miller2ae714f2000-07-11 09:29:50 +1000202*-sni-sysv*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000203 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Tim Riceffdf4aa2001-10-27 10:45:36 -0700204 # /usr/ucblib MUST NOT be searched on ReliantUNIX
205 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Damien Millerfd9885e2001-01-10 08:16:53 +1100206 IPADDR_IN_DISPLAY=yes
207 AC_DEFINE(USE_PIPES)
Damien Miller2ae714f2000-07-11 09:29:50 +1000208 AC_DEFINE(IP_TOS_IS_BROKEN)
Tim Riceffdf4aa2001-10-27 10:45:36 -0700209 # /usr/ucblib/libucb.a no longer needed on ReliantUNIX
210 # Attention: always take care to bind libsocket and libnsl before libc,
211 # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog
Damien Miller2ae714f2000-07-11 09:29:50 +1000212 ;;
Damien Miller78315eb2000-09-29 23:01:36 +1100213*-*-sysv4.2*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000214 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller78315eb2000-09-29 23:01:36 +1100215 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Tim Ricea4f7ae12001-09-17 14:34:33 -0700216# enable_suid_ssh=no
Damien Miller5dfe9762001-02-16 12:05:39 +1100217 AC_DEFINE(USE_PIPES)
Damien Miller78315eb2000-09-29 23:01:36 +1100218 ;;
219*-*-sysv5*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000220 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller78315eb2000-09-29 23:01:36 +1100221 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Tim Ricea4f7ae12001-09-17 14:34:33 -0700222# enable_suid_ssh=no
Damien Miller5dfe9762001-02-16 12:05:39 +1100223 AC_DEFINE(USE_PIPES)
Damien Miller78315eb2000-09-29 23:01:36 +1100224 ;;
Damien Miller75b1d102000-01-07 14:01:41 +1100225*-*-sysv*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000226 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Millerdb819592000-03-14 13:44:01 +1100227 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Damien Miller75b1d102000-01-07 14:01:41 +1100228 ;;
Damien Miller78315eb2000-09-29 23:01:36 +1100229*-*-sco3.2v4*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000230 CPPFLAGS="$CPPFLAGS -Dftruncate=chsize -I/usr/local/include"
Damien Miller78315eb2000-09-29 23:01:36 +1100231 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Tim Rice13aae5e2001-10-21 17:53:58 -0700232 LIBS="$LIBS -los -lprot -lx -ltinfo -lm"
Damien Miller78315eb2000-09-29 23:01:36 +1100233 rsh_path="/usr/bin/rcmd"
Damien Miller5dfe9762001-02-16 12:05:39 +1100234 RANLIB=true
235 no_dev_ptmx=1
236 AC_DEFINE(BROKEN_SYS_TERMIO_H)
237 AC_DEFINE(USE_PIPES)
Damien Miller78315eb2000-09-29 23:01:36 +1100238 AC_DEFINE(HAVE_SCO_PROTECTED_PW)
Ben Lindstrom980754c2000-11-12 00:04:24 +0000239 AC_DEFINE(DISABLE_SHADOW)
Damien Millerfbd884a2001-02-27 08:39:07 +1100240 AC_DEFINE(BROKEN_SAVED_UIDS)
Damien Miller217f5672001-02-16 12:12:41 +1100241 AC_CHECK_FUNCS(getluid setluid)
Tim Rice07183b82001-04-25 21:40:28 -0700242 MANTYPE=man
Tim Rice13aae5e2001-10-21 17:53:58 -0700243 do_sco3_extra_lib_check=yes
Damien Miller78315eb2000-09-29 23:01:36 +1100244 ;;
245*-*-sco3.2v5*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000246 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Millera66626b2000-06-13 18:57:53 +1000247 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Damien Miller5dfe9762001-02-16 12:05:39 +1100248 LIBS="$LIBS -lprot -lx -ltinfo -lm"
Damien Millera66626b2000-06-13 18:57:53 +1000249 no_dev_ptmx=1
Damien Miller78315eb2000-09-29 23:01:36 +1100250 rsh_path="/usr/bin/rcmd"
Damien Miller5dfe9762001-02-16 12:05:39 +1100251 AC_DEFINE(USE_PIPES)
Damien Miller78315eb2000-09-29 23:01:36 +1100252 AC_DEFINE(HAVE_SCO_PROTECTED_PW)
Ben Lindstrom980754c2000-11-12 00:04:24 +0000253 AC_DEFINE(DISABLE_SHADOW)
Damien Miller217f5672001-02-16 12:12:41 +1100254 AC_CHECK_FUNCS(getluid setluid)
Tim Rice07183b82001-04-25 21:40:28 -0700255 MANTYPE=man
Damien Millera66626b2000-06-13 18:57:53 +1000256 ;;
Ben Lindstromd9e08242001-07-22 19:32:00 +0000257*-*-unicos*)
Tim Ricee991e3c2001-08-07 15:29:07 -0700258 no_libsocket=1
259 no_libnsl=1
Ben Lindstromd9e08242001-07-22 19:32:00 +0000260 AC_DEFINE(USE_PIPES)
Tim Ricee991e3c2001-08-07 15:29:07 -0700261 LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal,-L/usr/local/lib"
262 LIBS="$LIBS -lgen -lrsc"
263 ;;
Damien Millerb8c656e2000-06-28 15:22:41 +1000264*-dec-osf*)
Ben Lindstrom72af2ef2001-05-08 20:42:28 +0000265 AC_MSG_CHECKING(for Digital Unix SIA)
266 no_osfsia=""
267 AC_ARG_WITH(osfsia,
268 [ --with-osfsia Enable Digital Unix SIA],
269 [
270 if test "x$withval" = "xno" ; then
271 AC_MSG_RESULT(disabled)
272 no_osfsia=1
273 fi
274 ],
275 )
276 if test -z "$no_osfsia" ; then
Damien Millerb8c656e2000-06-28 15:22:41 +1000277 if test -f /etc/sia/matrix.conf; then
278 AC_MSG_RESULT(yes)
279 AC_DEFINE(HAVE_OSF_SIA)
280 AC_DEFINE(DISABLE_LOGIN)
281 LIBS="$LIBS -lsecurity -ldb -lm -laud"
282 else
283 AC_MSG_RESULT(no)
284 fi
285 fi
286 ;;
Ben Lindstrom19d7b8d2001-08-16 00:09:49 +0000287
288*-*-nto-qnx)
289 AC_DEFINE(USE_PIPES)
290 AC_DEFINE(NO_X11_UNIX_SOCKETS)
291 AC_DEFINE(MISSING_NFDBITS)
292 AC_DEFINE(MISSING_HOWMANY)
293 AC_DEFINE(MISSING_FD_MASK)
294 ;;
Damien Miller76112de1999-12-21 11:18:08 +1100295esac
296
Damien Millere37bfc12000-06-05 09:37:43 +1000297# Allow user to specify flags
298AC_ARG_WITH(cflags,
299 [ --with-cflags Specify additional flags to pass to compiler],
300 [
301 if test "x$withval" != "xno" ; then
302 CFLAGS="$CFLAGS $withval"
303 fi
304 ]
305)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000306AC_ARG_WITH(cppflags,
307 [ --with-cppflags Specify additional flags to pass to preprocessor] ,
308 [
309 if test "x$withval" != "xno"; then
310 CPPFLAGS="$CPPFLAGS $withval"
311 fi
312 ]
313)
Damien Millere37bfc12000-06-05 09:37:43 +1000314AC_ARG_WITH(ldflags,
Ben Lindstrom2ed98182000-11-06 07:15:43 +0000315 [ --with-ldflags Specify additional flags to pass to linker],
Damien Millere37bfc12000-06-05 09:37:43 +1000316 [
317 if test "x$withval" != "xno" ; then
318 LDFLAGS="$LDFLAGS $withval"
319 fi
320 ]
321)
322AC_ARG_WITH(libs,
323 [ --with-libs Specify additional libraries to link with],
324 [
325 if test "x$withval" != "xno" ; then
326 LIBS="$LIBS $withval"
327 fi
328 ]
329)
330
Tim Rice4cec93f2002-02-26 08:40:48 -0800331# Checks for header files.
332AC_CHECK_HEADERS(bstring.h crypt.h endian.h floatingpoint.h \
333 getopt.h glob.h lastlog.h limits.h login.h \
334 login_cap.h maillock.h netdb.h netgroup.h \
Kevin Stevesb1184bb2002-04-07 18:12:03 +0000335 netinet/in_systm.h paths.h pty.h \
Ben Lindstrom7577fd82002-03-08 03:11:07 +0000336 rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \
Tim Rice4cec93f2002-02-26 08:40:48 -0800337 strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h \
Kevin Stevesb1184bb2002-04-07 18:12:03 +0000338 sys/mman.h sys/select.h sys/stat.h \
Tim Rice4cec93f2002-02-26 08:40:48 -0800339 sys/stropts.h sys/sysmacros.h sys/time.h \
Kevin Steves117b06d2002-03-30 17:55:21 +0000340 sys/un.h time.h ttyent.h usersec.h \
Tim Rice4cec93f2002-02-26 08:40:48 -0800341 util.h utime.h utmp.h utmpx.h)
342
Damien Millera22ba012000-03-02 23:09:20 +1100343# Checks for libraries.
Tim Rice13aae5e2001-10-21 17:53:58 -0700344AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match))
345AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
Ben Lindstrom3ad650a2001-01-03 06:02:51 +0000346
Damien Millerdf288022001-02-18 13:07:07 +1100347dnl SCO OS3 needs this for libwrap
Tim Rice13aae5e2001-10-21 17:53:58 -0700348if test "x$with_tcp_wrappers" != "xno" ; then
349 if test "x$do_sco3_extra_lib_check" = "xyes" ; then
350 AC_CHECK_LIB(rpc, innetgr, LIBS="-lrpc -lyp -lrpc $LIBS" , , -lyp -lrpc)
351 fi
352fi
Damien Millerdf288022001-02-18 13:07:07 +1100353
Tim Rice13aae5e2001-10-21 17:53:58 -0700354AC_CHECK_FUNC(getspnam, ,
355 AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen"))
Tim Rice13aae5e2001-10-21 17:53:58 -0700356
Damien Miller150c8b52002-02-13 23:06:56 +1100357AC_ARG_WITH(rpath,
358 [ --without-rpath Disable auto-added -R linker paths],
359 [
360 if test "x$withval" = "xno" ; then
361 need_dash_r=""
362 fi
363 if test "x$withval" = "xyes" ; then
364 need_dash_r=1
365 fi
366 ]
367)
368
Tim Rice13aae5e2001-10-21 17:53:58 -0700369dnl zlib is required
370AC_ARG_WITH(zlib,
371 [ --with-zlib=PATH Use zlib in PATH],
372 [
Kevin Steves7dc81972002-01-22 21:59:31 +0000373 if test "x$withval" = "xno" ; then
Damien Miller6c21c512002-01-22 21:57:53 +1100374 AC_MSG_ERROR([*** zlib is required ***])
375 fi
Tim Rice13aae5e2001-10-21 17:53:58 -0700376 if test -d "$withval/lib"; then
377 if test -n "${need_dash_r}"; then
Tim Rice02cebcd2001-10-25 10:01:30 -0700378 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700379 else
Tim Rice02cebcd2001-10-25 10:01:30 -0700380 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700381 fi
382 else
383 if test -n "${need_dash_r}"; then
Tim Rice02cebcd2001-10-25 10:01:30 -0700384 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700385 else
Tim Rice02cebcd2001-10-25 10:01:30 -0700386 LDFLAGS="-L${withval} ${LDFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700387 fi
388 fi
389 if test -d "$withval/include"; then
Tim Rice02cebcd2001-10-25 10:01:30 -0700390 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700391 else
Tim Rice02cebcd2001-10-25 10:01:30 -0700392 CPPFLAGS="-I${withval} ${CPPFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700393 fi
394 ]
395)
396
Tim Rice17b93e52001-10-23 22:36:54 -0700397AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first or check config.log ***]))
Damien Miller6f9c3372000-10-25 10:06:04 +1100398
Ben Lindstrom3ad650a2001-01-03 06:02:51 +0000399dnl UnixWare 2.x
400AC_CHECK_FUNC(strcasecmp,
401 [], [ AC_CHECK_LIB(resolv, strcasecmp, LIBS="$LIBS -lresolv") ]
402)
403AC_CHECK_FUNC(utimes,
404 [], [ AC_CHECK_LIB(c89, utimes, LIBS="$LIBS -lc89") ]
405)
Damien Millerab18c411999-11-11 10:40:23 +1100406
Tim Ricee589a292001-11-03 11:09:32 -0800407dnl Checks for libutil functions
408AC_CHECK_HEADERS(libutil.h)
409AC_SEARCH_LIBS(login, util bsd, [AC_DEFINE(HAVE_LOGIN)])
410AC_CHECK_FUNCS(logout updwtmp logwtmp)
411
Ben Lindstrom8697e082001-02-24 21:41:10 +0000412AC_FUNC_STRFTIME
413
Damien Miller3c027682001-03-14 11:39:45 +1100414# Check for ALTDIRFUNC glob() extension
415AC_MSG_CHECKING(for GLOB_ALTDIRFUNC support)
416AC_EGREP_CPP(FOUNDIT,
417 [
418 #include <glob.h>
419 #ifdef GLOB_ALTDIRFUNC
420 FOUNDIT
421 #endif
422 ],
423 [
424 AC_DEFINE(GLOB_HAS_ALTDIRFUNC)
425 AC_MSG_RESULT(yes)
426 ],
427 [
428 AC_MSG_RESULT(no)
429 ]
430)
Damien Millerab18c411999-11-11 10:40:23 +1100431
Ben Lindstrom45b14db2001-03-17 01:15:38 +0000432# Check for g.gl_matchc glob() extension
433AC_MSG_CHECKING(for gl_matchc field in glob_t)
434AC_EGREP_CPP(FOUNDIT,
435 [
436 #include <glob.h>
437 int main(void){glob_t g; g.gl_matchc = 1;}
438 ],
439 [
440 AC_DEFINE(GLOB_HAS_GL_MATCHC)
441 AC_MSG_RESULT(yes)
442 ],
443 [
444 AC_MSG_RESULT(no)
445 ]
446)
447
Damien Miller18bb4732001-03-28 14:35:30 +1000448AC_MSG_CHECKING([whether struct dirent allocates space for d_name])
449AC_TRY_RUN(
450 [
451#include <sys/types.h>
452#include <dirent.h>
453int main(void){struct dirent d;return(sizeof(d.d_name)<=sizeof(char));}
454 ],
455 [AC_MSG_RESULT(yes)],
456 [
457 AC_MSG_RESULT(no)
458 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME)
459 ]
460)
461
Damien Millerc547bf12001-02-16 10:18:12 +1100462# Check whether user wants S/Key support
463SKEY_MSG="no"
464AC_ARG_WITH(skey,
Tim Rice13aae5e2001-10-21 17:53:58 -0700465 [ --with-skey[[=PATH]] Enable S/Key support
466 (optionally in PATH)],
Damien Millerc547bf12001-02-16 10:18:12 +1100467 [
468 if test "x$withval" != "xno" ; then
469
470 if test "x$withval" != "xyes" ; then
471 CPPFLAGS="$CPPFLAGS -I${withval}/include"
472 LDFLAGS="$LDFLAGS -L${withval}/lib"
473 fi
474
475 AC_DEFINE(SKEY)
476 LIBS="-lskey $LIBS"
477 SKEY_MSG="yes"
478
Tim Rice4cec93f2002-02-26 08:40:48 -0800479 AC_MSG_CHECKING([for s/key support])
480 AC_TRY_RUN(
Damien Millerc547bf12001-02-16 10:18:12 +1100481 [
Tim Rice4cec93f2002-02-26 08:40:48 -0800482#include <stdio.h>
483#include <skey.h>
484int main() { char *ff = skey_keyinfo(""); ff=""; return 0; }
485 ],
486 [AC_MSG_RESULT(yes)],
487 [
488 AC_MSG_RESULT(no)
Damien Millerc547bf12001-02-16 10:18:12 +1100489 AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
490 ])
491 fi
492 ]
493)
494
495# Check whether user wants TCP wrappers support
Tim Rice13aae5e2001-10-21 17:53:58 -0700496TCPW_MSG="no"
Damien Millerc547bf12001-02-16 10:18:12 +1100497AC_ARG_WITH(tcp-wrappers,
Tim Rice13aae5e2001-10-21 17:53:58 -0700498 [ --with-tcp-wrappers[[=PATH]] Enable tcpwrappers support
499 (optionally in PATH)],
Damien Millerc547bf12001-02-16 10:18:12 +1100500 [
501 if test "x$withval" != "xno" ; then
502 saved_LIBS="$LIBS"
Tim Rice13aae5e2001-10-21 17:53:58 -0700503 saved_LDFLAGS="$LDFLAGS"
504 saved_CPPFLAGS="$CPPFLAGS"
505 if test -n "${withval}" -a "${withval}" != "yes"; then
506 if test -d "${withval}/lib"; then
507 if test -n "${need_dash_r}"; then
Tim Rice02cebcd2001-10-25 10:01:30 -0700508 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700509 else
Tim Rice02cebcd2001-10-25 10:01:30 -0700510 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700511 fi
512 else
513 if test -n "${need_dash_r}"; then
Tim Rice02cebcd2001-10-25 10:01:30 -0700514 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700515 else
Tim Rice02cebcd2001-10-25 10:01:30 -0700516 LDFLAGS="-L${withval} ${LDFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700517 fi
518 fi
519 if test -d "${withval}/include"; then
Tim Rice02cebcd2001-10-25 10:01:30 -0700520 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700521 else
Tim Rice02cebcd2001-10-25 10:01:30 -0700522 CPPFLAGS="-I${withval} ${CPPFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700523 fi
Tim Rice13aae5e2001-10-21 17:53:58 -0700524 fi
Tim Rice4cec93f2002-02-26 08:40:48 -0800525 LIBWRAP="-lwrap"
526 LIBS="$LIBWRAP $LIBS"
Damien Millerc547bf12001-02-16 10:18:12 +1100527 AC_MSG_CHECKING(for libwrap)
528 AC_TRY_LINK(
529 [
530#include <tcpd.h>
531 int deny_severity = 0, allow_severity = 0;
532 ],
533 [hosts_access(0);],
534 [
535 AC_MSG_RESULT(yes)
536 AC_DEFINE(LIBWRAP)
Tim Rice4cec93f2002-02-26 08:40:48 -0800537 AC_SUBST(LIBWRAP)
Tim Rice13aae5e2001-10-21 17:53:58 -0700538 TCPW_MSG="yes"
Damien Millerc547bf12001-02-16 10:18:12 +1100539 ],
540 [
541 AC_MSG_ERROR([*** libwrap missing])
542 ]
543 )
Tim Rice4cec93f2002-02-26 08:40:48 -0800544 LIBS="$saved_LIBS"
Damien Millerc547bf12001-02-16 10:18:12 +1100545 fi
546 ]
547)
548
Damien Millerad833b32000-08-23 10:46:23 +1000549dnl Checks for library functions.
Ben Lindstromfdee8ef2002-04-06 23:52:02 +0000550AC_CHECK_FUNCS(arc4random b64_ntop bcopy bindresvport_sa \
Tim Rice13aae5e2001-10-21 17:53:58 -0700551 clock fchmod fchown freeaddrinfo futimes gai_strerror \
552 getaddrinfo getcwd getgrouplist getnameinfo getopt \
553 getrlimit getrusage getttyent glob inet_aton inet_ntoa \
554 inet_ntop innetgr login_getcapbool md5_crypt memmove \
Damien Miller594a71b2002-04-23 20:22:59 +1000555 mkdtemp mmap ngetaddrinfo openpty ogetaddrinfo readpassphrase \
556 realpath recvmsg rresvport_af sendmsg setdtablesize setegid \
557 setenv seteuid setlogin setproctitle setresgid setreuid setrlimit \
Kevin Stevese0f2ca42002-04-10 23:17:05 +0000558 setsid setvbuf sigaction sigvec snprintf socketpair strerror \
Tim Rice13aae5e2001-10-21 17:53:58 -0700559 strlcat strlcpy strmode strsep sysconf tcgetpgrp utimes \
560 vhangup vsnprintf waitpid __b64_ntop _getpty)
561
562dnl IRIX and Solaris 2.5.1 have dirname() in libgen
Tim Rice17b93e52001-10-23 22:36:54 -0700563AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[
Tim Rice13aae5e2001-10-21 17:53:58 -0700564 AC_CHECK_LIB(gen, dirname,[
565 AC_CACHE_CHECK([for broken dirname],
566 ac_cv_have_broken_dirname, [
Tim Rice17b93e52001-10-23 22:36:54 -0700567 save_LIBS="$LIBS"
568 LIBS="$LIBS -lgen"
Tim Rice13aae5e2001-10-21 17:53:58 -0700569 AC_TRY_RUN(
570 [
571#include <libgen.h>
572#include <string.h>
573
574int main(int argc, char **argv) {
575 char *s, buf[32];
576
577 strncpy(buf,"/etc", 32);
578 s = dirname(buf);
Tim Rice17b93e52001-10-23 22:36:54 -0700579 if (!s || strncmp(s, "/", 32) != 0) {
Tim Rice13aae5e2001-10-21 17:53:58 -0700580 exit(1);
581 } else {
582 exit(0);
583 }
584}
585 ],
586 [ ac_cv_have_broken_dirname="no" ],
587 [ ac_cv_have_broken_dirname="yes" ]
588 )
Tim Rice17b93e52001-10-23 22:36:54 -0700589 LIBS="$save_LIBS"
Tim Rice13aae5e2001-10-21 17:53:58 -0700590 ])
Tim Rice17b93e52001-10-23 22:36:54 -0700591 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
Tim Rice13aae5e2001-10-21 17:53:58 -0700592 LIBS="$LIBS -lgen"
593 AC_DEFINE(HAVE_DIRNAME)
Tim Rice17b93e52001-10-23 22:36:54 -0700594 AC_CHECK_HEADERS(libgen.h)
Tim Rice13aae5e2001-10-21 17:53:58 -0700595 fi
596 ])
597])
598
Damien Millerad833b32000-08-23 10:46:23 +1000599dnl Checks for time functions
andre2ff7b5d2000-06-03 14:57:40 +0000600AC_CHECK_FUNCS(gettimeofday time)
Damien Millerad833b32000-08-23 10:46:23 +1000601dnl Checks for utmp functions
Ben Lindstrom2c467a22000-12-27 04:57:41 +0000602AC_CHECK_FUNCS(endutent getutent getutid getutline pututline setutent)
andre2ff7b5d2000-06-03 14:57:40 +0000603AC_CHECK_FUNCS(utmpname)
Damien Millerad833b32000-08-23 10:46:23 +1000604dnl Checks for utmpx functions
Ben Lindstrom2c467a22000-12-27 04:57:41 +0000605AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline pututxline )
andre2ff7b5d2000-06-03 14:57:40 +0000606AC_CHECK_FUNCS(setutxent utmpxname)
Damien Millercedfecc1999-11-15 14:36:53 +1100607
Damien Miller5fc85652000-07-09 23:53:07 +1000608AC_CHECK_FUNC(getuserattr,
609 [AC_DEFINE(HAVE_GETUSERATTR)],
610 [AC_CHECK_LIB(s, getuserattr, [LIBS="$LIBS -ls"; AC_DEFINE(HAVE_GETUSERATTR)])]
611)
612
Damien Miller04f80141999-11-19 15:32:34 +1100613AC_CHECK_FUNC(daemon,
614 [AC_DEFINE(HAVE_DAEMON)],
615 [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
616)
617
Damien Miller9fb07e42000-03-05 16:22:59 +1100618AC_CHECK_FUNC(getpagesize,
619 [AC_DEFINE(HAVE_GETPAGESIZE)],
620 [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])]
621)
622
Damien Millercb170cb2000-07-01 16:52:55 +1000623# Check for broken snprintf
624if test "x$ac_cv_func_snprintf" = "xyes" ; then
625 AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
626 AC_TRY_RUN(
627 [
628#include <stdio.h>
629int main(void){char b[5];snprintf(b,5,"123456789");return(b[4]!='\0');}
630 ],
631 [AC_MSG_RESULT(yes)],
632 [
633 AC_MSG_RESULT(no)
634 AC_DEFINE(BROKEN_SNPRINTF)
635 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
636 ]
637 )
638fi
639
Damien Miller606f8802000-09-16 15:39:56 +1100640AC_FUNC_GETPGRP
641
Damien Millera64b57a2001-01-17 10:44:13 +1100642# Check for PAM libs
Damien Miller7b22d652000-06-18 14:07:04 +1000643PAM_MSG="no"
Damien Millera22ba012000-03-02 23:09:20 +1100644AC_ARG_WITH(pam,
Damien Millera64b57a2001-01-17 10:44:13 +1100645 [ --with-pam Enable PAM support ],
Damien Millera22ba012000-03-02 23:09:20 +1100646 [
Damien Millera64b57a2001-01-17 10:44:13 +1100647 if test "x$withval" != "xno" ; then
648 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" ; then
649 AC_MSG_ERROR([PAM headers not found])
650 fi
651
652 AC_CHECK_LIB(dl, dlopen, , )
653 AC_CHECK_LIB(pam, pam_set_item, , AC_MSG_ERROR([*** libpam missing]))
654 AC_CHECK_FUNCS(pam_getenvlist)
655
656 disable_shadow=yes
657 PAM_MSG="yes"
658
659 AC_DEFINE(USE_PAM)
Tim Rice7d2d1f12002-02-26 22:05:11 -0800660 if test $ac_cv_lib_dl_dlopen = yes; then
661 LIBPAM="-lpam -ldl"
662 else
663 LIBPAM="-lpam"
664 fi
665 AC_SUBST(LIBPAM)
Damien Millera22ba012000-03-02 23:09:20 +1100666 fi
667 ]
668)
Damien Millera22ba012000-03-02 23:09:20 +1100669
Damien Millera64b57a2001-01-17 10:44:13 +1100670# Check for older PAM
671if test "x$PAM_MSG" = "xyes" ; then
Damien Millera22ba012000-03-02 23:09:20 +1100672 # Check PAM strerror arguments (old PAM)
673 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
674 AC_TRY_COMPILE(
675 [
Damien Miller81171112000-04-23 11:14:01 +1000676#include <stdlib.h>
677#include <security/pam_appl.h>
Damien Millera22ba012000-03-02 23:09:20 +1100678 ],
679 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
680 [AC_MSG_RESULT(no)],
681 [
682 AC_DEFINE(HAVE_OLD_PAM)
683 AC_MSG_RESULT(yes)
Damien Miller7b22d652000-06-18 14:07:04 +1000684 PAM_MSG="yes (old library)"
Damien Millera22ba012000-03-02 23:09:20 +1100685 ]
Damien Millera64b57a2001-01-17 10:44:13 +1100686 )
Damien Millera22ba012000-03-02 23:09:20 +1100687fi
688
689# The big search for OpenSSL
690AC_ARG_WITH(ssl-dir,
691 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
692 [
Ben Lindstrom23e13712000-10-29 22:49:19 +0000693 if test "x$withval" != "xno" ; then
Damien Millera22ba012000-03-02 23:09:20 +1100694 tryssldir=$withval
695 fi
696 ]
697)
698
699saved_LIBS="$LIBS"
Damien Millera1ad4802000-03-15 10:04:54 +1100700saved_LDFLAGS="$LDFLAGS"
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000701saved_CPPFLAGS="$CPPFLAGS"
Damien Millera22ba012000-03-02 23:09:20 +1100702if test "x$prefix" != "xNONE" ; then
703 tryssldir="$tryssldir $prefix"
704fi
Damien Miller61e50f12000-05-08 20:49:37 +1000705AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [
Damien Millera1b61e12000-09-16 17:02:16 +1100706 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 +1100707 CPPFLAGS="$saved_CPPFLAGS"
708 LDFLAGS="$saved_LDFLAGS"
Damien Miller3b512e12000-05-17 23:29:18 +1000709 LIBS="$saved_LIBS -lcrypto"
Damien Millerccdefb62001-02-19 12:56:39 +1100710
711 # Skip directories if they don't exist
712 if test ! -z "$ssldir" -a ! -d "$ssldir" ; then
713 continue;
714 fi
715 if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then
716 # Try to use $ssldir/lib if it exists, otherwise
717 # $ssldir
718 if test -d "$ssldir/lib" ; then
Damien Millerb68af622001-03-28 21:05:26 +1000719 LDFLAGS="-L$ssldir/lib $saved_LDFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100720 if test ! -z "$need_dash_r" ; then
Damien Millerb68af622001-03-28 21:05:26 +1000721 LDFLAGS="-R$ssldir/lib $LDFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100722 fi
723 else
Damien Millerb68af622001-03-28 21:05:26 +1000724 LDFLAGS="-L$ssldir $saved_LDFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100725 if test ! -z "$need_dash_r" ; then
Damien Millerb68af622001-03-28 21:05:26 +1000726 LDFLAGS="-R$ssldir $LDFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100727 fi
728 fi
729 # Try to use $ssldir/include if it exists, otherwise
730 # $ssldir
731 if test -d "$ssldir/include" ; then
Damien Millerb68af622001-03-28 21:05:26 +1000732 CPPFLAGS="-I$ssldir/include $saved_CPPFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100733 else
Damien Millerb68af622001-03-28 21:05:26 +1000734 CPPFLAGS="-I$ssldir $saved_CPPFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100735 fi
736 fi
Damien Miller61e50f12000-05-08 20:49:37 +1000737
Damien Miller3b512e12000-05-17 23:29:18 +1000738 # Basic test to check for compatible version and correct linking
739 # *does not* test for RSA - that comes later.
740 AC_TRY_RUN(
741 [
Damien Millere59ce622000-05-01 20:54:17 +1000742#include <string.h>
743#include <openssl/rand.h>
Damien Miller81171112000-04-23 11:14:01 +1000744int main(void)
745{
Damien Miller3b512e12000-05-17 23:29:18 +1000746 char a[2048];
747 memset(a, 0, sizeof(a));
Damien Miller81171112000-04-23 11:14:01 +1000748 RAND_add(a, sizeof(a), sizeof(a));
Damien Miller3b512e12000-05-17 23:29:18 +1000749 return(RAND_status() <= 0);
Damien Miller81171112000-04-23 11:14:01 +1000750}
Damien Miller3b512e12000-05-17 23:29:18 +1000751 ],
752 [
753 found_crypto=1
754 break;
755 ], []
756 )
Damien Miller61e50f12000-05-08 20:49:37 +1000757
758 if test ! -z "$found_crypto" ; then
759 break;
760 fi
Damien Millerb85dcad2000-03-11 11:37:00 +1100761 done
762
Damien Miller61e50f12000-05-08 20:49:37 +1000763 if test -z "$found_crypto" ; then
Damien Miller5dfe9762001-02-16 12:05:39 +1100764 AC_MSG_ERROR([Could not find working OpenSSL library, please install or check config.log])
Damien Millerb85dcad2000-03-11 11:37:00 +1100765 fi
Damien Miller61e50f12000-05-08 20:49:37 +1000766 if test -z "$ssldir" ; then
767 ssldir="(system)"
768 fi
Damien Millera22ba012000-03-02 23:09:20 +1100769
Damien Miller61e50f12000-05-08 20:49:37 +1000770 ac_cv_openssldir=$ssldir
771])
772
Damien Milleredb82922000-06-20 13:25:52 +1000773if (test ! -z "$ac_cv_openssldir" && test "x$ac_cv_openssldir" != "x(system)") ; then
Damien Miller61e50f12000-05-08 20:49:37 +1000774 AC_DEFINE(HAVE_OPENSSL)
775 dnl Need to recover ssldir - test above runs in subshell
776 ssldir=$ac_cv_openssldir
Damien Millera64b57a2001-01-17 10:44:13 +1100777 if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then
Damien Millerccdefb62001-02-19 12:56:39 +1100778 # Try to use $ssldir/lib if it exists, otherwise
779 # $ssldir
780 if test -d "$ssldir/lib" ; then
Damien Millerb68af622001-03-28 21:05:26 +1000781 LDFLAGS="-L$ssldir/lib $saved_LDFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100782 if test ! -z "$need_dash_r" ; then
Damien Millerb68af622001-03-28 21:05:26 +1000783 LDFLAGS="-R$ssldir/lib $LDFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100784 fi
785 else
Damien Millerb68af622001-03-28 21:05:26 +1000786 LDFLAGS="-L$ssldir $saved_LDFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100787 if test ! -z "$need_dash_r" ; then
Damien Millerb68af622001-03-28 21:05:26 +1000788 LDFLAGS="-R$ssldir $LDFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100789 fi
Damien Millera64b57a2001-01-17 10:44:13 +1100790 fi
Damien Millerccdefb62001-02-19 12:56:39 +1100791 # Try to use $ssldir/include if it exists, otherwise
792 # $ssldir
793 if test -d "$ssldir/include" ; then
Damien Millerb68af622001-03-28 21:05:26 +1000794 CPPFLAGS="-I$ssldir/include $saved_CPPFLAGS"
Damien Millerccdefb62001-02-19 12:56:39 +1100795 else
Damien Millerb68af622001-03-28 21:05:26 +1000796 CPPFLAGS="-I$ssldir $saved_CPPFLAGS"
Damien Millera64b57a2001-01-17 10:44:13 +1100797 fi
Damien Miller29ea30d2000-03-17 10:54:15 +1100798 fi
Damien Millera22ba012000-03-02 23:09:20 +1100799fi
Damien Miller3b512e12000-05-17 23:29:18 +1000800LIBS="$saved_LIBS -lcrypto"
Damien Miller61e50f12000-05-08 20:49:37 +1000801
Damien Miller3b512e12000-05-17 23:29:18 +1000802# Now test RSA support
803saved_LIBS="$LIBS"
804AC_MSG_CHECKING([for RSA support])
805for WANTS_RSAREF in "" 1 ; do
806 if test -z "$WANTS_RSAREF" ; then
807 LIBS="$saved_LIBS"
808 else
809 LIBS="$saved_LIBS -lRSAglue -lrsaref"
810 fi
811 AC_TRY_RUN([
812#include <string.h>
813#include <openssl/rand.h>
814#include <openssl/rsa.h>
815#include <openssl/bn.h>
816#include <openssl/sha.h>
817int main(void)
818{
819 int num; RSA *key; static unsigned char p_in[] = "blahblah";
820 unsigned char c[256], p[256];
821 memset(c, 0, sizeof(c)); RAND_add(c, sizeof(c), sizeof(c));
822 if ((key=RSA_generate_key(512, 3, NULL, NULL))==NULL) return(1);
823 num = RSA_public_encrypt(sizeof(p_in) - 1, p_in, c, key, RSA_PKCS1_PADDING);
824 return(-1 == RSA_private_decrypt(num, c, p, key, RSA_PKCS1_PADDING));
825}
826 ],
827 [
828 rsa_works=1
829 break;
830 ], [])
831done
Ben Lindstrom23fec142001-06-09 02:16:28 +0000832LIBS="$saved_LIBS"
Damien Miller3b512e12000-05-17 23:29:18 +1000833
834if test ! -z "$no_rsa" ; then
835 AC_MSG_RESULT(disabled)
Damien Miller7b22d652000-06-18 14:07:04 +1000836 RSA_MSG="disabled"
Damien Miller3b512e12000-05-17 23:29:18 +1000837else
838 if test -z "$rsa_works" ; then
839 AC_MSG_WARN([*** No RSA support found *** ])
Damien Miller7b22d652000-06-18 14:07:04 +1000840 RSA_MSG="no"
Damien Miller3b512e12000-05-17 23:29:18 +1000841 else
842 if test -z "$WANTS_RSAREF" ; then
843 AC_MSG_RESULT(yes)
Damien Miller7b22d652000-06-18 14:07:04 +1000844 RSA_MSG="yes"
Damien Miller3b512e12000-05-17 23:29:18 +1000845 else
Damien Miller7b22d652000-06-18 14:07:04 +1000846 RSA_MSG="yes (using RSAref)"
Damien Miller3b512e12000-05-17 23:29:18 +1000847 AC_MSG_RESULT(using RSAref)
Ben Lindstrom23fec142001-06-09 02:16:28 +0000848 LIBS="$LIBS -lcrypto -lRSAglue -lrsaref"
Damien Miller3b512e12000-05-17 23:29:18 +1000849 fi
850 fi
851fi
Damien Millera22ba012000-03-02 23:09:20 +1100852
Damien Millerec932372002-01-22 22:16:03 +1100853# Sanity check OpenSSL headers
854AC_MSG_CHECKING([whether OpenSSL's headers match the library])
855AC_TRY_RUN(
856 [
857#include <string.h>
858#include <openssl/opensslv.h>
859int main(void) { return(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); }
860 ],
861 [
862 AC_MSG_RESULT(yes)
863 ],
864 [
865 AC_MSG_RESULT(no)
866 AC_MSG_ERROR(Your OpenSSL headers do not match your library)
867 ]
868)
869
Damien Millera64b57a2001-01-17 10:44:13 +1100870# Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
871# version in OpenSSL. Skip this for PAM
872if test "x$PAM_MSG" = "xno" -a "x$check_for_libcrypt_later" = "x1"; then
Damien Miller95aa2d62001-03-01 09:16:11 +1100873 AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt")
Damien Millera64b57a2001-01-17 10:44:13 +1100874fi
875
Damien Miller6c21c512002-01-22 21:57:53 +1100876
877### Configure cryptographic random number support
878
879# Check wheter OpenSSL seeds itself
880AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded])
881AC_TRY_RUN(
882 [
883#include <string.h>
884#include <openssl/rand.h>
885int main(void) { return(RAND_status() == 1 ? 0 : 1); }
886 ],
887 [
888 OPENSSL_SEEDS_ITSELF=yes
889 AC_MSG_RESULT(yes)
890 ],
891 [
892 AC_MSG_RESULT(no)
893 # Default to use of the rand helper if OpenSSL doesn't
894 # seed itself
895 USE_RAND_HELPER=yes
896 ]
897)
898
899
900# Do we want to force the use of the rand helper?
901AC_ARG_WITH(rand-helper,
902 [ --with-rand-helper Use subprocess to gather strong randomness ],
903 [
904 if test "x$withval" = "xno" ; then
905 # Force use of OpenSSL's internal RNG, even if
906 # the previous test showed it to be unseeded.
907 if test -z "$OPENSSL_SEEDS_ITSELF" ; then
908 AC_MSG_WARN([*** Forcing use of OpenSSL's non-self-seeding PRNG])
909 OPENSSL_SEEDS_ITSELF=yes
910 USE_RAND_HELPER=""
911 fi
912 else
913 USE_RAND_HELPER=yes
914 fi
915 ],
916)
917
918# Which randomness source do we use?
919if test ! -z "$OPENSSL_SEEDS_ITSELF" -a -z "$USE_RAND_HELPER" ; then
920 # OpenSSL only
921 AC_DEFINE(OPENSSL_PRNG_ONLY)
922 RAND_MSG="OpenSSL internal ONLY"
923 INSTALL_SSH_RAND_HELPER=""
Tim Rice1e2c6002002-01-30 22:14:03 -0800924elif test ! -z "$USE_RAND_HELPER" ; then
925 # install rand helper
Damien Miller6c21c512002-01-22 21:57:53 +1100926 RAND_MSG="ssh-rand-helper"
927 INSTALL_SSH_RAND_HELPER="yes"
928fi
929AC_SUBST(INSTALL_SSH_RAND_HELPER)
930
931### Configuration of ssh-rand-helper
932
933# PRNGD TCP socket
934AC_ARG_WITH(prngd-port,
935 [ --with-prngd-port=PORT read entropy from PRNGD/EGD TCP localhost:PORT],
936 [
Damien Millere996d722002-01-23 11:20:59 +1100937 case "$withval" in
938 no)
939 withval=""
940 ;;
941 [[0-9]]*)
942 ;;
943 *)
944 AC_MSG_ERROR(You must specify a numeric port number for --with-prngd-port)
945 ;;
946 esac
947 if test ! -z "$withval" ; then
Damien Miller6c21c512002-01-22 21:57:53 +1100948 PRNGD_PORT="$withval"
949 AC_DEFINE_UNQUOTED(PRNGD_PORT, $PRNGD_PORT)
950 fi
951 ]
952)
953
954# PRNGD Unix domain socket
955AC_ARG_WITH(prngd-socket,
956 [ --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)],
957 [
Damien Millere996d722002-01-23 11:20:59 +1100958 case "$withval" in
959 yes)
Damien Miller6c21c512002-01-22 21:57:53 +1100960 withval="/var/run/egd-pool"
Damien Millere996d722002-01-23 11:20:59 +1100961 ;;
962 no)
963 withval=""
964 ;;
965 /*)
966 ;;
967 *)
968 AC_MSG_ERROR(You must specify an absolute path to the entropy socket)
969 ;;
970 esac
971
972 if test ! -z "$withval" ; then
Damien Miller6c21c512002-01-22 21:57:53 +1100973 if test ! -z "$PRNGD_PORT" ; then
974 AC_MSG_ERROR(You may not specify both a PRNGD/EGD port and socket)
975 fi
Damien Miller6385ba02002-01-23 08:12:36 +1100976 if test ! -r "$withval" ; then
Damien Miller6c21c512002-01-22 21:57:53 +1100977 AC_MSG_WARN(Entropy socket is not readable)
978 fi
979 PRNGD_SOCKET="$withval"
980 AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET")
981 fi
Tim Rice4cec93f2002-02-26 08:40:48 -0800982 ],
983 [
984 # Check for existing socket only if we don't have a random device already
985 if test "$USE_RAND_HELPER" = yes ; then
986 AC_MSG_CHECKING(for PRNGD/EGD socket)
987 # Insert other locations here
988 for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
989 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
990 PRNGD_SOCKET="$sock"
991 AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET")
992 break;
993 fi
994 done
995 if test ! -z "$PRNGD_SOCKET" ; then
996 AC_MSG_RESULT($PRNGD_SOCKET)
997 else
998 AC_MSG_RESULT(not found)
999 fi
1000 fi
Damien Miller6c21c512002-01-22 21:57:53 +11001001 ]
1002)
1003
1004# Change default command timeout for hashing entropy source
1005entropy_timeout=200
1006AC_ARG_WITH(entropy-timeout,
1007 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)],
1008 [
1009 if test "x$withval" != "xno" ; then
1010 entropy_timeout=$withval
1011 fi
1012 ]
1013)
Damien Miller6c21c512002-01-22 21:57:53 +11001014AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout)
1015
Kevin Steves7ff91122002-04-07 19:22:54 +00001016ssh_privsep_user=sshd
1017AC_ARG_WITH(privsep-user,
1018 [ --with-privsep-user Specify non-privileged user for privilege separation],
1019 [
1020 if test -n "$withval"; then
1021 ssh_privsep_user=$withval
1022 fi
1023 ]
1024)
Kevin Steves4e0bb522002-04-07 19:44:14 +00001025AC_DEFINE_UNQUOTED(SSH_PRIVSEP_USER, "$ssh_privsep_user")
Kevin Steves7ff91122002-04-07 19:22:54 +00001026
Tim Rice88f2ab52002-03-17 12:17:34 -08001027# We do this little dance with the search path to insure
1028# that programs that we select for use by installed programs
1029# (which may be run by the super-user) come from trusted
1030# locations before they come from the user's private area.
1031# This should help avoid accidentally configuring some
1032# random version of a program in someone's personal bin.
1033
1034OPATH=$PATH
1035PATH=/bin:/usr/bin
Tim Riceae49fe62002-04-12 10:26:21 -07001036test -h /bin 2> /dev/null && PATH=/usr/bin
Tim Rice88f2ab52002-03-17 12:17:34 -08001037test -d /sbin && PATH=$PATH:/sbin
1038test -d /usr/sbin && PATH=$PATH:/usr/sbin
1039PATH=$PATH:/etc:$OPATH
1040
Damien Miller6c21c512002-01-22 21:57:53 +11001041# These programs are used by the command hashing source to gather entropy
1042OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
1043OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
1044OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
1045OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
1046OSSH_PATH_ENTROPY_PROG(PROG_JSTAT, jstat)
1047OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
1048OSSH_PATH_ENTROPY_PROG(PROG_SAR, sar)
1049OSSH_PATH_ENTROPY_PROG(PROG_W, w)
1050OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
1051OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
1052OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
1053OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
1054OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
1055OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
1056OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
1057OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
Tim Rice88f2ab52002-03-17 12:17:34 -08001058# restore PATH
1059PATH=$OPATH
Damien Miller6c21c512002-01-22 21:57:53 +11001060
1061# Where does ssh-rand-helper get its randomness from?
1062INSTALL_SSH_PRNG_CMDS=""
1063if test ! -z "$INSTALL_SSH_RAND_HELPER" ; then
1064 if test ! -z "$PRNGD_PORT" ; then
1065 RAND_HELPER_MSG="TCP localhost:$PRNGD_PORT"
1066 elif test ! -z "$PRNGD_SOCKET" ; then
1067 RAND_HELPER_MSG="Unix domain socket \"$PRNGD_SOCKET\""
1068 else
1069 RAND_HELPER_MSG="Command hashing (timeout $entropy_timeout)"
1070 RAND_HELPER_CMDHASH=yes
1071 INSTALL_SSH_PRNG_CMDS="yes"
1072 fi
1073fi
1074AC_SUBST(INSTALL_SSH_PRNG_CMDS)
1075
1076
Ben Lindstromb5628642000-10-18 00:02:25 +00001077# Cheap hack to ensure NEWS-OS libraries are arranged right.
1078if test ! -z "$SONY" ; then
1079 LIBS="$LIBS -liberty";
1080fi
1081
Damien Millera22ba012000-03-02 23:09:20 +11001082# Checks for data types
Damien Millere0f45742000-01-18 09:12:06 +11001083AC_CHECK_SIZEOF(char, 1)
Damien Millerc6398ef1999-11-20 12:18:40 +11001084AC_CHECK_SIZEOF(short int, 2)
1085AC_CHECK_SIZEOF(int, 4)
1086AC_CHECK_SIZEOF(long int, 4)
1087AC_CHECK_SIZEOF(long long int, 8)
1088
Damien Millerfa2bb692002-04-23 23:22:25 +10001089# Sanity check long long for some platforms (AIX)
1090if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then
1091 ac_cv_sizeof_long_long_int=0
1092fi
1093
Damien Millera22ba012000-03-02 23:09:20 +11001094# More checks for data types
Damien Millercaf6dd62000-08-29 11:33:50 +11001095AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1096 AC_TRY_COMPILE(
1097 [ #include <sys/types.h> ],
1098 [ u_int a; a = 1;],
1099 [ ac_cv_have_u_int="yes" ],
1100 [ ac_cv_have_u_int="no" ]
1101 )
1102])
1103if test "x$ac_cv_have_u_int" = "xyes" ; then
1104 AC_DEFINE(HAVE_U_INT)
1105 have_u_int=1
1106fi
1107
Damien Miller61e50f12000-05-08 20:49:37 +10001108AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1109 AC_TRY_COMPILE(
1110 [ #include <sys/types.h> ],
1111 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1112 [ ac_cv_have_intxx_t="yes" ],
1113 [ ac_cv_have_intxx_t="no" ]
1114 )
1115])
1116if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1117 AC_DEFINE(HAVE_INTXX_T)
1118 have_intxx_t=1
1119fi
Ben Lindstrom19d7b8d2001-08-16 00:09:49 +00001120
1121if (test -z "$have_intxx_t" && \
1122 test "x$ac_cv_header_stdint_h" = "xyes")
1123then
1124 AC_MSG_CHECKING([for intXX_t types in stdint.h])
1125 AC_TRY_COMPILE(
1126 [ #include <stdint.h> ],
1127 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1128 [
1129 AC_DEFINE(HAVE_INTXX_T)
1130 AC_MSG_RESULT(yes)
1131 ],
1132 [ AC_MSG_RESULT(no) ]
1133 )
1134fi
1135
Damien Miller578783e2000-09-23 14:12:24 +11001136AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1137 AC_TRY_COMPILE(
1138 [ #include <sys/types.h> ],
1139 [ int64_t a; a = 1;],
1140 [ ac_cv_have_int64_t="yes" ],
1141 [ ac_cv_have_int64_t="no" ]
1142 )
1143])
1144if test "x$ac_cv_have_int64_t" = "xyes" ; then
1145 AC_DEFINE(HAVE_INT64_T)
1146 have_int64_t=1
1147fi
1148
Ben Lindstrom19d7b8d2001-08-16 00:09:49 +00001149if test -z "$have_int64_t" ; then
1150 AC_MSG_CHECKING([for int64_t type in sys/socket.h])
1151 AC_TRY_COMPILE(
1152 [ #include <sys/socket.h> ],
1153 [ int64_t a; a = 1],
1154 [
1155 AC_DEFINE(HAVE_INT64_T)
1156 AC_MSG_RESULT(yes)
1157 ],
1158 [ AC_MSG_RESULT(no) ]
1159 )
1160fi
1161
Tim Rice4cec93f2002-02-26 08:40:48 -08001162if test -z "$have_int64_t" ; then
1163 AC_MSG_CHECKING([for int64_t type in sys/bitypes.h])
1164 AC_TRY_COMPILE(
1165 [ #include <sys/bitypes.h> ],
1166 [ int64_t a; a = 1],
1167 [
1168 AC_DEFINE(HAVE_INT64_T)
1169 AC_MSG_RESULT(yes)
1170 ],
1171 [ AC_MSG_RESULT(no) ]
1172 )
1173fi
1174
Damien Miller61e50f12000-05-08 20:49:37 +10001175AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1176 AC_TRY_COMPILE(
1177 [ #include <sys/types.h> ],
1178 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1179 [ ac_cv_have_u_intxx_t="yes" ],
1180 [ ac_cv_have_u_intxx_t="no" ]
1181 )
1182])
1183if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1184 AC_DEFINE(HAVE_U_INTXX_T)
1185 have_u_intxx_t=1
1186fi
Damien Millerc6398ef1999-11-20 12:18:40 +11001187
Ben Lindstrom19d7b8d2001-08-16 00:09:49 +00001188if test -z "$have_u_intxx_t" ; then
1189 AC_MSG_CHECKING([for u_intXX_t types in sys/socket.h])
1190 AC_TRY_COMPILE(
1191 [ #include <sys/socket.h> ],
1192 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1193 [
1194 AC_DEFINE(HAVE_U_INTXX_T)
1195 AC_MSG_RESULT(yes)
1196 ],
1197 [ AC_MSG_RESULT(no) ]
1198 )
1199fi
1200
Damien Miller578783e2000-09-23 14:12:24 +11001201AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1202 AC_TRY_COMPILE(
1203 [ #include <sys/types.h> ],
1204 [ u_int64_t a; a = 1;],
1205 [ ac_cv_have_u_int64_t="yes" ],
1206 [ ac_cv_have_u_int64_t="no" ]
1207 )
1208])
1209if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1210 AC_DEFINE(HAVE_U_INT64_T)
1211 have_u_int64_t=1
1212fi
1213
Tim Rice4cec93f2002-02-26 08:40:48 -08001214if test -z "$have_u_int64_t" ; then
1215 AC_MSG_CHECKING([for u_int64_t type in sys/bitypes.h])
1216 AC_TRY_COMPILE(
1217 [ #include <sys/bitypes.h> ],
1218 [ u_int64_t a; a = 1],
1219 [
1220 AC_DEFINE(HAVE_U_INT64_T)
1221 AC_MSG_RESULT(yes)
1222 ],
1223 [ AC_MSG_RESULT(no) ]
1224 )
1225fi
1226
Ben Lindstrom19d7b8d2001-08-16 00:09:49 +00001227if test -z "$have_u_intxx_t" ; then
1228 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1229 AC_TRY_COMPILE(
1230 [
1231#include <sys/types.h>
1232 ],
1233 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
1234 [ ac_cv_have_uintxx_t="yes" ],
1235 [ ac_cv_have_uintxx_t="no" ]
1236 )
1237 ])
1238 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1239 AC_DEFINE(HAVE_UINTXX_T)
1240 fi
1241fi
1242
1243if test -z "$have_uintxx_t" ; then
1244 AC_MSG_CHECKING([for uintXX_t types in stdint.h])
1245 AC_TRY_COMPILE(
1246 [ #include <stdint.h> ],
1247 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;],
1248 [
1249 AC_DEFINE(HAVE_UINTXX_T)
1250 AC_MSG_RESULT(yes)
1251 ],
1252 [ AC_MSG_RESULT(no) ]
1253 )
1254fi
1255
Damien Milleredb82922000-06-20 13:25:52 +10001256if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1257 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
Damien Millerb29ea912000-01-15 14:12:03 +11001258then
1259 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1260 AC_TRY_COMPILE(
Damien Miller61e50f12000-05-08 20:49:37 +10001261 [
1262#include <sys/bitypes.h>
1263 ],
Damien Millerb29ea912000-01-15 14:12:03 +11001264 [
Damien Miller70494d12000-04-03 15:57:06 +10001265 int8_t a; int16_t b; int32_t c;
1266 u_int8_t e; u_int16_t f; u_int32_t g;
1267 a = b = c = e = f = g = 1;
Damien Millerb29ea912000-01-15 14:12:03 +11001268 ],
1269 [
1270 AC_DEFINE(HAVE_U_INTXX_T)
1271 AC_DEFINE(HAVE_INTXX_T)
1272 AC_MSG_RESULT(yes)
1273 ],
1274 [AC_MSG_RESULT(no)]
1275 )
1276fi
1277
Damien Miller58be7382001-09-15 21:31:54 +10001278
1279AC_CACHE_CHECK([for u_char], ac_cv_have_u_char, [
1280 AC_TRY_COMPILE(
1281 [
1282#include <sys/types.h>
1283 ],
1284 [ u_char foo; foo = 125; ],
1285 [ ac_cv_have_u_char="yes" ],
1286 [ ac_cv_have_u_char="no" ]
1287 )
1288])
1289if test "x$ac_cv_have_u_char" = "xyes" ; then
1290 AC_DEFINE(HAVE_U_CHAR)
1291fi
1292
Tim Rice13aae5e2001-10-21 17:53:58 -07001293TYPE_SOCKLEN_T
Damien Miller74d0d4a1999-12-29 02:24:35 +11001294
Tim Rice200a5c02002-02-26 22:12:34 -08001295AC_CHECK_TYPES(sig_atomic_t,,,[#include <signal.h>])
Tim Rice4cec93f2002-02-26 08:40:48 -08001296
Damien Miller61e50f12000-05-08 20:49:37 +10001297AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
1298 AC_TRY_COMPILE(
1299 [
1300#include <sys/types.h>
1301 ],
1302 [ size_t foo; foo = 1235; ],
1303 [ ac_cv_have_size_t="yes" ],
1304 [ ac_cv_have_size_t="no" ]
1305 )
1306])
1307if test "x$ac_cv_have_size_t" = "xyes" ; then
1308 AC_DEFINE(HAVE_SIZE_T)
1309fi
Damien Miller95058511999-12-29 10:36:45 +11001310
Damien Miller615f9392000-05-17 22:53:33 +10001311AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
1312 AC_TRY_COMPILE(
1313 [
1314#include <sys/types.h>
1315 ],
1316 [ ssize_t foo; foo = 1235; ],
1317 [ ac_cv_have_ssize_t="yes" ],
1318 [ ac_cv_have_ssize_t="no" ]
1319 )
1320])
1321if test "x$ac_cv_have_ssize_t" = "xyes" ; then
1322 AC_DEFINE(HAVE_SSIZE_T)
1323fi
1324
Ben Lindstrom0d5af602001-01-09 00:50:29 +00001325AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [
1326 AC_TRY_COMPILE(
1327 [
1328#include <time.h>
1329 ],
1330 [ clock_t foo; foo = 1235; ],
1331 [ ac_cv_have_clock_t="yes" ],
1332 [ ac_cv_have_clock_t="no" ]
1333 )
1334])
1335if test "x$ac_cv_have_clock_t" = "xyes" ; then
1336 AC_DEFINE(HAVE_CLOCK_T)
1337fi
1338
Damien Millerb54b40e2000-06-23 08:23:34 +10001339AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
1340 AC_TRY_COMPILE(
1341 [
1342#include <sys/types.h>
1343#include <sys/socket.h>
1344 ],
1345 [ sa_family_t foo; foo = 1235; ],
1346 [ ac_cv_have_sa_family_t="yes" ],
Damien Miller78315eb2000-09-29 23:01:36 +11001347 [ AC_TRY_COMPILE(
1348 [
1349#include <sys/types.h>
1350#include <sys/socket.h>
1351#include <netinet/in.h>
1352 ],
1353 [ sa_family_t foo; foo = 1235; ],
1354 [ ac_cv_have_sa_family_t="yes" ],
1355
Damien Millerb54b40e2000-06-23 08:23:34 +10001356 [ ac_cv_have_sa_family_t="no" ]
Damien Miller78315eb2000-09-29 23:01:36 +11001357 )]
Damien Millerb54b40e2000-06-23 08:23:34 +10001358 )
1359])
1360if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
1361 AC_DEFINE(HAVE_SA_FAMILY_T)
1362fi
1363
Damien Miller0f91b4e2000-06-18 15:43:25 +10001364AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
1365 AC_TRY_COMPILE(
1366 [
1367#include <sys/types.h>
1368 ],
1369 [ pid_t foo; foo = 1235; ],
1370 [ ac_cv_have_pid_t="yes" ],
1371 [ ac_cv_have_pid_t="no" ]
1372 )
1373])
1374if test "x$ac_cv_have_pid_t" = "xyes" ; then
1375 AC_DEFINE(HAVE_PID_T)
1376fi
1377
1378AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
1379 AC_TRY_COMPILE(
1380 [
1381#include <sys/types.h>
1382 ],
1383 [ mode_t foo; foo = 1235; ],
1384 [ ac_cv_have_mode_t="yes" ],
1385 [ ac_cv_have_mode_t="no" ]
1386 )
1387])
1388if test "x$ac_cv_have_mode_t" = "xyes" ; then
1389 AC_DEFINE(HAVE_MODE_T)
1390fi
1391
Damien Miller61e50f12000-05-08 20:49:37 +10001392
1393AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
1394 AC_TRY_COMPILE(
1395 [
Damien Miller81171112000-04-23 11:14:01 +10001396#include <sys/types.h>
1397#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +10001398 ],
1399 [ struct sockaddr_storage s; ],
1400 [ ac_cv_have_struct_sockaddr_storage="yes" ],
1401 [ ac_cv_have_struct_sockaddr_storage="no" ]
1402 )
1403])
1404if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
1405 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)
1406fi
Damien Miller34132e52000-01-14 15:45:46 +11001407
Damien Miller61e50f12000-05-08 20:49:37 +10001408AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
1409 AC_TRY_COMPILE(
1410 [
Damien Miller7b22d652000-06-18 14:07:04 +10001411#include <sys/types.h>
Damien Miller61e50f12000-05-08 20:49:37 +10001412#include <netinet/in.h>
1413 ],
1414 [ struct sockaddr_in6 s; s.sin6_family = 0; ],
1415 [ ac_cv_have_struct_sockaddr_in6="yes" ],
1416 [ ac_cv_have_struct_sockaddr_in6="no" ]
1417 )
1418])
1419if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
1420 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)
1421fi
Damien Miller34132e52000-01-14 15:45:46 +11001422
Damien Miller61e50f12000-05-08 20:49:37 +10001423AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
1424 AC_TRY_COMPILE(
1425 [
Damien Miller7b22d652000-06-18 14:07:04 +10001426#include <sys/types.h>
Damien Miller61e50f12000-05-08 20:49:37 +10001427#include <netinet/in.h>
1428 ],
1429 [ struct in6_addr s; s.s6_addr[0] = 0; ],
1430 [ ac_cv_have_struct_in6_addr="yes" ],
1431 [ ac_cv_have_struct_in6_addr="no" ]
1432 )
1433])
1434if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
1435 AC_DEFINE(HAVE_STRUCT_IN6_ADDR)
1436fi
Damien Miller34132e52000-01-14 15:45:46 +11001437
Damien Miller61e50f12000-05-08 20:49:37 +10001438AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
1439 AC_TRY_COMPILE(
1440 [
Damien Miller81171112000-04-23 11:14:01 +10001441#include <sys/types.h>
1442#include <sys/socket.h>
1443#include <netdb.h>
Damien Miller61e50f12000-05-08 20:49:37 +10001444 ],
1445 [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ],
1446 [ ac_cv_have_struct_addrinfo="yes" ],
1447 [ ac_cv_have_struct_addrinfo="no" ]
1448 )
1449])
1450if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
1451 AC_DEFINE(HAVE_STRUCT_ADDRINFO)
1452fi
1453
Ben Lindstrom42202bc2001-01-15 02:34:37 +00001454AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [
1455 AC_TRY_COMPILE(
1456 [ #include <sys/time.h> ],
1457 [ struct timeval tv; tv.tv_sec = 1;],
1458 [ ac_cv_have_struct_timeval="yes" ],
1459 [ ac_cv_have_struct_timeval="no" ]
1460 )
1461])
1462if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
1463 AC_DEFINE(HAVE_STRUCT_TIMEVAL)
1464 have_struct_timeval=1
1465fi
1466
Ben Lindstrom3ad650a2001-01-03 06:02:51 +00001467# If we don't have int64_t then we can't compile sftp-server. So don't
1468# even attempt to do it.
1469if test "x$ac_cv_have_int64_t" = "xno" -a \
1470 "x$ac_cv_sizeof_long_int" != "x8" -a \
1471 "x$ac_cv_sizeof_long_long_int" = "x0" ; then
1472 NO_SFTP='#'
Tim Ricebee3f222001-03-11 17:32:12 -08001473else
1474dnl test snprintf (broken on SCO w/gcc)
1475 AC_TRY_RUN(
1476 [
1477#include <stdio.h>
1478#include <string.h>
1479#ifdef HAVE_SNPRINTF
1480main()
1481{
1482 char buf[50];
1483 char expected_out[50];
1484 int mazsize = 50 ;
1485#if (SIZEOF_LONG_INT == 8)
1486 long int num = 0x7fffffffffffffff;
1487#else
Kevin Steves6482ec82001-07-15 02:09:28 +00001488 long long num = 0x7fffffffffffffffll;
Tim Ricebee3f222001-03-11 17:32:12 -08001489#endif
1490 strcpy(expected_out, "9223372036854775807");
1491 snprintf(buf, mazsize, "%lld", num);
1492 if(strcmp(buf, expected_out) != 0)
1493 exit(1);
1494 exit(0);
1495}
1496#else
1497main() { exit(0); }
1498#endif
1499 ], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ]
1500 )
Ben Lindstrom3ad650a2001-01-03 06:02:51 +00001501fi
Ben Lindstrom42202bc2001-01-15 02:34:37 +00001502AC_SUBST(NO_SFTP)
Ben Lindstrom3ad650a2001-01-03 06:02:51 +00001503
Damien Miller78315eb2000-09-29 23:01:36 +11001504dnl Checks for structure members
Damien Miller61e50f12000-05-08 20:49:37 +10001505OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
1506OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX)
1507OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX)
1508OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP)
1509OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP)
Damien Millerad1bc5f2000-05-20 14:53:09 +10001510OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX)
Damien Miller61e50f12000-05-08 20:49:37 +10001511OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP)
1512OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP)
Damien Miller8e81ed32000-07-01 13:17:42 +10001513OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmpx.h, HAVE_ID_IN_UTMPX)
Damien Miller61e50f12000-05-08 20:49:37 +10001514OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP)
1515OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX)
1516OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP)
1517OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX)
andre2ff7b5d2000-06-03 14:57:40 +00001518OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP)
1519OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP)
1520OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX)
1521OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX)
Tim Rice13aae5e2001-10-21 17:53:58 -07001522
1523AC_CHECK_MEMBERS([struct stat.st_blksize])
andre2ff7b5d2000-06-03 14:57:40 +00001524
Damien Miller61e50f12000-05-08 20:49:37 +10001525AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
1526 ac_cv_have_ss_family_in_struct_ss, [
1527 AC_TRY_COMPILE(
1528 [
Damien Miller81171112000-04-23 11:14:01 +10001529#include <sys/types.h>
1530#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +10001531 ],
1532 [ struct sockaddr_storage s; s.ss_family = 1; ],
1533 [ ac_cv_have_ss_family_in_struct_ss="yes" ],
1534 [ ac_cv_have_ss_family_in_struct_ss="no" ],
1535 )
1536])
1537if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
1538 AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
1539fi
1540
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
Damien Millerbf1c9b21999-12-09 10:16:54 +11001556
Damien Millerad833b32000-08-23 10:46:23 +10001557AC_CACHE_CHECK([for pw_class field in struct passwd],
1558 ac_cv_have_pw_class_in_struct_passwd, [
1559 AC_TRY_COMPILE(
1560 [
Damien Millerad833b32000-08-23 10:46:23 +10001561#include <pwd.h>
1562 ],
Kevin Steves48b7cc02000-10-07 13:24:00 +00001563 [ struct passwd p; p.pw_class = 0; ],
Damien Millerad833b32000-08-23 10:46:23 +10001564 [ ac_cv_have_pw_class_in_struct_passwd="yes" ],
1565 [ ac_cv_have_pw_class_in_struct_passwd="no" ]
1566 )
1567])
1568if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
1569 AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD)
1570fi
1571
Kevin Steves82456952001-06-22 21:14:18 +00001572AC_CACHE_CHECK([for pw_expire field in struct passwd],
1573 ac_cv_have_pw_expire_in_struct_passwd, [
1574 AC_TRY_COMPILE(
1575 [
1576#include <pwd.h>
1577 ],
1578 [ struct passwd p; p.pw_expire = 0; ],
1579 [ ac_cv_have_pw_expire_in_struct_passwd="yes" ],
1580 [ ac_cv_have_pw_expire_in_struct_passwd="no" ]
1581 )
1582])
1583if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then
1584 AC_DEFINE(HAVE_PW_EXPIRE_IN_PASSWD)
1585fi
1586
1587AC_CACHE_CHECK([for pw_change field in struct passwd],
1588 ac_cv_have_pw_change_in_struct_passwd, [
1589 AC_TRY_COMPILE(
1590 [
1591#include <pwd.h>
1592 ],
1593 [ struct passwd p; p.pw_change = 0; ],
1594 [ ac_cv_have_pw_change_in_struct_passwd="yes" ],
1595 [ ac_cv_have_pw_change_in_struct_passwd="no" ]
1596 )
1597])
1598if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then
1599 AC_DEFINE(HAVE_PW_CHANGE_IN_PASSWD)
1600fi
Damien Miller61e50f12000-05-08 20:49:37 +10001601
Kevin Steves939c9db2002-03-22 17:23:25 +00001602AC_CACHE_CHECK([for msg_accrights field in struct msghdr],
1603 ac_cv_have_accrights_in_msghdr, [
1604 AC_TRY_COMPILE(
1605 [
Tim Riceae49fe62002-04-12 10:26:21 -07001606#include <sys/types.h>
Kevin Steves939c9db2002-03-22 17:23:25 +00001607#include <sys/socket.h>
1608#include <sys/uio.h>
1609 ],
1610 [ struct msghdr m; m.msg_accrights = 0; ],
1611 [ ac_cv_have_accrights_in_msghdr="yes" ],
1612 [ ac_cv_have_accrights_in_msghdr="no" ]
1613 )
1614])
1615if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
1616 AC_DEFINE(HAVE_ACCRIGHTS_IN_MSGHDR)
1617fi
1618
Kevin Stevesa44e0352002-04-07 16:18:03 +00001619AC_CACHE_CHECK([for msg_control field in struct msghdr],
1620 ac_cv_have_control_in_msghdr, [
1621 AC_TRY_COMPILE(
1622 [
Tim Riceae49fe62002-04-12 10:26:21 -07001623#include <sys/types.h>
Kevin Stevesa44e0352002-04-07 16:18:03 +00001624#include <sys/socket.h>
1625#include <sys/uio.h>
1626 ],
1627 [ struct msghdr m; m.msg_control = 0; ],
1628 [ ac_cv_have_control_in_msghdr="yes" ],
1629 [ ac_cv_have_control_in_msghdr="no" ]
1630 )
1631])
1632if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
1633 AC_DEFINE(HAVE_CONTROL_IN_MSGHDR)
1634fi
1635
Damien Miller61e50f12000-05-08 20:49:37 +10001636AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
1637 AC_TRY_LINK([],
1638 [ extern char *__progname; printf("%s", __progname); ],
1639 [ ac_cv_libc_defines___progname="yes" ],
1640 [ ac_cv_libc_defines___progname="no" ]
1641 )
1642])
1643if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
1644 AC_DEFINE(HAVE___PROGNAME)
1645fi
1646
Kevin Steves4846f4a2002-03-22 18:19:53 +00001647AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNCTION__, [
1648 AC_TRY_LINK([
1649#include <stdio.h>
1650],
1651 [ printf("%s", __FUNCTION__); ],
1652 [ ac_cv_cc_implements___FUNCTION__="yes" ],
1653 [ ac_cv_cc_implements___FUNCTION__="no" ]
1654 )
1655])
1656if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
1657 AC_DEFINE(HAVE___FUNCTION__)
1658fi
1659
1660AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__, [
1661 AC_TRY_LINK([
1662#include <stdio.h>
1663],
1664 [ printf("%s", __func__); ],
1665 [ ac_cv_cc_implements___func__="yes" ],
1666 [ ac_cv_cc_implements___func__="no" ]
1667 )
1668])
1669if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
1670 AC_DEFINE(HAVE___func__)
1671fi
1672
Damien Miller4f8e6692001-07-14 13:22:53 +10001673AC_CACHE_CHECK([whether getopt has optreset support],
1674 ac_cv_have_getopt_optreset, [
1675 AC_TRY_LINK(
1676 [
1677#include <getopt.h>
1678 ],
1679 [ extern int optreset; optreset = 0; ],
1680 [ ac_cv_have_getopt_optreset="yes" ],
1681 [ ac_cv_have_getopt_optreset="no" ]
1682 )
1683])
1684if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
1685 AC_DEFINE(HAVE_GETOPT_OPTRESET)
1686fi
Damien Millera22ba012000-03-02 23:09:20 +11001687
Damien Millerecbb26d2000-07-15 14:59:14 +10001688AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
1689 AC_TRY_LINK([],
1690 [ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);],
1691 [ ac_cv_libc_defines_sys_errlist="yes" ],
1692 [ ac_cv_libc_defines_sys_errlist="no" ]
1693 )
1694])
1695if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
1696 AC_DEFINE(HAVE_SYS_ERRLIST)
1697fi
1698
1699
Damien Miller11fa2cc2000-08-16 10:35:58 +10001700AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [
1701 AC_TRY_LINK([],
1702 [ extern int sys_nerr; printf("%i", sys_nerr);],
1703 [ ac_cv_libc_defines_sys_nerr="yes" ],
1704 [ ac_cv_libc_defines_sys_nerr="no" ]
1705 )
1706])
1707if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
1708 AC_DEFINE(HAVE_SYS_NERR)
1709fi
1710
Damien Miller85de5802001-09-18 14:01:11 +10001711SCARD_MSG="no"
Ben Lindstroma42694f2002-04-05 16:11:45 +00001712
1713# Check whether user wants sectok support
1714AC_ARG_WITH(sectok,
1715 [ --with-sectok Enable smartcard support using libsectok],
Damien Miller85de5802001-09-18 14:01:11 +10001716 [
1717 if test "x$withval" != "xno" ; then
1718 if test "x$withval" != "xyes" ; then
1719 CPPFLAGS="$CPPFLAGS -I${withval}"
1720 LDFLAGS="$LDFLAGS -L${withval}"
1721 if test ! -z "$need_dash_r" ; then
1722 LDFLAGS="$LDFLAGS -R${withval}"
1723 fi
1724 if test ! -z "$blibpath" ; then
1725 blibpath="$blibpath:${withval}"
1726 fi
1727 fi
1728 AC_CHECK_HEADERS(sectok.h)
1729 if test "$ac_cv_header_sectok_h" != yes; then
1730 AC_MSG_ERROR(Can't find sectok.h)
1731 fi
1732 AC_CHECK_LIB(sectok, sectok_open)
1733 if test "$ac_cv_lib_sectok_sectok_open" != yes; then
1734 AC_MSG_ERROR(Can't find libsectok)
1735 fi
1736 AC_DEFINE(SMARTCARD)
Ben Lindstroma42694f2002-04-05 16:11:45 +00001737 AC_DEFINE(USE_SECTOK)
1738 SCARD_MSG="yes, using sectok"
1739 fi
1740 ]
1741)
1742
1743# Check whether user wants OpenSC support
1744AC_ARG_WITH(opensc,
Damien Millerf6195f22002-04-23 22:48:46 +10001745 AC_HELP_STRING([--with-opensc=PFX],
1746 [Enable smartcard support using OpenSC]),
1747 opensc_config_prefix="$withval", opensc_config_prefix="")
1748if test x$opensc_config_prefix != x ; then
1749 OPENSC_CONFIG=$opensc_config_prefix/bin/opensc-config
1750 AC_PATH_PROG(OPENSC_CONFIG, opensc-config, no)
1751 if test "$OPENSC_CONFIG" != "no"; then
1752 LIBOPENSC_CFLAGS=`$OPENSC_CONFIG --cflags`
1753 LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs`
1754 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS"
1755 LDFLAGS="$LDFLAGS $LIBOPENSC_LIBS"
1756 AC_DEFINE(SMARTCARD)
1757 AC_DEFINE(USE_OPENSC)
1758 SCARD_MSG="yes, using OpenSC"
1759 fi
1760fi
Damien Miller85de5802001-09-18 14:01:11 +10001761
Damien Millerfd4c9ee2002-04-13 11:04:40 +10001762# Check whether user wants Kerberos 5 support
1763KRB5_MSG="no"
1764AC_ARG_WITH(kerberos5,
1765 [ --with-kerberos5=PATH Enable Kerberos 5 support],
1766 [
1767 if test "x$withval" != "xno" ; then
1768 if test "x$withval" = "xyes" ; then
1769 KRB5ROOT="/usr/local"
1770 else
1771 KRB5ROOT=${withval}
1772 fi
1773 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
1774 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
1775 AC_DEFINE(KRB5)
1776 KRB5_MSG="yes"
1777 AC_MSG_CHECKING(whether we are using Heimdal)
1778 AC_TRY_COMPILE([ #include <krb5.h> ],
1779 [ char *tmp = heimdal_version; ],
1780 [ AC_MSG_RESULT(yes)
1781 AC_DEFINE(HEIMDAL)
1782 K5LIBS="-lkrb5 -ldes -lcom_err -lasn1 -lroken"
1783 ],
1784 [ AC_MSG_RESULT(no)
1785 K5LIBS="-lkrb5 -lk5crypto -lcom_err"
1786 ]
1787 )
1788 if test ! -z "$need_dash_r" ; then
1789 LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib"
1790 fi
1791 if test ! -z "$blibpath" ; then
1792 blibpath="$blibpath:${KRB5ROOT}/lib"
1793 fi
1794 AC_CHECK_LIB(resolv, dn_expand, , )
1795
1796 KRB5=yes
1797 fi
1798 ]
1799)
1800# Check whether user wants Kerberos 4 support
Damien Millerc79bc0d2001-03-28 13:03:42 +10001801KRB4_MSG="no"
1802AC_ARG_WITH(kerberos4,
1803 [ --with-kerberos4=PATH Enable Kerberos 4 support],
1804 [
1805 if test "x$withval" != "xno" ; then
Damien Millerc79bc0d2001-03-28 13:03:42 +10001806 if test "x$withval" != "xyes" ; then
1807 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1808 LDFLAGS="$LDFLAGS -L${withval}/lib"
1809 if test ! -z "$need_dash_r" ; then
1810 LDFLAGS="$LDFLAGS -R${withval}/lib"
1811 fi
1812 if test ! -z "$blibpath" ; then
1813 blibpath="$blibpath:${withval}/lib"
1814 fi
1815 else
1816 if test -d /usr/include/kerberosIV ; then
1817 CPPFLAGS="$CPPFLAGS -I/usr/include/kerberosIV"
1818 fi
1819 fi
1820
1821 AC_CHECK_HEADERS(krb.h)
Damien Millerc79bc0d2001-03-28 13:03:42 +10001822 if test "$ac_cv_header_krb_h" != yes; then
1823 AC_MSG_WARN([Cannot find krb.h, build may fail])
1824 fi
Damien Miller98344742001-03-28 14:37:06 +10001825 AC_CHECK_LIB(krb, main)
Damien Millerc79bc0d2001-03-28 13:03:42 +10001826 if test "$ac_cv_lib_krb_main" != yes; then
Damien Miller98344742001-03-28 14:37:06 +10001827 AC_CHECK_LIB(krb4, main)
1828 if test "$ac_cv_lib_krb4_main" != yes; then
1829 AC_MSG_WARN([Cannot find libkrb nor libkrb4, build may fail])
1830 else
1831 KLIBS="-lkrb4"
1832 fi
1833 else
1834 KLIBS="-lkrb"
Damien Millerc79bc0d2001-03-28 13:03:42 +10001835 fi
Damien Miller98344742001-03-28 14:37:06 +10001836 AC_CHECK_LIB(des, des_cbc_encrypt)
1837 if test "$ac_cv_lib_des_des_cbc_encrypt" != yes; then
1838 AC_CHECK_LIB(des425, des_cbc_encrypt)
1839 if test "$ac_cv_lib_des425_des_cbc_encrypt" != yes; then
1840 AC_MSG_WARN([Cannot find libdes nor libdes425, build may fail])
1841 else
1842 KLIBS="-ldes425"
1843 fi
1844 else
1845 KLIBS="-ldes"
1846 fi
Damien Millerc79bc0d2001-03-28 13:03:42 +10001847 AC_CHECK_LIB(resolv, dn_expand, , )
1848 KRB4=yes
1849 KRB4_MSG="yes"
1850 AC_DEFINE(KRB4)
1851 fi
1852 ]
1853)
1854
1855# Check whether user wants AFS support
1856AFS_MSG="no"
1857AC_ARG_WITH(afs,
1858 [ --with-afs=PATH Enable AFS support],
1859 [
1860 if test "x$withval" != "xno" ; then
1861
1862 if test "x$withval" != "xyes" ; then
1863 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1864 LDFLAGS="$LDFLAGS -L${withval}/lib"
1865 fi
1866
1867 if test -z "$KRB4" ; then
1868 AC_MSG_WARN([AFS requires Kerberos IV support, build may fail])
1869 fi
1870
1871 LIBS="-lkafs $LIBS"
1872 if test ! -z "$AFS_LIBS" ; then
1873 LIBS="$LIBS $AFS_LIBS"
1874 fi
1875 AC_DEFINE(AFS)
1876 AFS_MSG="yes"
1877 fi
1878 ]
1879)
Damien Millerfd4c9ee2002-04-13 11:04:40 +10001880LIBS="$LIBS $KLIBS $K5LIBS"
Damien Millerc79bc0d2001-03-28 13:03:42 +10001881
Damien Millera22ba012000-03-02 23:09:20 +11001882# Looking for programs, paths and files
1883AC_ARG_WITH(rsh,
1884 [ --with-rsh=PATH Specify path to remote shell program ],
1885 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001886 if test "x$withval" != "$no" ; then
Damien Miller90dcc052000-07-08 10:17:40 +10001887 rsh_path=$withval
Damien Millera22ba012000-03-02 23:09:20 +11001888 fi
1889 ],
1890 [
1891 AC_PATH_PROG(rsh_path, rsh)
1892 ]
1893)
1894
1895AC_ARG_WITH(xauth,
1896 [ --with-xauth=PATH Specify path to xauth program ],
1897 [
Ben Lindstrom76020ba2000-10-25 16:55:00 +00001898 if test "x$withval" != "xno" ; then
Damien Miller7b22d652000-06-18 14:07:04 +10001899 xauth_path=$withval
Damien Millera22ba012000-03-02 23:09:20 +11001900 fi
1901 ],
1902 [
Damien Miller78315eb2000-09-29 23:01:36 +11001903 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 +10001904 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
Damien Millera22ba012000-03-02 23:09:20 +11001905 xauth_path="/usr/openwin/bin/xauth"
1906 fi
1907 ]
1908)
1909
Damien Millera19cf472000-11-29 13:28:50 +11001910if test -z "$xauth_path" ; then
1911 XAUTH_PATH="undefined"
1912 AC_SUBST(XAUTH_PATH)
1913else
Damien Millera22ba012000-03-02 23:09:20 +11001914 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
Damien Millera19cf472000-11-29 13:28:50 +11001915 XAUTH_PATH=$xauth_path
1916 AC_SUBST(XAUTH_PATH)
Damien Millera22ba012000-03-02 23:09:20 +11001917fi
1918if test ! -z "$rsh_path" ; then
1919 AC_DEFINE_UNQUOTED(RSH_PATH, "$rsh_path")
1920fi
1921
1922# Check for mail directory (last resort if we cannot get it from headers)
1923if test ! -z "$MAIL" ; then
1924 maildir=`dirname $MAIL`
1925 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
1926fi
1927
Damien Millera22ba012000-03-02 23:09:20 +11001928if test -z "$no_dev_ptmx" ; then
Damien Miller204ad072000-03-02 23:56:12 +11001929 AC_CHECK_FILE("/dev/ptmx",
1930 [
1931 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
1932 have_dev_ptmx=1
1933 ]
1934 )
Damien Millera22ba012000-03-02 23:09:20 +11001935fi
Damien Miller204ad072000-03-02 23:56:12 +11001936AC_CHECK_FILE("/dev/ptc",
1937 [
1938 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
1939 have_dev_ptc=1
1940 ]
1941)
1942
Damien Millera22ba012000-03-02 23:09:20 +11001943# Options from here on. Some of these are preset by platform above
Ben Lindstrom9841b0a2001-06-09 02:26:58 +00001944AC_ARG_WITH(mantype,
Damien Miller897741e2001-04-16 10:41:46 +10001945 [ --with-mantype=man|cat|doc Set man page type],
Damien Miller670a4b82000-01-22 13:53:11 +11001946 [
Damien Miller897741e2001-04-16 10:41:46 +10001947 case "$withval" in
1948 man|cat|doc)
1949 MANTYPE=$withval
1950 ;;
1951 *)
1952 AC_MSG_ERROR(invalid man type: $withval)
1953 ;;
1954 esac
Damien Miller670a4b82000-01-22 13:53:11 +11001955 ]
1956)
Ben Lindstrombc709922001-04-18 18:04:21 +00001957if test -z "$MANTYPE"; then
Tim Rice07183b82001-04-25 21:40:28 -07001958 AC_PATH_PROGS(NROFF, nroff awf, /bin/false, /usr/bin:/usr/ucb)
Ben Lindstrombc709922001-04-18 18:04:21 +00001959 if ${NROFF} -mdoc ${srcdir}/ssh.1 >/dev/null 2>&1; then
1960 MANTYPE=doc
1961 elif ${NROFF} -man ${srcdir}/ssh.1 >/dev/null 2>&1; then
1962 MANTYPE=man
1963 else
1964 MANTYPE=cat
1965 fi
1966fi
Damien Miller670a4b82000-01-22 13:53:11 +11001967AC_SUBST(MANTYPE)
Ben Lindstrombc709922001-04-18 18:04:21 +00001968if test "$MANTYPE" = "doc"; then
1969 mansubdir=man;
1970else
1971 mansubdir=$MANTYPE;
1972fi
1973AC_SUBST(mansubdir)
Damien Miller8bdeee21999-12-30 15:50:54 +11001974
Damien Millera22ba012000-03-02 23:09:20 +11001975# Check whether to enable MD5 passwords
Damien Miller7b22d652000-06-18 14:07:04 +10001976MD5_MSG="no"
Damien Millerf7c0f821999-11-22 22:31:49 +11001977AC_ARG_WITH(md5-passwords,
Damien Millerdd1c7ba1999-11-19 15:53:20 +11001978 [ --with-md5-passwords Enable use of MD5 passwords],
Damien Miller8bdeee21999-12-30 15:50:54 +11001979 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001980 if test "x$withval" != "xno" ; then
Damien Miller8bdeee21999-12-30 15:50:54 +11001981 AC_DEFINE(HAVE_MD5_PASSWORDS)
Damien Miller7b22d652000-06-18 14:07:04 +10001982 MD5_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +11001983 fi
1984 ]
Damien Millerdd1c7ba1999-11-19 15:53:20 +11001985)
1986
Damien Millera22ba012000-03-02 23:09:20 +11001987# Whether to disable shadow password support
Damien Miller76112de1999-12-21 11:18:08 +11001988AC_ARG_WITH(shadow,
1989 [ --without-shadow Disable shadow password support],
1990 [
1991 if test "x$withval" = "xno" ; then
1992 AC_DEFINE(DISABLE_SHADOW)
Damien Miller1f335fb2000-06-26 11:31:33 +10001993 disable_shadow=yes
Damien Miller76112de1999-12-21 11:18:08 +11001994 fi
1995 ]
1996)
1997
Damien Miller1f335fb2000-06-26 11:31:33 +10001998if test -z "$disable_shadow" ; then
1999 AC_MSG_CHECKING([if the systems has expire shadow information])
2000 AC_TRY_COMPILE(
2001 [
2002#include <sys/types.h>
2003#include <shadow.h>
2004 struct spwd sp;
2005 ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ],
2006 [ sp_expire_available=yes ], []
2007 )
2008
2009 if test "x$sp_expire_available" = "xyes" ; then
2010 AC_MSG_RESULT(yes)
2011 AC_DEFINE(HAS_SHADOW_EXPIRE)
2012 else
2013 AC_MSG_RESULT(no)
2014 fi
2015fi
2016
Damien Millera22ba012000-03-02 23:09:20 +11002017# Use ip address instead of hostname in $DISPLAY
Damien Miller9a947342000-08-30 10:03:33 +11002018if test ! -z "$IPADDR_IN_DISPLAY" ; then
2019 DISPLAY_HACK_MSG="yes"
2020 AC_DEFINE(IPADDR_IN_DISPLAY)
2021else
2022 DISPLAY_HACK_MSG="no"
2023 AC_ARG_WITH(ipaddr-display,
2024 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
2025 [
2026 if test "x$withval" != "xno" ; then
2027 AC_DEFINE(IPADDR_IN_DISPLAY)
2028 DISPLAY_HACK_MSG="yes"
2029 fi
2030 ]
2031 )
2032fi
Damien Miller76112de1999-12-21 11:18:08 +11002033
Tim Rice43a1c132002-04-17 21:19:14 -07002034dnl BSD systems use /etc/login.conf so --with-default-path= has no effect
2035if test $ac_cv_func_login_getcapbool = "yes" -a \
2036 $ac_cv_header_login_cap_h = "yes" ; then
2037 USES_LOGIN_CONF=yes
2038fi
Damien Millera22ba012000-03-02 23:09:20 +11002039# Whether to mess with the default path
Damien Miller7b22d652000-06-18 14:07:04 +10002040SERVER_PATH_MSG="(default)"
Damien Millere7f626c1999-12-31 09:49:44 +11002041AC_ARG_WITH(default-path,
Damien Miller5a3e6831999-12-27 09:48:56 +11002042 [ --with-default-path=PATH Specify default \$PATH environment for server],
2043 [
Tim Rice43a1c132002-04-17 21:19:14 -07002044 if test "$USES_LOGIN_CONF" = "yes" ; then
2045 AC_MSG_WARN([
2046--with-default-path=PATH has no effect on this system.
2047Edit /etc/login.conf instead.])
2048 elif test "x$withval" != "xno" ; then
Tim Rice59ea0a02001-03-10 13:50:45 -08002049 user_path="$withval"
Damien Miller7b22d652000-06-18 14:07:04 +10002050 SERVER_PATH_MSG="$withval"
Damien Miller5a3e6831999-12-27 09:48:56 +11002051 fi
Tim Rice59ea0a02001-03-10 13:50:45 -08002052 ],
Tim Rice43a1c132002-04-17 21:19:14 -07002053 [ if test "$USES_LOGIN_CONF" = "yes" ; then
2054 AC_MSG_WARN([Make sure the path to scp is in /etc/login.conf])
2055 else
Tim Rice59ea0a02001-03-10 13:50:45 -08002056 AC_TRY_RUN(
2057 [
2058/* find out what STDPATH is */
2059#include <stdio.h>
Tim Rice59ea0a02001-03-10 13:50:45 -08002060#ifdef HAVE_PATHS_H
2061# include <paths.h>
2062#endif
2063#ifndef _PATH_STDPATH
2064# define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
2065#endif
2066#include <sys/types.h>
2067#include <sys/stat.h>
2068#include <fcntl.h>
2069#define DATA "conftest.stdpath"
2070
2071main()
2072{
2073 FILE *fd;
2074 int rc;
2075
2076 fd = fopen(DATA,"w");
2077 if(fd == NULL)
2078 exit(1);
2079
2080 if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0)
2081 exit(1);
2082
2083 exit(0);
2084}
2085 ], [ user_path=`cat conftest.stdpath` ],
2086 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ],
2087 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ]
2088 )
2089# make sure $bindir is in USER_PATH so scp will work
2090 t_bindir=`eval echo ${bindir}`
2091 case $t_bindir in
2092 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$prefix~"` ;;
2093 esac
2094 case $t_bindir in
2095 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$ac_default_prefix~"` ;;
2096 esac
2097 echo $user_path | grep ":$t_bindir" > /dev/null 2>&1
2098 if test $? -ne 0 ; then
2099 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1
2100 if test $? -ne 0 ; then
2101 user_path=$user_path:$t_bindir
2102 AC_MSG_RESULT(Adding $t_bindir to USER_PATH so scp will work)
2103 fi
2104 fi
Tim Rice43a1c132002-04-17 21:19:14 -07002105 fi ]
Damien Miller5a3e6831999-12-27 09:48:56 +11002106)
Tim Rice43a1c132002-04-17 21:19:14 -07002107if test "$USES_LOGIN_CONF" != "yes" ; then
2108 AC_DEFINE_UNQUOTED(USER_PATH, "$user_path")
2109 AC_SUBST(user_path)
2110fi
Damien Miller5a3e6831999-12-27 09:48:56 +11002111
Damien Millera22ba012000-03-02 23:09:20 +11002112# Whether to force IPv4 by default (needed on broken glibc Linux)
Damien Miller7b22d652000-06-18 14:07:04 +10002113IPV4_HACK_MSG="no"
Damien Miller7d80e342000-01-19 14:36:49 +11002114AC_ARG_WITH(ipv4-default,
2115 [ --with-ipv4-default Use IPv4 by connections unless '-6' specified],
2116 [
2117 if test "x$withval" != "xno" ; then
2118 AC_DEFINE(IPV4_DEFAULT)
Damien Miller7b22d652000-06-18 14:07:04 +10002119 IPV4_HACK_MSG="yes"
Damien Miller7d80e342000-01-19 14:36:49 +11002120 fi
2121 ]
2122)
2123
Damien Miller61e50f12000-05-08 20:49:37 +10002124AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
Damien Miller7b22d652000-06-18 14:07:04 +10002125IPV4_IN6_HACK_MSG="no"
Damien Miller7bcb0892000-03-11 20:45:40 +11002126AC_ARG_WITH(4in6,
2127 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
2128 [
2129 if test "x$withval" != "xno" ; then
2130 AC_MSG_RESULT(yes)
2131 AC_DEFINE(IPV4_IN_IPV6)
Damien Miller7b22d652000-06-18 14:07:04 +10002132 IPV4_IN6_HACK_MSG="yes"
Damien Miller7bcb0892000-03-11 20:45:40 +11002133 else
2134 AC_MSG_RESULT(no)
2135 fi
2136 ],[
2137 if test "x$inet6_default_4in6" = "xyes"; then
2138 AC_MSG_RESULT([yes (default)])
2139 AC_DEFINE(IPV4_IN_IPV6)
Damien Miller7b22d652000-06-18 14:07:04 +10002140 IPV4_IN6_HACK_MSG="yes"
Damien Miller7bcb0892000-03-11 20:45:40 +11002141 else
2142 AC_MSG_RESULT([no (default)])
2143 fi
2144 ]
2145)
2146
Damien Miller60396b02001-02-18 17:01:00 +11002147# Whether to enable BSD auth support
Damien Miller6c21c512002-01-22 21:57:53 +11002148BSD_AUTH_MSG=no
Damien Miller60396b02001-02-18 17:01:00 +11002149AC_ARG_WITH(bsd-auth,
2150 [ --with-bsd-auth Enable BSD auth support],
2151 [
2152 if test "x$withval" != "xno" ; then
2153 AC_DEFINE(BSD_AUTH)
Damien Miller6c21c512002-01-22 21:57:53 +11002154 BSD_AUTH_MSG=yes
Damien Miller60396b02001-02-18 17:01:00 +11002155 fi
2156 ]
2157)
2158
Damien Miller78315eb2000-09-29 23:01:36 +11002159AC_MSG_CHECKING(whether to install ssh as suid root)
2160AC_ARG_ENABLE(suid-ssh,
2161[ --enable-suid-ssh Install ssh as suid root (default)
2162 --disable-suid-ssh Install ssh without suid bit],
2163[ case "$enableval" in
2164 no)
2165 AC_MSG_RESULT(no)
2166 SSHMODE=0711
2167 ;;
2168 *) AC_MSG_RESULT(yes)
Ben Lindstrom8e2aa5b2001-07-24 17:00:13 +00002169 SSHMODE=4711
Damien Miller78315eb2000-09-29 23:01:36 +11002170 ;;
2171 esac ],
2172 AC_MSG_RESULT(yes)
Ben Lindstrom8e2aa5b2001-07-24 17:00:13 +00002173 SSHMODE=4711
Damien Miller78315eb2000-09-29 23:01:36 +11002174)
2175AC_SUBST(SSHMODE)
2176
2177
Damien Millera22ba012000-03-02 23:09:20 +11002178# Where to place sshd.pid
Damien Millerb13c73e2000-01-17 22:02:17 +11002179piddir=/var/run
Damien Miller78315eb2000-09-29 23:01:36 +11002180# make sure the directory exists
2181if test ! -d $piddir ; then
2182 piddir=`eval echo ${sysconfdir}`
2183 case $piddir in
2184 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
2185 esac
2186fi
2187
Tim Rice88f2ab52002-03-17 12:17:34 -08002188AC_ARG_WITH(pid-dir,
2189 [ --with-pid-dir=PATH Specify location of ssh.pid file],
2190 [
2191 if test "x$withval" != "xno" ; then
2192 piddir=$withval
2193 if test ! -d $piddir ; then
2194 AC_MSG_WARN([** no $piddir directory on this system **])
2195 fi
2196 fi
2197 ]
2198)
2199
Ben Lindstrom226cfa02001-01-22 05:34:40 +00002200AC_DEFINE_UNQUOTED(_PATH_SSH_PIDDIR, "$piddir")
Damien Millerb13c73e2000-01-17 22:02:17 +11002201AC_SUBST(piddir)
Damien Miller5eed6a22000-01-16 12:05:18 +11002202
andre2ff7b5d2000-06-03 14:57:40 +00002203dnl allow user to disable some login recording features
2204AC_ARG_ENABLE(lastlog,
andre43ca7e22000-06-19 08:23:46 +00002205 [ --disable-lastlog disable use of lastlog even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00002206 [ AC_DEFINE(DISABLE_LASTLOG) ]
2207)
2208AC_ARG_ENABLE(utmp,
andre43ca7e22000-06-19 08:23:46 +00002209 [ --disable-utmp disable use of utmp even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00002210 [ AC_DEFINE(DISABLE_UTMP) ]
2211)
2212AC_ARG_ENABLE(utmpx,
andre43ca7e22000-06-19 08:23:46 +00002213 [ --disable-utmpx disable use of utmpx even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00002214 [ AC_DEFINE(DISABLE_UTMPX) ]
2215)
2216AC_ARG_ENABLE(wtmp,
andre43ca7e22000-06-19 08:23:46 +00002217 [ --disable-wtmp disable use of wtmp even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00002218 [ AC_DEFINE(DISABLE_WTMP) ]
2219)
2220AC_ARG_ENABLE(wtmpx,
andre43ca7e22000-06-19 08:23:46 +00002221 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00002222 [ AC_DEFINE(DISABLE_WTMPX) ]
2223)
2224AC_ARG_ENABLE(libutil,
andre43ca7e22000-06-19 08:23:46 +00002225 [ --disable-libutil disable use of libutil (login() etc.) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00002226 [ AC_DEFINE(DISABLE_LOGIN) ]
2227)
2228AC_ARG_ENABLE(pututline,
andre43ca7e22000-06-19 08:23:46 +00002229 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00002230 [ AC_DEFINE(DISABLE_PUTUTLINE) ]
2231)
2232AC_ARG_ENABLE(pututxline,
andre43ca7e22000-06-19 08:23:46 +00002233 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00002234 [ AC_DEFINE(DISABLE_PUTUTXLINE) ]
2235)
2236AC_ARG_WITH(lastlog,
andre43ca7e22000-06-19 08:23:46 +00002237 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
Damien Miller709528a2001-01-31 09:57:55 +11002238 [
2239 if test "x$withval" = "xno" ; then
2240 AC_DEFINE(DISABLE_LASTLOG)
2241 else
2242 conf_lastlog_location=$withval
2243 fi
2244 ]
2245)
andre2ff7b5d2000-06-03 14:57:40 +00002246
2247dnl lastlog, [uw]tmpx? detection
2248dnl NOTE: set the paths in the platform section to avoid the
2249dnl need for command-line parameters
2250dnl lastlog and [uw]tmp are subject to a file search if all else fails
2251
2252dnl lastlog detection
2253dnl NOTE: the code itself will detect if lastlog is a directory
2254AC_MSG_CHECKING([if your system defines LASTLOG_FILE])
2255AC_TRY_COMPILE([
2256#include <sys/types.h>
2257#include <utmp.h>
2258#ifdef HAVE_LASTLOG_H
2259# include <lastlog.h>
2260#endif
Damien Miller2994e082000-06-04 15:51:47 +10002261#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00002262# include <paths.h>
2263#endif
Ben Lindstrom19d7b8d2001-08-16 00:09:49 +00002264#ifdef HAVE_LOGIN_H
2265# include <login.h>
2266#endif
andre2ff7b5d2000-06-03 14:57:40 +00002267 ],
2268 [ char *lastlog = LASTLOG_FILE; ],
2269 [ AC_MSG_RESULT(yes) ],
Damien Miller2994e082000-06-04 15:51:47 +10002270 [
2271 AC_MSG_RESULT(no)
2272 AC_MSG_CHECKING([if your system defines _PATH_LASTLOG])
2273 AC_TRY_COMPILE([
2274#include <sys/types.h>
2275#include <utmp.h>
2276#ifdef HAVE_LASTLOG_H
2277# include <lastlog.h>
2278#endif
2279#ifdef HAVE_PATHS_H
2280# include <paths.h>
2281#endif
2282 ],
2283 [ char *lastlog = _PATH_LASTLOG; ],
2284 [ AC_MSG_RESULT(yes) ],
2285 [
andree441aa32000-06-12 22:34:38 +00002286 AC_MSG_RESULT(no)
Damien Miller2994e082000-06-04 15:51:47 +10002287 system_lastlog_path=no
2288 ])
2289 ]
andre2ff7b5d2000-06-03 14:57:40 +00002290)
Damien Miller2994e082000-06-04 15:51:47 +10002291
andre2ff7b5d2000-06-03 14:57:40 +00002292if test -z "$conf_lastlog_location"; then
2293 if test x"$system_lastlog_path" = x"no" ; then
2294 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
Damien Milleredb82922000-06-20 13:25:52 +10002295 if (test -d "$f" || test -f "$f") ; then
andre2ff7b5d2000-06-03 14:57:40 +00002296 conf_lastlog_location=$f
2297 fi
2298 done
2299 if test -z "$conf_lastlog_location"; then
andre45cad512000-06-12 23:27:31 +00002300 AC_MSG_WARN([** Cannot find lastlog **])
2301 dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx
andre2ff7b5d2000-06-03 14:57:40 +00002302 fi
2303 fi
2304fi
2305
2306if test -n "$conf_lastlog_location"; then
2307 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location")
2308fi
2309
2310dnl utmp detection
2311AC_MSG_CHECKING([if your system defines UTMP_FILE])
2312AC_TRY_COMPILE([
2313#include <sys/types.h>
2314#include <utmp.h>
Damien Miller2994e082000-06-04 15:51:47 +10002315#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00002316# include <paths.h>
2317#endif
2318 ],
2319 [ char *utmp = UTMP_FILE; ],
2320 [ AC_MSG_RESULT(yes) ],
2321 [ AC_MSG_RESULT(no)
2322 system_utmp_path=no ]
2323)
2324if test -z "$conf_utmp_location"; then
2325 if test x"$system_utmp_path" = x"no" ; then
2326 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
2327 if test -f $f ; then
2328 conf_utmp_location=$f
2329 fi
2330 done
2331 if test -z "$conf_utmp_location"; then
2332 AC_DEFINE(DISABLE_UTMP)
2333 fi
2334 fi
2335fi
2336if test -n "$conf_utmp_location"; then
2337 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location")
2338fi
2339
2340dnl wtmp detection
2341AC_MSG_CHECKING([if your system defines WTMP_FILE])
2342AC_TRY_COMPILE([
2343#include <sys/types.h>
2344#include <utmp.h>
Damien Miller2994e082000-06-04 15:51:47 +10002345#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00002346# include <paths.h>
2347#endif
2348 ],
2349 [ char *wtmp = WTMP_FILE; ],
2350 [ AC_MSG_RESULT(yes) ],
2351 [ AC_MSG_RESULT(no)
2352 system_wtmp_path=no ]
2353)
2354if test -z "$conf_wtmp_location"; then
2355 if test x"$system_wtmp_path" = x"no" ; then
2356 for f in /usr/adm/wtmp /var/log/wtmp; do
2357 if test -f $f ; then
2358 conf_wtmp_location=$f
2359 fi
2360 done
2361 if test -z "$conf_wtmp_location"; then
2362 AC_DEFINE(DISABLE_WTMP)
2363 fi
2364 fi
2365fi
2366if test -n "$conf_wtmp_location"; then
2367 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location")
2368fi
2369
2370
2371dnl utmpx detection - I don't know any system so perverse as to require
2372dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out
2373dnl there, though.
2374AC_MSG_CHECKING([if your system defines UTMPX_FILE])
2375AC_TRY_COMPILE([
2376#include <sys/types.h>
2377#include <utmp.h>
2378#ifdef HAVE_UTMPX_H
2379#include <utmpx.h>
2380#endif
Damien Miller2994e082000-06-04 15:51:47 +10002381#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00002382# include <paths.h>
2383#endif
2384 ],
2385 [ char *utmpx = UTMPX_FILE; ],
2386 [ AC_MSG_RESULT(yes) ],
2387 [ AC_MSG_RESULT(no)
2388 system_utmpx_path=no ]
2389)
2390if test -z "$conf_utmpx_location"; then
2391 if test x"$system_utmpx_path" = x"no" ; then
2392 AC_DEFINE(DISABLE_UTMPX)
2393 fi
2394else
2395 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location")
2396fi
2397
2398dnl wtmpx detection
2399AC_MSG_CHECKING([if your system defines WTMPX_FILE])
2400AC_TRY_COMPILE([
2401#include <sys/types.h>
2402#include <utmp.h>
2403#ifdef HAVE_UTMPX_H
2404#include <utmpx.h>
2405#endif
Damien Miller2994e082000-06-04 15:51:47 +10002406#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00002407# include <paths.h>
2408#endif
2409 ],
2410 [ char *wtmpx = WTMPX_FILE; ],
2411 [ AC_MSG_RESULT(yes) ],
2412 [ AC_MSG_RESULT(no)
2413 system_wtmpx_path=no ]
2414)
2415if test -z "$conf_wtmpx_location"; then
2416 if test x"$system_wtmpx_path" = x"no" ; then
2417 AC_DEFINE(DISABLE_WTMPX)
2418 fi
2419else
2420 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location")
2421fi
2422
Damien Miller4018c192000-04-30 09:30:44 +10002423
Damien Miller29ea30d2000-03-17 10:54:15 +11002424if test ! -z "$blibpath" ; then
2425 LDFLAGS="$LDFLAGS -blibpath:$blibpath"
2426 AC_MSG_WARN([Please check and edit -blibpath in LDFLAGS in Makefile])
2427fi
2428
Tim Rice4cec93f2002-02-26 08:40:48 -08002429dnl remove pam and dl because they are in $LIBPAM
2430if test "$PAM_MSG" = yes ; then
Tim Rice7d2d1f12002-02-26 22:05:11 -08002431 LIBS=`echo $LIBS | sed 's/-lpam //'`
2432fi
2433if test "$ac_cv_lib_pam_pam_set_item" = yes ; then
2434 LIBS=`echo $LIBS | sed 's/-ldl //'`
Tim Rice4cec93f2002-02-26 08:40:48 -08002435fi
2436
Damien Millerbac2d8a2000-09-05 16:13:06 +11002437AC_EXEEXT
Tim Rice13aae5e2001-10-21 17:53:58 -07002438AC_CONFIG_FILES([Makefile openbsd-compat/Makefile scard/Makefile ssh_prng_cmds])
2439AC_OUTPUT
Damien Miller0437b332000-05-02 09:56:41 +10002440
Damien Miller7b22d652000-06-18 14:07:04 +10002441# Print summary of options
2442
Damien Miller7b22d652000-06-18 14:07:04 +10002443# Someone please show me a better way :)
2444A=`eval echo ${prefix}` ; A=`eval echo ${A}`
2445B=`eval echo ${bindir}` ; B=`eval echo ${B}`
2446C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
2447D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
Kevin Stevese0f49142000-10-14 17:51:48 +00002448E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
Ben Lindstrombc709922001-04-18 18:04:21 +00002449F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
Damien Miller7b22d652000-06-18 14:07:04 +10002450G=`eval echo ${piddir}` ; G=`eval echo ${G}`
Tim Rice59ea0a02001-03-10 13:50:45 -08002451H=`eval echo ${user_path}` ; H=`eval echo ${H}`
Damien Miller7b22d652000-06-18 14:07:04 +10002452
2453echo ""
Kevin Steves393d2f72001-04-08 22:50:43 +00002454echo "OpenSSH has been configured with the following options:"
Damien Miller7b22d652000-06-18 14:07:04 +10002455echo " User binaries: $B"
2456echo " System binaries: $C"
2457echo " Configuration files: $D"
2458echo " Askpass program: $E"
2459echo " Manual pages: $F"
2460echo " PID file: $G"
Tim Rice43a1c132002-04-17 21:19:14 -07002461if test "$USES_LOGIN_CONF" = "yes" ; then
2462echo " At runtime, sshd will use the path defined in /etc/login.conf"
2463else
Tim Rice59ea0a02001-03-10 13:50:45 -08002464echo " sshd default user PATH: $H"
Tim Rice43a1c132002-04-17 21:19:14 -07002465fi
Damien Miller897741e2001-04-16 10:41:46 +10002466echo " Manpage format: $MANTYPE"
Damien Miller7b22d652000-06-18 14:07:04 +10002467echo " PAM support: ${PAM_MSG}"
2468echo " KerberosIV support: $KRB4_MSG"
Damien Millerfd4c9ee2002-04-13 11:04:40 +10002469echo " KerberosV support: $KRB5_MSG"
Damien Miller85de5802001-09-18 14:01:11 +10002470echo " Smartcard support: $SCARD_MSG"
Damien Miller7b22d652000-06-18 14:07:04 +10002471echo " AFS support: $AFS_MSG"
2472echo " S/KEY support: $SKEY_MSG"
2473echo " TCP Wrappers support: $TCPW_MSG"
2474echo " MD5 password support: $MD5_MSG"
2475echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
2476echo " Use IPv4 by default hack: $IPV4_HACK_MSG"
2477echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
Damien Miller6c21c512002-01-22 21:57:53 +11002478echo " BSD Auth support: $BSD_AUTH_MSG"
2479echo " Random number source: $RAND_MSG"
2480if test ! -z "$USE_RAND_HELPER" ; then
2481 echo " ssh-rand-helper collects from: $RAND_HELPER_MSG"
Damien Miller60396b02001-02-18 17:01:00 +11002482fi
2483
Damien Miller7b22d652000-06-18 14:07:04 +10002484echo ""
2485
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +00002486echo " Host: ${host}"
2487echo " Compiler: ${CC}"
2488echo " Compiler flags: ${CFLAGS}"
2489echo "Preprocessor flags: ${CPPFLAGS}"
2490echo " Linker flags: ${LDFLAGS}"
Tim Rice4cec93f2002-02-26 08:40:48 -08002491echo " Libraries: ${LIBWRAP} ${LIBPAM} ${LIBS}"
Damien Miller7b22d652000-06-18 14:07:04 +10002492
2493echo ""
2494
Damien Miller82cf0ce2000-12-20 13:34:48 +11002495if test "x$PAM_MSG" = "xyes" ; then
Damien Miller6c21c512002-01-22 21:57:53 +11002496 echo "PAM is enabled. You may need to install a PAM control file "
2497 echo "for sshd, otherwise password authentication may fail. "
2498 echo "Example PAM control files can be found in the contrib/ "
2499 echo "subdirectory"
Damien Miller6f9c3372000-10-25 10:06:04 +11002500 echo ""
2501fi
Ben Lindstrom3ad650a2001-01-03 06:02:51 +00002502
2503if test ! -z "$NO_SFTP"; then
Damien Miller6c21c512002-01-22 21:57:53 +11002504 echo "sftp-server will be disabled. Your compiler does not "
2505 echo "support 64bit integers."
2506 echo ""
2507fi
2508
2509if test ! -z "$RAND_HELPER_CMDHASH" ; then
2510 echo "WARNING: you are using the builtin random number collection "
2511 echo "service. Please read WARNING.RNG and request that your OS "
2512 echo "vendor includes kernel-based random number collection in "
2513 echo "future versions of your OS."
Ben Lindstrom3ad650a2001-01-03 06:02:51 +00002514 echo ""
2515fi
Damien Miller60396b02001-02-18 17:01:00 +11002516