blob: dd68daeb178e00d3a6fcce9c94bb28f2057c5629 [file] [log] [blame]
Damien Millerab18c411999-11-11 10:40:23 +11001AC_INIT(ssh.c)
Damien Miller7f6ea021999-10-28 13:25:17 +10002
3AC_CONFIG_HEADER(config.h)
Damien Miller856799b2000-03-15 21:18:10 +11004AC_PROG_CC
Damien Miller76112de1999-12-21 11:18:08 +11005AC_CANONICAL_HOST
Damien Miller7f6ea021999-10-28 13:25:17 +10006
Damien Millera22ba012000-03-02 23:09:20 +11007# Checks for programs.
Damien Millerab18c411999-11-11 10:40:23 +11008AC_PROG_CPP
Damien Miller7f6ea021999-10-28 13:25:17 +10009AC_PROG_RANLIB
Damien Millerd8087f61999-11-25 12:31:26 +110010AC_PROG_INSTALL
Damien Millerc7b38ce1999-11-09 10:28:04 +110011AC_CHECK_PROG(AR, ar, ar)
Damien Millere79334a1999-12-29 10:03:37 +110012AC_PATH_PROG(PERL, perl)
13AC_SUBST(PERL)
Damien Miller8d1fd572000-05-17 21:34:07 +100014AC_PATH_PROG(ENT, ent)
15AC_SUBST(ENT)
Damien Miller78315eb2000-09-29 23:01:36 +110016AC_PATH_PROGS(FILEPRIV, filepriv, true, /sbin:/usr/sbin)
Damien Miller2e1b0821999-12-25 10:11:29 +110017
Damien Miller3f62aba2000-11-29 11:56:35 +110018if test -z "$AR" ; then
19 AC_MSG_ERROR([*** 'ar' missing, please install or fix your \$PATH ***])
20fi
21
Damien Millerad833b32000-08-23 10:46:23 +100022# Use LOGIN_PROGRAM from environment if possible
23if test ! -z "$LOGIN_PROGRAM" ; then
24 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM")
25else
26 # Search for login
27 AC_PATH_PROG(LOGIN_PROGRAM_FALLBACK, login)
28 if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
29 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM_FALLBACK")
30 fi
31fi
32
Damien Miller166bd442000-03-16 10:48:25 +110033if test -z "$LD" ; then
34 LD=$CC
35fi
36AC_SUBST(LD)
37
38# C Compiler features
39AC_C_INLINE
40if test "$GCC" = "yes"; then
41 CFLAGS="$CFLAGS -Wall"
42fi
43
Damien Millera22ba012000-03-02 23:09:20 +110044# Check for some target-specific stuff
Damien Miller76112de1999-12-21 11:18:08 +110045case "$host" in
Damien Miller75b1d102000-01-07 14:01:41 +110046*-*-aix*)
47 AFS_LIBS="-lld"
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +000048 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Millerdb819592000-03-14 13:44:01 +110049 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Damien Milleredb82922000-06-20 13:25:52 +100050 if (test "$LD" != "gcc" && test -z "$blibpath"); then
Damien Miller29ea30d2000-03-17 10:54:15 +110051 blibpath="/usr/lib:/lib:/usr/local/lib"
52 fi
Damien Millerd2c208a2000-05-17 22:00:02 +100053 AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)])
Damien Millereca71f82000-01-20 22:38:27 +110054 AC_DEFINE(BROKEN_GETADDRINFO)
andree441aa32000-06-12 22:34:38 +000055 MANTYPE='$(CATMAN)'
56 mansubdir=cat
andre60f3c982000-06-03 16:18:19 +000057 dnl AIX handles lastlog as part of its login message
58 AC_DEFINE(DISABLE_LASTLOG)
Damien Miller5fc85652000-07-09 23:53:07 +100059 MANTYPE='$(CATMAN)'
60 mansubdir=cat
Damien Miller75b1d102000-01-07 14:01:41 +110061 ;;
Damien Millerbac2d8a2000-09-05 16:13:06 +110062*-*-cygwin*)
Damien Milleref767ac2000-10-17 23:14:08 +110063 LIBS="$LIBS -lregex /usr/lib/textmode.o"
Damien Millerbac2d8a2000-09-05 16:13:06 +110064 AC_DEFINE(HAVE_CYGWIN)
65 AC_DEFINE(DISABLE_PAM)
66 AC_DEFINE(DISABLE_SHADOW)
67 AC_DEFINE(IPV4_DEFAULT)
68 AC_DEFINE(IP_TOS_IS_BROKEN)
69 AC_DEFINE(BROKEN_VHANGUP)
70 no_pam=1
71 no_libsocket=1
72 no_libnsl=1
73 ;;
Damien Miller76112de1999-12-21 11:18:08 +110074*-*-hpux10*)
75 if test -z "$GCC"; then
Damien Millerfda78d92000-05-20 15:33:44 +100076 CFLAGS="$CFLAGS -Ae"
Damien Miller76112de1999-12-21 11:18:08 +110077 fi
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +000078 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
Damien Miller9a947342000-08-30 10:03:33 +110079 IPADDR_IN_DISPLAY=yes
Damien Millerb0785672000-08-23 09:10:39 +100080 AC_DEFINE(USE_PIPES)
Damien Miller8a1e6a62000-09-16 15:55:52 +110081 AC_DEFINE(DISABLE_SHADOW)
Damien Millerd6f204d2000-09-23 13:57:27 +110082 AC_DEFINE(DISABLE_UTMP)
Kevin Steves8848b242000-10-18 13:11:44 +000083 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
Damien Miller8a1e6a62000-09-16 15:55:52 +110084 LIBS="$LIBS -lsec"
Damien Miller670a4b82000-01-22 13:53:11 +110085 MANTYPE='$(CATMAN)'
86 mansubdir=cat
Damien Miller76112de1999-12-21 11:18:08 +110087 ;;
Damien Miller1bead332000-04-30 00:47:29 +100088*-*-hpux11*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +000089 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
Damien Miller9a947342000-08-30 10:03:33 +110090 IPADDR_IN_DISPLAY=yes
Damien Miller82cf0ce2000-12-20 13:34:48 +110091 AC_DEFINE(PAM_SUN_CODEBASE)
Damien Miller5552d7a2000-08-30 09:53:24 +110092 AC_DEFINE(USE_PIPES)
Damien Miller8a1e6a62000-09-16 15:55:52 +110093 AC_DEFINE(DISABLE_SHADOW)
Damien Millerd6f204d2000-09-23 13:57:27 +110094 AC_DEFINE(DISABLE_UTMP)
Kevin Steves8848b242000-10-18 13:11:44 +000095 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
Damien Miller8a1e6a62000-09-16 15:55:52 +110096 LIBS="$LIBS -lsec"
Damien Miller1bead332000-04-30 00:47:29 +100097 MANTYPE='$(CATMAN)'
98 mansubdir=cat
99 ;;
Damien Millerbeb4ba51999-12-28 15:09:35 +1100100*-*-irix5*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000101 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller9e110892000-06-07 21:05:46 +1000102 LDFLAGS="$LDFLAGS"
Damien Miller190d5a82000-09-30 09:43:19 +1100103 PATH="$PATH:/usr/etc"
Damien Miller07278932000-01-22 14:05:37 +1100104 MANTYPE='$(CATMAN)'
Damien Miller1808f382000-01-06 12:03:12 +1100105 no_libsocket=1
106 no_libnsl=1
Damien Miller11fa2cc2000-08-16 10:35:58 +1000107 AC_DEFINE(BROKEN_INET_NTOA)
Damien Miller1808f382000-01-06 12:03:12 +1100108 ;;
109*-*-irix6*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000110 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller9e110892000-06-07 21:05:46 +1000111 LDFLAGS="$LDFLAGS"
Damien Miller190d5a82000-09-30 09:43:19 +1100112 PATH="$PATH:/usr/etc"
Damien Miller07278932000-01-22 14:05:37 +1100113 MANTYPE='$(CATMAN)'
Damien Miller91606b12000-06-28 08:22:29 +1000114 AC_DEFINE(WITH_IRIX_ARRAY)
115 AC_DEFINE(WITH_IRIX_PROJECT)
116 AC_DEFINE(WITH_IRIX_AUDIT)
Ben Lindstrom4a1d9162000-11-21 10:45:31 +0000117 AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)])
Damien Millerbeb4ba51999-12-28 15:09:35 +1100118 no_libsocket=1
119 no_libnsl=1
Damien Miller11fa2cc2000-08-16 10:35:58 +1000120 AC_DEFINE(BROKEN_INET_NTOA)
Ben Lindstrom75214f92000-12-01 21:19:51 +0000121 mansubdir=man
Damien Millerbeb4ba51999-12-28 15:09:35 +1100122 ;;
Damien Millerb29ea912000-01-15 14:12:03 +1100123*-*-linux*)
124 no_dev_ptmx=1
Damien Miller7bcb0892000-03-11 20:45:40 +1100125 AC_DEFINE(DONT_TRY_OTHER_AF)
Damien Miller4e997202000-07-09 21:21:52 +1000126 AC_DEFINE(PAM_TTY_KLUDGE)
Damien Miller7bcb0892000-03-11 20:45:40 +1100127 inet6_default_4in6=yes
Damien Millerb29ea912000-01-15 14:12:03 +1100128 ;;
Ben Lindstromb5628642000-10-18 00:02:25 +0000129mips-sony-bsd|mips-sony-newsos4)
130 AC_DEFINE(HAVE_NEWS4)
131 SONY=1
132 AC_CHECK_LIB(iberty, xatexit, AC_DEFINE(HAVE_XATEXIT),
133 AC_MSG_ERROR([*** libiberty missing - please install first ***])
134 )
135 ;;
Damien Milleree1c0b32000-01-21 00:18:15 +1100136*-*-netbsd*)
Damien Millera22ba012000-03-02 23:09:20 +1100137 need_dash_r=1
Damien Milleree1c0b32000-01-21 00:18:15 +1100138 ;;
Damien Miller0f91b4e2000-06-18 15:43:25 +1000139*-next-*)
Damien Miller0f91b4e2000-06-18 15:43:25 +1000140 conf_lastlog_location="/usr/adm/lastlog"
Damien Millere5192fa2000-08-29 14:30:37 +1100141 conf_utmp_location=/etc/utmp
142 conf_wtmp_location=/usr/adm/wtmp
143 MAIL=/usr/spool/mail
Damien Miller0f91b4e2000-06-18 15:43:25 +1000144 AC_DEFINE(HAVE_NEXT)
Ben Lindstromb4df15d2000-10-15 00:17:36 +0000145 AC_DEFINE(BROKEN_REALPATH)
Ben Lindstrom76020ba2000-10-25 16:55:00 +0000146 AC_DEFINE(USE_PIPES)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000147 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Ben Lindstrom321ae732000-12-31 15:00:23 +0000148 CFLAGS="$CFLAGS"
Damien Miller0f91b4e2000-06-18 15:43:25 +1000149 ;;
Damien Miller75b1d102000-01-07 14:01:41 +1100150*-*-solaris*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000151 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller08c788a2000-03-16 07:52:29 +1100152 LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib -L/usr/ucblib -R/usr/ucblib"
Damien Millera22ba012000-03-02 23:09:20 +1100153 need_dash_r=1
Damien Miller82cf0ce2000-12-20 13:34:48 +1100154 AC_DEFINE(PAM_SUN_CODEBASE)
andre2ff7b5d2000-06-03 14:57:40 +0000155 # hardwire lastlog location (can't detect it on some versions)
156 conf_lastlog_location="/var/adm/lastlog"
Damien Millera1cb6442000-06-09 11:58:35 +1000157 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
158 sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'`
159 if test "$sol2ver" -ge 8; then
160 AC_MSG_RESULT(yes)
161 AC_DEFINE(DISABLE_UTMP)
162 AC_DEFINE(DISABLE_WTMP)
163 else
164 AC_MSG_RESULT(no)
165 fi
Damien Miller75b1d102000-01-07 14:01:41 +1100166 ;;
Damien Millerdfc83f42000-05-20 15:02:59 +1000167*-*-sunos4*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000168 CPPFLAGS="$CPPFLAGS -DSUNOS4"
Damien Millerdfc83f42000-05-20 15:02:59 +1000169 AC_CHECK_FUNCS(getpwanam)
Damien Miller82cf0ce2000-12-20 13:34:48 +1100170 AC_DEFINE(PAM_SUN_CODEBASE)
Damien Miller36ccb5c2000-08-09 16:34:27 +1000171 conf_utmp_location=/etc/utmp
172 conf_wtmp_location=/var/adm/wtmp
173 conf_lastlog_location=/var/adm/lastlog
Damien Millerb0785672000-08-23 09:10:39 +1000174 AC_DEFINE(USE_PIPES)
Damien Miller36ccb5c2000-08-09 16:34:27 +1000175 MANTYPE='$(CATMAN)'
176 mansubdir=cat
Damien Millerdfc83f42000-05-20 15:02:59 +1000177 ;;
Damien Miller2ae714f2000-07-11 09:29:50 +1000178*-sni-sysv*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000179 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller2ae714f2000-07-11 09:29:50 +1000180 LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/ucblib"
181 MANTYPE='$(CATMAN)'
182 AC_DEFINE(IP_TOS_IS_BROKEN)
183 mansubdir=cat
Damien Millerb2dc28e2000-07-12 09:18:33 +1000184 LIBS="$LIBS -lgen -lnsl -lucb"
Damien Miller2ae714f2000-07-11 09:29:50 +1000185 ;;
Damien Miller78315eb2000-09-29 23:01:36 +1100186*-*-sysv4.2*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000187 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller78315eb2000-09-29 23:01:36 +1100188 LDFLAGS="$LDFLAGS -L/usr/local/lib"
189 MANTYPE='$(CATMAN)'
190 mansubdir=cat
Damien Miller78315eb2000-09-29 23:01:36 +1100191 enable_suid_ssh=no
192 ;;
193*-*-sysv5*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000194 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Miller78315eb2000-09-29 23:01:36 +1100195 LDFLAGS="$LDFLAGS -L/usr/local/lib"
196 MANTYPE='$(CATMAN)'
197 mansubdir=cat
Damien Miller78315eb2000-09-29 23:01:36 +1100198 enable_suid_ssh=no
199 ;;
Damien Miller75b1d102000-01-07 14:01:41 +1100200*-*-sysv*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000201 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Millerdb819592000-03-14 13:44:01 +1100202 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Damien Miller0e1cf7c2000-01-26 12:15:30 +1100203 MANTYPE='$(CATMAN)'
204 mansubdir=cat
Damien Miller75b1d102000-01-07 14:01:41 +1100205 LIBS="$LIBS -lgen -lsocket"
206 ;;
Damien Miller78315eb2000-09-29 23:01:36 +1100207*-*-sco3.2v4*)
Damien Miller238a9fa2000-08-31 09:20:05 +1100208 AC_DEFINE(USE_PIPES)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000209 CPPFLAGS="$CPPFLAGS -Dftruncate=chsize -I/usr/local/include"
Damien Miller78315eb2000-09-29 23:01:36 +1100210 LDFLAGS="$LDFLAGS -L/usr/local/lib"
211 MANTYPE='$(CATMAN)'
212 mansubdir=cat
Ben Lindstrom980754c2000-11-12 00:04:24 +0000213 LIBS="$LIBS -lgen -lsocket -los -lprot -lx -ltinfo -lm"
Damien Miller78315eb2000-09-29 23:01:36 +1100214 no_dev_ptmx=1
215 RANLIB=true
216 AC_DEFINE(BROKEN_SYS_TERMIO_H)
217 rsh_path="/usr/bin/rcmd"
218 AC_DEFINE(HAVE_SCO_PROTECTED_PW)
Ben Lindstrom980754c2000-11-12 00:04:24 +0000219 AC_DEFINE(DISABLE_SHADOW)
Ben Lindstrom3ad650a2001-01-03 06:02:51 +0000220 AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
Damien Miller78315eb2000-09-29 23:01:36 +1100221 ;;
222*-*-sco3.2v5*)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000223 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
Damien Millera66626b2000-06-13 18:57:53 +1000224 LDFLAGS="$LDFLAGS -L/usr/local/lib"
225 MANTYPE='$(CATMAN)'
226 mansubdir=cat
Ben Lindstrom3ad650a2001-01-03 06:02:51 +0000227 LIBS="$LIBS -lprot -lx -ltinfo -lm"
Damien Millera66626b2000-06-13 18:57:53 +1000228 no_dev_ptmx=1
Damien Miller78315eb2000-09-29 23:01:36 +1100229 rsh_path="/usr/bin/rcmd"
230 AC_DEFINE(HAVE_SCO_PROTECTED_PW)
Ben Lindstrom980754c2000-11-12 00:04:24 +0000231 AC_DEFINE(DISABLE_SHADOW)
Ben Lindstrom42717bf2000-12-28 15:46:20 +0000232 AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
Damien Millera66626b2000-06-13 18:57:53 +1000233 ;;
Damien Millerb8c656e2000-06-28 15:22:41 +1000234*-dec-osf*)
235# This is untested
236 if test ! -z "USE_SIA" ; then
237 AC_MSG_CHECKING(for Digital Unix Security Integration Architecture)
238 if test -f /etc/sia/matrix.conf; then
239 AC_MSG_RESULT(yes)
240 AC_DEFINE(HAVE_OSF_SIA)
241 AC_DEFINE(DISABLE_LOGIN)
242 LIBS="$LIBS -lsecurity -ldb -lm -laud"
243 else
244 AC_MSG_RESULT(no)
245 fi
246 fi
247 ;;
Damien Miller76112de1999-12-21 11:18:08 +1100248esac
249
Damien Millere37bfc12000-06-05 09:37:43 +1000250# Allow user to specify flags
251AC_ARG_WITH(cflags,
252 [ --with-cflags Specify additional flags to pass to compiler],
253 [
254 if test "x$withval" != "xno" ; then
255 CFLAGS="$CFLAGS $withval"
256 fi
257 ]
258)
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000259AC_ARG_WITH(cppflags,
260 [ --with-cppflags Specify additional flags to pass to preprocessor] ,
261 [
262 if test "x$withval" != "xno"; then
263 CPPFLAGS="$CPPFLAGS $withval"
264 fi
265 ]
266)
Damien Millere37bfc12000-06-05 09:37:43 +1000267AC_ARG_WITH(ldflags,
Ben Lindstrom2ed98182000-11-06 07:15:43 +0000268 [ --with-ldflags Specify additional flags to pass to linker],
Damien Millere37bfc12000-06-05 09:37:43 +1000269 [
270 if test "x$withval" != "xno" ; then
271 LDFLAGS="$LDFLAGS $withval"
272 fi
273 ]
274)
275AC_ARG_WITH(libs,
276 [ --with-libs Specify additional libraries to link with],
277 [
278 if test "x$withval" != "xno" ; then
279 LIBS="$LIBS $withval"
280 fi
281 ]
282)
283
284
Damien Millera22ba012000-03-02 23:09:20 +1100285# Checks for libraries.
Ben Lindstrom3ad650a2001-01-03 06:02:51 +0000286if test -z "$no_libsocket" ; then
287 AC_CHECK_LIB(nsl, yp_match, , )
288fi
289if test -z "$no_libnsl" ; then
290 AC_CHECK_LIB(socket, main, , )
291fi
292
293AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen")
Damien Millerab18c411999-11-11 10:40:23 +1100294AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***]))
295AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil")
Damien Miller6f9c3372000-10-25 10:06:04 +1100296
297AC_CHECK_FUNC(regcomp,
298 [],
299 [
300 AC_CHECK_LIB(pcre, pcre_info,
301 AC_DEFINE(HAVE_LIBPCRE) LIBS="$LIBS -lpcreposix -lpcre")
302 ]
303)
Damien Millerab18c411999-11-11 10:40:23 +1100304
Ben Lindstrom3ad650a2001-01-03 06:02:51 +0000305dnl UnixWare 2.x
306AC_CHECK_FUNC(strcasecmp,
307 [], [ AC_CHECK_LIB(resolv, strcasecmp, LIBS="$LIBS -lresolv") ]
308)
309AC_CHECK_FUNC(utimes,
310 [], [ AC_CHECK_LIB(c89, utimes, LIBS="$LIBS -lc89") ]
311)
Damien Millerab18c411999-11-11 10:40:23 +1100312
Damien Millera22ba012000-03-02 23:09:20 +1100313# Checks for header files.
Kevin Steves2c65ada2000-12-06 22:25:40 +0000314AC_CHECK_HEADERS(bstring.h endian.h floatingpoint.h getopt.h lastlog.h limits.h login.h login_cap.h maillock.h netdb.h netgroup.h netinet/in_systm.h paths.h poll.h pty.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/queue.h sys/select.h sys/stat.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h sys/un.h stddef.h time.h ttyent.h usersec.h util.h utmp.h utmpx.h vis.h)
Damien Millerab18c411999-11-11 10:40:23 +1100315
Damien Millerad833b32000-08-23 10:46:23 +1000316dnl Checks for library functions.
Ben Lindstrom2c467a22000-12-27 04:57:41 +0000317AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_af clock fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getnameinfo getrlimit getrusage getttyent inet_aton inet_ntoa innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty realpath rresvport_af setdtablesize setenv seteuid setlogin setproctitle setreuid setrlimit setsid sigaction sigvec snprintf strerror strlcat strlcpy strsep strtok_r sysconf vsnprintf vhangup vis waitpid _getpty __b64_ntop)
Damien Millerad833b32000-08-23 10:46:23 +1000318dnl Checks for time functions
andre2ff7b5d2000-06-03 14:57:40 +0000319AC_CHECK_FUNCS(gettimeofday time)
Damien Millerad833b32000-08-23 10:46:23 +1000320dnl Checks for libutil functions
Ben Lindstrome2fb8d32000-12-28 00:07:07 +0000321AC_CHECK_HEADERS(libutil.h)
andre2ff7b5d2000-06-03 14:57:40 +0000322AC_CHECK_FUNCS(login logout updwtmp logwtmp)
Damien Millerad833b32000-08-23 10:46:23 +1000323dnl Checks for utmp functions
Ben Lindstrom2c467a22000-12-27 04:57:41 +0000324AC_CHECK_FUNCS(endutent getutent getutid getutline pututline setutent)
andre2ff7b5d2000-06-03 14:57:40 +0000325AC_CHECK_FUNCS(utmpname)
Damien Millerad833b32000-08-23 10:46:23 +1000326dnl Checks for utmpx functions
Ben Lindstrom2c467a22000-12-27 04:57:41 +0000327AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline pututxline )
andre2ff7b5d2000-06-03 14:57:40 +0000328AC_CHECK_FUNCS(setutxent utmpxname)
Damien Millercedfecc1999-11-15 14:36:53 +1100329
Damien Miller5fc85652000-07-09 23:53:07 +1000330AC_CHECK_FUNC(getuserattr,
331 [AC_DEFINE(HAVE_GETUSERATTR)],
332 [AC_CHECK_LIB(s, getuserattr, [LIBS="$LIBS -ls"; AC_DEFINE(HAVE_GETUSERATTR)])]
333)
334
Damien Miller04f80141999-11-19 15:32:34 +1100335AC_CHECK_FUNC(login,
336 [AC_DEFINE(HAVE_LOGIN)],
337 [AC_CHECK_LIB(bsd, login, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_LOGIN)])]
338)
339
340AC_CHECK_FUNC(daemon,
341 [AC_DEFINE(HAVE_DAEMON)],
342 [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
343)
344
Damien Miller9fb07e42000-03-05 16:22:59 +1100345AC_CHECK_FUNC(getpagesize,
346 [AC_DEFINE(HAVE_GETPAGESIZE)],
347 [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])]
348)
349
Damien Millercb170cb2000-07-01 16:52:55 +1000350# Check for broken snprintf
351if test "x$ac_cv_func_snprintf" = "xyes" ; then
352 AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
353 AC_TRY_RUN(
354 [
355#include <stdio.h>
356int main(void){char b[5];snprintf(b,5,"123456789");return(b[4]!='\0');}
357 ],
358 [AC_MSG_RESULT(yes)],
359 [
360 AC_MSG_RESULT(no)
361 AC_DEFINE(BROKEN_SNPRINTF)
362 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
363 ]
364 )
365fi
366
Damien Miller606f8802000-09-16 15:39:56 +1100367AC_FUNC_GETPGRP
368
Damien Miller7b22d652000-06-18 14:07:04 +1000369PAM_MSG="no"
Damien Millera22ba012000-03-02 23:09:20 +1100370AC_ARG_WITH(pam,
371 [ --without-pam Disable PAM support ],
372 [
373 if test "x$withval" = "xno" ; then
374 no_pam=1
375 AC_DEFINE(DISABLE_PAM)
Damien Miller7b22d652000-06-18 14:07:04 +1000376 PAM_MSG="disabled"
Damien Millera22ba012000-03-02 23:09:20 +1100377 fi
378 ]
379)
Damien Milleredb82922000-06-20 13:25:52 +1000380if (test -z "$no_pam" && test "x$ac_cv_header_security_pam_appl_h" = "xyes") ; then
Damien Millera22ba012000-03-02 23:09:20 +1100381 AC_CHECK_LIB(dl, dlopen, , )
382 LIBS="$LIBS -lpam"
383
Damien Miller0e65eed2000-05-17 22:16:05 +1000384 AC_CHECK_FUNCS(pam_getenvlist)
Damien Miller1bead332000-04-30 00:47:29 +1000385
Damien Miller1f335fb2000-06-26 11:31:33 +1000386 disable_shadow=yes
387
Damien Miller7b22d652000-06-18 14:07:04 +1000388 PAM_MSG="yes"
389
Damien Millera22ba012000-03-02 23:09:20 +1100390 # Check PAM strerror arguments (old PAM)
391 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
392 AC_TRY_COMPILE(
393 [
Damien Miller81171112000-04-23 11:14:01 +1000394#include <stdlib.h>
395#include <security/pam_appl.h>
Damien Millera22ba012000-03-02 23:09:20 +1100396 ],
397 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
398 [AC_MSG_RESULT(no)],
399 [
400 AC_DEFINE(HAVE_OLD_PAM)
401 AC_MSG_RESULT(yes)
Damien Miller7b22d652000-06-18 14:07:04 +1000402 PAM_MSG="yes (old library)"
Damien Millera22ba012000-03-02 23:09:20 +1100403 ]
404 )
405fi
406
407# The big search for OpenSSL
408AC_ARG_WITH(ssl-dir,
409 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
410 [
Ben Lindstrom23e13712000-10-29 22:49:19 +0000411 if test "x$withval" != "xno" ; then
Damien Millera22ba012000-03-02 23:09:20 +1100412 tryssldir=$withval
413 fi
414 ]
415)
416
417saved_LIBS="$LIBS"
Damien Millera1ad4802000-03-15 10:04:54 +1100418saved_LDFLAGS="$LDFLAGS"
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000419saved_CPPFLAGS="$CPPFLAGS"
Damien Millera22ba012000-03-02 23:09:20 +1100420if test "x$prefix" != "xNONE" ; then
421 tryssldir="$tryssldir $prefix"
422fi
Damien Miller61e50f12000-05-08 20:49:37 +1000423AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [
Damien Millera22ba012000-03-02 23:09:20 +1100424
Damien Millera1b61e12000-09-16 17:02:16 +1100425 for ssldir in $tryssldir "" /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
Damien Miller61e50f12000-05-08 20:49:37 +1000426 if test ! -z "$ssldir" ; then
427 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000428 CPPFLAGS="$saved_CPPFLAGS -I$ssldir/include"
Damien Miller61e50f12000-05-08 20:49:37 +1000429 if test ! -z "$need_dash_r" ; then
430 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
431 fi
Damien Millera1ad4802000-03-15 10:04:54 +1100432 else
Damien Miller61e50f12000-05-08 20:49:37 +1000433 LDFLAGS="$saved_LDFLAGS"
Damien Millerb85dcad2000-03-11 11:37:00 +1100434 fi
435
Damien Miller3b512e12000-05-17 23:29:18 +1000436 LIBS="$saved_LIBS -lcrypto"
Damien Miller61e50f12000-05-08 20:49:37 +1000437
Damien Miller3b512e12000-05-17 23:29:18 +1000438 # Basic test to check for compatible version and correct linking
439 # *does not* test for RSA - that comes later.
440 AC_TRY_RUN(
441 [
Damien Millere59ce622000-05-01 20:54:17 +1000442#include <string.h>
443#include <openssl/rand.h>
Damien Miller81171112000-04-23 11:14:01 +1000444int main(void)
445{
Damien Miller3b512e12000-05-17 23:29:18 +1000446 char a[2048];
447 memset(a, 0, sizeof(a));
Damien Miller81171112000-04-23 11:14:01 +1000448 RAND_add(a, sizeof(a), sizeof(a));
Damien Miller3b512e12000-05-17 23:29:18 +1000449 return(RAND_status() <= 0);
Damien Miller81171112000-04-23 11:14:01 +1000450}
Damien Miller3b512e12000-05-17 23:29:18 +1000451 ],
452 [
453 found_crypto=1
454 break;
455 ], []
456 )
Damien Miller61e50f12000-05-08 20:49:37 +1000457
458 if test ! -z "$found_crypto" ; then
459 break;
460 fi
Damien Millerb85dcad2000-03-11 11:37:00 +1100461 done
462
Damien Miller61e50f12000-05-08 20:49:37 +1000463 if test -z "$found_crypto" ; then
464 AC_MSG_ERROR([Could not find working SSLeay / OpenSSL libraries, please install])
Damien Millerb85dcad2000-03-11 11:37:00 +1100465 fi
Damien Miller61e50f12000-05-08 20:49:37 +1000466 if test -z "$ssldir" ; then
467 ssldir="(system)"
468 fi
Damien Millera22ba012000-03-02 23:09:20 +1100469
Damien Miller61e50f12000-05-08 20:49:37 +1000470 ac_cv_openssldir=$ssldir
471])
472
Damien Milleredb82922000-06-20 13:25:52 +1000473if (test ! -z "$ac_cv_openssldir" && test "x$ac_cv_openssldir" != "x(system)") ; then
Damien Miller61e50f12000-05-08 20:49:37 +1000474 AC_DEFINE(HAVE_OPENSSL)
475 dnl Need to recover ssldir - test above runs in subshell
476 ssldir=$ac_cv_openssldir
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +0000477 CPPFLAGS="$saved_CPPFLAGS -I$ssldir/include"
Damien Millera1ad4802000-03-15 10:04:54 +1100478 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
479 if test ! -z "$need_dash_r" ; then
480 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
Damien Millera22ba012000-03-02 23:09:20 +1100481 fi
Damien Miller29ea30d2000-03-17 10:54:15 +1100482 if test ! -z "$blibpath" ; then
483 blibpath="$blibpath:$ssldir:$ssldir/lib"
484 fi
Damien Millera22ba012000-03-02 23:09:20 +1100485fi
Damien Miller3b512e12000-05-17 23:29:18 +1000486LIBS="$saved_LIBS -lcrypto"
Damien Miller61e50f12000-05-08 20:49:37 +1000487
Damien Miller3b512e12000-05-17 23:29:18 +1000488# Now test RSA support
489saved_LIBS="$LIBS"
490AC_MSG_CHECKING([for RSA support])
491for WANTS_RSAREF in "" 1 ; do
492 if test -z "$WANTS_RSAREF" ; then
493 LIBS="$saved_LIBS"
494 else
495 LIBS="$saved_LIBS -lRSAglue -lrsaref"
496 fi
497 AC_TRY_RUN([
498#include <string.h>
499#include <openssl/rand.h>
500#include <openssl/rsa.h>
501#include <openssl/bn.h>
502#include <openssl/sha.h>
503int main(void)
504{
505 int num; RSA *key; static unsigned char p_in[] = "blahblah";
506 unsigned char c[256], p[256];
507 memset(c, 0, sizeof(c)); RAND_add(c, sizeof(c), sizeof(c));
508 if ((key=RSA_generate_key(512, 3, NULL, NULL))==NULL) return(1);
509 num = RSA_public_encrypt(sizeof(p_in) - 1, p_in, c, key, RSA_PKCS1_PADDING);
510 return(-1 == RSA_private_decrypt(num, c, p, key, RSA_PKCS1_PADDING));
511}
512 ],
513 [
514 rsa_works=1
515 break;
516 ], [])
517done
518
519if test ! -z "$no_rsa" ; then
520 AC_MSG_RESULT(disabled)
Damien Miller7b22d652000-06-18 14:07:04 +1000521 RSA_MSG="disabled"
Damien Miller3b512e12000-05-17 23:29:18 +1000522else
523 if test -z "$rsa_works" ; then
524 AC_MSG_WARN([*** No RSA support found *** ])
Damien Miller7b22d652000-06-18 14:07:04 +1000525 RSA_MSG="no"
Damien Miller3b512e12000-05-17 23:29:18 +1000526 else
527 if test -z "$WANTS_RSAREF" ; then
528 AC_MSG_RESULT(yes)
Damien Miller7b22d652000-06-18 14:07:04 +1000529 RSA_MSG="yes"
Damien Miller3b512e12000-05-17 23:29:18 +1000530 else
Damien Miller7b22d652000-06-18 14:07:04 +1000531 RSA_MSG="yes (using RSAref)"
Damien Miller3b512e12000-05-17 23:29:18 +1000532 AC_MSG_RESULT(using RSAref)
533 LIBS="$saved_LIBS -lcrypto -lRSAglue -lrsaref"
534 fi
535 fi
536fi
Damien Millera22ba012000-03-02 23:09:20 +1100537
Ben Lindstromb5628642000-10-18 00:02:25 +0000538# Cheap hack to ensure NEWS-OS libraries are arranged right.
539if test ! -z "$SONY" ; then
540 LIBS="$LIBS -liberty";
541fi
542
Damien Millera22ba012000-03-02 23:09:20 +1100543# Checks for data types
Damien Millere0f45742000-01-18 09:12:06 +1100544AC_CHECK_SIZEOF(char, 1)
Damien Millerc6398ef1999-11-20 12:18:40 +1100545AC_CHECK_SIZEOF(short int, 2)
546AC_CHECK_SIZEOF(int, 4)
547AC_CHECK_SIZEOF(long int, 4)
548AC_CHECK_SIZEOF(long long int, 8)
549
Damien Millera22ba012000-03-02 23:09:20 +1100550# More checks for data types
Damien Millercaf6dd62000-08-29 11:33:50 +1100551AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
552 AC_TRY_COMPILE(
553 [ #include <sys/types.h> ],
554 [ u_int a; a = 1;],
555 [ ac_cv_have_u_int="yes" ],
556 [ ac_cv_have_u_int="no" ]
557 )
558])
559if test "x$ac_cv_have_u_int" = "xyes" ; then
560 AC_DEFINE(HAVE_U_INT)
561 have_u_int=1
562fi
563
Damien Miller61e50f12000-05-08 20:49:37 +1000564AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
565 AC_TRY_COMPILE(
566 [ #include <sys/types.h> ],
567 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
568 [ ac_cv_have_intxx_t="yes" ],
569 [ ac_cv_have_intxx_t="no" ]
570 )
571])
572if test "x$ac_cv_have_intxx_t" = "xyes" ; then
573 AC_DEFINE(HAVE_INTXX_T)
574 have_intxx_t=1
575fi
576
Damien Miller578783e2000-09-23 14:12:24 +1100577AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
578 AC_TRY_COMPILE(
579 [ #include <sys/types.h> ],
580 [ int64_t a; a = 1;],
581 [ ac_cv_have_int64_t="yes" ],
582 [ ac_cv_have_int64_t="no" ]
583 )
584])
585if test "x$ac_cv_have_int64_t" = "xyes" ; then
586 AC_DEFINE(HAVE_INT64_T)
587 have_int64_t=1
588fi
589
Damien Miller61e50f12000-05-08 20:49:37 +1000590AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
591 AC_TRY_COMPILE(
592 [ #include <sys/types.h> ],
593 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
594 [ ac_cv_have_u_intxx_t="yes" ],
595 [ ac_cv_have_u_intxx_t="no" ]
596 )
597])
598if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
599 AC_DEFINE(HAVE_U_INTXX_T)
600 have_u_intxx_t=1
601fi
Damien Millerc6398ef1999-11-20 12:18:40 +1100602
Damien Miller578783e2000-09-23 14:12:24 +1100603AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
604 AC_TRY_COMPILE(
605 [ #include <sys/types.h> ],
606 [ u_int64_t a; a = 1;],
607 [ ac_cv_have_u_int64_t="yes" ],
608 [ ac_cv_have_u_int64_t="no" ]
609 )
610])
611if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
612 AC_DEFINE(HAVE_U_INT64_T)
613 have_u_int64_t=1
614fi
615
Damien Milleredb82922000-06-20 13:25:52 +1000616if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
617 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
Damien Millerb29ea912000-01-15 14:12:03 +1100618then
619 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
620 AC_TRY_COMPILE(
Damien Miller61e50f12000-05-08 20:49:37 +1000621 [
622#include <sys/bitypes.h>
623 ],
Damien Millerb29ea912000-01-15 14:12:03 +1100624 [
Damien Miller70494d12000-04-03 15:57:06 +1000625 int8_t a; int16_t b; int32_t c;
626 u_int8_t e; u_int16_t f; u_int32_t g;
627 a = b = c = e = f = g = 1;
Damien Millerb29ea912000-01-15 14:12:03 +1100628 ],
629 [
630 AC_DEFINE(HAVE_U_INTXX_T)
631 AC_DEFINE(HAVE_INTXX_T)
632 AC_MSG_RESULT(yes)
633 ],
634 [AC_MSG_RESULT(no)]
635 )
636fi
637
Damien Millerd6121d22000-03-17 23:26:46 +1100638if test -z "$have_u_intxx_t" ; then
Damien Miller61e50f12000-05-08 20:49:37 +1000639 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
640 AC_TRY_COMPILE(
641 [
642#include <sys/types.h>
643 ],
644 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
645 [ ac_cv_have_uintxx_t="yes" ],
646 [ ac_cv_have_uintxx_t="no" ]
647 )
648 ])
649 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
650 AC_DEFINE(HAVE_UINTXX_T)
651 fi
Damien Millerd6121d22000-03-17 23:26:46 +1100652fi
Damien Millerc6398ef1999-11-20 12:18:40 +1100653
Damien Miller61e50f12000-05-08 20:49:37 +1000654AC_CACHE_CHECK([for socklen_t], ac_cv_have_socklen_t, [
655 AC_TRY_COMPILE(
656 [
Damien Miller81171112000-04-23 11:14:01 +1000657#include <sys/types.h>
658#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000659 ],
660 [socklen_t foo; foo = 1235;],
661 [ ac_cv_have_socklen_t="yes" ],
662 [ ac_cv_have_socklen_t="no" ]
663 )
664])
665if test "x$ac_cv_have_socklen_t" = "xyes" ; then
666 AC_DEFINE(HAVE_SOCKLEN_T)
667fi
Damien Miller74d0d4a1999-12-29 02:24:35 +1100668
Damien Miller61e50f12000-05-08 20:49:37 +1000669AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
670 AC_TRY_COMPILE(
671 [
672#include <sys/types.h>
673 ],
674 [ size_t foo; foo = 1235; ],
675 [ ac_cv_have_size_t="yes" ],
676 [ ac_cv_have_size_t="no" ]
677 )
678])
679if test "x$ac_cv_have_size_t" = "xyes" ; then
680 AC_DEFINE(HAVE_SIZE_T)
681fi
Damien Miller95058511999-12-29 10:36:45 +1100682
Damien Miller615f9392000-05-17 22:53:33 +1000683AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
684 AC_TRY_COMPILE(
685 [
686#include <sys/types.h>
687 ],
688 [ ssize_t foo; foo = 1235; ],
689 [ ac_cv_have_ssize_t="yes" ],
690 [ ac_cv_have_ssize_t="no" ]
691 )
692])
693if test "x$ac_cv_have_ssize_t" = "xyes" ; then
694 AC_DEFINE(HAVE_SSIZE_T)
695fi
696
Damien Millerb54b40e2000-06-23 08:23:34 +1000697AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
698 AC_TRY_COMPILE(
699 [
700#include <sys/types.h>
701#include <sys/socket.h>
702 ],
703 [ sa_family_t foo; foo = 1235; ],
704 [ ac_cv_have_sa_family_t="yes" ],
Damien Miller78315eb2000-09-29 23:01:36 +1100705 [ AC_TRY_COMPILE(
706 [
707#include <sys/types.h>
708#include <sys/socket.h>
709#include <netinet/in.h>
710 ],
711 [ sa_family_t foo; foo = 1235; ],
712 [ ac_cv_have_sa_family_t="yes" ],
713
Damien Millerb54b40e2000-06-23 08:23:34 +1000714 [ ac_cv_have_sa_family_t="no" ]
Damien Miller78315eb2000-09-29 23:01:36 +1100715 )]
Damien Millerb54b40e2000-06-23 08:23:34 +1000716 )
717])
718if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
719 AC_DEFINE(HAVE_SA_FAMILY_T)
720fi
721
Damien Miller0f91b4e2000-06-18 15:43:25 +1000722AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
723 AC_TRY_COMPILE(
724 [
725#include <sys/types.h>
726 ],
727 [ pid_t foo; foo = 1235; ],
728 [ ac_cv_have_pid_t="yes" ],
729 [ ac_cv_have_pid_t="no" ]
730 )
731])
732if test "x$ac_cv_have_pid_t" = "xyes" ; then
733 AC_DEFINE(HAVE_PID_T)
734fi
735
736AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
737 AC_TRY_COMPILE(
738 [
739#include <sys/types.h>
740 ],
741 [ mode_t foo; foo = 1235; ],
742 [ ac_cv_have_mode_t="yes" ],
743 [ ac_cv_have_mode_t="no" ]
744 )
745])
746if test "x$ac_cv_have_mode_t" = "xyes" ; then
747 AC_DEFINE(HAVE_MODE_T)
748fi
749
Damien Miller61e50f12000-05-08 20:49:37 +1000750
751AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
752 AC_TRY_COMPILE(
753 [
Damien Miller81171112000-04-23 11:14:01 +1000754#include <sys/types.h>
755#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000756 ],
757 [ struct sockaddr_storage s; ],
758 [ ac_cv_have_struct_sockaddr_storage="yes" ],
759 [ ac_cv_have_struct_sockaddr_storage="no" ]
760 )
761])
762if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
763 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)
764fi
Damien Miller34132e52000-01-14 15:45:46 +1100765
Damien Miller61e50f12000-05-08 20:49:37 +1000766AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
767 AC_TRY_COMPILE(
768 [
Damien Miller7b22d652000-06-18 14:07:04 +1000769#include <sys/types.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000770#include <netinet/in.h>
771 ],
772 [ struct sockaddr_in6 s; s.sin6_family = 0; ],
773 [ ac_cv_have_struct_sockaddr_in6="yes" ],
774 [ ac_cv_have_struct_sockaddr_in6="no" ]
775 )
776])
777if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
778 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)
779fi
Damien Miller34132e52000-01-14 15:45:46 +1100780
Damien Miller61e50f12000-05-08 20:49:37 +1000781AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
782 AC_TRY_COMPILE(
783 [
Damien Miller7b22d652000-06-18 14:07:04 +1000784#include <sys/types.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000785#include <netinet/in.h>
786 ],
787 [ struct in6_addr s; s.s6_addr[0] = 0; ],
788 [ ac_cv_have_struct_in6_addr="yes" ],
789 [ ac_cv_have_struct_in6_addr="no" ]
790 )
791])
792if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
793 AC_DEFINE(HAVE_STRUCT_IN6_ADDR)
794fi
Damien Miller34132e52000-01-14 15:45:46 +1100795
Damien Miller61e50f12000-05-08 20:49:37 +1000796AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
797 AC_TRY_COMPILE(
798 [
Damien Miller81171112000-04-23 11:14:01 +1000799#include <sys/types.h>
800#include <sys/socket.h>
801#include <netdb.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000802 ],
803 [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ],
804 [ ac_cv_have_struct_addrinfo="yes" ],
805 [ ac_cv_have_struct_addrinfo="no" ]
806 )
807])
808if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
809 AC_DEFINE(HAVE_STRUCT_ADDRINFO)
810fi
811
Ben Lindstrom3ad650a2001-01-03 06:02:51 +0000812# If we don't have int64_t then we can't compile sftp-server. So don't
813# even attempt to do it.
814if test "x$ac_cv_have_int64_t" = "xno" -a \
815 "x$ac_cv_sizeof_long_int" != "x8" -a \
816 "x$ac_cv_sizeof_long_long_int" = "x0" ; then
817 NO_SFTP='#'
818 AC_SUBST(NO_SFTP)
819fi
820
Damien Miller78315eb2000-09-29 23:01:36 +1100821dnl Checks for structure members
Damien Miller61e50f12000-05-08 20:49:37 +1000822OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
823OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX)
824OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX)
825OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP)
826OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP)
Damien Millerad1bc5f2000-05-20 14:53:09 +1000827OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX)
Damien Miller61e50f12000-05-08 20:49:37 +1000828OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP)
829OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP)
Damien Miller8e81ed32000-07-01 13:17:42 +1000830OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmpx.h, HAVE_ID_IN_UTMPX)
Damien Miller61e50f12000-05-08 20:49:37 +1000831OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP)
832OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX)
833OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP)
834OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX)
andre2ff7b5d2000-06-03 14:57:40 +0000835OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP)
836OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP)
837OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX)
838OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX)
Damien Miller78315eb2000-09-29 23:01:36 +1100839AC_STRUCT_ST_BLKSIZE
andre2ff7b5d2000-06-03 14:57:40 +0000840
Damien Miller942da032000-08-18 13:59:06 +1000841AC_CACHE_CHECK([for sun_len field in struct sockaddr_un],
842 ac_cv_have_sun_len_in_struct_sockaddr_un, [
843 AC_TRY_COMPILE(
844 [
845#include <sys/types.h>
846#include <sys/socket.h>
847 ],
848 [ struct sockaddr_un s; s.sun_len = 1; ],
849 [ ac_cv_have_sun_len_in_struct_sockaddr_un="yes" ],
850 [ ac_cv_have_sun_len_in_struct_sockaddr_un="no" ],
851 )
852])
853if test "x$ac_cv_have_sun_len_in_struct_sockaddr_un" = "xyes" ; then
854 AC_DEFINE(HAVE_SUN_LEN_IN_SOCKADDR_UN)
855fi
856
Damien Miller61e50f12000-05-08 20:49:37 +1000857AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
858 ac_cv_have_ss_family_in_struct_ss, [
859 AC_TRY_COMPILE(
860 [
Damien Miller81171112000-04-23 11:14:01 +1000861#include <sys/types.h>
862#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000863 ],
864 [ struct sockaddr_storage s; s.ss_family = 1; ],
865 [ ac_cv_have_ss_family_in_struct_ss="yes" ],
866 [ ac_cv_have_ss_family_in_struct_ss="no" ],
867 )
868])
869if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
870 AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
871fi
872
Damien Miller61e50f12000-05-08 20:49:37 +1000873AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
874 ac_cv_have___ss_family_in_struct_ss, [
875 AC_TRY_COMPILE(
876 [
Damien Miller81171112000-04-23 11:14:01 +1000877#include <sys/types.h>
878#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000879 ],
880 [ struct sockaddr_storage s; s.__ss_family = 1; ],
881 [ ac_cv_have___ss_family_in_struct_ss="yes" ],
882 [ ac_cv_have___ss_family_in_struct_ss="no" ]
883 )
884])
885if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
886 AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
887fi
Damien Millerbf1c9b21999-12-09 10:16:54 +1100888
Damien Millerad833b32000-08-23 10:46:23 +1000889AC_CACHE_CHECK([for pw_class field in struct passwd],
890 ac_cv_have_pw_class_in_struct_passwd, [
891 AC_TRY_COMPILE(
892 [
Damien Millerad833b32000-08-23 10:46:23 +1000893#include <pwd.h>
894 ],
Kevin Steves48b7cc02000-10-07 13:24:00 +0000895 [ struct passwd p; p.pw_class = 0; ],
Damien Millerad833b32000-08-23 10:46:23 +1000896 [ ac_cv_have_pw_class_in_struct_passwd="yes" ],
897 [ ac_cv_have_pw_class_in_struct_passwd="no" ]
898 )
899])
900if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
901 AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD)
902fi
903
Damien Miller61e50f12000-05-08 20:49:37 +1000904
905AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
906 AC_TRY_LINK([],
907 [ extern char *__progname; printf("%s", __progname); ],
908 [ ac_cv_libc_defines___progname="yes" ],
909 [ ac_cv_libc_defines___progname="no" ]
910 )
911])
912if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
913 AC_DEFINE(HAVE___PROGNAME)
914fi
915
Damien Millera22ba012000-03-02 23:09:20 +1100916
Damien Millerecbb26d2000-07-15 14:59:14 +1000917AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
918 AC_TRY_LINK([],
919 [ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);],
920 [ ac_cv_libc_defines_sys_errlist="yes" ],
921 [ ac_cv_libc_defines_sys_errlist="no" ]
922 )
923])
924if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
925 AC_DEFINE(HAVE_SYS_ERRLIST)
926fi
927
928
Damien Miller11fa2cc2000-08-16 10:35:58 +1000929AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [
930 AC_TRY_LINK([],
931 [ extern int sys_nerr; printf("%i", sys_nerr);],
932 [ ac_cv_libc_defines_sys_nerr="yes" ],
933 [ ac_cv_libc_defines_sys_nerr="no" ]
934 )
935])
936if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
937 AC_DEFINE(HAVE_SYS_NERR)
938fi
939
940
Damien Millera22ba012000-03-02 23:09:20 +1100941# Looking for programs, paths and files
942AC_ARG_WITH(rsh,
943 [ --with-rsh=PATH Specify path to remote shell program ],
944 [
Damien Millerb85dcad2000-03-11 11:37:00 +1100945 if test "x$withval" != "$no" ; then
Damien Miller90dcc052000-07-08 10:17:40 +1000946 rsh_path=$withval
Damien Millera22ba012000-03-02 23:09:20 +1100947 fi
948 ],
949 [
950 AC_PATH_PROG(rsh_path, rsh)
951 ]
952)
953
954AC_ARG_WITH(xauth,
955 [ --with-xauth=PATH Specify path to xauth program ],
956 [
Ben Lindstrom76020ba2000-10-25 16:55:00 +0000957 if test "x$withval" != "xno" ; then
Damien Miller7b22d652000-06-18 14:07:04 +1000958 xauth_path=$withval
Damien Millera22ba012000-03-02 23:09:20 +1100959 fi
960 ],
961 [
Damien Miller78315eb2000-09-29 23:01:36 +1100962 AC_PATH_PROG(xauth_path, xauth,,$PATH:/usr/X/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/openwin/bin)
Damien Milleredb82922000-06-20 13:25:52 +1000963 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
Damien Millera22ba012000-03-02 23:09:20 +1100964 xauth_path="/usr/openwin/bin/xauth"
965 fi
966 ]
967)
968
Damien Millera19cf472000-11-29 13:28:50 +1100969if test -z "$xauth_path" ; then
970 XAUTH_PATH="undefined"
971 AC_SUBST(XAUTH_PATH)
972else
Damien Millera22ba012000-03-02 23:09:20 +1100973 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
Damien Millera19cf472000-11-29 13:28:50 +1100974 XAUTH_PATH=$xauth_path
975 AC_SUBST(XAUTH_PATH)
Damien Millera22ba012000-03-02 23:09:20 +1100976fi
977if test ! -z "$rsh_path" ; then
978 AC_DEFINE_UNQUOTED(RSH_PATH, "$rsh_path")
979fi
980
981# Check for mail directory (last resort if we cannot get it from headers)
982if test ! -z "$MAIL" ; then
983 maildir=`dirname $MAIL`
984 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
985fi
986
Damien Millera22ba012000-03-02 23:09:20 +1100987if test -z "$no_dev_ptmx" ; then
Damien Miller204ad072000-03-02 23:56:12 +1100988 AC_CHECK_FILE("/dev/ptmx",
989 [
990 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
991 have_dev_ptmx=1
992 ]
993 )
Damien Millera22ba012000-03-02 23:09:20 +1100994fi
Damien Miller204ad072000-03-02 23:56:12 +1100995AC_CHECK_FILE("/dev/ptc",
996 [
997 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
998 have_dev_ptc=1
999 ]
1000)
1001
Damien Millera22ba012000-03-02 23:09:20 +11001002# Options from here on. Some of these are preset by platform above
1003
Damien Millera22ba012000-03-02 23:09:20 +11001004# Check for user-specified random device, otherwise check /dev/urandom
1005AC_ARG_WITH(random,
1006 [ --with-random=FILE read randomness from FILE (default=/dev/urandom)],
1007 [
Damien Miller040f3832000-04-03 14:50:43 +10001008 if test "x$withval" != "xno" ; then
1009 RANDOM_POOL="$withval";
1010 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
1011 fi
Damien Millera22ba012000-03-02 23:09:20 +11001012 ],
1013 [
1014 # Check for random device
1015 AC_CHECK_FILE("/dev/urandom",
1016 [
1017 RANDOM_POOL="/dev/urandom";
1018 AC_SUBST(RANDOM_POOL)
1019 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
1020 ]
1021 )
1022 ]
1023)
1024
1025# Check for EGD pool file
1026AC_ARG_WITH(egd-pool,
1027 [ --with-egd-pool=FILE read randomness from EGD pool FILE (default none)],
1028 [
Damien Miller040f3832000-04-03 14:50:43 +10001029 if test "x$withval" != "xno" ; then
1030 EGD_SOCKET="$withval";
1031 AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET")
1032 fi
Damien Millera22ba012000-03-02 23:09:20 +11001033 ]
1034)
1035
Damien Miller0437b332000-05-02 09:56:41 +10001036# detect pathnames for entropy gathering commands, if we need them
1037INSTALL_SSH_PRNG_CMDS=""
1038rm -f prng_commands
Damien Milleredb82922000-06-20 13:25:52 +10001039if (test -z "$RANDOM_POOL" && test -z "$EGD_SOCKET") ; then
Damien Miller11e37f62000-04-08 18:23:30 +10001040 # Use these commands to collect entropy
Damien Miller61e50f12000-05-08 20:49:37 +10001041 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
1042 OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
1043 OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
1044 OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
1045 OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
1046 OSSH_PATH_ENTROPY_PROG(PROG_W, w)
1047 OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
1048 OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
1049 OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
1050 OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
1051 OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
1052 OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
1053 OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
1054 OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
1055 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
Damien Miller0437b332000-05-02 09:56:41 +10001056
1057 INSTALL_SSH_PRNG_CMDS="yes"
Damien Miller11e37f62000-04-08 18:23:30 +10001058fi
Damien Miller0437b332000-05-02 09:56:41 +10001059AC_SUBST(INSTALL_SSH_PRNG_CMDS)
1060
Damien Miller11e37f62000-04-08 18:23:30 +10001061
Damien Miller670a4b82000-01-22 13:53:11 +11001062AC_ARG_WITH(catman,
1063 [ --with-catman=man|cat Install preformatted manpages[no]],
1064 [
1065 MANTYPE='$(CATMAN)'
1066 if test x"$withval" != x"yes" ; then
1067 mansubdir=$withval
1068 else
1069 mansubdir=cat
1070 fi
1071 ], [
1072 if test -z "$MANTYPE" ; then
1073 MANTYPE='$(TROFFMAN)'
1074 mansubdir=man
1075 fi
1076 ]
1077)
1078AC_SUBST(MANTYPE)
1079AC_SUBST(mansubdir)
Damien Miller8bdeee21999-12-30 15:50:54 +11001080
Damien Millera22ba012000-03-02 23:09:20 +11001081# Check whether user wants Kerberos support
Damien Miller7b22d652000-06-18 14:07:04 +10001082KRB4_MSG="no"
Damien Miller80297751999-11-19 13:03:25 +11001083AC_ARG_WITH(kerberos4,
Damien Miller105b7f02000-01-07 08:45:55 +11001084 [ --with-kerberos4=PATH Enable Kerberos 4 support],
Damien Miller80297751999-11-19 13:03:25 +11001085 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001086 if test "x$withval" != "xno" ; then
Damien Miller105b7f02000-01-07 08:45:55 +11001087
Ben Lindstrom23e13712000-10-29 22:49:19 +00001088 if test "x$withval" != "xyes" ; then
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +00001089 CPPFLAGS="$CPPFLAGS -I${withval}/include"
Damien Miller105b7f02000-01-07 08:45:55 +11001090 LDFLAGS="$LDFLAGS -L${withval}/lib"
Damien Miller29ea30d2000-03-17 10:54:15 +11001091 if test ! -z "$need_dash_r" ; then
1092 LDFLAGS="$LDFLAGS -R${withval}/lib"
1093 fi
1094 if test ! -z "$blibpath" ; then
1095 blibpath="$blibpath:${withval}/lib"
1096 fi
Damien Miller105b7f02000-01-07 08:45:55 +11001097 else
1098 if test -d /usr/include/kerberosIV ; then
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +00001099 CPPFLAGS="$CPPFLAGS -I/usr/include/kerberosIV"
Damien Miller105b7f02000-01-07 08:45:55 +11001100 fi
1101 fi
1102
1103 AC_CHECK_HEADERS(krb.h)
1104 AC_CHECK_LIB(krb, main)
1105 if test "$ac_cv_header_krb_h" != yes; then
1106 AC_MSG_WARN([Cannot find krb.h, build may fail])
1107 fi
1108 if test "$ac_cv_lib_krb_main" != yes; then
1109 AC_MSG_WARN([Cannot find libkrb, build may fail])
1110 fi
1111
Damien Millerc85f9b42000-01-29 10:20:21 +11001112 KLIBS="-lkrb -ldes"
Damien Miller105b7f02000-01-07 08:45:55 +11001113 AC_CHECK_LIB(resolv, dn_expand, , )
1114 KRB4=yes
Damien Miller7b22d652000-06-18 14:07:04 +10001115 KRB4_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +11001116 AC_DEFINE(KRB4)
Damien Miller8bdeee21999-12-30 15:50:54 +11001117 fi
Damien Miller80297751999-11-19 13:03:25 +11001118 ]
1119)
1120
Damien Millera22ba012000-03-02 23:09:20 +11001121# Check whether user wants AFS support
Damien Miller7b22d652000-06-18 14:07:04 +10001122AFS_MSG="no"
Damien Millerc6398ef1999-11-20 12:18:40 +11001123AC_ARG_WITH(afs,
Damien Miller105b7f02000-01-07 08:45:55 +11001124 [ --with-afs=PATH Enable AFS support],
Damien Miller80297751999-11-19 13:03:25 +11001125 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001126 if test "x$withval" != "xno" ; then
Damien Miller105b7f02000-01-07 08:45:55 +11001127
Ben Lindstrom76020ba2000-10-25 16:55:00 +00001128 if test "x$withval" != "xyes" ; then
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +00001129 CPPFLAGS="$CPPFLAGS -I${withval}/include"
Ben Lindstrom305fb002000-11-10 02:41:30 +00001130 LDFLAGS="$LDFLAGS -L${withval}/lib"
Damien Miller105b7f02000-01-07 08:45:55 +11001131 fi
1132
1133 if test -z "$KRB4" ; then
1134 AC_MSG_WARN([AFS requires Kerberos IV support, build may fail])
1135 fi
1136
Damien Miller8bdeee21999-12-30 15:50:54 +11001137 LIBS="$LIBS -lkafs"
Damien Miller105b7f02000-01-07 08:45:55 +11001138 if test ! -z "$AFS_LIBS" ; then
1139 LIBS="$LIBS $AFS_LIBS"
1140 fi
1141 AC_DEFINE(AFS)
Damien Miller7b22d652000-06-18 14:07:04 +10001142 AFS_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +11001143 fi
Damien Miller80297751999-11-19 13:03:25 +11001144 ]
1145)
Damien Millerc85f9b42000-01-29 10:20:21 +11001146LIBS="$LIBS $KLIBS"
Damien Miller80297751999-11-19 13:03:25 +11001147
Damien Millera22ba012000-03-02 23:09:20 +11001148# Check whether user wants S/Key support
Damien Miller7b22d652000-06-18 14:07:04 +10001149SKEY_MSG="no"
Damien Miller80297751999-11-19 13:03:25 +11001150AC_ARG_WITH(skey,
Ben Lindstrom305fb002000-11-10 02:41:30 +00001151 [ --with-skey=PATH Enable S/Key support],
Damien Miller80297751999-11-19 13:03:25 +11001152 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001153 if test "x$withval" != "xno" ; then
Ben Lindstrom305fb002000-11-10 02:41:30 +00001154
1155 if test "x$withval" != "xyes" ; then
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +00001156 CPPFLAGS="$CPPFLAGS -I${withval}/include"
Ben Lindstrom305fb002000-11-10 02:41:30 +00001157 LDFLAGS="$LDFLAGS -L${withval}/lib"
1158 fi
1159
Damien Miller8bdeee21999-12-30 15:50:54 +11001160 AC_DEFINE(SKEY)
1161 LIBS="$LIBS -lskey"
Damien Miller7b22d652000-06-18 14:07:04 +10001162 SKEY_MSG="yes"
Ben Lindstrom305fb002000-11-10 02:41:30 +00001163
1164 AC_CHECK_FUNC(skey_keyinfo,
1165 [],
1166 [
1167 AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
1168 ])
Damien Miller8bdeee21999-12-30 15:50:54 +11001169 fi
Damien Miller80297751999-11-19 13:03:25 +11001170 ]
1171)
1172
Damien Millera22ba012000-03-02 23:09:20 +11001173# Check whether user wants TCP wrappers support
Damien Miller7b22d652000-06-18 14:07:04 +10001174TCPW_MSG="no"
Damien Millerf7c0f821999-11-22 22:31:49 +11001175AC_ARG_WITH(tcp-wrappers,
Damien Miller80297751999-11-19 13:03:25 +11001176 [ --with-tcp-wrappers Enable tcpwrappers support],
1177 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001178 if test "x$withval" != "xno" ; then
Damien Miller65165f82000-03-05 17:02:45 +11001179 saved_LIBS="$LIBS"
Damien Miller105b7f02000-01-07 08:45:55 +11001180 LIBS="$LIBS -lwrap"
Damien Miller65165f82000-03-05 17:02:45 +11001181 AC_MSG_CHECKING(for libwrap)
1182 AC_TRY_LINK(
1183 [
Damien Miller81171112000-04-23 11:14:01 +10001184#include <tcpd.h>
Damien Miller65165f82000-03-05 17:02:45 +11001185 int deny_severity = 0, allow_severity = 0;
1186 ],
1187 [hosts_access(0);],
1188 [
1189 AC_MSG_RESULT(yes)
1190 AC_DEFINE(LIBWRAP)
Damien Miller7b22d652000-06-18 14:07:04 +10001191 TCPW_MSG="yes"
Damien Miller65165f82000-03-05 17:02:45 +11001192 ],
1193 [
Damien Miller7b22d652000-06-18 14:07:04 +10001194 AC_MSG_ERROR([*** libwrap missing])
Damien Miller65165f82000-03-05 17:02:45 +11001195 ]
1196 )
Damien Miller8bdeee21999-12-30 15:50:54 +11001197 fi
Damien Miller80297751999-11-19 13:03:25 +11001198 ]
1199)
1200
Damien Millera22ba012000-03-02 23:09:20 +11001201# Check whether to enable MD5 passwords
Damien Miller7b22d652000-06-18 14:07:04 +10001202MD5_MSG="no"
Damien Millerf7c0f821999-11-22 22:31:49 +11001203AC_ARG_WITH(md5-passwords,
Damien Millerdd1c7ba1999-11-19 15:53:20 +11001204 [ --with-md5-passwords Enable use of MD5 passwords],
Damien Miller8bdeee21999-12-30 15:50:54 +11001205 [
Damien Millerb85dcad2000-03-11 11:37:00 +11001206 if test "x$withval" != "xno" ; then
Damien Miller8bdeee21999-12-30 15:50:54 +11001207 AC_DEFINE(HAVE_MD5_PASSWORDS)
Damien Miller7b22d652000-06-18 14:07:04 +10001208 MD5_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +11001209 fi
1210 ]
Damien Millerdd1c7ba1999-11-19 15:53:20 +11001211)
1212
Damien Millera22ba012000-03-02 23:09:20 +11001213# Whether to disable shadow password support
Damien Miller76112de1999-12-21 11:18:08 +11001214AC_ARG_WITH(shadow,
1215 [ --without-shadow Disable shadow password support],
1216 [
1217 if test "x$withval" = "xno" ; then
1218 AC_DEFINE(DISABLE_SHADOW)
Damien Miller1f335fb2000-06-26 11:31:33 +10001219 disable_shadow=yes
Damien Miller76112de1999-12-21 11:18:08 +11001220 fi
1221 ]
1222)
1223
Damien Miller1f335fb2000-06-26 11:31:33 +10001224if test -z "$disable_shadow" ; then
1225 AC_MSG_CHECKING([if the systems has expire shadow information])
1226 AC_TRY_COMPILE(
1227 [
1228#include <sys/types.h>
1229#include <shadow.h>
1230 struct spwd sp;
1231 ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ],
1232 [ sp_expire_available=yes ], []
1233 )
1234
1235 if test "x$sp_expire_available" = "xyes" ; then
1236 AC_MSG_RESULT(yes)
1237 AC_DEFINE(HAS_SHADOW_EXPIRE)
1238 else
1239 AC_MSG_RESULT(no)
1240 fi
1241fi
1242
Damien Millera22ba012000-03-02 23:09:20 +11001243# Use ip address instead of hostname in $DISPLAY
Damien Miller9a947342000-08-30 10:03:33 +11001244if test ! -z "$IPADDR_IN_DISPLAY" ; then
1245 DISPLAY_HACK_MSG="yes"
1246 AC_DEFINE(IPADDR_IN_DISPLAY)
1247else
1248 DISPLAY_HACK_MSG="no"
1249 AC_ARG_WITH(ipaddr-display,
1250 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
1251 [
1252 if test "x$withval" != "xno" ; then
1253 AC_DEFINE(IPADDR_IN_DISPLAY)
1254 DISPLAY_HACK_MSG="yes"
1255 fi
1256 ]
1257 )
1258fi
Damien Miller76112de1999-12-21 11:18:08 +11001259
Damien Millera22ba012000-03-02 23:09:20 +11001260# Whether to mess with the default path
Damien Miller7b22d652000-06-18 14:07:04 +10001261SERVER_PATH_MSG="(default)"
Damien Millere7f626c1999-12-31 09:49:44 +11001262AC_ARG_WITH(default-path,
Damien Miller5a3e6831999-12-27 09:48:56 +11001263 [ --with-default-path=PATH Specify default \$PATH environment for server],
1264 [
1265 if test "x$withval" != "xno" ; then
Damien Millere68f92b2000-10-02 21:42:15 +11001266 AC_DEFINE_UNQUOTED(USER_PATH, "$withval")
Damien Miller7b22d652000-06-18 14:07:04 +10001267 SERVER_PATH_MSG="$withval"
Damien Miller5a3e6831999-12-27 09:48:56 +11001268 fi
1269 ]
1270)
1271
Damien Millera22ba012000-03-02 23:09:20 +11001272# Whether to force IPv4 by default (needed on broken glibc Linux)
Damien Miller7b22d652000-06-18 14:07:04 +10001273IPV4_HACK_MSG="no"
Damien Miller7d80e342000-01-19 14:36:49 +11001274AC_ARG_WITH(ipv4-default,
1275 [ --with-ipv4-default Use IPv4 by connections unless '-6' specified],
1276 [
1277 if test "x$withval" != "xno" ; then
1278 AC_DEFINE(IPV4_DEFAULT)
Damien Miller7b22d652000-06-18 14:07:04 +10001279 IPV4_HACK_MSG="yes"
Damien Miller7d80e342000-01-19 14:36:49 +11001280 fi
1281 ]
1282)
1283
Damien Miller61e50f12000-05-08 20:49:37 +10001284AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
Damien Miller7b22d652000-06-18 14:07:04 +10001285IPV4_IN6_HACK_MSG="no"
Damien Miller7bcb0892000-03-11 20:45:40 +11001286AC_ARG_WITH(4in6,
1287 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
1288 [
1289 if test "x$withval" != "xno" ; then
1290 AC_MSG_RESULT(yes)
1291 AC_DEFINE(IPV4_IN_IPV6)
Damien Miller7b22d652000-06-18 14:07:04 +10001292 IPV4_IN6_HACK_MSG="yes"
Damien Miller7bcb0892000-03-11 20:45:40 +11001293 else
1294 AC_MSG_RESULT(no)
1295 fi
1296 ],[
1297 if test "x$inet6_default_4in6" = "xyes"; then
1298 AC_MSG_RESULT([yes (default)])
1299 AC_DEFINE(IPV4_IN_IPV6)
Damien Miller7b22d652000-06-18 14:07:04 +10001300 IPV4_IN6_HACK_MSG="yes"
Damien Miller7bcb0892000-03-11 20:45:40 +11001301 else
1302 AC_MSG_RESULT([no (default)])
1303 fi
1304 ]
1305)
1306
Damien Miller78315eb2000-09-29 23:01:36 +11001307AC_MSG_CHECKING(whether to install ssh as suid root)
1308AC_ARG_ENABLE(suid-ssh,
1309[ --enable-suid-ssh Install ssh as suid root (default)
1310 --disable-suid-ssh Install ssh without suid bit],
1311[ case "$enableval" in
1312 no)
1313 AC_MSG_RESULT(no)
1314 SSHMODE=0711
1315 ;;
1316 *) AC_MSG_RESULT(yes)
1317 SSHMODE=04711
1318 ;;
1319 esac ],
1320 AC_MSG_RESULT(yes)
1321 SSHMODE=04711
1322)
1323AC_SUBST(SSHMODE)
1324
1325
Damien Millera22ba012000-03-02 23:09:20 +11001326# Where to place sshd.pid
Damien Millerb13c73e2000-01-17 22:02:17 +11001327piddir=/var/run
Damien Miller5eed6a22000-01-16 12:05:18 +11001328AC_ARG_WITH(pid-dir,
1329 [ --with-pid-dir=PATH Specify location of ssh.pid file],
1330 [
1331 if test "x$withval" != "xno" ; then
Damien Millerb13c73e2000-01-17 22:02:17 +11001332 piddir=$withval
Damien Miller5eed6a22000-01-16 12:05:18 +11001333 fi
1334 ]
1335)
Damien Miller4018c192000-04-30 09:30:44 +10001336
Damien Miller78315eb2000-09-29 23:01:36 +11001337# make sure the directory exists
1338if test ! -d $piddir ; then
1339 piddir=`eval echo ${sysconfdir}`
1340 case $piddir in
1341 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
1342 esac
1343fi
1344
Damien Millerdbd250f2000-01-18 08:57:14 +11001345AC_DEFINE_UNQUOTED(PIDDIR, "$piddir")
Damien Millerb13c73e2000-01-17 22:02:17 +11001346AC_SUBST(piddir)
Damien Miller5eed6a22000-01-16 12:05:18 +11001347
andre2ff7b5d2000-06-03 14:57:40 +00001348dnl allow user to disable some login recording features
1349AC_ARG_ENABLE(lastlog,
andre43ca7e22000-06-19 08:23:46 +00001350 [ --disable-lastlog disable use of lastlog even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001351 [ AC_DEFINE(DISABLE_LASTLOG) ]
1352)
1353AC_ARG_ENABLE(utmp,
andre43ca7e22000-06-19 08:23:46 +00001354 [ --disable-utmp disable use of utmp even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001355 [ AC_DEFINE(DISABLE_UTMP) ]
1356)
1357AC_ARG_ENABLE(utmpx,
andre43ca7e22000-06-19 08:23:46 +00001358 [ --disable-utmpx disable use of utmpx even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001359 [ AC_DEFINE(DISABLE_UTMPX) ]
1360)
1361AC_ARG_ENABLE(wtmp,
andre43ca7e22000-06-19 08:23:46 +00001362 [ --disable-wtmp disable use of wtmp even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001363 [ AC_DEFINE(DISABLE_WTMP) ]
1364)
1365AC_ARG_ENABLE(wtmpx,
andre43ca7e22000-06-19 08:23:46 +00001366 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001367 [ AC_DEFINE(DISABLE_WTMPX) ]
1368)
1369AC_ARG_ENABLE(libutil,
andre43ca7e22000-06-19 08:23:46 +00001370 [ --disable-libutil disable use of libutil (login() etc.) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001371 [ AC_DEFINE(DISABLE_LOGIN) ]
1372)
1373AC_ARG_ENABLE(pututline,
andre43ca7e22000-06-19 08:23:46 +00001374 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001375 [ AC_DEFINE(DISABLE_PUTUTLINE) ]
1376)
1377AC_ARG_ENABLE(pututxline,
andre43ca7e22000-06-19 08:23:46 +00001378 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001379 [ AC_DEFINE(DISABLE_PUTUTXLINE) ]
1380)
1381AC_ARG_WITH(lastlog,
andre43ca7e22000-06-19 08:23:46 +00001382 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
andre2ff7b5d2000-06-03 14:57:40 +00001383 [ conf_lastlog_location="$withval"; ],)
1384
1385dnl lastlog, [uw]tmpx? detection
1386dnl NOTE: set the paths in the platform section to avoid the
1387dnl need for command-line parameters
1388dnl lastlog and [uw]tmp are subject to a file search if all else fails
1389
1390dnl lastlog detection
1391dnl NOTE: the code itself will detect if lastlog is a directory
1392AC_MSG_CHECKING([if your system defines LASTLOG_FILE])
1393AC_TRY_COMPILE([
1394#include <sys/types.h>
1395#include <utmp.h>
1396#ifdef HAVE_LASTLOG_H
1397# include <lastlog.h>
1398#endif
Damien Miller2994e082000-06-04 15:51:47 +10001399#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001400# include <paths.h>
1401#endif
1402 ],
1403 [ char *lastlog = LASTLOG_FILE; ],
1404 [ AC_MSG_RESULT(yes) ],
Damien Miller2994e082000-06-04 15:51:47 +10001405 [
1406 AC_MSG_RESULT(no)
1407 AC_MSG_CHECKING([if your system defines _PATH_LASTLOG])
1408 AC_TRY_COMPILE([
1409#include <sys/types.h>
1410#include <utmp.h>
1411#ifdef HAVE_LASTLOG_H
1412# include <lastlog.h>
1413#endif
1414#ifdef HAVE_PATHS_H
1415# include <paths.h>
1416#endif
1417 ],
1418 [ char *lastlog = _PATH_LASTLOG; ],
1419 [ AC_MSG_RESULT(yes) ],
1420 [
andree441aa32000-06-12 22:34:38 +00001421 AC_MSG_RESULT(no)
Damien Miller2994e082000-06-04 15:51:47 +10001422 system_lastlog_path=no
1423 ])
1424 ]
andre2ff7b5d2000-06-03 14:57:40 +00001425)
Damien Miller2994e082000-06-04 15:51:47 +10001426
andre2ff7b5d2000-06-03 14:57:40 +00001427if test -z "$conf_lastlog_location"; then
1428 if test x"$system_lastlog_path" = x"no" ; then
1429 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
Damien Milleredb82922000-06-20 13:25:52 +10001430 if (test -d "$f" || test -f "$f") ; then
andre2ff7b5d2000-06-03 14:57:40 +00001431 conf_lastlog_location=$f
1432 fi
1433 done
1434 if test -z "$conf_lastlog_location"; then
andre45cad512000-06-12 23:27:31 +00001435 AC_MSG_WARN([** Cannot find lastlog **])
1436 dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx
andre2ff7b5d2000-06-03 14:57:40 +00001437 fi
1438 fi
1439fi
1440
1441if test -n "$conf_lastlog_location"; then
1442 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location")
1443fi
1444
1445dnl utmp detection
1446AC_MSG_CHECKING([if your system defines UTMP_FILE])
1447AC_TRY_COMPILE([
1448#include <sys/types.h>
1449#include <utmp.h>
Damien Miller2994e082000-06-04 15:51:47 +10001450#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001451# include <paths.h>
1452#endif
1453 ],
1454 [ char *utmp = UTMP_FILE; ],
1455 [ AC_MSG_RESULT(yes) ],
1456 [ AC_MSG_RESULT(no)
1457 system_utmp_path=no ]
1458)
1459if test -z "$conf_utmp_location"; then
1460 if test x"$system_utmp_path" = x"no" ; then
1461 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
1462 if test -f $f ; then
1463 conf_utmp_location=$f
1464 fi
1465 done
1466 if test -z "$conf_utmp_location"; then
1467 AC_DEFINE(DISABLE_UTMP)
1468 fi
1469 fi
1470fi
1471if test -n "$conf_utmp_location"; then
1472 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location")
1473fi
1474
1475dnl wtmp detection
1476AC_MSG_CHECKING([if your system defines WTMP_FILE])
1477AC_TRY_COMPILE([
1478#include <sys/types.h>
1479#include <utmp.h>
Damien Miller2994e082000-06-04 15:51:47 +10001480#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001481# include <paths.h>
1482#endif
1483 ],
1484 [ char *wtmp = WTMP_FILE; ],
1485 [ AC_MSG_RESULT(yes) ],
1486 [ AC_MSG_RESULT(no)
1487 system_wtmp_path=no ]
1488)
1489if test -z "$conf_wtmp_location"; then
1490 if test x"$system_wtmp_path" = x"no" ; then
1491 for f in /usr/adm/wtmp /var/log/wtmp; do
1492 if test -f $f ; then
1493 conf_wtmp_location=$f
1494 fi
1495 done
1496 if test -z "$conf_wtmp_location"; then
1497 AC_DEFINE(DISABLE_WTMP)
1498 fi
1499 fi
1500fi
1501if test -n "$conf_wtmp_location"; then
1502 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location")
1503fi
1504
1505
1506dnl utmpx detection - I don't know any system so perverse as to require
1507dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out
1508dnl there, though.
1509AC_MSG_CHECKING([if your system defines UTMPX_FILE])
1510AC_TRY_COMPILE([
1511#include <sys/types.h>
1512#include <utmp.h>
1513#ifdef HAVE_UTMPX_H
1514#include <utmpx.h>
1515#endif
Damien Miller2994e082000-06-04 15:51:47 +10001516#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001517# include <paths.h>
1518#endif
1519 ],
1520 [ char *utmpx = UTMPX_FILE; ],
1521 [ AC_MSG_RESULT(yes) ],
1522 [ AC_MSG_RESULT(no)
1523 system_utmpx_path=no ]
1524)
1525if test -z "$conf_utmpx_location"; then
1526 if test x"$system_utmpx_path" = x"no" ; then
1527 AC_DEFINE(DISABLE_UTMPX)
1528 fi
1529else
1530 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location")
1531fi
1532
1533dnl wtmpx detection
1534AC_MSG_CHECKING([if your system defines WTMPX_FILE])
1535AC_TRY_COMPILE([
1536#include <sys/types.h>
1537#include <utmp.h>
1538#ifdef HAVE_UTMPX_H
1539#include <utmpx.h>
1540#endif
Damien Miller2994e082000-06-04 15:51:47 +10001541#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001542# include <paths.h>
1543#endif
1544 ],
1545 [ char *wtmpx = WTMPX_FILE; ],
1546 [ AC_MSG_RESULT(yes) ],
1547 [ AC_MSG_RESULT(no)
1548 system_wtmpx_path=no ]
1549)
1550if test -z "$conf_wtmpx_location"; then
1551 if test x"$system_wtmpx_path" = x"no" ; then
1552 AC_DEFINE(DISABLE_WTMPX)
1553 fi
1554else
1555 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location")
1556fi
1557
Damien Miller4018c192000-04-30 09:30:44 +10001558
1559# Change default command timeout for builtin PRNG
Damien Miller14c12cb2000-06-07 22:20:23 +10001560entropy_timeout=200
Damien Miller4018c192000-04-30 09:30:44 +10001561AC_ARG_WITH(entropy-timeout,
1562 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)],
1563 [
1564 if test "x$withval" != "xno" ; then
1565 entropy_timeout=$withval
1566 fi
1567 ]
1568)
1569AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout)
1570
1571
Damien Miller29ea30d2000-03-17 10:54:15 +11001572if test ! -z "$blibpath" ; then
1573 LDFLAGS="$LDFLAGS -blibpath:$blibpath"
1574 AC_MSG_WARN([Please check and edit -blibpath in LDFLAGS in Makefile])
1575fi
1576
Damien Millerbac2d8a2000-09-05 16:13:06 +11001577AC_EXEEXT
1578
Damien Miller0437b332000-05-02 09:56:41 +10001579AC_OUTPUT(Makefile ssh_prng_cmds)
1580
Damien Miller7b22d652000-06-18 14:07:04 +10001581# Print summary of options
1582
1583if test x$MANTYPE = x'$(CATMAN)' ; then
1584 MAN_MSG=cat
1585else
1586 MAN_MSG=man
1587fi
1588if test ! -z "$RANDOM_POOL" ; then
1589 RAND_MSG="Device ($RANDOM_POOL)"
1590else
1591 if test ! -z "$EGD_SOCKET" ; then
1592 RAND_MSG="EGD ($EGD_SOCKET)"
1593 else
1594 RAND_MSG="Builtin (timeout $entropy_timeout)"
Damien Miller6f9c3372000-10-25 10:06:04 +11001595 BUILTIN_RNG=1
Damien Miller7b22d652000-06-18 14:07:04 +10001596 fi
1597fi
1598
1599# Someone please show me a better way :)
1600A=`eval echo ${prefix}` ; A=`eval echo ${A}`
1601B=`eval echo ${bindir}` ; B=`eval echo ${B}`
1602C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
1603D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
Kevin Stevese0f49142000-10-14 17:51:48 +00001604E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
Damien Miller7b22d652000-06-18 14:07:04 +10001605F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
1606G=`eval echo ${piddir}` ; G=`eval echo ${G}`
1607
1608echo ""
1609echo "OpenSSH configured has been configured with the following options."
1610echo " User binaries: $B"
Damien Millere68f92b2000-10-02 21:42:15 +11001611echo " User binaries: $B"
Damien Miller7b22d652000-06-18 14:07:04 +10001612echo " System binaries: $C"
1613echo " Configuration files: $D"
1614echo " Askpass program: $E"
1615echo " Manual pages: $F"
1616echo " PID file: $G"
1617echo " Random number collection: $RAND_MSG"
1618echo " Manpage format: $MAN_MSG"
1619echo " PAM support: ${PAM_MSG}"
1620echo " KerberosIV support: $KRB4_MSG"
1621echo " AFS support: $AFS_MSG"
1622echo " S/KEY support: $SKEY_MSG"
1623echo " TCP Wrappers support: $TCPW_MSG"
1624echo " MD5 password support: $MD5_MSG"
1625echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
1626echo " Use IPv4 by default hack: $IPV4_HACK_MSG"
1627echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
1628
1629echo ""
1630
Ben Lindstrom28bfc0d2000-12-18 19:58:57 +00001631echo " Host: ${host}"
1632echo " Compiler: ${CC}"
1633echo " Compiler flags: ${CFLAGS}"
1634echo "Preprocessor flags: ${CPPFLAGS}"
1635echo " Linker flags: ${LDFLAGS}"
1636echo " Libraries: ${LIBS}"
Damien Miller7b22d652000-06-18 14:07:04 +10001637
1638echo ""
1639
Damien Miller82cf0ce2000-12-20 13:34:48 +11001640if test "x$PAM_MSG" = "xyes" ; then
1641 echo "PAM is enabled. You may need to install a PAM control file for sshd,"
1642 echo "otherwise password authentication may fail. Example PAM control files"
1643 echo "can be found in the contrib/ subdirectory"
1644 echo ""
1645fi
1646
Damien Miller6f9c3372000-10-25 10:06:04 +11001647if test ! -z "$BUILTIN_RNG" ; then
1648 echo "WARNING: you are using the builtin random number collection service."
1649 echo "Please read WARNING.RNG and request that your OS vendor includes"
1650 echo "/dev/random in future versions of their OS."
1651 echo ""
1652fi
Ben Lindstrom3ad650a2001-01-03 06:02:51 +00001653
1654if test ! -z "$NO_SFTP"; then
1655 echo "sftp-server will be disabled. Your compiler does not support"
1656 echo "64bit integers."
1657 echo ""
1658fi