blob: 4be5f641ed10f7f118eeffc3f2f065f272e9bd43 [file] [log] [blame]
Ben Lindstrom3e006472002-10-16 00:24:03 +00001# $Id: configure.ac,v 1.91 2002/10/16 00:24:05 mouring 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 Miller4864e8f2001-02-08 10:07:08 +110020AC_PATH_PROG(TEST_MINUS_S_SH, bash)
21AC_PATH_PROG(TEST_MINUS_S_SH, ksh)
22AC_PATH_PROG(TEST_MINUS_S_SH, sh)
Tim Rice0502a472002-05-08 16:04:14 -070023AC_PATH_PROG(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
Tim Ricee958ed32002-07-05 07:12:33 -070073 AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)],
74 [AC_CHECK_LIB(s,authenticate,
75 [ AC_DEFINE(WITH_AIXAUTHENTICATE)
76 LIBS="$LIBS -ls"
77 ])
78 ])
Damien Millereca71f82000-01-20 22:38:27 +110079 AC_DEFINE(BROKEN_GETADDRINFO)
Damien Millerf5fea442002-04-23 22:52:45 +100080 AC_DEFINE(BROKEN_REALPATH)
andre60f3c982000-06-03 16:18:19 +000081 dnl AIX handles lastlog as part of its login message
82 AC_DEFINE(DISABLE_LASTLOG)
Kevin Steves90d5de72002-06-22 18:51:48 +000083 AC_DEFINE(LOGIN_NEEDS_UTMPX)
Damien Miller75b1d102000-01-07 14:01:41 +110084 ;;
Damien Millerbac2d8a2000-09-05 16:13:06 +110085*-*-cygwin*)
Tim Ricefe1d1002001-11-26 17:19:43 -080086 LIBS="$LIBS /usr/lib/textmode.o"
Damien Millerbac2d8a2000-09-05 16:13:06 +110087 AC_DEFINE(HAVE_CYGWIN)
Ben Lindstromca60a9b2001-05-17 03:32:50 +000088 AC_DEFINE(USE_PIPES)
Damien Millerbac2d8a2000-09-05 16:13:06 +110089 AC_DEFINE(DISABLE_SHADOW)
90 AC_DEFINE(IPV4_DEFAULT)
91 AC_DEFINE(IP_TOS_IS_BROKEN)
Ben Lindstrom38e60932001-02-24 00:55:04 +000092 AC_DEFINE(NO_X11_UNIX_SOCKETS)
Ben Lindstrom99a4e142002-07-09 14:06:40 +000093 AC_DEFINE(NO_IPPORT_RESERVED_CONCEPT)
Tim Rice9dd30812002-07-07 13:43:36 -070094 AC_DEFINE(DISABLE_FD_PASSING)
Ben Lindstrom837461b2002-06-12 16:57:14 +000095 AC_DEFINE(SETGROUPS_NOOP)
Damien Millerbac2d8a2000-09-05 16:13:06 +110096 ;;
Ben Lindstrom58055132001-02-15 18:34:29 +000097*-*-dgux*)
98 AC_DEFINE(IP_TOS_IS_BROKEN)
99 ;;
Ben Lindstromfed7bb42001-07-15 18:30:42 +0000100*-*-darwin*)
Damien Millerfc93d4b2002-09-04 23:26:29 +1000101 AC_MSG_CHECKING(if we have working getaddrinfo)
102 AC_TRY_RUN([#include <mach-o/dyld.h>
103main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
104 exit(0);
105 else
106 exit(1);
107}], [AC_MSG_RESULT(working)],
108 [AC_MSG_RESULT(buggy)
109 AC_DEFINE(BROKEN_GETADDRINFO)],
110 [AC_MSG_RESULT(assume it is working)])
Ben Lindstromfed7bb42001-07-15 18:30:42 +0000111 ;;
Kevin Steves0ea1d9d2002-04-25 18:17:04 +0000112*-*-hpux10.26)
113 if test -z "$GCC"; then
114 CFLAGS="$CFLAGS -Ae"
115 fi
116 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
117 IPADDR_IN_DISPLAY=yes
118 AC_DEFINE(HAVE_SECUREWARE)
119 AC_DEFINE(USE_PIPES)
120 AC_DEFINE(LOGIN_NO_ENDOPT)
121 AC_DEFINE(LOGIN_NEEDS_UTMPX)
122 AC_DEFINE(DISABLE_SHADOW)
123 AC_DEFINE(DISABLE_UTMP)
124 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
Tim Ricef028f1e2002-07-19 12:41:10 -0700125 LIBS="$LIBS -lsec -lsecpw"
126 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***]))
Kevin Steves0ea1d9d2002-04-25 18:17:04 +0000127 disable_ptmx_check=yes
128 ;;
Damien Miller76112de1999-12-21 11:18:08 +1100129*-*-hpux10*)
130 if test -z "$GCC"; then
Damien Millerfda78d92000-05-20 15:33:44 +1000131 CFLAGS="$CFLAGS -Ae"
Damien Miller76112de1999-12-21 11:18:08 +1100132 fi
Kevin Steves315f8b72001-06-28 00:24:41 +0000133 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
Damien Miller9a947342000-08-30 10:03:33 +1100134 IPADDR_IN_DISPLAY=yes
Damien Millerb0785672000-08-23 09:10:39 +1000135 AC_DEFINE(USE_PIPES)
Kevin Steves5feaaef2002-04-23 20:45:55 +0000136 AC_DEFINE(LOGIN_NO_ENDOPT)
137 AC_DEFINE(LOGIN_NEEDS_UTMPX)
Damien Miller8a1e6a62000-09-16 15:55:52 +1100138 AC_DEFINE(DISABLE_SHADOW)
Damien Millerd6f204d2000-09-23 13:57:27 +1100139 AC_DEFINE(DISABLE_UTMP)
Kevin Steves8848b242000-10-18 13:11:44 +0000140 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
Tim Ricef028f1e2002-07-19 12:41:10 -0700141 LIBS="$LIBS -lsec"
142 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***]))
Damien Miller76112de1999-12-21 11:18:08 +1100143 ;;
Damien Miller1bead332000-04-30 00:47:29 +1000144*-*-hpux11*)
Kevin Steves6a7b0de2001-06-27 16:32:24 +0000145 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
Damien Miller9a947342000-08-30 10:03:33 +1100146 IPADDR_IN_DISPLAY=yes
Damien Miller82cf0ce2000-12-20 13:34:48 +1100147 AC_DEFINE(PAM_SUN_CODEBASE)
Damien Miller5552d7a2000-08-30 09:53:24 +1100148 AC_DEFINE(USE_PIPES)
Kevin Steves5feaaef2002-04-23 20:45:55 +0000149 AC_DEFINE(LOGIN_NO_ENDOPT)
150 AC_DEFINE(LOGIN_NEEDS_UTMPX)
Damien Miller8a1e6a62000-09-16 15:55:52 +1100151 AC_DEFINE(DISABLE_SHADOW)
Damien Millerd6f204d2000-09-23 13:57:27 +1100152 AC_DEFINE(DISABLE_UTMP)
Kevin Steves8848b242000-10-18 13:11:44 +0000153 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
Tim Ricef028f1e2002-07-19 12:41:10 -0700154 LIBS="$LIBS -lsec"
155 AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***]))
Damien Miller1bead332000-04-30 00:47:29 +1000156 ;;
Damien Millerbeb4ba51999-12-28 15:09:35 +1100157*-*-irix5*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000158 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller9e110892000-06-07 21:05:46 +1000159 LDFLAGS="$LDFLAGS"
Damien Miller190d5a82000-09-30 09:43:19 +1100160 PATH="$PATH:/usr/etc"
Damien Miller11fa2cc2000-08-16 10:35:58 +1000161 AC_DEFINE(BROKEN_INET_NTOA)
Damien Millerf1b9d112002-04-23 23:09:19 +1000162 AC_DEFINE(WITH_ABBREV_NO_TTY)
Damien Miller1808f382000-01-06 12:03:12 +1100163 ;;
164*-*-irix6*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000165 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller9e110892000-06-07 21:05:46 +1000166 LDFLAGS="$LDFLAGS"
Damien Miller190d5a82000-09-30 09:43:19 +1100167 PATH="$PATH:/usr/etc"
Damien Miller91606b12000-06-28 08:22:29 +1000168 AC_DEFINE(WITH_IRIX_ARRAY)
169 AC_DEFINE(WITH_IRIX_PROJECT)
170 AC_DEFINE(WITH_IRIX_AUDIT)
Ben Lindstrom8ff2a8d2002-04-06 18:58:31 +0000171 AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)])
Damien Miller11fa2cc2000-08-16 10:35:58 +1000172 AC_DEFINE(BROKEN_INET_NTOA)
Damien Millerf1b9d112002-04-23 23:09:19 +1000173 AC_DEFINE(WITH_ABBREV_NO_TTY)
Damien Millerbeb4ba51999-12-28 15:09:35 +1100174 ;;
Damien Millerb29ea912000-01-15 14:12:03 +1100175*-*-linux*)
176 no_dev_ptmx=1
Damien Millera64b57a2001-01-17 10:44:13 +1100177 check_for_libcrypt_later=1
Damien Miller7bcb0892000-03-11 20:45:40 +1100178 AC_DEFINE(DONT_TRY_OTHER_AF)
Damien Miller4e997202000-07-09 21:21:52 +1000179 AC_DEFINE(PAM_TTY_KLUDGE)
Damien Miller7bcb0892000-03-11 20:45:40 +1100180 inet6_default_4in6=yes
Damien Millerb29ea912000-01-15 14:12:03 +1100181 ;;
Ben Lindstromb5628642000-10-18 00:02:25 +0000182mips-sony-bsd|mips-sony-newsos4)
183 AC_DEFINE(HAVE_NEWS4)
184 SONY=1
Ben Lindstromb5628642000-10-18 00:02:25 +0000185 ;;
Damien Milleree1c0b32000-01-21 00:18:15 +1100186*-*-netbsd*)
Damien Millerfc93d4b2002-09-04 23:26:29 +1000187 check_for_libcrypt_before=1
Damien Millera22ba012000-03-02 23:09:20 +1100188 need_dash_r=1
Damien Milleree1c0b32000-01-21 00:18:15 +1100189 ;;
Damien Millerfbd884a2001-02-27 08:39:07 +1100190*-*-freebsd*)
191 check_for_libcrypt_later=1
192 ;;
Damien Miller0f91b4e2000-06-18 15:43:25 +1000193*-next-*)
Damien Miller0f91b4e2000-06-18 15:43:25 +1000194 conf_lastlog_location="/usr/adm/lastlog"
Damien Millere5192fa2000-08-29 14:30:37 +1100195 conf_utmp_location=/etc/utmp
196 conf_wtmp_location=/usr/adm/wtmp
197 MAIL=/usr/spool/mail
Damien Miller0f91b4e2000-06-18 15:43:25 +1000198 AC_DEFINE(HAVE_NEXT)
Ben Lindstromb4df15d2000-10-15 00:17:36 +0000199 AC_DEFINE(BROKEN_REALPATH)
Ben Lindstrom76020ba2000-10-25 16:55:00 +0000200 AC_DEFINE(USE_PIPES)
Damien Millerfbd884a2001-02-27 08:39:07 +1100201 AC_DEFINE(BROKEN_SAVED_UIDS)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000202 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Ben Lindstrom321ae732000-12-31 15:00:23 +0000203 CFLAGS="$CFLAGS"
Damien Miller0f91b4e2000-06-18 15:43:25 +1000204 ;;
Damien Miller75b1d102000-01-07 14:01:41 +1100205*-*-solaris*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000206 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Ben Lindstrom866488b2001-02-20 18:22:38 +0000207 LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib"
Damien Millera22ba012000-03-02 23:09:20 +1100208 need_dash_r=1
Damien Miller82cf0ce2000-12-20 13:34:48 +1100209 AC_DEFINE(PAM_SUN_CODEBASE)
Ben Lindstrom97c677d2001-05-08 20:33:05 +0000210 AC_DEFINE(LOGIN_NEEDS_UTMPX)
211 AC_DEFINE(LOGIN_NEEDS_TERM)
Ben Lindstrom95276712001-10-23 17:14:00 +0000212 AC_DEFINE(PAM_TTY_KLUDGE)
andre2ff7b5d2000-06-03 14:57:40 +0000213 # hardwire lastlog location (can't detect it on some versions)
214 conf_lastlog_location="/var/adm/lastlog"
Damien Millera1cb6442000-06-09 11:58:35 +1000215 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
216 sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'`
217 if test "$sol2ver" -ge 8; then
218 AC_MSG_RESULT(yes)
219 AC_DEFINE(DISABLE_UTMP)
220 AC_DEFINE(DISABLE_WTMP)
221 else
222 AC_MSG_RESULT(no)
223 fi
Damien Miller75b1d102000-01-07 14:01:41 +1100224 ;;
Damien Millerdfc83f42000-05-20 15:02:59 +1000225*-*-sunos4*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000226 CPPFLAGS="$CPPFLAGS -DSUNOS4"
Damien Millerdfc83f42000-05-20 15:02:59 +1000227 AC_CHECK_FUNCS(getpwanam)
Damien Miller82cf0ce2000-12-20 13:34:48 +1100228 AC_DEFINE(PAM_SUN_CODEBASE)
Damien Miller36ccb5c2000-08-09 16:34:27 +1000229 conf_utmp_location=/etc/utmp
230 conf_wtmp_location=/var/adm/wtmp
231 conf_lastlog_location=/var/adm/lastlog
Damien Millerb0785672000-08-23 09:10:39 +1000232 AC_DEFINE(USE_PIPES)
Damien Millerdfc83f42000-05-20 15:02:59 +1000233 ;;
Ben Lindstrom603bdfd2001-02-12 07:29:45 +0000234*-ncr-sysv*)
235 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
236 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Tim Rice13aae5e2001-10-21 17:53:58 -0700237 LIBS="$LIBS -lc89"
Kevin Steves0bd4b342002-01-05 23:24:27 +0000238 AC_DEFINE(USE_PIPES)
Ben Lindstrom603bdfd2001-02-12 07:29:45 +0000239 ;;
Damien Miller2ae714f2000-07-11 09:29:50 +1000240*-sni-sysv*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000241 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Tim Riceffdf4aa2001-10-27 10:45:36 -0700242 # /usr/ucblib MUST NOT be searched on ReliantUNIX
243 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Damien Millerfd9885e2001-01-10 08:16:53 +1100244 IPADDR_IN_DISPLAY=yes
245 AC_DEFINE(USE_PIPES)
Damien Miller2ae714f2000-07-11 09:29:50 +1000246 AC_DEFINE(IP_TOS_IS_BROKEN)
Tim Riceffdf4aa2001-10-27 10:45:36 -0700247 # /usr/ucblib/libucb.a no longer needed on ReliantUNIX
248 # Attention: always take care to bind libsocket and libnsl before libc,
249 # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog
Damien Miller2ae714f2000-07-11 09:29:50 +1000250 ;;
Damien Miller78315eb2000-09-29 23:01:36 +1100251*-*-sysv4.2*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000252 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller78315eb2000-09-29 23:01:36 +1100253 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Damien Miller5dfe9762001-02-16 12:05:39 +1100254 AC_DEFINE(USE_PIPES)
Damien Miller78315eb2000-09-29 23:01:36 +1100255 ;;
256*-*-sysv5*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000257 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller78315eb2000-09-29 23:01:36 +1100258 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Damien Miller5dfe9762001-02-16 12:05:39 +1100259 AC_DEFINE(USE_PIPES)
Damien Miller78315eb2000-09-29 23:01:36 +1100260 ;;
Damien Miller75b1d102000-01-07 14:01:41 +1100261*-*-sysv*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000262 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Millerdb819592000-03-14 13:44:01 +1100263 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Damien Miller75b1d102000-01-07 14:01:41 +1100264 ;;
Damien Miller78315eb2000-09-29 23:01:36 +1100265*-*-sco3.2v4*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000266 CPPFLAGS="$CPPFLAGS -Dftruncate=chsize -I/usr/local/include"
Damien Miller78315eb2000-09-29 23:01:36 +1100267 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Tim Rice13aae5e2001-10-21 17:53:58 -0700268 LIBS="$LIBS -los -lprot -lx -ltinfo -lm"
Damien Miller5dfe9762001-02-16 12:05:39 +1100269 RANLIB=true
270 no_dev_ptmx=1
271 AC_DEFINE(BROKEN_SYS_TERMIO_H)
272 AC_DEFINE(USE_PIPES)
Kevin Steves0ea1d9d2002-04-25 18:17:04 +0000273 AC_DEFINE(HAVE_SECUREWARE)
Ben Lindstrom980754c2000-11-12 00:04:24 +0000274 AC_DEFINE(DISABLE_SHADOW)
Damien Millerfbd884a2001-02-27 08:39:07 +1100275 AC_DEFINE(BROKEN_SAVED_UIDS)
Damien Miller217f5672001-02-16 12:12:41 +1100276 AC_CHECK_FUNCS(getluid setluid)
Tim Rice07183b82001-04-25 21:40:28 -0700277 MANTYPE=man
Tim Rice13aae5e2001-10-21 17:53:58 -0700278 do_sco3_extra_lib_check=yes
Damien Miller78315eb2000-09-29 23:01:36 +1100279 ;;
280*-*-sco3.2v5*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000281 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Millera66626b2000-06-13 18:57:53 +1000282 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Damien Miller5dfe9762001-02-16 12:05:39 +1100283 LIBS="$LIBS -lprot -lx -ltinfo -lm"
Damien Millera66626b2000-06-13 18:57:53 +1000284 no_dev_ptmx=1
Damien Miller5dfe9762001-02-16 12:05:39 +1100285 AC_DEFINE(USE_PIPES)
Kevin Steves0ea1d9d2002-04-25 18:17:04 +0000286 AC_DEFINE(HAVE_SECUREWARE)
Ben Lindstrom980754c2000-11-12 00:04:24 +0000287 AC_DEFINE(DISABLE_SHADOW)
Tim Rice9dd30812002-07-07 13:43:36 -0700288 AC_DEFINE(DISABLE_FD_PASSING)
Damien Miller217f5672001-02-16 12:12:41 +1100289 AC_CHECK_FUNCS(getluid setluid)
Tim Rice07183b82001-04-25 21:40:28 -0700290 MANTYPE=man
Damien Millera66626b2000-06-13 18:57:53 +1000291 ;;
Ben Lindstrom232ccf72002-07-22 23:34:25 +0000292*-*-unicosmk*)
293 no_libsocket=1
294 no_libnsl=1
295 AC_DEFINE(USE_PIPES)
296 AC_DEFINE(DISABLE_FD_PASSING)
297 LDFLAGS="$LDFLAGS"
298 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
299 MANTYPE=cat
Ben Lindstrom762104e2002-07-23 00:00:05 +0000300 ;;
Ben Lindstromd9e08242001-07-22 19:32:00 +0000301*-*-unicos*)
Tim Ricee991e3c2001-08-07 15:29:07 -0700302 no_libsocket=1
303 no_libnsl=1
Ben Lindstromd9e08242001-07-22 19:32:00 +0000304 AC_DEFINE(USE_PIPES)
Tim Rice9dd30812002-07-07 13:43:36 -0700305 AC_DEFINE(DISABLE_FD_PASSING)
Tim Rice81ed5182002-09-25 17:38:46 -0700306 AC_DEFINE(NO_SSH_LASTLOG)
Ben Lindstrom232ccf72002-07-22 23:34:25 +0000307 LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal"
308 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
309 MANTYPE=cat
Tim Ricee991e3c2001-08-07 15:29:07 -0700310 ;;
Damien Millerb8c656e2000-06-28 15:22:41 +1000311*-dec-osf*)
Ben Lindstrom72af2ef2001-05-08 20:42:28 +0000312 AC_MSG_CHECKING(for Digital Unix SIA)
313 no_osfsia=""
314 AC_ARG_WITH(osfsia,
315 [ --with-osfsia Enable Digital Unix SIA],
316 [
317 if test "x$withval" = "xno" ; then
318 AC_MSG_RESULT(disabled)
319 no_osfsia=1
320 fi
321 ],
322 )
323 if test -z "$no_osfsia" ; then
Damien Millerb8c656e2000-06-28 15:22:41 +1000324 if test -f /etc/sia/matrix.conf; then
325 AC_MSG_RESULT(yes)
326 AC_DEFINE(HAVE_OSF_SIA)
327 AC_DEFINE(DISABLE_LOGIN)
328 LIBS="$LIBS -lsecurity -ldb -lm -laud"
329 else
330 AC_MSG_RESULT(no)
331 fi
332 fi
Ben Lindstromdc3c7572002-10-04 23:54:54 +0000333 AC_DEFINE(DISABLE_FD_PASSING)
Damien Millerb8c656e2000-06-28 15:22:41 +1000334 ;;
Ben Lindstrom19d7b8d2001-08-16 00:09:49 +0000335
336*-*-nto-qnx)
337 AC_DEFINE(USE_PIPES)
338 AC_DEFINE(NO_X11_UNIX_SOCKETS)
339 AC_DEFINE(MISSING_NFDBITS)
340 AC_DEFINE(MISSING_HOWMANY)
341 AC_DEFINE(MISSING_FD_MASK)
342 ;;
Damien Miller76112de1999-12-21 11:18:08 +1100343esac
344
Damien Millere37bfc12000-06-05 09:37:43 +1000345# Allow user to specify flags
346AC_ARG_WITH(cflags,
347 [ --with-cflags Specify additional flags to pass to compiler],
348 [
349 if test "x$withval" != "xno" ; then
350 CFLAGS="$CFLAGS $withval"
351 fi
352 ]
353)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000354AC_ARG_WITH(cppflags,
355 [ --with-cppflags Specify additional flags to pass to preprocessor] ,
356 [
357 if test "x$withval" != "xno"; then
358 CPPFLAGS="$CPPFLAGS $withval"
359 fi
360 ]
361)
Damien Millere37bfc12000-06-05 09:37:43 +1000362AC_ARG_WITH(ldflags,
Ben Lindstrom2ed98182000-11-06 07:15:43 +0000363 [ --with-ldflags Specify additional flags to pass to linker],
Damien Millere37bfc12000-06-05 09:37:43 +1000364 [
365 if test "x$withval" != "xno" ; then
366 LDFLAGS="$LDFLAGS $withval"
367 fi
368 ]
369)
370AC_ARG_WITH(libs,
371 [ --with-libs Specify additional libraries to link with],
372 [
373 if test "x$withval" != "xno" ; then
374 LIBS="$LIBS $withval"
375 fi
376 ]
377)
378
Tim Rice4cec93f2002-02-26 08:40:48 -0800379# Checks for header files.
380AC_CHECK_HEADERS(bstring.h crypt.h endian.h floatingpoint.h \
Tim Rice81ed5182002-09-25 17:38:46 -0700381 getopt.h glob.h ia.h lastlog.h limits.h login.h \
Tim Rice4cec93f2002-02-26 08:40:48 -0800382 login_cap.h maillock.h netdb.h netgroup.h \
Damien Millerf71d2a52002-05-13 15:14:08 +1000383 netinet/in_systm.h paths.h pty.h readpassphrase.h \
Ben Lindstrom7577fd82002-03-08 03:11:07 +0000384 rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \
Tim Rice4cec93f2002-02-26 08:40:48 -0800385 strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h \
Kevin Stevesb1184bb2002-04-07 18:12:03 +0000386 sys/mman.h sys/select.h sys/stat.h \
Tim Rice4cec93f2002-02-26 08:40:48 -0800387 sys/stropts.h sys/sysmacros.h sys/time.h \
Tim Rice81ed5182002-09-25 17:38:46 -0700388 sys/un.h time.h tmpdir.h ttyent.h usersec.h \
Tim Rice4cec93f2002-02-26 08:40:48 -0800389 util.h utime.h utmp.h utmpx.h)
390
Damien Millera22ba012000-03-02 23:09:20 +1100391# Checks for libraries.
Tim Rice13aae5e2001-10-21 17:53:58 -0700392AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match))
393AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
Ben Lindstrom3ad650a2001-01-03 06:02:51 +0000394
Damien Millerdf288022001-02-18 13:07:07 +1100395dnl SCO OS3 needs this for libwrap
Tim Rice13aae5e2001-10-21 17:53:58 -0700396if test "x$with_tcp_wrappers" != "xno" ; then
397 if test "x$do_sco3_extra_lib_check" = "xyes" ; then
398 AC_CHECK_LIB(rpc, innetgr, LIBS="-lrpc -lyp -lrpc $LIBS" , , -lyp -lrpc)
399 fi
400fi
Damien Millerdf288022001-02-18 13:07:07 +1100401
Tim Rice13aae5e2001-10-21 17:53:58 -0700402AC_CHECK_FUNC(getspnam, ,
403 AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen"))
Tim Rice13aae5e2001-10-21 17:53:58 -0700404
Damien Miller150c8b52002-02-13 23:06:56 +1100405AC_ARG_WITH(rpath,
406 [ --without-rpath Disable auto-added -R linker paths],
407 [
408 if test "x$withval" = "xno" ; then
409 need_dash_r=""
410 fi
411 if test "x$withval" = "xyes" ; then
412 need_dash_r=1
413 fi
414 ]
415)
416
Tim Rice13aae5e2001-10-21 17:53:58 -0700417dnl zlib is required
418AC_ARG_WITH(zlib,
419 [ --with-zlib=PATH Use zlib in PATH],
420 [
Kevin Steves7dc81972002-01-22 21:59:31 +0000421 if test "x$withval" = "xno" ; then
Damien Miller6c21c512002-01-22 21:57:53 +1100422 AC_MSG_ERROR([*** zlib is required ***])
423 fi
Tim Rice13aae5e2001-10-21 17:53:58 -0700424 if test -d "$withval/lib"; then
425 if test -n "${need_dash_r}"; then
Tim Rice02cebcd2001-10-25 10:01:30 -0700426 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700427 else
Tim Rice02cebcd2001-10-25 10:01:30 -0700428 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700429 fi
430 else
431 if test -n "${need_dash_r}"; then
Tim Rice02cebcd2001-10-25 10:01:30 -0700432 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700433 else
Tim Rice02cebcd2001-10-25 10:01:30 -0700434 LDFLAGS="-L${withval} ${LDFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700435 fi
436 fi
437 if test -d "$withval/include"; then
Tim Rice02cebcd2001-10-25 10:01:30 -0700438 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700439 else
Tim Rice02cebcd2001-10-25 10:01:30 -0700440 CPPFLAGS="-I${withval} ${CPPFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700441 fi
442 ]
443)
444
Tim Rice17b93e52001-10-23 22:36:54 -0700445AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first or check config.log ***]))
Damien Miller6f9c3372000-10-25 10:06:04 +1100446
Ben Lindstrom3ad650a2001-01-03 06:02:51 +0000447dnl UnixWare 2.x
448AC_CHECK_FUNC(strcasecmp,
449 [], [ AC_CHECK_LIB(resolv, strcasecmp, LIBS="$LIBS -lresolv") ]
450)
451AC_CHECK_FUNC(utimes,
Tim Ricecbb90662002-07-08 19:17:10 -0700452 [], [ AC_CHECK_LIB(c89, utimes, [AC_DEFINE(HAVE_UTIMES)
453 LIBS="$LIBS -lc89"]) ]
Ben Lindstrom3ad650a2001-01-03 06:02:51 +0000454)
Damien Millerab18c411999-11-11 10:40:23 +1100455
Tim Ricee589a292001-11-03 11:09:32 -0800456dnl Checks for libutil functions
457AC_CHECK_HEADERS(libutil.h)
458AC_SEARCH_LIBS(login, util bsd, [AC_DEFINE(HAVE_LOGIN)])
459AC_CHECK_FUNCS(logout updwtmp logwtmp)
460
Ben Lindstrom8697e082001-02-24 21:41:10 +0000461AC_FUNC_STRFTIME
462
Damien Miller3c027682001-03-14 11:39:45 +1100463# Check for ALTDIRFUNC glob() extension
464AC_MSG_CHECKING(for GLOB_ALTDIRFUNC support)
465AC_EGREP_CPP(FOUNDIT,
466 [
467 #include <glob.h>
468 #ifdef GLOB_ALTDIRFUNC
469 FOUNDIT
470 #endif
471 ],
472 [
473 AC_DEFINE(GLOB_HAS_ALTDIRFUNC)
474 AC_MSG_RESULT(yes)
475 ],
476 [
477 AC_MSG_RESULT(no)
478 ]
479)
Damien Millerab18c411999-11-11 10:40:23 +1100480
Ben Lindstrom45b14db2001-03-17 01:15:38 +0000481# Check for g.gl_matchc glob() extension
482AC_MSG_CHECKING(for gl_matchc field in glob_t)
483AC_EGREP_CPP(FOUNDIT,
484 [
485 #include <glob.h>
486 int main(void){glob_t g; g.gl_matchc = 1;}
487 ],
488 [
489 AC_DEFINE(GLOB_HAS_GL_MATCHC)
490 AC_MSG_RESULT(yes)
491 ],
492 [
493 AC_MSG_RESULT(no)
494 ]
495)
496
Damien Miller18bb4732001-03-28 14:35:30 +1000497AC_MSG_CHECKING([whether struct dirent allocates space for d_name])
498AC_TRY_RUN(
499 [
500#include <sys/types.h>
501#include <dirent.h>
Tim Rice2c961ce2002-09-23 16:54:10 -0700502int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));}
Damien Miller18bb4732001-03-28 14:35:30 +1000503 ],
504 [AC_MSG_RESULT(yes)],
505 [
506 AC_MSG_RESULT(no)
507 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME)
508 ]
509)
510
Damien Millerc547bf12001-02-16 10:18:12 +1100511# Check whether user wants S/Key support
512SKEY_MSG="no"
513AC_ARG_WITH(skey,
Tim Rice13aae5e2001-10-21 17:53:58 -0700514 [ --with-skey[[=PATH]] Enable S/Key support
515 (optionally in PATH)],
Damien Millerc547bf12001-02-16 10:18:12 +1100516 [
517 if test "x$withval" != "xno" ; then
518
519 if test "x$withval" != "xyes" ; then
520 CPPFLAGS="$CPPFLAGS -I${withval}/include"
521 LDFLAGS="$LDFLAGS -L${withval}/lib"
522 fi
523
524 AC_DEFINE(SKEY)
525 LIBS="-lskey $LIBS"
526 SKEY_MSG="yes"
527
Tim Rice4cec93f2002-02-26 08:40:48 -0800528 AC_MSG_CHECKING([for s/key support])
529 AC_TRY_RUN(
Damien Millerc547bf12001-02-16 10:18:12 +1100530 [
Tim Rice4cec93f2002-02-26 08:40:48 -0800531#include <stdio.h>
532#include <skey.h>
Tim Rice2c961ce2002-09-23 16:54:10 -0700533int main() { char *ff = skey_keyinfo(""); ff=""; exit(0); }
Tim Rice4cec93f2002-02-26 08:40:48 -0800534 ],
535 [AC_MSG_RESULT(yes)],
536 [
537 AC_MSG_RESULT(no)
Damien Millerc547bf12001-02-16 10:18:12 +1100538 AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
539 ])
540 fi
541 ]
542)
543
544# Check whether user wants TCP wrappers support
Tim Rice13aae5e2001-10-21 17:53:58 -0700545TCPW_MSG="no"
Damien Millerc547bf12001-02-16 10:18:12 +1100546AC_ARG_WITH(tcp-wrappers,
Tim Rice13aae5e2001-10-21 17:53:58 -0700547 [ --with-tcp-wrappers[[=PATH]] Enable tcpwrappers support
548 (optionally in PATH)],
Damien Millerc547bf12001-02-16 10:18:12 +1100549 [
550 if test "x$withval" != "xno" ; then
551 saved_LIBS="$LIBS"
Tim Rice13aae5e2001-10-21 17:53:58 -0700552 saved_LDFLAGS="$LDFLAGS"
553 saved_CPPFLAGS="$CPPFLAGS"
554 if test -n "${withval}" -a "${withval}" != "yes"; then
555 if test -d "${withval}/lib"; then
556 if test -n "${need_dash_r}"; then
Tim Rice02cebcd2001-10-25 10:01:30 -0700557 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700558 else
Tim Rice02cebcd2001-10-25 10:01:30 -0700559 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700560 fi
561 else
562 if test -n "${need_dash_r}"; then
Tim Rice02cebcd2001-10-25 10:01:30 -0700563 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700564 else
Tim Rice02cebcd2001-10-25 10:01:30 -0700565 LDFLAGS="-L${withval} ${LDFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700566 fi
567 fi
568 if test -d "${withval}/include"; then
Tim Rice02cebcd2001-10-25 10:01:30 -0700569 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700570 else
Tim Rice02cebcd2001-10-25 10:01:30 -0700571 CPPFLAGS="-I${withval} ${CPPFLAGS}"
Tim Rice13aae5e2001-10-21 17:53:58 -0700572 fi
Tim Rice13aae5e2001-10-21 17:53:58 -0700573 fi
Tim Rice4cec93f2002-02-26 08:40:48 -0800574 LIBWRAP="-lwrap"
575 LIBS="$LIBWRAP $LIBS"
Damien Millerc547bf12001-02-16 10:18:12 +1100576 AC_MSG_CHECKING(for libwrap)
577 AC_TRY_LINK(
578 [
579#include <tcpd.h>
580 int deny_severity = 0, allow_severity = 0;
581 ],
582 [hosts_access(0);],
583 [
584 AC_MSG_RESULT(yes)
585 AC_DEFINE(LIBWRAP)
Tim Rice4cec93f2002-02-26 08:40:48 -0800586 AC_SUBST(LIBWRAP)
Tim Rice13aae5e2001-10-21 17:53:58 -0700587 TCPW_MSG="yes"
Damien Millerc547bf12001-02-16 10:18:12 +1100588 ],
589 [
590 AC_MSG_ERROR([*** libwrap missing])
591 ]
592 )
Tim Rice4cec93f2002-02-26 08:40:48 -0800593 LIBS="$saved_LIBS"
Damien Millerc547bf12001-02-16 10:18:12 +1100594 fi
595 ]
596)
597
Damien Millerad833b32000-08-23 10:46:23 +1000598dnl Checks for library functions.
Ben Lindstromfdee8ef2002-04-06 23:52:02 +0000599AC_CHECK_FUNCS(arc4random b64_ntop bcopy bindresvport_sa \
Tim Rice13aae5e2001-10-21 17:53:58 -0700600 clock fchmod fchown freeaddrinfo futimes gai_strerror \
Damien Miller771721f2002-09-12 10:32:59 +1000601 getaddrinfo getcwd getgrouplist getnameinfo getopt getpeereid\
Tim Rice13aae5e2001-10-21 17:53:58 -0700602 getrlimit getrusage getttyent glob inet_aton inet_ntoa \
603 inet_ntop innetgr login_getcapbool md5_crypt memmove \
Damien Miller594a71b2002-04-23 20:22:59 +1000604 mkdtemp mmap ngetaddrinfo openpty ogetaddrinfo readpassphrase \
605 realpath recvmsg rresvport_af sendmsg setdtablesize setegid \
Ben Lindstrom837461b2002-06-12 16:57:14 +0000606 setenv seteuid setgroups setlogin setproctitle setresgid setreuid \
Ben Lindstromf0bfa832002-06-21 00:01:18 +0000607 setrlimit setsid setpcred setvbuf sigaction sigvec snprintf \
Ben Lindstrom3e006472002-10-16 00:24:03 +0000608 socketpair strerror strlcat strlcpy strmode sysconf tcgetpgrp \
Ben Lindstromf0bfa832002-06-21 00:01:18 +0000609 truncate utimes vhangup vsnprintf waitpid __b64_ntop _getpty)
Tim Rice13aae5e2001-10-21 17:53:58 -0700610
Ben Lindstrom3e006472002-10-16 00:24:03 +0000611dnl Make sure strsep prototype is defined before defining HAVE_STRSEP
612AC_CHECK_DECL(strsep, [AC_CHECK_FUNCS(strsep)])
613
Tim Rice13aae5e2001-10-21 17:53:58 -0700614dnl IRIX and Solaris 2.5.1 have dirname() in libgen
Tim Rice17b93e52001-10-23 22:36:54 -0700615AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[
Tim Rice13aae5e2001-10-21 17:53:58 -0700616 AC_CHECK_LIB(gen, dirname,[
617 AC_CACHE_CHECK([for broken dirname],
618 ac_cv_have_broken_dirname, [
Tim Rice17b93e52001-10-23 22:36:54 -0700619 save_LIBS="$LIBS"
620 LIBS="$LIBS -lgen"
Tim Rice13aae5e2001-10-21 17:53:58 -0700621 AC_TRY_RUN(
622 [
623#include <libgen.h>
624#include <string.h>
625
626int main(int argc, char **argv) {
627 char *s, buf[32];
628
629 strncpy(buf,"/etc", 32);
630 s = dirname(buf);
Tim Rice17b93e52001-10-23 22:36:54 -0700631 if (!s || strncmp(s, "/", 32) != 0) {
Tim Rice13aae5e2001-10-21 17:53:58 -0700632 exit(1);
633 } else {
634 exit(0);
635 }
636}
637 ],
638 [ ac_cv_have_broken_dirname="no" ],
639 [ ac_cv_have_broken_dirname="yes" ]
640 )
Tim Rice17b93e52001-10-23 22:36:54 -0700641 LIBS="$save_LIBS"
Tim Rice13aae5e2001-10-21 17:53:58 -0700642 ])
Tim Rice17b93e52001-10-23 22:36:54 -0700643 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
Tim Rice13aae5e2001-10-21 17:53:58 -0700644 LIBS="$LIBS -lgen"
645 AC_DEFINE(HAVE_DIRNAME)
Tim Rice17b93e52001-10-23 22:36:54 -0700646 AC_CHECK_HEADERS(libgen.h)
Tim Rice13aae5e2001-10-21 17:53:58 -0700647 fi
648 ])
649])
650
Damien Millerad833b32000-08-23 10:46:23 +1000651dnl Checks for time functions
andre2ff7b5d2000-06-03 14:57:40 +0000652AC_CHECK_FUNCS(gettimeofday time)
Damien Millerad833b32000-08-23 10:46:23 +1000653dnl Checks for utmp functions
Ben Lindstrom2c467a22000-12-27 04:57:41 +0000654AC_CHECK_FUNCS(endutent getutent getutid getutline pututline setutent)
andre2ff7b5d2000-06-03 14:57:40 +0000655AC_CHECK_FUNCS(utmpname)
Damien Millerad833b32000-08-23 10:46:23 +1000656dnl Checks for utmpx functions
Ben Lindstrom2c467a22000-12-27 04:57:41 +0000657AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline pututxline )
andre2ff7b5d2000-06-03 14:57:40 +0000658AC_CHECK_FUNCS(setutxent utmpxname)
Damien Millercedfecc1999-11-15 14:36:53 +1100659
Damien Miller04f80141999-11-19 15:32:34 +1100660AC_CHECK_FUNC(daemon,
661 [AC_DEFINE(HAVE_DAEMON)],
662 [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
663)
664
Damien Miller9fb07e42000-03-05 16:22:59 +1100665AC_CHECK_FUNC(getpagesize,
666 [AC_DEFINE(HAVE_GETPAGESIZE)],
667 [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])]
668)
669
Damien Millercb170cb2000-07-01 16:52:55 +1000670# Check for broken snprintf
671if test "x$ac_cv_func_snprintf" = "xyes" ; then
672 AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
673 AC_TRY_RUN(
674 [
675#include <stdio.h>
Tim Rice2c961ce2002-09-23 16:54:10 -0700676int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');}
Damien Millercb170cb2000-07-01 16:52:55 +1000677 ],
678 [AC_MSG_RESULT(yes)],
679 [
680 AC_MSG_RESULT(no)
681 AC_DEFINE(BROKEN_SNPRINTF)
682 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
683 ]
684 )
685fi
686
Damien Miller606f8802000-09-16 15:39:56 +1100687AC_FUNC_GETPGRP
688
Damien Millera64b57a2001-01-17 10:44:13 +1100689# Check for PAM libs
Damien Miller7b22d652000-06-18 14:07:04 +1000690PAM_MSG="no"
Damien Millera22ba012000-03-02 23:09:20 +1100691AC_ARG_WITH(pam,
Damien Millera64b57a2001-01-17 10:44:13 +1100692 [ --with-pam Enable PAM support ],
Damien Millera22ba012000-03-02 23:09:20 +1100693 [
Damien Millera64b57a2001-01-17 10:44:13 +1100694 if test "x$withval" != "xno" ; then
695 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" ; then
696 AC_MSG_ERROR([PAM headers not found])
697 fi
698
699 AC_CHECK_LIB(dl, dlopen, , )
700 AC_CHECK_LIB(pam, pam_set_item, , AC_MSG_ERROR([*** libpam missing]))
701 AC_CHECK_FUNCS(pam_getenvlist)
702
703 disable_shadow=yes
704 PAM_MSG="yes"
705
706 AC_DEFINE(USE_PAM)
Tim Rice7d2d1f12002-02-26 22:05:11 -0800707 if test $ac_cv_lib_dl_dlopen = yes; then
708 LIBPAM="-lpam -ldl"
709 else
710 LIBPAM="-lpam"
711 fi
712 AC_SUBST(LIBPAM)
Damien Millera22ba012000-03-02 23:09:20 +1100713 fi
714 ]
715)
Damien Millera22ba012000-03-02 23:09:20 +1100716
Damien Millera64b57a2001-01-17 10:44:13 +1100717# Check for older PAM
718if test "x$PAM_MSG" = "xyes" ; then
Damien Millera22ba012000-03-02 23:09:20 +1100719 # Check PAM strerror arguments (old PAM)
720 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
721 AC_TRY_COMPILE(
722 [
Damien Miller81171112000-04-23 11:14:01 +1000723#include <stdlib.h>
724#include <security/pam_appl.h>
Damien Millera22ba012000-03-02 23:09:20 +1100725 ],
726 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
727 [AC_MSG_RESULT(no)],
728 [
729 AC_DEFINE(HAVE_OLD_PAM)
730 AC_MSG_RESULT(yes)
Damien Miller7b22d652000-06-18 14:07:04 +1000731 PAM_MSG="yes (old library)"
Damien Millera22ba012000-03-02 23:09:20 +1100732 ]
Damien Millera64b57a2001-01-17 10:44:13 +1100733 )
Damien Millera22ba012000-03-02 23:09:20 +1100734fi
735
Damien Millerfc93d4b2002-09-04 23:26:29 +1000736# Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
737# because the system crypt() is more featureful.
738if test "x$check_for_libcrypt_before" = "x1"; then
739 AC_CHECK_LIB(crypt, crypt)
740fi
741
Tim Riceaef73712002-05-11 13:17:42 -0700742# Search for OpenSSL
743saved_CPPFLAGS="$CPPFLAGS"
744saved_LDFLAGS="$LDFLAGS"
Damien Millera22ba012000-03-02 23:09:20 +1100745AC_ARG_WITH(ssl-dir,
746 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
747 [
Ben Lindstrom23e13712000-10-29 22:49:19 +0000748 if test "x$withval" != "xno" ; then
Tim Riceaef73712002-05-11 13:17:42 -0700749 if test -d "$withval/lib"; then
750 if test -n "${need_dash_r}"; then
751 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
752 else
753 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
754 fi
755 else
756 if test -n "${need_dash_r}"; then
757 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
758 else
759 LDFLAGS="-L${withval} ${LDFLAGS}"
760 fi
761 fi
762 if test -d "$withval/include"; then
763 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
764 else
765 CPPFLAGS="-I${withval} ${CPPFLAGS}"
766 fi
Damien Millera22ba012000-03-02 23:09:20 +1100767 fi
768 ]
769)
Tim Riceaef73712002-05-11 13:17:42 -0700770LIBS="$LIBS -lcrypto"
771AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL),
Damien Miller3b512e12000-05-17 23:29:18 +1000772 [
Tim Riceaef73712002-05-11 13:17:42 -0700773 dnl Check default openssl install dir
774 if test -n "${need_dash_r}"; then
775 LDFLAGS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib ${saved_LDFLAGS}"
Damien Miller3b512e12000-05-17 23:29:18 +1000776 else
Tim Riceaef73712002-05-11 13:17:42 -0700777 LDFLAGS="-L/usr/local/ssl/lib ${saved_LDFLAGS}"
Damien Miller3b512e12000-05-17 23:29:18 +1000778 fi
Tim Riceaef73712002-05-11 13:17:42 -0700779 CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}"
780 AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL),
781 [
782 AC_MSG_ERROR([*** Can't find recent OpenSSL libcrypto (see config.log for details) ***])
783 ]
784 )
785 ]
786)
787
Tim Riced730b782002-08-13 18:52:10 -0700788# Determine OpenSSL header version
789AC_MSG_CHECKING([OpenSSL header version])
790AC_TRY_RUN(
791 [
792#include <stdio.h>
793#include <string.h>
794#include <openssl/opensslv.h>
795#define DATA "conftest.sslincver"
796int main(void) {
797 FILE *fd;
798 int rc;
799
800 fd = fopen(DATA,"w");
801 if(fd == NULL)
802 exit(1);
803
804 if ((rc = fprintf(fd ,"%x (%s)\n", OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_TEXT)) <0)
805 exit(1);
806
807 exit(0);
808}
809 ],
810 [
811 ssl_header_ver=`cat conftest.sslincver`
812 AC_MSG_RESULT($ssl_header_ver)
813 ],
814 [
815 AC_MSG_RESULT(not found)
816 AC_MSG_ERROR(OpenSSL version header not found.)
817 ]
818)
819
820# Determine OpenSSL library version
821AC_MSG_CHECKING([OpenSSL library version])
822AC_TRY_RUN(
823 [
824#include <stdio.h>
825#include <string.h>
826#include <openssl/opensslv.h>
827#include <openssl/crypto.h>
828#define DATA "conftest.ssllibver"
829int main(void) {
830 FILE *fd;
831 int rc;
832
833 fd = fopen(DATA,"w");
834 if(fd == NULL)
835 exit(1);
836
837 if ((rc = fprintf(fd ,"%x (%s)\n", SSLeay(), SSLeay_version(SSLEAY_VERSION))) <0)
838 exit(1);
839
840 exit(0);
841}
842 ],
843 [
844 ssl_library_ver=`cat conftest.ssllibver`
845 AC_MSG_RESULT($ssl_library_ver)
846 ],
847 [
848 AC_MSG_RESULT(not found)
849 AC_MSG_ERROR(OpenSSL library not found.)
850 ]
851)
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>
Tim Rice2c961ce2002-09-23 16:54:10 -0700859int main(void) { exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); }
Damien Millerec932372002-01-22 22:16:03 +1100860 ],
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>
Tim Rice2c961ce2002-09-23 16:54:10 -0700885int main(void) { exit(RAND_status() == 1 ? 0 : 1); }
Damien Miller6c21c512002-01-22 21:57:53 +1100886 ],
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
Damien Millerd3f6ad22002-06-25 10:24:47 +10001016SSH_PRIVSEP_USER=sshd
Kevin Steves7ff91122002-04-07 19:22:54 +00001017AC_ARG_WITH(privsep-user,
Kevin Stevesc81e1292002-05-13 03:51:40 +00001018 [ --with-privsep-user=user Specify non-privileged user for privilege separation],
Kevin Steves7ff91122002-04-07 19:22:54 +00001019 [
1020 if test -n "$withval"; then
Damien Millerd3f6ad22002-06-25 10:24:47 +10001021 SSH_PRIVSEP_USER=$withval
Kevin Steves7ff91122002-04-07 19:22:54 +00001022 fi
1023 ]
1024)
Damien Millerd3f6ad22002-06-25 10:24:47 +10001025AC_DEFINE_UNQUOTED(SSH_PRIVSEP_USER, "$SSH_PRIVSEP_USER")
1026AC_SUBST(SSH_PRIVSEP_USER)
Kevin Steves7ff91122002-04-07 19:22:54 +00001027
Tim Rice88f2ab52002-03-17 12:17:34 -08001028# We do this little dance with the search path to insure
1029# that programs that we select for use by installed programs
1030# (which may be run by the super-user) come from trusted
1031# locations before they come from the user's private area.
1032# This should help avoid accidentally configuring some
1033# random version of a program in someone's personal bin.
1034
1035OPATH=$PATH
1036PATH=/bin:/usr/bin
Tim Riceae49fe62002-04-12 10:26:21 -07001037test -h /bin 2> /dev/null && PATH=/usr/bin
Tim Rice88f2ab52002-03-17 12:17:34 -08001038test -d /sbin && PATH=$PATH:/sbin
1039test -d /usr/sbin && PATH=$PATH:/usr/sbin
1040PATH=$PATH:/etc:$OPATH
1041
Damien Miller6c21c512002-01-22 21:57:53 +11001042# These programs are used by the command hashing source to gather entropy
1043OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
1044OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
1045OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
1046OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
1047OSSH_PATH_ENTROPY_PROG(PROG_JSTAT, jstat)
1048OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
1049OSSH_PATH_ENTROPY_PROG(PROG_SAR, sar)
1050OSSH_PATH_ENTROPY_PROG(PROG_W, w)
1051OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
1052OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
1053OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
1054OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
1055OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
1056OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
1057OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
1058OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
Tim Rice88f2ab52002-03-17 12:17:34 -08001059# restore PATH
1060PATH=$OPATH
Damien Miller6c21c512002-01-22 21:57:53 +11001061
1062# Where does ssh-rand-helper get its randomness from?
1063INSTALL_SSH_PRNG_CMDS=""
1064if test ! -z "$INSTALL_SSH_RAND_HELPER" ; then
1065 if test ! -z "$PRNGD_PORT" ; then
1066 RAND_HELPER_MSG="TCP localhost:$PRNGD_PORT"
1067 elif test ! -z "$PRNGD_SOCKET" ; then
1068 RAND_HELPER_MSG="Unix domain socket \"$PRNGD_SOCKET\""
1069 else
1070 RAND_HELPER_MSG="Command hashing (timeout $entropy_timeout)"
1071 RAND_HELPER_CMDHASH=yes
1072 INSTALL_SSH_PRNG_CMDS="yes"
1073 fi
1074fi
1075AC_SUBST(INSTALL_SSH_PRNG_CMDS)
1076
1077
Ben Lindstromb5628642000-10-18 00:02:25 +00001078# Cheap hack to ensure NEWS-OS libraries are arranged right.
1079if test ! -z "$SONY" ; then
1080 LIBS="$LIBS -liberty";
1081fi
1082
Damien Millera22ba012000-03-02 23:09:20 +11001083# Checks for data types
Damien Millere0f45742000-01-18 09:12:06 +11001084AC_CHECK_SIZEOF(char, 1)
Damien Millerc6398ef1999-11-20 12:18:40 +11001085AC_CHECK_SIZEOF(short int, 2)
1086AC_CHECK_SIZEOF(int, 4)
1087AC_CHECK_SIZEOF(long int, 4)
1088AC_CHECK_SIZEOF(long long int, 8)
1089
Damien Millerfa2bb692002-04-23 23:22:25 +10001090# Sanity check long long for some platforms (AIX)
1091if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then
1092 ac_cv_sizeof_long_long_int=0
1093fi
1094
Damien Millera22ba012000-03-02 23:09:20 +11001095# More checks for data types
Damien Millercaf6dd62000-08-29 11:33:50 +11001096AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1097 AC_TRY_COMPILE(
1098 [ #include <sys/types.h> ],
1099 [ u_int a; a = 1;],
1100 [ ac_cv_have_u_int="yes" ],
1101 [ ac_cv_have_u_int="no" ]
1102 )
1103])
1104if test "x$ac_cv_have_u_int" = "xyes" ; then
1105 AC_DEFINE(HAVE_U_INT)
1106 have_u_int=1
1107fi
1108
Damien Miller61e50f12000-05-08 20:49:37 +10001109AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1110 AC_TRY_COMPILE(
1111 [ #include <sys/types.h> ],
1112 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1113 [ ac_cv_have_intxx_t="yes" ],
1114 [ ac_cv_have_intxx_t="no" ]
1115 )
1116])
1117if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1118 AC_DEFINE(HAVE_INTXX_T)
1119 have_intxx_t=1
1120fi
Ben Lindstrom19d7b8d2001-08-16 00:09:49 +00001121
1122if (test -z "$have_intxx_t" && \
1123 test "x$ac_cv_header_stdint_h" = "xyes")
1124then
1125 AC_MSG_CHECKING([for intXX_t types in stdint.h])
1126 AC_TRY_COMPILE(
1127 [ #include <stdint.h> ],
1128 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1129 [
1130 AC_DEFINE(HAVE_INTXX_T)
1131 AC_MSG_RESULT(yes)
1132 ],
1133 [ AC_MSG_RESULT(no) ]
1134 )
1135fi
1136
Damien Miller578783e2000-09-23 14:12:24 +11001137AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1138 AC_TRY_COMPILE(
Tim Rice907881e2002-07-18 11:44:50 -07001139 [
1140#include <sys/types.h>
1141#ifdef HAVE_STDINT_H
1142# include <stdint.h>
1143#endif
1144#include <sys/socket.h>
1145#ifdef HAVE_SYS_BITYPES_H
1146# include <sys/bitypes.h>
1147#endif
1148 ],
Damien Miller578783e2000-09-23 14:12:24 +11001149 [ int64_t a; a = 1;],
1150 [ ac_cv_have_int64_t="yes" ],
1151 [ ac_cv_have_int64_t="no" ]
1152 )
1153])
1154if test "x$ac_cv_have_int64_t" = "xyes" ; then
1155 AC_DEFINE(HAVE_INT64_T)
Tim Rice4cec93f2002-02-26 08:40:48 -08001156fi
1157
Damien Miller61e50f12000-05-08 20:49:37 +10001158AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1159 AC_TRY_COMPILE(
1160 [ #include <sys/types.h> ],
1161 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1162 [ ac_cv_have_u_intxx_t="yes" ],
1163 [ ac_cv_have_u_intxx_t="no" ]
1164 )
1165])
1166if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1167 AC_DEFINE(HAVE_U_INTXX_T)
1168 have_u_intxx_t=1
1169fi
Damien Millerc6398ef1999-11-20 12:18:40 +11001170
Ben Lindstrom19d7b8d2001-08-16 00:09:49 +00001171if test -z "$have_u_intxx_t" ; then
1172 AC_MSG_CHECKING([for u_intXX_t types in sys/socket.h])
1173 AC_TRY_COMPILE(
1174 [ #include <sys/socket.h> ],
1175 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1176 [
1177 AC_DEFINE(HAVE_U_INTXX_T)
1178 AC_MSG_RESULT(yes)
1179 ],
1180 [ AC_MSG_RESULT(no) ]
1181 )
1182fi
1183
Damien Miller578783e2000-09-23 14:12:24 +11001184AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1185 AC_TRY_COMPILE(
1186 [ #include <sys/types.h> ],
1187 [ u_int64_t a; a = 1;],
1188 [ ac_cv_have_u_int64_t="yes" ],
1189 [ ac_cv_have_u_int64_t="no" ]
1190 )
1191])
1192if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1193 AC_DEFINE(HAVE_U_INT64_T)
1194 have_u_int64_t=1
1195fi
1196
Tim Rice4cec93f2002-02-26 08:40:48 -08001197if test -z "$have_u_int64_t" ; then
1198 AC_MSG_CHECKING([for u_int64_t type in sys/bitypes.h])
1199 AC_TRY_COMPILE(
1200 [ #include <sys/bitypes.h> ],
1201 [ u_int64_t a; a = 1],
1202 [
1203 AC_DEFINE(HAVE_U_INT64_T)
1204 AC_MSG_RESULT(yes)
1205 ],
1206 [ AC_MSG_RESULT(no) ]
1207 )
1208fi
1209
Ben Lindstrom19d7b8d2001-08-16 00:09:49 +00001210if test -z "$have_u_intxx_t" ; then
1211 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1212 AC_TRY_COMPILE(
1213 [
1214#include <sys/types.h>
1215 ],
1216 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
1217 [ ac_cv_have_uintxx_t="yes" ],
1218 [ ac_cv_have_uintxx_t="no" ]
1219 )
1220 ])
1221 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1222 AC_DEFINE(HAVE_UINTXX_T)
1223 fi
1224fi
1225
1226if test -z "$have_uintxx_t" ; then
1227 AC_MSG_CHECKING([for uintXX_t types in stdint.h])
1228 AC_TRY_COMPILE(
1229 [ #include <stdint.h> ],
1230 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;],
1231 [
1232 AC_DEFINE(HAVE_UINTXX_T)
1233 AC_MSG_RESULT(yes)
1234 ],
1235 [ AC_MSG_RESULT(no) ]
1236 )
1237fi
1238
Damien Milleredb82922000-06-20 13:25:52 +10001239if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1240 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
Damien Millerb29ea912000-01-15 14:12:03 +11001241then
1242 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1243 AC_TRY_COMPILE(
Damien Miller61e50f12000-05-08 20:49:37 +10001244 [
1245#include <sys/bitypes.h>
1246 ],
Damien Millerb29ea912000-01-15 14:12:03 +11001247 [
Damien Miller70494d12000-04-03 15:57:06 +10001248 int8_t a; int16_t b; int32_t c;
1249 u_int8_t e; u_int16_t f; u_int32_t g;
1250 a = b = c = e = f = g = 1;
Damien Millerb29ea912000-01-15 14:12:03 +11001251 ],
1252 [
1253 AC_DEFINE(HAVE_U_INTXX_T)
1254 AC_DEFINE(HAVE_INTXX_T)
1255 AC_MSG_RESULT(yes)
1256 ],
1257 [AC_MSG_RESULT(no)]
1258 )
1259fi
1260
Damien Miller58be7382001-09-15 21:31:54 +10001261
1262AC_CACHE_CHECK([for u_char], ac_cv_have_u_char, [
1263 AC_TRY_COMPILE(
1264 [
1265#include <sys/types.h>
1266 ],
1267 [ u_char foo; foo = 125; ],
1268 [ ac_cv_have_u_char="yes" ],
1269 [ ac_cv_have_u_char="no" ]
1270 )
1271])
1272if test "x$ac_cv_have_u_char" = "xyes" ; then
1273 AC_DEFINE(HAVE_U_CHAR)
1274fi
1275
Tim Rice13aae5e2001-10-21 17:53:58 -07001276TYPE_SOCKLEN_T
Damien Miller74d0d4a1999-12-29 02:24:35 +11001277
Tim Rice200a5c02002-02-26 22:12:34 -08001278AC_CHECK_TYPES(sig_atomic_t,,,[#include <signal.h>])
Tim Rice4cec93f2002-02-26 08:40:48 -08001279
Damien Miller61e50f12000-05-08 20:49:37 +10001280AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
1281 AC_TRY_COMPILE(
1282 [
1283#include <sys/types.h>
1284 ],
1285 [ size_t foo; foo = 1235; ],
1286 [ ac_cv_have_size_t="yes" ],
1287 [ ac_cv_have_size_t="no" ]
1288 )
1289])
1290if test "x$ac_cv_have_size_t" = "xyes" ; then
1291 AC_DEFINE(HAVE_SIZE_T)
1292fi
Damien Miller95058511999-12-29 10:36:45 +11001293
Damien Miller615f9392000-05-17 22:53:33 +10001294AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
1295 AC_TRY_COMPILE(
1296 [
1297#include <sys/types.h>
1298 ],
1299 [ ssize_t foo; foo = 1235; ],
1300 [ ac_cv_have_ssize_t="yes" ],
1301 [ ac_cv_have_ssize_t="no" ]
1302 )
1303])
1304if test "x$ac_cv_have_ssize_t" = "xyes" ; then
1305 AC_DEFINE(HAVE_SSIZE_T)
1306fi
1307
Ben Lindstrom0d5af602001-01-09 00:50:29 +00001308AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [
1309 AC_TRY_COMPILE(
1310 [
1311#include <time.h>
1312 ],
1313 [ clock_t foo; foo = 1235; ],
1314 [ ac_cv_have_clock_t="yes" ],
1315 [ ac_cv_have_clock_t="no" ]
1316 )
1317])
1318if test "x$ac_cv_have_clock_t" = "xyes" ; then
1319 AC_DEFINE(HAVE_CLOCK_T)
1320fi
1321
Damien Millerb54b40e2000-06-23 08:23:34 +10001322AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
1323 AC_TRY_COMPILE(
1324 [
1325#include <sys/types.h>
1326#include <sys/socket.h>
1327 ],
1328 [ sa_family_t foo; foo = 1235; ],
1329 [ ac_cv_have_sa_family_t="yes" ],
Damien Miller78315eb2000-09-29 23:01:36 +11001330 [ AC_TRY_COMPILE(
1331 [
1332#include <sys/types.h>
1333#include <sys/socket.h>
1334#include <netinet/in.h>
1335 ],
1336 [ sa_family_t foo; foo = 1235; ],
1337 [ ac_cv_have_sa_family_t="yes" ],
1338
Damien Millerb54b40e2000-06-23 08:23:34 +10001339 [ ac_cv_have_sa_family_t="no" ]
Damien Miller78315eb2000-09-29 23:01:36 +11001340 )]
Damien Millerb54b40e2000-06-23 08:23:34 +10001341 )
1342])
1343if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
1344 AC_DEFINE(HAVE_SA_FAMILY_T)
1345fi
1346
Damien Miller0f91b4e2000-06-18 15:43:25 +10001347AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
1348 AC_TRY_COMPILE(
1349 [
1350#include <sys/types.h>
1351 ],
1352 [ pid_t foo; foo = 1235; ],
1353 [ ac_cv_have_pid_t="yes" ],
1354 [ ac_cv_have_pid_t="no" ]
1355 )
1356])
1357if test "x$ac_cv_have_pid_t" = "xyes" ; then
1358 AC_DEFINE(HAVE_PID_T)
1359fi
1360
1361AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
1362 AC_TRY_COMPILE(
1363 [
1364#include <sys/types.h>
1365 ],
1366 [ mode_t foo; foo = 1235; ],
1367 [ ac_cv_have_mode_t="yes" ],
1368 [ ac_cv_have_mode_t="no" ]
1369 )
1370])
1371if test "x$ac_cv_have_mode_t" = "xyes" ; then
1372 AC_DEFINE(HAVE_MODE_T)
1373fi
1374
Damien Miller61e50f12000-05-08 20:49:37 +10001375
1376AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
1377 AC_TRY_COMPILE(
1378 [
Damien Miller81171112000-04-23 11:14:01 +10001379#include <sys/types.h>
1380#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +10001381 ],
1382 [ struct sockaddr_storage s; ],
1383 [ ac_cv_have_struct_sockaddr_storage="yes" ],
1384 [ ac_cv_have_struct_sockaddr_storage="no" ]
1385 )
1386])
1387if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
1388 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)
1389fi
Damien Miller34132e52000-01-14 15:45:46 +11001390
Damien Miller61e50f12000-05-08 20:49:37 +10001391AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
1392 AC_TRY_COMPILE(
1393 [
Damien Miller7b22d652000-06-18 14:07:04 +10001394#include <sys/types.h>
Damien Miller61e50f12000-05-08 20:49:37 +10001395#include <netinet/in.h>
1396 ],
1397 [ struct sockaddr_in6 s; s.sin6_family = 0; ],
1398 [ ac_cv_have_struct_sockaddr_in6="yes" ],
1399 [ ac_cv_have_struct_sockaddr_in6="no" ]
1400 )
1401])
1402if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
1403 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)
1404fi
Damien Miller34132e52000-01-14 15:45:46 +11001405
Damien Miller61e50f12000-05-08 20:49:37 +10001406AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
1407 AC_TRY_COMPILE(
1408 [
Damien Miller7b22d652000-06-18 14:07:04 +10001409#include <sys/types.h>
Damien Miller61e50f12000-05-08 20:49:37 +10001410#include <netinet/in.h>
1411 ],
1412 [ struct in6_addr s; s.s6_addr[0] = 0; ],
1413 [ ac_cv_have_struct_in6_addr="yes" ],
1414 [ ac_cv_have_struct_in6_addr="no" ]
1415 )
1416])
1417if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
1418 AC_DEFINE(HAVE_STRUCT_IN6_ADDR)
1419fi
Damien Miller34132e52000-01-14 15:45:46 +11001420
Damien Miller61e50f12000-05-08 20:49:37 +10001421AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
1422 AC_TRY_COMPILE(
1423 [
Damien Miller81171112000-04-23 11:14:01 +10001424#include <sys/types.h>
1425#include <sys/socket.h>
1426#include <netdb.h>
Damien Miller61e50f12000-05-08 20:49:37 +10001427 ],
1428 [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ],
1429 [ ac_cv_have_struct_addrinfo="yes" ],
1430 [ ac_cv_have_struct_addrinfo="no" ]
1431 )
1432])
1433if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
1434 AC_DEFINE(HAVE_STRUCT_ADDRINFO)
1435fi
1436
Ben Lindstrom42202bc2001-01-15 02:34:37 +00001437AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [
1438 AC_TRY_COMPILE(
1439 [ #include <sys/time.h> ],
1440 [ struct timeval tv; tv.tv_sec = 1;],
1441 [ ac_cv_have_struct_timeval="yes" ],
1442 [ ac_cv_have_struct_timeval="no" ]
1443 )
1444])
1445if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
1446 AC_DEFINE(HAVE_STRUCT_TIMEVAL)
1447 have_struct_timeval=1
1448fi
1449
Ben Lindstrom3ad650a2001-01-03 06:02:51 +00001450# If we don't have int64_t then we can't compile sftp-server. So don't
1451# even attempt to do it.
1452if test "x$ac_cv_have_int64_t" = "xno" -a \
1453 "x$ac_cv_sizeof_long_int" != "x8" -a \
1454 "x$ac_cv_sizeof_long_long_int" = "x0" ; then
1455 NO_SFTP='#'
Tim Ricebee3f222001-03-11 17:32:12 -08001456else
1457dnl test snprintf (broken on SCO w/gcc)
1458 AC_TRY_RUN(
1459 [
1460#include <stdio.h>
1461#include <string.h>
1462#ifdef HAVE_SNPRINTF
1463main()
1464{
1465 char buf[50];
1466 char expected_out[50];
1467 int mazsize = 50 ;
1468#if (SIZEOF_LONG_INT == 8)
1469 long int num = 0x7fffffffffffffff;
1470#else
Kevin Steves6482ec82001-07-15 02:09:28 +00001471 long long num = 0x7fffffffffffffffll;
Tim Ricebee3f222001-03-11 17:32:12 -08001472#endif
1473 strcpy(expected_out, "9223372036854775807");
1474 snprintf(buf, mazsize, "%lld", num);
1475 if(strcmp(buf, expected_out) != 0)
1476 exit(1);
1477 exit(0);
1478}
1479#else
1480main() { exit(0); }
1481#endif
1482 ], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ]
1483 )
Ben Lindstrom3ad650a2001-01-03 06:02:51 +00001484fi
Ben Lindstrom42202bc2001-01-15 02:34:37 +00001485AC_SUBST(NO_SFTP)
Ben Lindstrom3ad650a2001-01-03 06:02:51 +00001486
Damien Miller78315eb2000-09-29 23:01:36 +11001487dnl Checks for structure members
Damien Miller61e50f12000-05-08 20:49:37 +10001488OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
1489OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX)
1490OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX)
1491OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP)
1492OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP)
Damien Millerad1bc5f2000-05-20 14:53:09 +10001493OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX)
Damien Miller61e50f12000-05-08 20:49:37 +10001494OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP)
1495OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP)
Damien Miller8e81ed32000-07-01 13:17:42 +10001496OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmpx.h, HAVE_ID_IN_UTMPX)
Damien Miller61e50f12000-05-08 20:49:37 +10001497OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP)
1498OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX)
1499OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP)
1500OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX)
andre2ff7b5d2000-06-03 14:57:40 +00001501OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP)
1502OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP)
1503OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX)
1504OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX)
Tim Rice13aae5e2001-10-21 17:53:58 -07001505
1506AC_CHECK_MEMBERS([struct stat.st_blksize])
andre2ff7b5d2000-06-03 14:57:40 +00001507
Damien Miller61e50f12000-05-08 20:49:37 +10001508AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
1509 ac_cv_have_ss_family_in_struct_ss, [
1510 AC_TRY_COMPILE(
1511 [
Damien Miller81171112000-04-23 11:14:01 +10001512#include <sys/types.h>
1513#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +10001514 ],
1515 [ struct sockaddr_storage s; s.ss_family = 1; ],
1516 [ ac_cv_have_ss_family_in_struct_ss="yes" ],
1517 [ ac_cv_have_ss_family_in_struct_ss="no" ],
1518 )
1519])
1520if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
1521 AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
1522fi
1523
Damien Miller61e50f12000-05-08 20:49:37 +10001524AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
1525 ac_cv_have___ss_family_in_struct_ss, [
1526 AC_TRY_COMPILE(
1527 [
Damien Miller81171112000-04-23 11:14:01 +10001528#include <sys/types.h>
1529#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +10001530 ],
1531 [ struct sockaddr_storage s; s.__ss_family = 1; ],
1532 [ ac_cv_have___ss_family_in_struct_ss="yes" ],
1533 [ ac_cv_have___ss_family_in_struct_ss="no" ]
1534 )
1535])
1536if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
1537 AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
1538fi
Damien Millerbf1c9b21999-12-09 10:16:54 +11001539
Damien Millerad833b32000-08-23 10:46:23 +10001540AC_CACHE_CHECK([for pw_class field in struct passwd],
1541 ac_cv_have_pw_class_in_struct_passwd, [
1542 AC_TRY_COMPILE(
1543 [
Damien Millerad833b32000-08-23 10:46:23 +10001544#include <pwd.h>
1545 ],
Kevin Steves48b7cc02000-10-07 13:24:00 +00001546 [ struct passwd p; p.pw_class = 0; ],
Damien Millerad833b32000-08-23 10:46:23 +10001547 [ ac_cv_have_pw_class_in_struct_passwd="yes" ],
1548 [ ac_cv_have_pw_class_in_struct_passwd="no" ]
1549 )
1550])
1551if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
1552 AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD)
1553fi
1554
Kevin Steves82456952001-06-22 21:14:18 +00001555AC_CACHE_CHECK([for pw_expire field in struct passwd],
1556 ac_cv_have_pw_expire_in_struct_passwd, [
1557 AC_TRY_COMPILE(
1558 [
1559#include <pwd.h>
1560 ],
1561 [ struct passwd p; p.pw_expire = 0; ],
1562 [ ac_cv_have_pw_expire_in_struct_passwd="yes" ],
1563 [ ac_cv_have_pw_expire_in_struct_passwd="no" ]
1564 )
1565])
1566if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then
1567 AC_DEFINE(HAVE_PW_EXPIRE_IN_PASSWD)
1568fi
1569
1570AC_CACHE_CHECK([for pw_change field in struct passwd],
1571 ac_cv_have_pw_change_in_struct_passwd, [
1572 AC_TRY_COMPILE(
1573 [
1574#include <pwd.h>
1575 ],
1576 [ struct passwd p; p.pw_change = 0; ],
1577 [ ac_cv_have_pw_change_in_struct_passwd="yes" ],
1578 [ ac_cv_have_pw_change_in_struct_passwd="no" ]
1579 )
1580])
1581if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then
1582 AC_DEFINE(HAVE_PW_CHANGE_IN_PASSWD)
1583fi
Damien Miller61e50f12000-05-08 20:49:37 +10001584
Tim Rice28bbb0c2002-05-27 17:37:32 -07001585dnl make sure we're using the real structure members and not defines
Kevin Steves939c9db2002-03-22 17:23:25 +00001586AC_CACHE_CHECK([for msg_accrights field in struct msghdr],
1587 ac_cv_have_accrights_in_msghdr, [
Tim Rice28bbb0c2002-05-27 17:37:32 -07001588 AC_TRY_RUN(
Kevin Steves939c9db2002-03-22 17:23:25 +00001589 [
Tim Riceae49fe62002-04-12 10:26:21 -07001590#include <sys/types.h>
Kevin Steves939c9db2002-03-22 17:23:25 +00001591#include <sys/socket.h>
1592#include <sys/uio.h>
Tim Rice28bbb0c2002-05-27 17:37:32 -07001593int main() {
1594#ifdef msg_accrights
1595exit(1);
1596#endif
1597struct msghdr m;
1598m.msg_accrights = 0;
1599exit(0);
1600}
Kevin Steves939c9db2002-03-22 17:23:25 +00001601 ],
Kevin Steves939c9db2002-03-22 17:23:25 +00001602 [ ac_cv_have_accrights_in_msghdr="yes" ],
1603 [ ac_cv_have_accrights_in_msghdr="no" ]
1604 )
1605])
1606if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
1607 AC_DEFINE(HAVE_ACCRIGHTS_IN_MSGHDR)
1608fi
1609
Kevin Stevesa44e0352002-04-07 16:18:03 +00001610AC_CACHE_CHECK([for msg_control field in struct msghdr],
1611 ac_cv_have_control_in_msghdr, [
Tim Rice28bbb0c2002-05-27 17:37:32 -07001612 AC_TRY_RUN(
Kevin Stevesa44e0352002-04-07 16:18:03 +00001613 [
Tim Riceae49fe62002-04-12 10:26:21 -07001614#include <sys/types.h>
Kevin Stevesa44e0352002-04-07 16:18:03 +00001615#include <sys/socket.h>
1616#include <sys/uio.h>
Tim Rice28bbb0c2002-05-27 17:37:32 -07001617int main() {
1618#ifdef msg_control
1619exit(1);
1620#endif
1621struct msghdr m;
1622m.msg_control = 0;
1623exit(0);
1624}
Kevin Stevesa44e0352002-04-07 16:18:03 +00001625 ],
Kevin Stevesa44e0352002-04-07 16:18:03 +00001626 [ ac_cv_have_control_in_msghdr="yes" ],
1627 [ ac_cv_have_control_in_msghdr="no" ]
1628 )
1629])
1630if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
1631 AC_DEFINE(HAVE_CONTROL_IN_MSGHDR)
1632fi
1633
Damien Miller61e50f12000-05-08 20:49:37 +10001634AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
1635 AC_TRY_LINK([],
1636 [ extern char *__progname; printf("%s", __progname); ],
1637 [ ac_cv_libc_defines___progname="yes" ],
1638 [ ac_cv_libc_defines___progname="no" ]
1639 )
1640])
1641if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
1642 AC_DEFINE(HAVE___PROGNAME)
1643fi
1644
Kevin Steves4846f4a2002-03-22 18:19:53 +00001645AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNCTION__, [
1646 AC_TRY_LINK([
1647#include <stdio.h>
1648],
1649 [ printf("%s", __FUNCTION__); ],
1650 [ ac_cv_cc_implements___FUNCTION__="yes" ],
1651 [ ac_cv_cc_implements___FUNCTION__="no" ]
1652 )
1653])
1654if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
1655 AC_DEFINE(HAVE___FUNCTION__)
1656fi
1657
1658AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__, [
1659 AC_TRY_LINK([
1660#include <stdio.h>
1661],
1662 [ printf("%s", __func__); ],
1663 [ ac_cv_cc_implements___func__="yes" ],
1664 [ ac_cv_cc_implements___func__="no" ]
1665 )
1666])
1667if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
1668 AC_DEFINE(HAVE___func__)
1669fi
1670
Damien Miller4f8e6692001-07-14 13:22:53 +10001671AC_CACHE_CHECK([whether getopt has optreset support],
1672 ac_cv_have_getopt_optreset, [
1673 AC_TRY_LINK(
1674 [
1675#include <getopt.h>
1676 ],
1677 [ extern int optreset; optreset = 0; ],
1678 [ ac_cv_have_getopt_optreset="yes" ],
1679 [ ac_cv_have_getopt_optreset="no" ]
1680 )
1681])
1682if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
1683 AC_DEFINE(HAVE_GETOPT_OPTRESET)
1684fi
Damien Millera22ba012000-03-02 23:09:20 +11001685
Damien Millerecbb26d2000-07-15 14:59:14 +10001686AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
1687 AC_TRY_LINK([],
1688 [ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);],
1689 [ ac_cv_libc_defines_sys_errlist="yes" ],
1690 [ ac_cv_libc_defines_sys_errlist="no" ]
1691 )
1692])
1693if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
1694 AC_DEFINE(HAVE_SYS_ERRLIST)
1695fi
1696
1697
Damien Miller11fa2cc2000-08-16 10:35:58 +10001698AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [
1699 AC_TRY_LINK([],
1700 [ extern int sys_nerr; printf("%i", sys_nerr);],
1701 [ ac_cv_libc_defines_sys_nerr="yes" ],
1702 [ ac_cv_libc_defines_sys_nerr="no" ]
1703 )
1704])
1705if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
1706 AC_DEFINE(HAVE_SYS_NERR)
1707fi
1708
Damien Miller85de5802001-09-18 14:01:11 +10001709SCARD_MSG="no"
Ben Lindstroma42694f2002-04-05 16:11:45 +00001710
1711# Check whether user wants sectok support
1712AC_ARG_WITH(sectok,
1713 [ --with-sectok Enable smartcard support using libsectok],
Damien Miller85de5802001-09-18 14:01:11 +10001714 [
1715 if test "x$withval" != "xno" ; then
1716 if test "x$withval" != "xyes" ; then
1717 CPPFLAGS="$CPPFLAGS -I${withval}"
1718 LDFLAGS="$LDFLAGS -L${withval}"
1719 if test ! -z "$need_dash_r" ; then
1720 LDFLAGS="$LDFLAGS -R${withval}"
1721 fi
1722 if test ! -z "$blibpath" ; then
1723 blibpath="$blibpath:${withval}"
1724 fi
1725 fi
1726 AC_CHECK_HEADERS(sectok.h)
1727 if test "$ac_cv_header_sectok_h" != yes; then
1728 AC_MSG_ERROR(Can't find sectok.h)
1729 fi
1730 AC_CHECK_LIB(sectok, sectok_open)
1731 if test "$ac_cv_lib_sectok_sectok_open" != yes; then
1732 AC_MSG_ERROR(Can't find libsectok)
1733 fi
1734 AC_DEFINE(SMARTCARD)
Ben Lindstroma42694f2002-04-05 16:11:45 +00001735 AC_DEFINE(USE_SECTOK)
1736 SCARD_MSG="yes, using sectok"
1737 fi
1738 ]
1739)
1740
1741# Check whether user wants OpenSC support
1742AC_ARG_WITH(opensc,
Damien Millerf6195f22002-04-23 22:48:46 +10001743 AC_HELP_STRING([--with-opensc=PFX],
1744 [Enable smartcard support using OpenSC]),
1745 opensc_config_prefix="$withval", opensc_config_prefix="")
1746if test x$opensc_config_prefix != x ; then
1747 OPENSC_CONFIG=$opensc_config_prefix/bin/opensc-config
1748 AC_PATH_PROG(OPENSC_CONFIG, opensc-config, no)
1749 if test "$OPENSC_CONFIG" != "no"; then
1750 LIBOPENSC_CFLAGS=`$OPENSC_CONFIG --cflags`
1751 LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs`
1752 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS"
1753 LDFLAGS="$LDFLAGS $LIBOPENSC_LIBS"
1754 AC_DEFINE(SMARTCARD)
1755 AC_DEFINE(USE_OPENSC)
1756 SCARD_MSG="yes, using OpenSC"
1757 fi
1758fi
Damien Miller85de5802001-09-18 14:01:11 +10001759
Damien Millerfd4c9ee2002-04-13 11:04:40 +10001760# Check whether user wants Kerberos 5 support
1761KRB5_MSG="no"
1762AC_ARG_WITH(kerberos5,
1763 [ --with-kerberos5=PATH Enable Kerberos 5 support],
1764 [
1765 if test "x$withval" != "xno" ; then
1766 if test "x$withval" = "xyes" ; then
1767 KRB5ROOT="/usr/local"
1768 else
1769 KRB5ROOT=${withval}
1770 fi
1771 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
1772 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
1773 AC_DEFINE(KRB5)
1774 KRB5_MSG="yes"
1775 AC_MSG_CHECKING(whether we are using Heimdal)
1776 AC_TRY_COMPILE([ #include <krb5.h> ],
1777 [ char *tmp = heimdal_version; ],
1778 [ AC_MSG_RESULT(yes)
1779 AC_DEFINE(HEIMDAL)
1780 K5LIBS="-lkrb5 -ldes -lcom_err -lasn1 -lroken"
1781 ],
1782 [ AC_MSG_RESULT(no)
1783 K5LIBS="-lkrb5 -lk5crypto -lcom_err"
1784 ]
1785 )
1786 if test ! -z "$need_dash_r" ; then
1787 LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib"
1788 fi
1789 if test ! -z "$blibpath" ; then
1790 blibpath="$blibpath:${KRB5ROOT}/lib"
1791 fi
1792 AC_CHECK_LIB(resolv, dn_expand, , )
1793
1794 KRB5=yes
1795 fi
1796 ]
1797)
1798# Check whether user wants Kerberos 4 support
Damien Millerc79bc0d2001-03-28 13:03:42 +10001799KRB4_MSG="no"
1800AC_ARG_WITH(kerberos4,
1801 [ --with-kerberos4=PATH Enable Kerberos 4 support],
1802 [
1803 if test "x$withval" != "xno" ; then
Damien Millerc79bc0d2001-03-28 13:03:42 +10001804 if test "x$withval" != "xyes" ; then
1805 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1806 LDFLAGS="$LDFLAGS -L${withval}/lib"
1807 if test ! -z "$need_dash_r" ; then
1808 LDFLAGS="$LDFLAGS -R${withval}/lib"
1809 fi
1810 if test ! -z "$blibpath" ; then
1811 blibpath="$blibpath:${withval}/lib"
1812 fi
1813 else
1814 if test -d /usr/include/kerberosIV ; then
1815 CPPFLAGS="$CPPFLAGS -I/usr/include/kerberosIV"
1816 fi
1817 fi
1818
1819 AC_CHECK_HEADERS(krb.h)
Damien Millerc79bc0d2001-03-28 13:03:42 +10001820 if test "$ac_cv_header_krb_h" != yes; then
1821 AC_MSG_WARN([Cannot find krb.h, build may fail])
1822 fi
Damien Miller98344742001-03-28 14:37:06 +10001823 AC_CHECK_LIB(krb, main)
Damien Millerc79bc0d2001-03-28 13:03:42 +10001824 if test "$ac_cv_lib_krb_main" != yes; then
Damien Miller98344742001-03-28 14:37:06 +10001825 AC_CHECK_LIB(krb4, main)
1826 if test "$ac_cv_lib_krb4_main" != yes; then
1827 AC_MSG_WARN([Cannot find libkrb nor libkrb4, build may fail])
1828 else
1829 KLIBS="-lkrb4"
1830 fi
1831 else
1832 KLIBS="-lkrb"
Damien Millerc79bc0d2001-03-28 13:03:42 +10001833 fi
Damien Miller98344742001-03-28 14:37:06 +10001834 AC_CHECK_LIB(des, des_cbc_encrypt)
1835 if test "$ac_cv_lib_des_des_cbc_encrypt" != yes; then
1836 AC_CHECK_LIB(des425, des_cbc_encrypt)
1837 if test "$ac_cv_lib_des425_des_cbc_encrypt" != yes; then
1838 AC_MSG_WARN([Cannot find libdes nor libdes425, build may fail])
1839 else
1840 KLIBS="-ldes425"
1841 fi
1842 else
1843 KLIBS="-ldes"
1844 fi
Damien Millerc79bc0d2001-03-28 13:03:42 +10001845 AC_CHECK_LIB(resolv, dn_expand, , )
1846 KRB4=yes
1847 KRB4_MSG="yes"
1848 AC_DEFINE(KRB4)
1849 fi
1850 ]
1851)
1852
1853# Check whether user wants AFS support
1854AFS_MSG="no"
1855AC_ARG_WITH(afs,
1856 [ --with-afs=PATH Enable AFS support],
1857 [
1858 if test "x$withval" != "xno" ; then
1859
1860 if test "x$withval" != "xyes" ; then
1861 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1862 LDFLAGS="$LDFLAGS -L${withval}/lib"
1863 fi
1864
1865 if test -z "$KRB4" ; then
1866 AC_MSG_WARN([AFS requires Kerberos IV support, build may fail])
1867 fi
1868
1869 LIBS="-lkafs $LIBS"
1870 if test ! -z "$AFS_LIBS" ; then
1871 LIBS="$LIBS $AFS_LIBS"
1872 fi
1873 AC_DEFINE(AFS)
1874 AFS_MSG="yes"
1875 fi
1876 ]
1877)
Damien Millerfd4c9ee2002-04-13 11:04:40 +10001878LIBS="$LIBS $KLIBS $K5LIBS"
Damien Millerc79bc0d2001-03-28 13:03:42 +10001879
Damien Millera22ba012000-03-02 23:09:20 +11001880# Looking for programs, paths and files
Damien Millera22ba012000-03-02 23:09:20 +11001881
Damien Millerf58c6722002-05-13 13:15:42 +10001882PRIVSEP_PATH=/var/empty
1883AC_ARG_WITH(privsep-path,
Tim Ricecbb90662002-07-08 19:17:10 -07001884 [ --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)],
Damien Millerf58c6722002-05-13 13:15:42 +10001885 [
1886 if test "x$withval" != "$no" ; then
1887 PRIVSEP_PATH=$withval
1888 fi
1889 ]
1890)
1891AC_SUBST(PRIVSEP_PATH)
1892
Damien Millera22ba012000-03-02 23:09:20 +11001893AC_ARG_WITH(xauth,
1894 [ --with-xauth=PATH Specify path to xauth program ],
1895 [
Ben Lindstrom76020ba2000-10-25 16:55:00 +00001896 if test "x$withval" != "xno" ; then
Damien Miller7b22d652000-06-18 14:07:04 +10001897 xauth_path=$withval
Damien Millera22ba012000-03-02 23:09:20 +11001898 fi
1899 ],
1900 [
Tim Ricee22be3b2002-07-17 19:20:07 -07001901 TestPath="$PATH"
1902 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X/bin"
1903 TestPath="${TestPath}${PATH_SEPARATOR}/usr/bin/X11"
1904 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X11R6/bin"
1905 TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin"
1906 AC_PATH_PROG(xauth_path, xauth, , $TestPath)
Damien Milleredb82922000-06-20 13:25:52 +10001907 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
Damien Millera22ba012000-03-02 23:09:20 +11001908 xauth_path="/usr/openwin/bin/xauth"
1909 fi
1910 ]
1911)
1912
Damien Millera19cf472000-11-29 13:28:50 +11001913if test -z "$xauth_path" ; then
1914 XAUTH_PATH="undefined"
1915 AC_SUBST(XAUTH_PATH)
1916else
Damien Millera22ba012000-03-02 23:09:20 +11001917 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
Damien Millera19cf472000-11-29 13:28:50 +11001918 XAUTH_PATH=$xauth_path
1919 AC_SUBST(XAUTH_PATH)
Damien Millera22ba012000-03-02 23:09:20 +11001920fi
Damien Millera22ba012000-03-02 23:09:20 +11001921
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
Kevin Steves0ea1d9d2002-04-25 18:17:04 +00001929 if test "x$disable_ptmx_check" != "xyes" ; then
1930 AC_CHECK_FILE("/dev/ptmx",
1931 [
1932 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
1933 have_dev_ptmx=1
1934 ]
1935 )
1936 fi
Damien Millera22ba012000-03-02 23:09:20 +11001937fi
Damien Miller204ad072000-03-02 23:56:12 +11001938AC_CHECK_FILE("/dev/ptc",
1939 [
1940 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
1941 have_dev_ptc=1
1942 ]
1943)
1944
Damien Millera22ba012000-03-02 23:09:20 +11001945# Options from here on. Some of these are preset by platform above
Ben Lindstrom9841b0a2001-06-09 02:26:58 +00001946AC_ARG_WITH(mantype,
Damien Miller897741e2001-04-16 10:41:46 +10001947 [ --with-mantype=man|cat|doc Set man page type],
Damien Miller670a4b82000-01-22 13:53:11 +11001948 [
Damien Miller897741e2001-04-16 10:41:46 +10001949 case "$withval" in
1950 man|cat|doc)
1951 MANTYPE=$withval
1952 ;;
1953 *)
1954 AC_MSG_ERROR(invalid man type: $withval)
1955 ;;
1956 esac
Damien Miller670a4b82000-01-22 13:53:11 +11001957 ]
1958)
Ben Lindstrombc709922001-04-18 18:04:21 +00001959if test -z "$MANTYPE"; then
Tim Ricee22be3b2002-07-17 19:20:07 -07001960 TestPath="/usr/bin${PATH_SEPARATOR}/usr/ucb"
1961 AC_PATH_PROGS(NROFF, nroff awf, /bin/false, $TestPath)
Ben Lindstrombc709922001-04-18 18:04:21 +00001962 if ${NROFF} -mdoc ${srcdir}/ssh.1 >/dev/null 2>&1; then
1963 MANTYPE=doc
1964 elif ${NROFF} -man ${srcdir}/ssh.1 >/dev/null 2>&1; then
1965 MANTYPE=man
1966 else
1967 MANTYPE=cat
1968 fi
1969fi
Damien Miller670a4b82000-01-22 13:53:11 +11001970AC_SUBST(MANTYPE)
Ben Lindstrombc709922001-04-18 18:04:21 +00001971if test "$MANTYPE" = "doc"; then
1972 mansubdir=man;
1973else
1974 mansubdir=$MANTYPE;
1975fi
1976AC_SUBST(mansubdir)
Damien Miller8bdeee21999-12-30 15:50:54 +11001977
Damien Millera22ba012000-03-02 23:09:20 +11001978# Check whether to enable MD5 passwords
Damien Miller7b22d652000-06-18 14:07:04 +10001979MD5_MSG="no"
Damien Millerf7c0f821999-11-22 22:31:49 +11001980AC_ARG_WITH(md5-passwords,
Damien Millerdd1c7ba1999-11-19 15:53:20 +11001981 [ --with-md5-passwords Enable use of MD5 passwords],
Damien Miller8bdeee21999-12-30 15:50:54 +11001982 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001983 if test "x$withval" != "xno" ; then
Damien Miller8bdeee21999-12-30 15:50:54 +11001984 AC_DEFINE(HAVE_MD5_PASSWORDS)
Damien Miller7b22d652000-06-18 14:07:04 +10001985 MD5_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +11001986 fi
1987 ]
Damien Millerdd1c7ba1999-11-19 15:53:20 +11001988)
1989
Damien Millera22ba012000-03-02 23:09:20 +11001990# Whether to disable shadow password support
Damien Miller76112de1999-12-21 11:18:08 +11001991AC_ARG_WITH(shadow,
1992 [ --without-shadow Disable shadow password support],
1993 [
1994 if test "x$withval" = "xno" ; then
1995 AC_DEFINE(DISABLE_SHADOW)
Damien Miller1f335fb2000-06-26 11:31:33 +10001996 disable_shadow=yes
Damien Miller76112de1999-12-21 11:18:08 +11001997 fi
1998 ]
1999)
2000
Damien Miller1f335fb2000-06-26 11:31:33 +10002001if test -z "$disable_shadow" ; then
2002 AC_MSG_CHECKING([if the systems has expire shadow information])
2003 AC_TRY_COMPILE(
2004 [
2005#include <sys/types.h>
2006#include <shadow.h>
2007 struct spwd sp;
2008 ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ],
2009 [ sp_expire_available=yes ], []
2010 )
2011
2012 if test "x$sp_expire_available" = "xyes" ; then
2013 AC_MSG_RESULT(yes)
2014 AC_DEFINE(HAS_SHADOW_EXPIRE)
2015 else
2016 AC_MSG_RESULT(no)
2017 fi
2018fi
2019
Damien Millera22ba012000-03-02 23:09:20 +11002020# Use ip address instead of hostname in $DISPLAY
Damien Miller9a947342000-08-30 10:03:33 +11002021if test ! -z "$IPADDR_IN_DISPLAY" ; then
2022 DISPLAY_HACK_MSG="yes"
2023 AC_DEFINE(IPADDR_IN_DISPLAY)
2024else
2025 DISPLAY_HACK_MSG="no"
2026 AC_ARG_WITH(ipaddr-display,
2027 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
2028 [
2029 if test "x$withval" != "xno" ; then
2030 AC_DEFINE(IPADDR_IN_DISPLAY)
2031 DISPLAY_HACK_MSG="yes"
2032 fi
2033 ]
2034 )
2035fi
Damien Miller76112de1999-12-21 11:18:08 +11002036
Tim Rice43a1c132002-04-17 21:19:14 -07002037dnl BSD systems use /etc/login.conf so --with-default-path= has no effect
2038if test $ac_cv_func_login_getcapbool = "yes" -a \
2039 $ac_cv_header_login_cap_h = "yes" ; then
2040 USES_LOGIN_CONF=yes
2041fi
Damien Millera22ba012000-03-02 23:09:20 +11002042# Whether to mess with the default path
Damien Miller7b22d652000-06-18 14:07:04 +10002043SERVER_PATH_MSG="(default)"
Damien Millere7f626c1999-12-31 09:49:44 +11002044AC_ARG_WITH(default-path,
Damien Millerf71d2a52002-05-13 15:14:08 +10002045 [ --with-default-path= Specify default \$PATH environment for server],
Damien Miller5a3e6831999-12-27 09:48:56 +11002046 [
Tim Rice43a1c132002-04-17 21:19:14 -07002047 if test "$USES_LOGIN_CONF" = "yes" ; then
2048 AC_MSG_WARN([
2049--with-default-path=PATH has no effect on this system.
2050Edit /etc/login.conf instead.])
2051 elif test "x$withval" != "xno" ; then
Tim Rice59ea0a02001-03-10 13:50:45 -08002052 user_path="$withval"
Damien Miller7b22d652000-06-18 14:07:04 +10002053 SERVER_PATH_MSG="$withval"
Damien Miller5a3e6831999-12-27 09:48:56 +11002054 fi
Tim Rice59ea0a02001-03-10 13:50:45 -08002055 ],
Tim Rice43a1c132002-04-17 21:19:14 -07002056 [ if test "$USES_LOGIN_CONF" = "yes" ; then
2057 AC_MSG_WARN([Make sure the path to scp is in /etc/login.conf])
2058 else
Tim Rice59ea0a02001-03-10 13:50:45 -08002059 AC_TRY_RUN(
2060 [
2061/* find out what STDPATH is */
2062#include <stdio.h>
Tim Rice59ea0a02001-03-10 13:50:45 -08002063#ifdef HAVE_PATHS_H
2064# include <paths.h>
2065#endif
2066#ifndef _PATH_STDPATH
2067# define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
2068#endif
2069#include <sys/types.h>
2070#include <sys/stat.h>
2071#include <fcntl.h>
2072#define DATA "conftest.stdpath"
2073
2074main()
2075{
2076 FILE *fd;
2077 int rc;
2078
2079 fd = fopen(DATA,"w");
2080 if(fd == NULL)
2081 exit(1);
2082
2083 if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0)
2084 exit(1);
2085
2086 exit(0);
2087}
2088 ], [ user_path=`cat conftest.stdpath` ],
2089 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ],
2090 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ]
2091 )
2092# make sure $bindir is in USER_PATH so scp will work
2093 t_bindir=`eval echo ${bindir}`
2094 case $t_bindir in
2095 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$prefix~"` ;;
2096 esac
2097 case $t_bindir in
2098 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$ac_default_prefix~"` ;;
2099 esac
2100 echo $user_path | grep ":$t_bindir" > /dev/null 2>&1
2101 if test $? -ne 0 ; then
2102 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1
2103 if test $? -ne 0 ; then
2104 user_path=$user_path:$t_bindir
2105 AC_MSG_RESULT(Adding $t_bindir to USER_PATH so scp will work)
2106 fi
2107 fi
Tim Rice43a1c132002-04-17 21:19:14 -07002108 fi ]
Damien Miller5a3e6831999-12-27 09:48:56 +11002109)
Tim Rice43a1c132002-04-17 21:19:14 -07002110if test "$USES_LOGIN_CONF" != "yes" ; then
2111 AC_DEFINE_UNQUOTED(USER_PATH, "$user_path")
2112 AC_SUBST(user_path)
2113fi
Damien Miller5a3e6831999-12-27 09:48:56 +11002114
Damien Millera18bbd32002-05-13 10:48:57 +10002115# Set superuser path separately to user path
Damien Millera18bbd32002-05-13 10:48:57 +10002116AC_ARG_WITH(superuser-path,
2117 [ --with-superuser-path= Specify different path for super-user],
2118 [
2119 if test "x$withval" != "xno" ; then
2120 AC_DEFINE_UNQUOTED(SUPERUSER_PATH, "$withval")
2121 superuser_path=$withval
2122 fi
2123 ]
2124)
2125
2126
Damien Millera22ba012000-03-02 23:09:20 +11002127# Whether to force IPv4 by default (needed on broken glibc Linux)
Damien Miller7b22d652000-06-18 14:07:04 +10002128IPV4_HACK_MSG="no"
Damien Miller7d80e342000-01-19 14:36:49 +11002129AC_ARG_WITH(ipv4-default,
2130 [ --with-ipv4-default Use IPv4 by connections unless '-6' specified],
2131 [
2132 if test "x$withval" != "xno" ; then
2133 AC_DEFINE(IPV4_DEFAULT)
Damien Miller7b22d652000-06-18 14:07:04 +10002134 IPV4_HACK_MSG="yes"
Damien Miller7d80e342000-01-19 14:36:49 +11002135 fi
2136 ]
2137)
2138
Damien Miller61e50f12000-05-08 20:49:37 +10002139AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
Damien Miller7b22d652000-06-18 14:07:04 +10002140IPV4_IN6_HACK_MSG="no"
Damien Miller7bcb0892000-03-11 20:45:40 +11002141AC_ARG_WITH(4in6,
2142 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
2143 [
2144 if test "x$withval" != "xno" ; then
2145 AC_MSG_RESULT(yes)
2146 AC_DEFINE(IPV4_IN_IPV6)
Damien Miller7b22d652000-06-18 14:07:04 +10002147 IPV4_IN6_HACK_MSG="yes"
Damien Miller7bcb0892000-03-11 20:45:40 +11002148 else
2149 AC_MSG_RESULT(no)
2150 fi
2151 ],[
2152 if test "x$inet6_default_4in6" = "xyes"; then
2153 AC_MSG_RESULT([yes (default)])
2154 AC_DEFINE(IPV4_IN_IPV6)
Damien Miller7b22d652000-06-18 14:07:04 +10002155 IPV4_IN6_HACK_MSG="yes"
Damien Miller7bcb0892000-03-11 20:45:40 +11002156 else
2157 AC_MSG_RESULT([no (default)])
2158 fi
2159 ]
2160)
2161
Damien Miller60396b02001-02-18 17:01:00 +11002162# Whether to enable BSD auth support
Damien Miller6c21c512002-01-22 21:57:53 +11002163BSD_AUTH_MSG=no
Damien Miller60396b02001-02-18 17:01:00 +11002164AC_ARG_WITH(bsd-auth,
2165 [ --with-bsd-auth Enable BSD auth support],
2166 [
2167 if test "x$withval" != "xno" ; then
2168 AC_DEFINE(BSD_AUTH)
Damien Miller6c21c512002-01-22 21:57:53 +11002169 BSD_AUTH_MSG=yes
Damien Miller60396b02001-02-18 17:01:00 +11002170 fi
2171 ]
2172)
2173
Damien Millera22ba012000-03-02 23:09:20 +11002174# Where to place sshd.pid
Damien Millerb13c73e2000-01-17 22:02:17 +11002175piddir=/var/run
Damien Miller78315eb2000-09-29 23:01:36 +11002176# make sure the directory exists
2177if test ! -d $piddir ; then
2178 piddir=`eval echo ${sysconfdir}`
2179 case $piddir in
2180 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
2181 esac
2182fi
2183
Tim Rice88f2ab52002-03-17 12:17:34 -08002184AC_ARG_WITH(pid-dir,
2185 [ --with-pid-dir=PATH Specify location of ssh.pid file],
2186 [
2187 if test "x$withval" != "xno" ; then
2188 piddir=$withval
2189 if test ! -d $piddir ; then
2190 AC_MSG_WARN([** no $piddir directory on this system **])
2191 fi
2192 fi
2193 ]
2194)
2195
Ben Lindstrom226cfa02001-01-22 05:34:40 +00002196AC_DEFINE_UNQUOTED(_PATH_SSH_PIDDIR, "$piddir")
Damien Millerb13c73e2000-01-17 22:02:17 +11002197AC_SUBST(piddir)
Damien Miller5eed6a22000-01-16 12:05:18 +11002198
andre2ff7b5d2000-06-03 14:57:40 +00002199dnl allow user to disable some login recording features
2200AC_ARG_ENABLE(lastlog,
andre43ca7e22000-06-19 08:23:46 +00002201 [ --disable-lastlog disable use of lastlog even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00002202 [ AC_DEFINE(DISABLE_LASTLOG) ]
2203)
2204AC_ARG_ENABLE(utmp,
andre43ca7e22000-06-19 08:23:46 +00002205 [ --disable-utmp disable use of utmp even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00002206 [ AC_DEFINE(DISABLE_UTMP) ]
2207)
2208AC_ARG_ENABLE(utmpx,
andre43ca7e22000-06-19 08:23:46 +00002209 [ --disable-utmpx disable use of utmpx even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00002210 [ AC_DEFINE(DISABLE_UTMPX) ]
2211)
2212AC_ARG_ENABLE(wtmp,
andre43ca7e22000-06-19 08:23:46 +00002213 [ --disable-wtmp disable use of wtmp even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00002214 [ AC_DEFINE(DISABLE_WTMP) ]
2215)
2216AC_ARG_ENABLE(wtmpx,
andre43ca7e22000-06-19 08:23:46 +00002217 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00002218 [ AC_DEFINE(DISABLE_WTMPX) ]
2219)
2220AC_ARG_ENABLE(libutil,
andre43ca7e22000-06-19 08:23:46 +00002221 [ --disable-libutil disable use of libutil (login() etc.) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00002222 [ AC_DEFINE(DISABLE_LOGIN) ]
2223)
2224AC_ARG_ENABLE(pututline,
andre43ca7e22000-06-19 08:23:46 +00002225 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00002226 [ AC_DEFINE(DISABLE_PUTUTLINE) ]
2227)
2228AC_ARG_ENABLE(pututxline,
andre43ca7e22000-06-19 08:23:46 +00002229 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00002230 [ AC_DEFINE(DISABLE_PUTUTXLINE) ]
2231)
2232AC_ARG_WITH(lastlog,
andre43ca7e22000-06-19 08:23:46 +00002233 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
Damien Miller709528a2001-01-31 09:57:55 +11002234 [
2235 if test "x$withval" = "xno" ; then
2236 AC_DEFINE(DISABLE_LASTLOG)
2237 else
2238 conf_lastlog_location=$withval
2239 fi
2240 ]
2241)
andre2ff7b5d2000-06-03 14:57:40 +00002242
2243dnl lastlog, [uw]tmpx? detection
2244dnl NOTE: set the paths in the platform section to avoid the
2245dnl need for command-line parameters
2246dnl lastlog and [uw]tmp are subject to a file search if all else fails
2247
2248dnl lastlog detection
2249dnl NOTE: the code itself will detect if lastlog is a directory
2250AC_MSG_CHECKING([if your system defines LASTLOG_FILE])
2251AC_TRY_COMPILE([
2252#include <sys/types.h>
2253#include <utmp.h>
2254#ifdef HAVE_LASTLOG_H
2255# include <lastlog.h>
2256#endif
Damien Miller2994e082000-06-04 15:51:47 +10002257#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00002258# include <paths.h>
2259#endif
Ben Lindstrom19d7b8d2001-08-16 00:09:49 +00002260#ifdef HAVE_LOGIN_H
2261# include <login.h>
2262#endif
andre2ff7b5d2000-06-03 14:57:40 +00002263 ],
2264 [ char *lastlog = LASTLOG_FILE; ],
2265 [ AC_MSG_RESULT(yes) ],
Damien Miller2994e082000-06-04 15:51:47 +10002266 [
2267 AC_MSG_RESULT(no)
2268 AC_MSG_CHECKING([if your system defines _PATH_LASTLOG])
2269 AC_TRY_COMPILE([
2270#include <sys/types.h>
2271#include <utmp.h>
2272#ifdef HAVE_LASTLOG_H
2273# include <lastlog.h>
2274#endif
2275#ifdef HAVE_PATHS_H
2276# include <paths.h>
2277#endif
2278 ],
2279 [ char *lastlog = _PATH_LASTLOG; ],
2280 [ AC_MSG_RESULT(yes) ],
2281 [
andree441aa32000-06-12 22:34:38 +00002282 AC_MSG_RESULT(no)
Damien Miller2994e082000-06-04 15:51:47 +10002283 system_lastlog_path=no
2284 ])
2285 ]
andre2ff7b5d2000-06-03 14:57:40 +00002286)
Damien Miller2994e082000-06-04 15:51:47 +10002287
andre2ff7b5d2000-06-03 14:57:40 +00002288if test -z "$conf_lastlog_location"; then
2289 if test x"$system_lastlog_path" = x"no" ; then
2290 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
Damien Milleredb82922000-06-20 13:25:52 +10002291 if (test -d "$f" || test -f "$f") ; then
andre2ff7b5d2000-06-03 14:57:40 +00002292 conf_lastlog_location=$f
2293 fi
2294 done
2295 if test -z "$conf_lastlog_location"; then
andre45cad512000-06-12 23:27:31 +00002296 AC_MSG_WARN([** Cannot find lastlog **])
2297 dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx
andre2ff7b5d2000-06-03 14:57:40 +00002298 fi
2299 fi
2300fi
2301
2302if test -n "$conf_lastlog_location"; then
2303 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location")
2304fi
2305
2306dnl utmp detection
2307AC_MSG_CHECKING([if your system defines UTMP_FILE])
2308AC_TRY_COMPILE([
2309#include <sys/types.h>
2310#include <utmp.h>
Damien Miller2994e082000-06-04 15:51:47 +10002311#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00002312# include <paths.h>
2313#endif
2314 ],
2315 [ char *utmp = UTMP_FILE; ],
2316 [ AC_MSG_RESULT(yes) ],
2317 [ AC_MSG_RESULT(no)
2318 system_utmp_path=no ]
2319)
2320if test -z "$conf_utmp_location"; then
2321 if test x"$system_utmp_path" = x"no" ; then
2322 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
2323 if test -f $f ; then
2324 conf_utmp_location=$f
2325 fi
2326 done
2327 if test -z "$conf_utmp_location"; then
2328 AC_DEFINE(DISABLE_UTMP)
2329 fi
2330 fi
2331fi
2332if test -n "$conf_utmp_location"; then
2333 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location")
2334fi
2335
2336dnl wtmp detection
2337AC_MSG_CHECKING([if your system defines WTMP_FILE])
2338AC_TRY_COMPILE([
2339#include <sys/types.h>
2340#include <utmp.h>
Damien Miller2994e082000-06-04 15:51:47 +10002341#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00002342# include <paths.h>
2343#endif
2344 ],
2345 [ char *wtmp = WTMP_FILE; ],
2346 [ AC_MSG_RESULT(yes) ],
2347 [ AC_MSG_RESULT(no)
2348 system_wtmp_path=no ]
2349)
2350if test -z "$conf_wtmp_location"; then
2351 if test x"$system_wtmp_path" = x"no" ; then
2352 for f in /usr/adm/wtmp /var/log/wtmp; do
2353 if test -f $f ; then
2354 conf_wtmp_location=$f
2355 fi
2356 done
2357 if test -z "$conf_wtmp_location"; then
2358 AC_DEFINE(DISABLE_WTMP)
2359 fi
2360 fi
2361fi
2362if test -n "$conf_wtmp_location"; then
2363 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location")
2364fi
2365
2366
2367dnl utmpx detection - I don't know any system so perverse as to require
2368dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out
2369dnl there, though.
2370AC_MSG_CHECKING([if your system defines UTMPX_FILE])
2371AC_TRY_COMPILE([
2372#include <sys/types.h>
2373#include <utmp.h>
2374#ifdef HAVE_UTMPX_H
2375#include <utmpx.h>
2376#endif
Damien Miller2994e082000-06-04 15:51:47 +10002377#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00002378# include <paths.h>
2379#endif
2380 ],
2381 [ char *utmpx = UTMPX_FILE; ],
2382 [ AC_MSG_RESULT(yes) ],
2383 [ AC_MSG_RESULT(no)
2384 system_utmpx_path=no ]
2385)
2386if test -z "$conf_utmpx_location"; then
2387 if test x"$system_utmpx_path" = x"no" ; then
2388 AC_DEFINE(DISABLE_UTMPX)
2389 fi
2390else
2391 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location")
2392fi
2393
2394dnl wtmpx detection
2395AC_MSG_CHECKING([if your system defines WTMPX_FILE])
2396AC_TRY_COMPILE([
2397#include <sys/types.h>
2398#include <utmp.h>
2399#ifdef HAVE_UTMPX_H
2400#include <utmpx.h>
2401#endif
Damien Miller2994e082000-06-04 15:51:47 +10002402#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00002403# include <paths.h>
2404#endif
2405 ],
2406 [ char *wtmpx = WTMPX_FILE; ],
2407 [ AC_MSG_RESULT(yes) ],
2408 [ AC_MSG_RESULT(no)
2409 system_wtmpx_path=no ]
2410)
2411if test -z "$conf_wtmpx_location"; then
2412 if test x"$system_wtmpx_path" = x"no" ; then
2413 AC_DEFINE(DISABLE_WTMPX)
2414 fi
2415else
2416 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location")
2417fi
2418
Damien Miller4018c192000-04-30 09:30:44 +10002419
Damien Miller29ea30d2000-03-17 10:54:15 +11002420if test ! -z "$blibpath" ; then
2421 LDFLAGS="$LDFLAGS -blibpath:$blibpath"
2422 AC_MSG_WARN([Please check and edit -blibpath in LDFLAGS in Makefile])
2423fi
2424
Tim Rice4cec93f2002-02-26 08:40:48 -08002425dnl remove pam and dl because they are in $LIBPAM
2426if test "$PAM_MSG" = yes ; then
Tim Rice7d2d1f12002-02-26 22:05:11 -08002427 LIBS=`echo $LIBS | sed 's/-lpam //'`
2428fi
2429if test "$ac_cv_lib_pam_pam_set_item" = yes ; then
2430 LIBS=`echo $LIBS | sed 's/-ldl //'`
Tim Rice4cec93f2002-02-26 08:40:48 -08002431fi
2432
Damien Millerbac2d8a2000-09-05 16:13:06 +11002433AC_EXEEXT
Tim Rice13aae5e2001-10-21 17:53:58 -07002434AC_CONFIG_FILES([Makefile openbsd-compat/Makefile scard/Makefile ssh_prng_cmds])
2435AC_OUTPUT
Damien Miller0437b332000-05-02 09:56:41 +10002436
Damien Miller7b22d652000-06-18 14:07:04 +10002437# Print summary of options
2438
Damien Miller7b22d652000-06-18 14:07:04 +10002439# Someone please show me a better way :)
2440A=`eval echo ${prefix}` ; A=`eval echo ${A}`
2441B=`eval echo ${bindir}` ; B=`eval echo ${B}`
2442C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
2443D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
Kevin Stevese0f49142000-10-14 17:51:48 +00002444E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
Ben Lindstrombc709922001-04-18 18:04:21 +00002445F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
Damien Miller7b22d652000-06-18 14:07:04 +10002446G=`eval echo ${piddir}` ; G=`eval echo ${G}`
Damien Millerf58c6722002-05-13 13:15:42 +10002447H=`eval echo ${PRIVSEP_PATH}` ; H=`eval echo ${H}`
2448I=`eval echo ${user_path}` ; I=`eval echo ${I}`
2449J=`eval echo ${superuser_path}` ; J=`eval echo ${J}`
Damien Miller7b22d652000-06-18 14:07:04 +10002450
2451echo ""
Kevin Steves393d2f72001-04-08 22:50:43 +00002452echo "OpenSSH has been configured with the following options:"
Damien Millerf58c6722002-05-13 13:15:42 +10002453echo " User binaries: $B"
2454echo " System binaries: $C"
2455echo " Configuration files: $D"
2456echo " Askpass program: $E"
2457echo " Manual pages: $F"
2458echo " PID file: $G"
2459echo " Privilege separation chroot path: $H"
Tim Rice43a1c132002-04-17 21:19:14 -07002460if test "$USES_LOGIN_CONF" = "yes" ; then
Damien Millerf58c6722002-05-13 13:15:42 +10002461echo " At runtime, sshd will use the path defined in /etc/login.conf"
Tim Rice43a1c132002-04-17 21:19:14 -07002462else
Damien Millerf58c6722002-05-13 13:15:42 +10002463echo " sshd default user PATH: $I"
Tim Rice43a1c132002-04-17 21:19:14 -07002464fi
Damien Millera18bbd32002-05-13 10:48:57 +10002465if test ! -z "$superuser_path" ; then
Damien Millerf58c6722002-05-13 13:15:42 +10002466echo " sshd superuser user PATH: $J"
Damien Millera18bbd32002-05-13 10:48:57 +10002467fi
Damien Millerf58c6722002-05-13 13:15:42 +10002468echo " Manpage format: $MANTYPE"
2469echo " PAM support: ${PAM_MSG}"
2470echo " KerberosIV support: $KRB4_MSG"
2471echo " KerberosV support: $KRB5_MSG"
2472echo " Smartcard support: $SCARD_MSG"
2473echo " AFS support: $AFS_MSG"
2474echo " S/KEY support: $SKEY_MSG"
2475echo " TCP Wrappers support: $TCPW_MSG"
2476echo " MD5 password support: $MD5_MSG"
Damien Miller903e1152002-05-13 14:41:31 +10002477echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
Damien Millerf58c6722002-05-13 13:15:42 +10002478echo " Use IPv4 by default hack: $IPV4_HACK_MSG"
2479echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
2480echo " BSD Auth support: $BSD_AUTH_MSG"
2481echo " Random number source: $RAND_MSG"
Damien Miller6c21c512002-01-22 21:57:53 +11002482if test ! -z "$USE_RAND_HELPER" ; then
Damien Millerf58c6722002-05-13 13:15:42 +10002483echo " ssh-rand-helper collects from: $RAND_HELPER_MSG"
Damien Miller60396b02001-02-18 17:01:00 +11002484fi
2485
Damien Miller7b22d652000-06-18 14:07:04 +10002486echo ""
2487
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +00002488echo " Host: ${host}"
2489echo " Compiler: ${CC}"
2490echo " Compiler flags: ${CFLAGS}"
2491echo "Preprocessor flags: ${CPPFLAGS}"
2492echo " Linker flags: ${LDFLAGS}"
Tim Rice4cec93f2002-02-26 08:40:48 -08002493echo " Libraries: ${LIBWRAP} ${LIBPAM} ${LIBS}"
Damien Miller7b22d652000-06-18 14:07:04 +10002494
2495echo ""
2496
Damien Miller82cf0ce2000-12-20 13:34:48 +11002497if test "x$PAM_MSG" = "xyes" ; then
Damien Miller6c21c512002-01-22 21:57:53 +11002498 echo "PAM is enabled. You may need to install a PAM control file "
2499 echo "for sshd, otherwise password authentication may fail. "
2500 echo "Example PAM control files can be found in the contrib/ "
2501 echo "subdirectory"
Damien Miller6f9c3372000-10-25 10:06:04 +11002502 echo ""
2503fi
Ben Lindstrom3ad650a2001-01-03 06:02:51 +00002504
2505if test ! -z "$NO_SFTP"; then
Damien Miller6c21c512002-01-22 21:57:53 +11002506 echo "sftp-server will be disabled. Your compiler does not "
2507 echo "support 64bit integers."
2508 echo ""
2509fi
2510
2511if test ! -z "$RAND_HELPER_CMDHASH" ; then
2512 echo "WARNING: you are using the builtin random number collection "
2513 echo "service. Please read WARNING.RNG and request that your OS "
2514 echo "vendor includes kernel-based random number collection in "
2515 echo "future versions of your OS."
Ben Lindstrom3ad650a2001-01-03 06:02:51 +00002516 echo ""
2517fi
Damien Miller60396b02001-02-18 17:01:00 +11002518