blob: dbc5a18ee92bcbc361a8158a74f58ad1ba552954 [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 Miller2e1b0821999-12-25 10:11:29 +110016
Damien Miller166bd442000-03-16 10:48:25 +110017if test -z "$LD" ; then
18 LD=$CC
19fi
20AC_SUBST(LD)
21
22# C Compiler features
23AC_C_INLINE
24if test "$GCC" = "yes"; then
25 CFLAGS="$CFLAGS -Wall"
26fi
27
Damien Millera22ba012000-03-02 23:09:20 +110028# Check for some target-specific stuff
Damien Miller76112de1999-12-21 11:18:08 +110029case "$host" in
Damien Miller75b1d102000-01-07 14:01:41 +110030*-*-aix*)
31 AFS_LIBS="-lld"
Damien Millerdb819592000-03-14 13:44:01 +110032 CFLAGS="$CFLAGS -I/usr/local/include"
33 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Damien Milleredb82922000-06-20 13:25:52 +100034 if (test "$LD" != "gcc" && test -z "$blibpath"); then
Damien Miller29ea30d2000-03-17 10:54:15 +110035 blibpath="/usr/lib:/lib:/usr/local/lib"
36 fi
Damien Millerd2c208a2000-05-17 22:00:02 +100037 AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)])
Damien Millereca71f82000-01-20 22:38:27 +110038 AC_DEFINE(BROKEN_GETADDRINFO)
andree441aa32000-06-12 22:34:38 +000039 MANTYPE='$(CATMAN)'
40 mansubdir=cat
andre60f3c982000-06-03 16:18:19 +000041 dnl AIX handles lastlog as part of its login message
42 AC_DEFINE(DISABLE_LASTLOG)
Damien Miller75b1d102000-01-07 14:01:41 +110043 ;;
Damien Miller76112de1999-12-21 11:18:08 +110044*-*-hpux10*)
45 if test -z "$GCC"; then
Damien Millerfda78d92000-05-20 15:33:44 +100046 CFLAGS="$CFLAGS -Ae"
Damien Miller76112de1999-12-21 11:18:08 +110047 fi
48 CFLAGS="$CFLAGS -D_HPUX_SOURCE"
49 AC_DEFINE(IPADDR_IN_DISPLAY)
50 AC_MSG_CHECKING(for HPUX trusted system password database)
51 if test -f /tcb/files/auth/system/default; then
52 AC_MSG_RESULT(yes)
53 AC_DEFINE(HAVE_HPUX_TRUSTED_SYSTEM_PW)
54 LIBS="$LIBS -lsec"
Damien Miller105b7f02000-01-07 08:45:55 +110055 AC_MSG_WARN([This configuration is untested])
Damien Miller76112de1999-12-21 11:18:08 +110056 else
57 AC_MSG_RESULT(no)
58 AC_DEFINE(DISABLE_SHADOW)
59 fi
Damien Miller670a4b82000-01-22 13:53:11 +110060 MANTYPE='$(CATMAN)'
61 mansubdir=cat
Damien Miller76112de1999-12-21 11:18:08 +110062 ;;
Damien Miller1bead332000-04-30 00:47:29 +100063*-*-hpux11*)
64 if test -z "$GCC"; then
65 CFLAGS="$CFLAGS -Ae"
66 fi
67 CFLAGS="$CFLAGS -D_HPUX_SOURCE"
Damien Miller1bead332000-04-30 00:47:29 +100068 AC_DEFINE(IPADDR_IN_DISPLAY)
Damien Miller1bead332000-04-30 00:47:29 +100069 AC_MSG_CHECKING(for HPUX trusted system password database)
70 if test -f /tcb/files/auth/system/default; then
71 AC_MSG_RESULT(yes)
72 AC_DEFINE(HAVE_HPUX_TRUSTED_SYSTEM_PW)
73 LIBS="$LIBS -lsec"
74 AC_MSG_WARN([This configuration is untested])
75 else
76 AC_MSG_RESULT(no)
77 AC_DEFINE(DISABLE_SHADOW)
78 fi
79 MANTYPE='$(CATMAN)'
80 mansubdir=cat
81 ;;
Damien Millerbeb4ba51999-12-28 15:09:35 +110082*-*-irix5*)
Damien Millerdb819592000-03-14 13:44:01 +110083 CFLAGS="$CFLAGS -I/usr/local/include"
Damien Miller9e110892000-06-07 21:05:46 +100084 LDFLAGS="$LDFLAGS"
Damien Miller07278932000-01-22 14:05:37 +110085 MANTYPE='$(CATMAN)'
Damien Miller1808f382000-01-06 12:03:12 +110086 no_libsocket=1
87 no_libnsl=1
88 ;;
89*-*-irix6*)
Damien Millerdb819592000-03-14 13:44:01 +110090 CFLAGS="$CFLAGS -I/usr/local/include"
Damien Miller9e110892000-06-07 21:05:46 +100091 LDFLAGS="$LDFLAGS"
Damien Miller07278932000-01-22 14:05:37 +110092 MANTYPE='$(CATMAN)'
Damien Miller91606b12000-06-28 08:22:29 +100093 AC_DEFINE(WITH_IRIX_ARRAY)
94 AC_DEFINE(WITH_IRIX_PROJECT)
95 AC_DEFINE(WITH_IRIX_AUDIT)
Damien Millerbeb4ba51999-12-28 15:09:35 +110096 no_libsocket=1
97 no_libnsl=1
98 ;;
Damien Millerb29ea912000-01-15 14:12:03 +110099*-*-linux*)
100 no_dev_ptmx=1
Damien Miller7bcb0892000-03-11 20:45:40 +1100101 AC_DEFINE(DONT_TRY_OTHER_AF)
102 inet6_default_4in6=yes
Damien Millerb29ea912000-01-15 14:12:03 +1100103 ;;
Damien Milleree1c0b32000-01-21 00:18:15 +1100104*-*-netbsd*)
Damien Millera22ba012000-03-02 23:09:20 +1100105 need_dash_r=1
Damien Milleree1c0b32000-01-21 00:18:15 +1100106 ;;
Damien Miller0f91b4e2000-06-18 15:43:25 +1000107*-next-*)
108 # hardwire lastlog location (can't detect it on some versions)
109 conf_lastlog_location="/usr/adm/lastlog"
110 AC_DEFINE(HAVE_NEXT)
111 CFLAGS="$CFLAGS -I/usr/local/include"
112 MAIL=/usr/spool/mail
113 conf_utmp_location=/etc/utmp
114 AC_MSG_WARN([*** Tested: PA-RISC/m68k Untested: Sparc/Intel])
115 AC_MSG_WARN([*** Expect 'scp' to fail!])
116 AC_MSG_WARN([*** Please report any problems, thanks])
117 ;;
Damien Miller75b1d102000-01-07 14:01:41 +1100118*-*-solaris*)
Damien Millerdb819592000-03-14 13:44:01 +1100119 CFLAGS="$CFLAGS -I/usr/local/include"
Damien Miller08c788a2000-03-16 07:52:29 +1100120 LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib -L/usr/ucblib -R/usr/ucblib"
Damien Millera22ba012000-03-02 23:09:20 +1100121 need_dash_r=1
andre2ff7b5d2000-06-03 14:57:40 +0000122 # hardwire lastlog location (can't detect it on some versions)
123 conf_lastlog_location="/var/adm/lastlog"
Damien Millera1cb6442000-06-09 11:58:35 +1000124 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
125 sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'`
126 if test "$sol2ver" -ge 8; then
127 AC_MSG_RESULT(yes)
128 AC_DEFINE(DISABLE_UTMP)
129 AC_DEFINE(DISABLE_WTMP)
130 else
131 AC_MSG_RESULT(no)
132 fi
Damien Miller75b1d102000-01-07 14:01:41 +1100133 ;;
Damien Millerdfc83f42000-05-20 15:02:59 +1000134*-*-sunos4*)
135 CFLAGS="$CFLAGS -DSUNOS4"
136 AC_CHECK_FUNCS(getpwanam)
137 ;;
Damien Miller75b1d102000-01-07 14:01:41 +1100138*-*-sysv*)
Damien Millerdb819592000-03-14 13:44:01 +1100139 CFLAGS="$CFLAGS -I/usr/local/include"
140 LDFLAGS="$LDFLAGS -L/usr/local/lib"
Damien Miller0e1cf7c2000-01-26 12:15:30 +1100141 MANTYPE='$(CATMAN)'
142 mansubdir=cat
Damien Miller75b1d102000-01-07 14:01:41 +1100143 LIBS="$LIBS -lgen -lsocket"
144 ;;
Damien Millera66626b2000-06-13 18:57:53 +1000145*-*-sco3*)
146 CFLAGS="$CFLAGS -I/usr/local/include"
147 LDFLAGS="$LDFLAGS -L/usr/local/lib"
148 MANTYPE='$(CATMAN)'
149 mansubdir=cat
150 LIBS="$LIBS -lgen -lsocket"
151 no_dev_ptmx=1
152 ;;
Damien Millerb8c656e2000-06-28 15:22:41 +1000153*-dec-osf*)
154# This is untested
155 if test ! -z "USE_SIA" ; then
156 AC_MSG_CHECKING(for Digital Unix Security Integration Architecture)
157 if test -f /etc/sia/matrix.conf; then
158 AC_MSG_RESULT(yes)
159 AC_DEFINE(HAVE_OSF_SIA)
160 AC_DEFINE(DISABLE_LOGIN)
161 LIBS="$LIBS -lsecurity -ldb -lm -laud"
162 else
163 AC_MSG_RESULT(no)
164 fi
165 fi
166 ;;
Damien Miller76112de1999-12-21 11:18:08 +1100167esac
168
Damien Millere37bfc12000-06-05 09:37:43 +1000169# Allow user to specify flags
170AC_ARG_WITH(cflags,
171 [ --with-cflags Specify additional flags to pass to compiler],
172 [
173 if test "x$withval" != "xno" ; then
174 CFLAGS="$CFLAGS $withval"
175 fi
176 ]
177)
178AC_ARG_WITH(ldflags,
179 [ --with-ldlags Specify additional flags to pass to linker],
180 [
181 if test "x$withval" != "xno" ; then
182 LDFLAGS="$LDFLAGS $withval"
183 fi
184 ]
185)
186AC_ARG_WITH(libs,
187 [ --with-libs Specify additional libraries to link with],
188 [
189 if test "x$withval" != "xno" ; then
190 LIBS="$LIBS $withval"
191 fi
192 ]
193)
194
195
Damien Millera22ba012000-03-02 23:09:20 +1100196# Checks for libraries.
Damien Millerab18c411999-11-11 10:40:23 +1100197AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***]))
198AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil")
Damien Millerab18c411999-11-11 10:40:23 +1100199
Damien Millerbeb4ba51999-12-28 15:09:35 +1100200if test -z "$no_libsocket" ; then
201 AC_CHECK_LIB(nsl, yp_match, , )
202fi
203if test -z "$no_libnsl" ; then
204 AC_CHECK_LIB(socket, main, , )
Damien Miller32b3cf21999-12-26 10:21:48 +1100205fi
Damien Millerab18c411999-11-11 10:40:23 +1100206
Damien Millera22ba012000-03-02 23:09:20 +1100207# Checks for header files.
Damien Miller0f91b4e2000-06-18 15:43:25 +1000208AC_CHECK_HEADERS(bstring.h endian.h lastlog.h limits.h login.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/select.h sys/stat.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h stddef.h time.h util.h utmp.h utmpx.h)
Damien Millerab18c411999-11-11 10:40:23 +1100209
Damien Millera22ba012000-03-02 23:09:20 +1100210# Checks for library functions.
andre2ff7b5d2000-06-03 14:57:40 +0000211AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_af clock freeaddrinfo gai_strerror getaddrinfo getnameinfo getrusage innetgr md5_crypt memmove mkdtemp on_exit openpty rresvport_af setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy vsnprintf vhangup _getpty __b64_ntop)
212dnl checks for time functions
213AC_CHECK_FUNCS(gettimeofday time)
214dnl checks for libutil functions
215AC_CHECK_FUNCS(login logout updwtmp logwtmp)
216dnl checks for utmp functions
217AC_CHECK_FUNCS(entutent getutent getutid getutline pututline setutent)
218AC_CHECK_FUNCS(utmpname)
219dnl checks for utmpx functions
220AC_CHECK_FUNCS(entutxent getutxent getutxid getutxline pututxline )
221AC_CHECK_FUNCS(setutxent utmpxname)
Damien Millercedfecc1999-11-15 14:36:53 +1100222
Damien Miller04f80141999-11-19 15:32:34 +1100223AC_CHECK_FUNC(login,
224 [AC_DEFINE(HAVE_LOGIN)],
225 [AC_CHECK_LIB(bsd, login, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_LOGIN)])]
226)
227
228AC_CHECK_FUNC(daemon,
229 [AC_DEFINE(HAVE_DAEMON)],
230 [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
231)
232
Damien Miller9fb07e42000-03-05 16:22:59 +1100233AC_CHECK_FUNC(getpagesize,
234 [AC_DEFINE(HAVE_GETPAGESIZE)],
235 [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])]
236)
237
Damien Millercb170cb2000-07-01 16:52:55 +1000238# Check for broken snprintf
239if test "x$ac_cv_func_snprintf" = "xyes" ; then
240 AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
241 AC_TRY_RUN(
242 [
243#include <stdio.h>
244int main(void){char b[5];snprintf(b,5,"123456789");return(b[4]!='\0');}
245 ],
246 [AC_MSG_RESULT(yes)],
247 [
248 AC_MSG_RESULT(no)
249 AC_DEFINE(BROKEN_SNPRINTF)
250 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
251 ]
252 )
253fi
254
Damien Miller7b22d652000-06-18 14:07:04 +1000255PAM_MSG="no"
Damien Millera22ba012000-03-02 23:09:20 +1100256AC_ARG_WITH(pam,
257 [ --without-pam Disable PAM support ],
258 [
259 if test "x$withval" = "xno" ; then
260 no_pam=1
261 AC_DEFINE(DISABLE_PAM)
Damien Miller7b22d652000-06-18 14:07:04 +1000262 PAM_MSG="disabled"
Damien Millera22ba012000-03-02 23:09:20 +1100263 fi
264 ]
265)
Damien Milleredb82922000-06-20 13:25:52 +1000266if (test -z "$no_pam" && test "x$ac_cv_header_security_pam_appl_h" = "xyes") ; then
Damien Millera22ba012000-03-02 23:09:20 +1100267 AC_CHECK_LIB(dl, dlopen, , )
268 LIBS="$LIBS -lpam"
269
Damien Miller0e65eed2000-05-17 22:16:05 +1000270 AC_CHECK_FUNCS(pam_getenvlist)
Damien Miller1bead332000-04-30 00:47:29 +1000271
Damien Miller1f335fb2000-06-26 11:31:33 +1000272 disable_shadow=yes
273
Damien Miller7b22d652000-06-18 14:07:04 +1000274 PAM_MSG="yes"
275
Damien Millera22ba012000-03-02 23:09:20 +1100276 # Check PAM strerror arguments (old PAM)
277 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
278 AC_TRY_COMPILE(
279 [
Damien Miller81171112000-04-23 11:14:01 +1000280#include <stdlib.h>
281#include <security/pam_appl.h>
Damien Millera22ba012000-03-02 23:09:20 +1100282 ],
283 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
284 [AC_MSG_RESULT(no)],
285 [
286 AC_DEFINE(HAVE_OLD_PAM)
287 AC_MSG_RESULT(yes)
Damien Miller7b22d652000-06-18 14:07:04 +1000288 PAM_MSG="yes (old library)"
Damien Millera22ba012000-03-02 23:09:20 +1100289 ]
290 )
291fi
292
293# The big search for OpenSSL
294AC_ARG_WITH(ssl-dir,
295 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
296 [
297 if test "x$withval" != "$xno" ; then
298 tryssldir=$withval
299 fi
300 ]
301)
302
303saved_LIBS="$LIBS"
Damien Millera1ad4802000-03-15 10:04:54 +1100304saved_LDFLAGS="$LDFLAGS"
Damien Millera22ba012000-03-02 23:09:20 +1100305saved_CFLAGS="$CFLAGS"
306if test "x$prefix" != "xNONE" ; then
307 tryssldir="$tryssldir $prefix"
308fi
Damien Miller61e50f12000-05-08 20:49:37 +1000309AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [
Damien Millera22ba012000-03-02 23:09:20 +1100310
Damien Miller61e50f12000-05-08 20:49:37 +1000311 for ssldir in "" $tryssldir /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
312 if test ! -z "$ssldir" ; then
313 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
314 CFLAGS="$saved_CFLAGS -I$ssldir/include"
315 if test ! -z "$need_dash_r" ; then
316 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
317 fi
Damien Millera1ad4802000-03-15 10:04:54 +1100318 else
Damien Miller61e50f12000-05-08 20:49:37 +1000319 LDFLAGS="$saved_LDFLAGS"
Damien Millerb85dcad2000-03-11 11:37:00 +1100320 fi
321
Damien Miller3b512e12000-05-17 23:29:18 +1000322 LIBS="$saved_LIBS -lcrypto"
Damien Miller61e50f12000-05-08 20:49:37 +1000323
Damien Miller3b512e12000-05-17 23:29:18 +1000324 # Basic test to check for compatible version and correct linking
325 # *does not* test for RSA - that comes later.
326 AC_TRY_RUN(
327 [
Damien Millere59ce622000-05-01 20:54:17 +1000328#include <string.h>
329#include <openssl/rand.h>
Damien Miller81171112000-04-23 11:14:01 +1000330int main(void)
331{
Damien Miller3b512e12000-05-17 23:29:18 +1000332 char a[2048];
333 memset(a, 0, sizeof(a));
Damien Miller81171112000-04-23 11:14:01 +1000334 RAND_add(a, sizeof(a), sizeof(a));
Damien Miller3b512e12000-05-17 23:29:18 +1000335 return(RAND_status() <= 0);
Damien Miller81171112000-04-23 11:14:01 +1000336}
Damien Miller3b512e12000-05-17 23:29:18 +1000337 ],
338 [
339 found_crypto=1
340 break;
341 ], []
342 )
Damien Miller61e50f12000-05-08 20:49:37 +1000343
344 if test ! -z "$found_crypto" ; then
345 break;
346 fi
Damien Millerb85dcad2000-03-11 11:37:00 +1100347 done
348
Damien Miller61e50f12000-05-08 20:49:37 +1000349 if test -z "$found_crypto" ; then
350 AC_MSG_ERROR([Could not find working SSLeay / OpenSSL libraries, please install])
Damien Millerb85dcad2000-03-11 11:37:00 +1100351 fi
Damien Miller61e50f12000-05-08 20:49:37 +1000352 if test -z "$ssldir" ; then
353 ssldir="(system)"
354 fi
Damien Millera22ba012000-03-02 23:09:20 +1100355
Damien Miller61e50f12000-05-08 20:49:37 +1000356 ac_cv_openssldir=$ssldir
357])
358
Damien Milleredb82922000-06-20 13:25:52 +1000359if (test ! -z "$ac_cv_openssldir" && test "x$ac_cv_openssldir" != "x(system)") ; then
Damien Miller61e50f12000-05-08 20:49:37 +1000360 AC_DEFINE(HAVE_OPENSSL)
361 dnl Need to recover ssldir - test above runs in subshell
362 ssldir=$ac_cv_openssldir
Damien Millera1ad4802000-03-15 10:04:54 +1100363 CFLAGS="$saved_CFLAGS -I$ssldir/include"
364 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
365 if test ! -z "$need_dash_r" ; then
366 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
Damien Millera22ba012000-03-02 23:09:20 +1100367 fi
Damien Miller29ea30d2000-03-17 10:54:15 +1100368 if test ! -z "$blibpath" ; then
369 blibpath="$blibpath:$ssldir:$ssldir/lib"
370 fi
Damien Millera22ba012000-03-02 23:09:20 +1100371fi
Damien Miller3b512e12000-05-17 23:29:18 +1000372LIBS="$saved_LIBS -lcrypto"
Damien Miller61e50f12000-05-08 20:49:37 +1000373
Damien Miller3b512e12000-05-17 23:29:18 +1000374# Now test RSA support
375saved_LIBS="$LIBS"
376AC_MSG_CHECKING([for RSA support])
377for WANTS_RSAREF in "" 1 ; do
378 if test -z "$WANTS_RSAREF" ; then
379 LIBS="$saved_LIBS"
380 else
381 LIBS="$saved_LIBS -lRSAglue -lrsaref"
382 fi
383 AC_TRY_RUN([
384#include <string.h>
385#include <openssl/rand.h>
386#include <openssl/rsa.h>
387#include <openssl/bn.h>
388#include <openssl/sha.h>
389int main(void)
390{
391 int num; RSA *key; static unsigned char p_in[] = "blahblah";
392 unsigned char c[256], p[256];
393 memset(c, 0, sizeof(c)); RAND_add(c, sizeof(c), sizeof(c));
394 if ((key=RSA_generate_key(512, 3, NULL, NULL))==NULL) return(1);
395 num = RSA_public_encrypt(sizeof(p_in) - 1, p_in, c, key, RSA_PKCS1_PADDING);
396 return(-1 == RSA_private_decrypt(num, c, p, key, RSA_PKCS1_PADDING));
397}
398 ],
399 [
400 rsa_works=1
401 break;
402 ], [])
403done
404
405if test ! -z "$no_rsa" ; then
406 AC_MSG_RESULT(disabled)
Damien Miller7b22d652000-06-18 14:07:04 +1000407 RSA_MSG="disabled"
Damien Miller3b512e12000-05-17 23:29:18 +1000408else
409 if test -z "$rsa_works" ; then
410 AC_MSG_WARN([*** No RSA support found *** ])
Damien Miller7b22d652000-06-18 14:07:04 +1000411 RSA_MSG="no"
Damien Miller3b512e12000-05-17 23:29:18 +1000412 else
413 if test -z "$WANTS_RSAREF" ; then
414 AC_MSG_RESULT(yes)
Damien Miller7b22d652000-06-18 14:07:04 +1000415 RSA_MSG="yes"
Damien Miller3b512e12000-05-17 23:29:18 +1000416 else
Damien Miller7b22d652000-06-18 14:07:04 +1000417 RSA_MSG="yes (using RSAref)"
Damien Miller3b512e12000-05-17 23:29:18 +1000418 AC_MSG_RESULT(using RSAref)
419 LIBS="$saved_LIBS -lcrypto -lRSAglue -lrsaref"
420 fi
421 fi
422fi
Damien Millera22ba012000-03-02 23:09:20 +1100423
424# Checks for data types
Damien Millere0f45742000-01-18 09:12:06 +1100425AC_CHECK_SIZEOF(char, 1)
Damien Millerc6398ef1999-11-20 12:18:40 +1100426AC_CHECK_SIZEOF(short int, 2)
427AC_CHECK_SIZEOF(int, 4)
428AC_CHECK_SIZEOF(long int, 4)
429AC_CHECK_SIZEOF(long long int, 8)
430
Damien Millera22ba012000-03-02 23:09:20 +1100431# More checks for data types
Damien Miller61e50f12000-05-08 20:49:37 +1000432AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
433 AC_TRY_COMPILE(
434 [ #include <sys/types.h> ],
435 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
436 [ ac_cv_have_intxx_t="yes" ],
437 [ ac_cv_have_intxx_t="no" ]
438 )
439])
440if test "x$ac_cv_have_intxx_t" = "xyes" ; then
441 AC_DEFINE(HAVE_INTXX_T)
442 have_intxx_t=1
443fi
444
445AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
446 AC_TRY_COMPILE(
447 [ #include <sys/types.h> ],
448 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
449 [ ac_cv_have_u_intxx_t="yes" ],
450 [ ac_cv_have_u_intxx_t="no" ]
451 )
452])
453if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
454 AC_DEFINE(HAVE_U_INTXX_T)
455 have_u_intxx_t=1
456fi
Damien Millerc6398ef1999-11-20 12:18:40 +1100457
Damien Millerc6398ef1999-11-20 12:18:40 +1100458
Damien Milleredb82922000-06-20 13:25:52 +1000459if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
460 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
Damien Millerb29ea912000-01-15 14:12:03 +1100461then
462 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
463 AC_TRY_COMPILE(
Damien Miller61e50f12000-05-08 20:49:37 +1000464 [
465#include <sys/bitypes.h>
466 ],
Damien Millerb29ea912000-01-15 14:12:03 +1100467 [
Damien Miller70494d12000-04-03 15:57:06 +1000468 int8_t a; int16_t b; int32_t c;
469 u_int8_t e; u_int16_t f; u_int32_t g;
470 a = b = c = e = f = g = 1;
Damien Millerb29ea912000-01-15 14:12:03 +1100471 ],
472 [
473 AC_DEFINE(HAVE_U_INTXX_T)
474 AC_DEFINE(HAVE_INTXX_T)
475 AC_MSG_RESULT(yes)
476 ],
477 [AC_MSG_RESULT(no)]
478 )
479fi
480
Damien Millerd6121d22000-03-17 23:26:46 +1100481if test -z "$have_u_intxx_t" ; then
Damien Miller61e50f12000-05-08 20:49:37 +1000482 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
483 AC_TRY_COMPILE(
484 [
485#include <sys/types.h>
486 ],
487 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
488 [ ac_cv_have_uintxx_t="yes" ],
489 [ ac_cv_have_uintxx_t="no" ]
490 )
491 ])
492 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
493 AC_DEFINE(HAVE_UINTXX_T)
494 fi
Damien Millerd6121d22000-03-17 23:26:46 +1100495fi
Damien Millerc6398ef1999-11-20 12:18:40 +1100496
Damien Miller61e50f12000-05-08 20:49:37 +1000497AC_CACHE_CHECK([for socklen_t], ac_cv_have_socklen_t, [
498 AC_TRY_COMPILE(
499 [
Damien Miller81171112000-04-23 11:14:01 +1000500#include <sys/types.h>
501#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000502 ],
503 [socklen_t foo; foo = 1235;],
504 [ ac_cv_have_socklen_t="yes" ],
505 [ ac_cv_have_socklen_t="no" ]
506 )
507])
508if test "x$ac_cv_have_socklen_t" = "xyes" ; then
509 AC_DEFINE(HAVE_SOCKLEN_T)
510fi
Damien Miller74d0d4a1999-12-29 02:24:35 +1100511
Damien Miller61e50f12000-05-08 20:49:37 +1000512AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
513 AC_TRY_COMPILE(
514 [
515#include <sys/types.h>
516 ],
517 [ size_t foo; foo = 1235; ],
518 [ ac_cv_have_size_t="yes" ],
519 [ ac_cv_have_size_t="no" ]
520 )
521])
522if test "x$ac_cv_have_size_t" = "xyes" ; then
523 AC_DEFINE(HAVE_SIZE_T)
524fi
Damien Miller95058511999-12-29 10:36:45 +1100525
Damien Miller615f9392000-05-17 22:53:33 +1000526AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
527 AC_TRY_COMPILE(
528 [
529#include <sys/types.h>
530 ],
531 [ ssize_t foo; foo = 1235; ],
532 [ ac_cv_have_ssize_t="yes" ],
533 [ ac_cv_have_ssize_t="no" ]
534 )
535])
536if test "x$ac_cv_have_ssize_t" = "xyes" ; then
537 AC_DEFINE(HAVE_SSIZE_T)
538fi
539
Damien Millerb54b40e2000-06-23 08:23:34 +1000540AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
541 AC_TRY_COMPILE(
542 [
543#include <sys/types.h>
544#include <sys/socket.h>
545 ],
546 [ sa_family_t foo; foo = 1235; ],
547 [ ac_cv_have_sa_family_t="yes" ],
548 [ ac_cv_have_sa_family_t="no" ]
549 )
550])
551if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
552 AC_DEFINE(HAVE_SA_FAMILY_T)
553fi
554
Damien Miller0f91b4e2000-06-18 15:43:25 +1000555AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
556 AC_TRY_COMPILE(
557 [
558#include <sys/types.h>
559 ],
560 [ pid_t foo; foo = 1235; ],
561 [ ac_cv_have_pid_t="yes" ],
562 [ ac_cv_have_pid_t="no" ]
563 )
564])
565if test "x$ac_cv_have_pid_t" = "xyes" ; then
566 AC_DEFINE(HAVE_PID_T)
567fi
568
569AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
570 AC_TRY_COMPILE(
571 [
572#include <sys/types.h>
573 ],
574 [ mode_t foo; foo = 1235; ],
575 [ ac_cv_have_mode_t="yes" ],
576 [ ac_cv_have_mode_t="no" ]
577 )
578])
579if test "x$ac_cv_have_mode_t" = "xyes" ; then
580 AC_DEFINE(HAVE_MODE_T)
581fi
582
Damien Miller61e50f12000-05-08 20:49:37 +1000583
584AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
585 AC_TRY_COMPILE(
586 [
Damien Miller81171112000-04-23 11:14:01 +1000587#include <sys/types.h>
588#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000589 ],
590 [ struct sockaddr_storage s; ],
591 [ ac_cv_have_struct_sockaddr_storage="yes" ],
592 [ ac_cv_have_struct_sockaddr_storage="no" ]
593 )
594])
595if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
596 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)
597fi
Damien Miller34132e52000-01-14 15:45:46 +1100598
Damien Miller61e50f12000-05-08 20:49:37 +1000599AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
600 AC_TRY_COMPILE(
601 [
Damien Miller7b22d652000-06-18 14:07:04 +1000602#include <sys/types.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000603#include <netinet/in.h>
604 ],
605 [ struct sockaddr_in6 s; s.sin6_family = 0; ],
606 [ ac_cv_have_struct_sockaddr_in6="yes" ],
607 [ ac_cv_have_struct_sockaddr_in6="no" ]
608 )
609])
610if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
611 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)
612fi
Damien Miller34132e52000-01-14 15:45:46 +1100613
Damien Miller61e50f12000-05-08 20:49:37 +1000614AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
615 AC_TRY_COMPILE(
616 [
Damien Miller7b22d652000-06-18 14:07:04 +1000617#include <sys/types.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000618#include <netinet/in.h>
619 ],
620 [ struct in6_addr s; s.s6_addr[0] = 0; ],
621 [ ac_cv_have_struct_in6_addr="yes" ],
622 [ ac_cv_have_struct_in6_addr="no" ]
623 )
624])
625if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
626 AC_DEFINE(HAVE_STRUCT_IN6_ADDR)
627fi
Damien Miller34132e52000-01-14 15:45:46 +1100628
Damien Miller61e50f12000-05-08 20:49:37 +1000629AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
630 AC_TRY_COMPILE(
631 [
Damien Miller81171112000-04-23 11:14:01 +1000632#include <sys/types.h>
633#include <sys/socket.h>
634#include <netdb.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000635 ],
636 [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ],
637 [ ac_cv_have_struct_addrinfo="yes" ],
638 [ ac_cv_have_struct_addrinfo="no" ]
639 )
640])
641if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
642 AC_DEFINE(HAVE_STRUCT_ADDRINFO)
643fi
644
Damien Miller34132e52000-01-14 15:45:46 +1100645
Damien Millera22ba012000-03-02 23:09:20 +1100646# Checks for structure members
Damien Miller34132e52000-01-14 15:45:46 +1100647
Damien Miller61e50f12000-05-08 20:49:37 +1000648OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
649OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX)
650OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX)
651OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP)
652OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP)
Damien Millerad1bc5f2000-05-20 14:53:09 +1000653OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX)
Damien Miller61e50f12000-05-08 20:49:37 +1000654OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP)
655OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP)
Damien Miller8e81ed32000-07-01 13:17:42 +1000656OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmpx.h, HAVE_ID_IN_UTMPX)
Damien Miller61e50f12000-05-08 20:49:37 +1000657OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP)
658OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX)
659OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP)
660OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX)
andre2ff7b5d2000-06-03 14:57:40 +0000661OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP)
662OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP)
663OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX)
664OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX)
665
Damien Miller61e50f12000-05-08 20:49:37 +1000666AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
667 ac_cv_have_ss_family_in_struct_ss, [
668 AC_TRY_COMPILE(
669 [
Damien Miller81171112000-04-23 11:14:01 +1000670#include <sys/types.h>
671#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000672 ],
673 [ struct sockaddr_storage s; s.ss_family = 1; ],
674 [ ac_cv_have_ss_family_in_struct_ss="yes" ],
675 [ ac_cv_have_ss_family_in_struct_ss="no" ],
676 )
677])
678if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
679 AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
680fi
681
Damien Miller61e50f12000-05-08 20:49:37 +1000682AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
683 ac_cv_have___ss_family_in_struct_ss, [
684 AC_TRY_COMPILE(
685 [
Damien Miller81171112000-04-23 11:14:01 +1000686#include <sys/types.h>
687#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000688 ],
689 [ struct sockaddr_storage s; s.__ss_family = 1; ],
690 [ ac_cv_have___ss_family_in_struct_ss="yes" ],
691 [ ac_cv_have___ss_family_in_struct_ss="no" ]
692 )
693])
694if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
695 AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
696fi
Damien Millerbf1c9b21999-12-09 10:16:54 +1100697
Damien Miller61e50f12000-05-08 20:49:37 +1000698
699AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
700 AC_TRY_LINK([],
701 [ extern char *__progname; printf("%s", __progname); ],
702 [ ac_cv_libc_defines___progname="yes" ],
703 [ ac_cv_libc_defines___progname="no" ]
704 )
705])
706if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
707 AC_DEFINE(HAVE___PROGNAME)
708fi
709
Damien Millera22ba012000-03-02 23:09:20 +1100710
711# Looking for programs, paths and files
712AC_ARG_WITH(rsh,
713 [ --with-rsh=PATH Specify path to remote shell program ],
714 [
Damien Millerb85dcad2000-03-11 11:37:00 +1100715 if test "x$withval" != "$no" ; then
Damien Miller7b22d652000-06-18 14:07:04 +1000716 rsa_path=$withval
Damien Millera22ba012000-03-02 23:09:20 +1100717 fi
718 ],
719 [
720 AC_PATH_PROG(rsh_path, rsh)
721 ]
722)
723
724AC_ARG_WITH(xauth,
725 [ --with-xauth=PATH Specify path to xauth program ],
726 [
727 if test "x$withval" != "$xno" ; then
Damien Miller7b22d652000-06-18 14:07:04 +1000728 xauth_path=$withval
Damien Millera22ba012000-03-02 23:09:20 +1100729 fi
730 ],
731 [
732 AC_PATH_PROG(xauth_path, xauth)
Damien Milleredb82922000-06-20 13:25:52 +1000733 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
Damien Millera22ba012000-03-02 23:09:20 +1100734 xauth_path="/usr/openwin/bin/xauth"
735 fi
736 ]
737)
738
739if test ! -z "$xauth_path" ; then
740 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
741fi
742if test ! -z "$rsh_path" ; then
743 AC_DEFINE_UNQUOTED(RSH_PATH, "$rsh_path")
744fi
745
746# Check for mail directory (last resort if we cannot get it from headers)
747if test ! -z "$MAIL" ; then
748 maildir=`dirname $MAIL`
749 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
750fi
751
Damien Millera22ba012000-03-02 23:09:20 +1100752if test -z "$no_dev_ptmx" ; then
Damien Miller204ad072000-03-02 23:56:12 +1100753 AC_CHECK_FILE("/dev/ptmx",
754 [
755 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
756 have_dev_ptmx=1
757 ]
758 )
Damien Millera22ba012000-03-02 23:09:20 +1100759fi
Damien Miller204ad072000-03-02 23:56:12 +1100760AC_CHECK_FILE("/dev/ptc",
761 [
762 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
763 have_dev_ptc=1
764 ]
765)
766
Damien Millera22ba012000-03-02 23:09:20 +1100767# Options from here on. Some of these are preset by platform above
768
Damien Millera22ba012000-03-02 23:09:20 +1100769# Check for user-specified random device, otherwise check /dev/urandom
770AC_ARG_WITH(random,
771 [ --with-random=FILE read randomness from FILE (default=/dev/urandom)],
772 [
Damien Miller040f3832000-04-03 14:50:43 +1000773 if test "x$withval" != "xno" ; then
774 RANDOM_POOL="$withval";
775 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
776 fi
Damien Millera22ba012000-03-02 23:09:20 +1100777 ],
778 [
779 # Check for random device
780 AC_CHECK_FILE("/dev/urandom",
781 [
782 RANDOM_POOL="/dev/urandom";
783 AC_SUBST(RANDOM_POOL)
784 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
785 ]
786 )
787 ]
788)
789
790# Check for EGD pool file
791AC_ARG_WITH(egd-pool,
792 [ --with-egd-pool=FILE read randomness from EGD pool FILE (default none)],
793 [
Damien Miller040f3832000-04-03 14:50:43 +1000794 if test "x$withval" != "xno" ; then
795 EGD_SOCKET="$withval";
796 AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET")
797 fi
Damien Millera22ba012000-03-02 23:09:20 +1100798 ]
799)
800
Damien Miller0437b332000-05-02 09:56:41 +1000801# detect pathnames for entropy gathering commands, if we need them
802INSTALL_SSH_PRNG_CMDS=""
803rm -f prng_commands
Damien Milleredb82922000-06-20 13:25:52 +1000804if (test -z "$RANDOM_POOL" && test -z "$EGD_SOCKET") ; then
Damien Miller11e37f62000-04-08 18:23:30 +1000805 # Use these commands to collect entropy
Damien Miller61e50f12000-05-08 20:49:37 +1000806 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
807 OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
808 OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
809 OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
810 OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
811 OSSH_PATH_ENTROPY_PROG(PROG_W, w)
812 OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
813 OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
814 OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
815 OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
816 OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
817 OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
818 OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
819 OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
820 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
Damien Miller0437b332000-05-02 09:56:41 +1000821
822 INSTALL_SSH_PRNG_CMDS="yes"
Damien Miller11e37f62000-04-08 18:23:30 +1000823fi
Damien Miller0437b332000-05-02 09:56:41 +1000824AC_SUBST(INSTALL_SSH_PRNG_CMDS)
825
Damien Miller11e37f62000-04-08 18:23:30 +1000826
Damien Miller670a4b82000-01-22 13:53:11 +1100827AC_ARG_WITH(catman,
828 [ --with-catman=man|cat Install preformatted manpages[no]],
829 [
830 MANTYPE='$(CATMAN)'
831 if test x"$withval" != x"yes" ; then
832 mansubdir=$withval
833 else
834 mansubdir=cat
835 fi
836 ], [
837 if test -z "$MANTYPE" ; then
838 MANTYPE='$(TROFFMAN)'
839 mansubdir=man
840 fi
841 ]
842)
843AC_SUBST(MANTYPE)
844AC_SUBST(mansubdir)
Damien Miller8bdeee21999-12-30 15:50:54 +1100845
Damien Millera22ba012000-03-02 23:09:20 +1100846# Check whether user wants Kerberos support
Damien Miller7b22d652000-06-18 14:07:04 +1000847KRB4_MSG="no"
Damien Miller80297751999-11-19 13:03:25 +1100848AC_ARG_WITH(kerberos4,
Damien Miller105b7f02000-01-07 08:45:55 +1100849 [ --with-kerberos4=PATH Enable Kerberos 4 support],
Damien Miller80297751999-11-19 13:03:25 +1100850 [
Damien Millerb85dcad2000-03-11 11:37:00 +1100851 if test "x$withval" != "xno" ; then
Damien Miller105b7f02000-01-07 08:45:55 +1100852
853 if test "x$withval" != "$xyes" ; then
854 CFLAGS="$CFLAGS -I${withval}/include"
855 LDFLAGS="$LDFLAGS -L${withval}/lib"
Damien Miller29ea30d2000-03-17 10:54:15 +1100856 if test ! -z "$need_dash_r" ; then
857 LDFLAGS="$LDFLAGS -R${withval}/lib"
858 fi
859 if test ! -z "$blibpath" ; then
860 blibpath="$blibpath:${withval}/lib"
861 fi
Damien Miller105b7f02000-01-07 08:45:55 +1100862 else
863 if test -d /usr/include/kerberosIV ; then
864 CFLAGS="$CFLAGS -I/usr/include/kerberosIV"
865 fi
866 fi
867
868 AC_CHECK_HEADERS(krb.h)
869 AC_CHECK_LIB(krb, main)
870 if test "$ac_cv_header_krb_h" != yes; then
871 AC_MSG_WARN([Cannot find krb.h, build may fail])
872 fi
873 if test "$ac_cv_lib_krb_main" != yes; then
874 AC_MSG_WARN([Cannot find libkrb, build may fail])
875 fi
876
Damien Millerc85f9b42000-01-29 10:20:21 +1100877 KLIBS="-lkrb -ldes"
Damien Miller105b7f02000-01-07 08:45:55 +1100878 AC_CHECK_LIB(resolv, dn_expand, , )
879 KRB4=yes
Damien Miller7b22d652000-06-18 14:07:04 +1000880 KRB4_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +1100881 AC_DEFINE(KRB4)
Damien Miller8bdeee21999-12-30 15:50:54 +1100882 fi
Damien Miller80297751999-11-19 13:03:25 +1100883 ]
884)
885
Damien Millera22ba012000-03-02 23:09:20 +1100886# Check whether user wants AFS support
Damien Miller7b22d652000-06-18 14:07:04 +1000887AFS_MSG="no"
Damien Millerc6398ef1999-11-20 12:18:40 +1100888AC_ARG_WITH(afs,
Damien Miller105b7f02000-01-07 08:45:55 +1100889 [ --with-afs=PATH Enable AFS support],
Damien Miller80297751999-11-19 13:03:25 +1100890 [
Damien Millerb85dcad2000-03-11 11:37:00 +1100891 if test "x$withval" != "xno" ; then
Damien Miller105b7f02000-01-07 08:45:55 +1100892
893 if test "x$withval" != "$xyes" ; then
894 CFLAGS="$CFLAGS -I${withval}/include"
895 LFLAGS="$LFLAGS -L${withval}/lib"
896 fi
897
898 if test -z "$KRB4" ; then
899 AC_MSG_WARN([AFS requires Kerberos IV support, build may fail])
900 fi
901
Damien Miller8bdeee21999-12-30 15:50:54 +1100902 LIBS="$LIBS -lkafs"
Damien Miller105b7f02000-01-07 08:45:55 +1100903 if test ! -z "$AFS_LIBS" ; then
904 LIBS="$LIBS $AFS_LIBS"
905 fi
906 AC_DEFINE(AFS)
Damien Miller7b22d652000-06-18 14:07:04 +1000907 AFS_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +1100908 fi
Damien Miller80297751999-11-19 13:03:25 +1100909 ]
910)
Damien Millerc85f9b42000-01-29 10:20:21 +1100911LIBS="$LIBS $KLIBS"
Damien Miller80297751999-11-19 13:03:25 +1100912
Damien Millera22ba012000-03-02 23:09:20 +1100913# Check whether user wants S/Key support
Damien Miller7b22d652000-06-18 14:07:04 +1000914SKEY_MSG="no"
Damien Miller80297751999-11-19 13:03:25 +1100915AC_ARG_WITH(skey,
916 [ --with-skey Enable S/Key support],
917 [
Damien Millerb85dcad2000-03-11 11:37:00 +1100918 if test "x$withval" != "xno" ; then
Damien Miller8bdeee21999-12-30 15:50:54 +1100919 AC_DEFINE(SKEY)
920 LIBS="$LIBS -lskey"
Damien Miller7b22d652000-06-18 14:07:04 +1000921 SKEY_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +1100922 fi
Damien Miller80297751999-11-19 13:03:25 +1100923 ]
924)
925
Damien Millera22ba012000-03-02 23:09:20 +1100926# Check whether user wants TCP wrappers support
Damien Miller7b22d652000-06-18 14:07:04 +1000927TCPW_MSG="no"
Damien Millerf7c0f821999-11-22 22:31:49 +1100928AC_ARG_WITH(tcp-wrappers,
Damien Miller80297751999-11-19 13:03:25 +1100929 [ --with-tcp-wrappers Enable tcpwrappers support],
930 [
Damien Millerb85dcad2000-03-11 11:37:00 +1100931 if test "x$withval" != "xno" ; then
Damien Miller65165f82000-03-05 17:02:45 +1100932 saved_LIBS="$LIBS"
Damien Miller105b7f02000-01-07 08:45:55 +1100933 LIBS="$LIBS -lwrap"
Damien Miller65165f82000-03-05 17:02:45 +1100934 AC_MSG_CHECKING(for libwrap)
935 AC_TRY_LINK(
936 [
Damien Miller81171112000-04-23 11:14:01 +1000937#include <tcpd.h>
Damien Miller65165f82000-03-05 17:02:45 +1100938 int deny_severity = 0, allow_severity = 0;
939 ],
940 [hosts_access(0);],
941 [
942 AC_MSG_RESULT(yes)
943 AC_DEFINE(LIBWRAP)
Damien Miller7b22d652000-06-18 14:07:04 +1000944 TCPW_MSG="yes"
Damien Miller65165f82000-03-05 17:02:45 +1100945 ],
946 [
Damien Miller7b22d652000-06-18 14:07:04 +1000947 AC_MSG_ERROR([*** libwrap missing])
Damien Miller65165f82000-03-05 17:02:45 +1100948 ]
949 )
Damien Miller8bdeee21999-12-30 15:50:54 +1100950 fi
Damien Miller80297751999-11-19 13:03:25 +1100951 ]
952)
953
Damien Millera22ba012000-03-02 23:09:20 +1100954# Check whether to enable MD5 passwords
Damien Miller7b22d652000-06-18 14:07:04 +1000955MD5_MSG="no"
Damien Millerf7c0f821999-11-22 22:31:49 +1100956AC_ARG_WITH(md5-passwords,
Damien Millerdd1c7ba1999-11-19 15:53:20 +1100957 [ --with-md5-passwords Enable use of MD5 passwords],
Damien Miller8bdeee21999-12-30 15:50:54 +1100958 [
Damien Millerb85dcad2000-03-11 11:37:00 +1100959 if test "x$withval" != "xno" ; then
Damien Miller8bdeee21999-12-30 15:50:54 +1100960 AC_DEFINE(HAVE_MD5_PASSWORDS)
Damien Miller7b22d652000-06-18 14:07:04 +1000961 MD5_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +1100962 fi
963 ]
Damien Millerdd1c7ba1999-11-19 15:53:20 +1100964)
965
Damien Millera22ba012000-03-02 23:09:20 +1100966# Whether to disable shadow password support
Damien Miller76112de1999-12-21 11:18:08 +1100967AC_ARG_WITH(shadow,
968 [ --without-shadow Disable shadow password support],
969 [
970 if test "x$withval" = "xno" ; then
971 AC_DEFINE(DISABLE_SHADOW)
Damien Miller1f335fb2000-06-26 11:31:33 +1000972 disable_shadow=yes
Damien Miller76112de1999-12-21 11:18:08 +1100973 fi
974 ]
975)
976
Damien Miller1f335fb2000-06-26 11:31:33 +1000977if test -z "$disable_shadow" ; then
978 AC_MSG_CHECKING([if the systems has expire shadow information])
979 AC_TRY_COMPILE(
980 [
981#include <sys/types.h>
982#include <shadow.h>
983 struct spwd sp;
984 ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ],
985 [ sp_expire_available=yes ], []
986 )
987
988 if test "x$sp_expire_available" = "xyes" ; then
989 AC_MSG_RESULT(yes)
990 AC_DEFINE(HAS_SHADOW_EXPIRE)
991 else
992 AC_MSG_RESULT(no)
993 fi
994fi
995
Damien Millera22ba012000-03-02 23:09:20 +1100996# Use ip address instead of hostname in $DISPLAY
Damien Miller7b22d652000-06-18 14:07:04 +1000997DISPLAY_HACK_MSG="no"
Damien Miller76112de1999-12-21 11:18:08 +1100998AC_ARG_WITH(ipaddr-display,
999 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
1000 [
Damien Miller66409952000-01-17 21:40:06 +11001001 if test "x$withval" = "xno" ; then
Damien Miller76112de1999-12-21 11:18:08 +11001002 AC_DEFINE(IPADDR_IN_DISPLAY)
Damien Miller7b22d652000-06-18 14:07:04 +10001003 DISPLAY_HACK_MSG="yes"
Damien Miller76112de1999-12-21 11:18:08 +11001004 fi
1005 ]
1006)
1007
Damien Millera22ba012000-03-02 23:09:20 +11001008# Whether to mess with the default path
Damien Miller7b22d652000-06-18 14:07:04 +10001009SERVER_PATH_MSG="(default)"
Damien Millere7f626c1999-12-31 09:49:44 +11001010AC_ARG_WITH(default-path,
Damien Miller5a3e6831999-12-27 09:48:56 +11001011 [ --with-default-path=PATH Specify default \$PATH environment for server],
1012 [
1013 if test "x$withval" != "xno" ; then
Damien Miller9550a761999-12-29 02:32:22 +11001014 AC_DEFINE_UNQUOTED(USER_PATH, "$withval")
Damien Miller7b22d652000-06-18 14:07:04 +10001015 SERVER_PATH_MSG="$withval"
Damien Miller5a3e6831999-12-27 09:48:56 +11001016 fi
1017 ]
1018)
1019
Damien Millera22ba012000-03-02 23:09:20 +11001020# Whether to force IPv4 by default (needed on broken glibc Linux)
Damien Miller7b22d652000-06-18 14:07:04 +10001021IPV4_HACK_MSG="no"
Damien Miller7d80e342000-01-19 14:36:49 +11001022AC_ARG_WITH(ipv4-default,
1023 [ --with-ipv4-default Use IPv4 by connections unless '-6' specified],
1024 [
1025 if test "x$withval" != "xno" ; then
1026 AC_DEFINE(IPV4_DEFAULT)
Damien Miller7b22d652000-06-18 14:07:04 +10001027 IPV4_HACK_MSG="yes"
Damien Miller7d80e342000-01-19 14:36:49 +11001028 fi
1029 ]
1030)
1031
Damien Miller61e50f12000-05-08 20:49:37 +10001032AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
Damien Miller7b22d652000-06-18 14:07:04 +10001033IPV4_IN6_HACK_MSG="no"
Damien Miller7bcb0892000-03-11 20:45:40 +11001034AC_ARG_WITH(4in6,
1035 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
1036 [
1037 if test "x$withval" != "xno" ; then
1038 AC_MSG_RESULT(yes)
1039 AC_DEFINE(IPV4_IN_IPV6)
Damien Miller7b22d652000-06-18 14:07:04 +10001040 IPV4_IN6_HACK_MSG="yes"
Damien Miller7bcb0892000-03-11 20:45:40 +11001041 else
1042 AC_MSG_RESULT(no)
1043 fi
1044 ],[
1045 if test "x$inet6_default_4in6" = "xyes"; then
1046 AC_MSG_RESULT([yes (default)])
1047 AC_DEFINE(IPV4_IN_IPV6)
Damien Miller7b22d652000-06-18 14:07:04 +10001048 IPV4_IN6_HACK_MSG="yes"
Damien Miller7bcb0892000-03-11 20:45:40 +11001049 else
1050 AC_MSG_RESULT([no (default)])
1051 fi
1052 ]
1053)
1054
Damien Millera22ba012000-03-02 23:09:20 +11001055# Where to place sshd.pid
Damien Millerb13c73e2000-01-17 22:02:17 +11001056piddir=/var/run
Damien Miller5eed6a22000-01-16 12:05:18 +11001057AC_ARG_WITH(pid-dir,
1058 [ --with-pid-dir=PATH Specify location of ssh.pid file],
1059 [
1060 if test "x$withval" != "xno" ; then
Damien Millerb13c73e2000-01-17 22:02:17 +11001061 piddir=$withval
Damien Miller5eed6a22000-01-16 12:05:18 +11001062 fi
1063 ]
1064)
Damien Miller4018c192000-04-30 09:30:44 +10001065
Damien Millerdbd250f2000-01-18 08:57:14 +11001066AC_DEFINE_UNQUOTED(PIDDIR, "$piddir")
Damien Millerb13c73e2000-01-17 22:02:17 +11001067AC_SUBST(piddir)
Damien Miller5eed6a22000-01-16 12:05:18 +11001068
andre2ff7b5d2000-06-03 14:57:40 +00001069dnl allow user to disable some login recording features
1070AC_ARG_ENABLE(lastlog,
andre43ca7e22000-06-19 08:23:46 +00001071 [ --disable-lastlog disable use of lastlog even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001072 [ AC_DEFINE(DISABLE_LASTLOG) ]
1073)
1074AC_ARG_ENABLE(utmp,
andre43ca7e22000-06-19 08:23:46 +00001075 [ --disable-utmp disable use of utmp even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001076 [ AC_DEFINE(DISABLE_UTMP) ]
1077)
1078AC_ARG_ENABLE(utmpx,
andre43ca7e22000-06-19 08:23:46 +00001079 [ --disable-utmpx disable use of utmpx even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001080 [ AC_DEFINE(DISABLE_UTMPX) ]
1081)
1082AC_ARG_ENABLE(wtmp,
andre43ca7e22000-06-19 08:23:46 +00001083 [ --disable-wtmp disable use of wtmp even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001084 [ AC_DEFINE(DISABLE_WTMP) ]
1085)
1086AC_ARG_ENABLE(wtmpx,
andre43ca7e22000-06-19 08:23:46 +00001087 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001088 [ AC_DEFINE(DISABLE_WTMPX) ]
1089)
1090AC_ARG_ENABLE(libutil,
andre43ca7e22000-06-19 08:23:46 +00001091 [ --disable-libutil disable use of libutil (login() etc.) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001092 [ AC_DEFINE(DISABLE_LOGIN) ]
1093)
1094AC_ARG_ENABLE(pututline,
andre43ca7e22000-06-19 08:23:46 +00001095 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001096 [ AC_DEFINE(DISABLE_PUTUTLINE) ]
1097)
1098AC_ARG_ENABLE(pututxline,
andre43ca7e22000-06-19 08:23:46 +00001099 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001100 [ AC_DEFINE(DISABLE_PUTUTXLINE) ]
1101)
1102AC_ARG_WITH(lastlog,
andre43ca7e22000-06-19 08:23:46 +00001103 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
andre2ff7b5d2000-06-03 14:57:40 +00001104 [ conf_lastlog_location="$withval"; ],)
1105
1106dnl lastlog, [uw]tmpx? detection
1107dnl NOTE: set the paths in the platform section to avoid the
1108dnl need for command-line parameters
1109dnl lastlog and [uw]tmp are subject to a file search if all else fails
1110
1111dnl lastlog detection
1112dnl NOTE: the code itself will detect if lastlog is a directory
1113AC_MSG_CHECKING([if your system defines LASTLOG_FILE])
1114AC_TRY_COMPILE([
1115#include <sys/types.h>
1116#include <utmp.h>
1117#ifdef HAVE_LASTLOG_H
1118# include <lastlog.h>
1119#endif
Damien Miller2994e082000-06-04 15:51:47 +10001120#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001121# include <paths.h>
1122#endif
1123 ],
1124 [ char *lastlog = LASTLOG_FILE; ],
1125 [ AC_MSG_RESULT(yes) ],
Damien Miller2994e082000-06-04 15:51:47 +10001126 [
1127 AC_MSG_RESULT(no)
1128 AC_MSG_CHECKING([if your system defines _PATH_LASTLOG])
1129 AC_TRY_COMPILE([
1130#include <sys/types.h>
1131#include <utmp.h>
1132#ifdef HAVE_LASTLOG_H
1133# include <lastlog.h>
1134#endif
1135#ifdef HAVE_PATHS_H
1136# include <paths.h>
1137#endif
1138 ],
1139 [ char *lastlog = _PATH_LASTLOG; ],
1140 [ AC_MSG_RESULT(yes) ],
1141 [
andree441aa32000-06-12 22:34:38 +00001142 AC_MSG_RESULT(no)
Damien Miller2994e082000-06-04 15:51:47 +10001143 system_lastlog_path=no
1144 ])
1145 ]
andre2ff7b5d2000-06-03 14:57:40 +00001146)
Damien Miller2994e082000-06-04 15:51:47 +10001147
andre2ff7b5d2000-06-03 14:57:40 +00001148if test -z "$conf_lastlog_location"; then
1149 if test x"$system_lastlog_path" = x"no" ; then
1150 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
Damien Milleredb82922000-06-20 13:25:52 +10001151 if (test -d "$f" || test -f "$f") ; then
andre2ff7b5d2000-06-03 14:57:40 +00001152 conf_lastlog_location=$f
1153 fi
1154 done
1155 if test -z "$conf_lastlog_location"; then
andre45cad512000-06-12 23:27:31 +00001156 AC_MSG_WARN([** Cannot find lastlog **])
1157 dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx
andre2ff7b5d2000-06-03 14:57:40 +00001158 fi
1159 fi
1160fi
1161
1162if test -n "$conf_lastlog_location"; then
1163 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location")
1164fi
1165
1166dnl utmp detection
1167AC_MSG_CHECKING([if your system defines UTMP_FILE])
1168AC_TRY_COMPILE([
1169#include <sys/types.h>
1170#include <utmp.h>
Damien Miller2994e082000-06-04 15:51:47 +10001171#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001172# include <paths.h>
1173#endif
1174 ],
1175 [ char *utmp = UTMP_FILE; ],
1176 [ AC_MSG_RESULT(yes) ],
1177 [ AC_MSG_RESULT(no)
1178 system_utmp_path=no ]
1179)
1180if test -z "$conf_utmp_location"; then
1181 if test x"$system_utmp_path" = x"no" ; then
1182 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
1183 if test -f $f ; then
1184 conf_utmp_location=$f
1185 fi
1186 done
1187 if test -z "$conf_utmp_location"; then
1188 AC_DEFINE(DISABLE_UTMP)
1189 fi
1190 fi
1191fi
1192if test -n "$conf_utmp_location"; then
1193 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location")
1194fi
1195
1196dnl wtmp detection
1197AC_MSG_CHECKING([if your system defines WTMP_FILE])
1198AC_TRY_COMPILE([
1199#include <sys/types.h>
1200#include <utmp.h>
Damien Miller2994e082000-06-04 15:51:47 +10001201#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001202# include <paths.h>
1203#endif
1204 ],
1205 [ char *wtmp = WTMP_FILE; ],
1206 [ AC_MSG_RESULT(yes) ],
1207 [ AC_MSG_RESULT(no)
1208 system_wtmp_path=no ]
1209)
1210if test -z "$conf_wtmp_location"; then
1211 if test x"$system_wtmp_path" = x"no" ; then
1212 for f in /usr/adm/wtmp /var/log/wtmp; do
1213 if test -f $f ; then
1214 conf_wtmp_location=$f
1215 fi
1216 done
1217 if test -z "$conf_wtmp_location"; then
1218 AC_DEFINE(DISABLE_WTMP)
1219 fi
1220 fi
1221fi
1222if test -n "$conf_wtmp_location"; then
1223 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location")
1224fi
1225
1226
1227dnl utmpx detection - I don't know any system so perverse as to require
1228dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out
1229dnl there, though.
1230AC_MSG_CHECKING([if your system defines UTMPX_FILE])
1231AC_TRY_COMPILE([
1232#include <sys/types.h>
1233#include <utmp.h>
1234#ifdef HAVE_UTMPX_H
1235#include <utmpx.h>
1236#endif
Damien Miller2994e082000-06-04 15:51:47 +10001237#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001238# include <paths.h>
1239#endif
1240 ],
1241 [ char *utmpx = UTMPX_FILE; ],
1242 [ AC_MSG_RESULT(yes) ],
1243 [ AC_MSG_RESULT(no)
1244 system_utmpx_path=no ]
1245)
1246if test -z "$conf_utmpx_location"; then
1247 if test x"$system_utmpx_path" = x"no" ; then
1248 AC_DEFINE(DISABLE_UTMPX)
1249 fi
1250else
1251 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location")
1252fi
1253
1254dnl wtmpx detection
1255AC_MSG_CHECKING([if your system defines WTMPX_FILE])
1256AC_TRY_COMPILE([
1257#include <sys/types.h>
1258#include <utmp.h>
1259#ifdef HAVE_UTMPX_H
1260#include <utmpx.h>
1261#endif
Damien Miller2994e082000-06-04 15:51:47 +10001262#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001263# include <paths.h>
1264#endif
1265 ],
1266 [ char *wtmpx = WTMPX_FILE; ],
1267 [ AC_MSG_RESULT(yes) ],
1268 [ AC_MSG_RESULT(no)
1269 system_wtmpx_path=no ]
1270)
1271if test -z "$conf_wtmpx_location"; then
1272 if test x"$system_wtmpx_path" = x"no" ; then
1273 AC_DEFINE(DISABLE_WTMPX)
1274 fi
1275else
1276 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location")
1277fi
1278
Damien Miller4018c192000-04-30 09:30:44 +10001279
1280# Change default command timeout for builtin PRNG
Damien Miller14c12cb2000-06-07 22:20:23 +10001281entropy_timeout=200
Damien Miller4018c192000-04-30 09:30:44 +10001282AC_ARG_WITH(entropy-timeout,
1283 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)],
1284 [
1285 if test "x$withval" != "xno" ; then
1286 entropy_timeout=$withval
1287 fi
1288 ]
1289)
1290AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout)
1291
1292
Damien Miller29ea30d2000-03-17 10:54:15 +11001293if test ! -z "$blibpath" ; then
1294 LDFLAGS="$LDFLAGS -blibpath:$blibpath"
1295 AC_MSG_WARN([Please check and edit -blibpath in LDFLAGS in Makefile])
1296fi
1297
Damien Miller0437b332000-05-02 09:56:41 +10001298AC_OUTPUT(Makefile ssh_prng_cmds)
1299
Damien Miller7b22d652000-06-18 14:07:04 +10001300# Print summary of options
1301
1302if test x$MANTYPE = x'$(CATMAN)' ; then
1303 MAN_MSG=cat
1304else
1305 MAN_MSG=man
1306fi
1307if test ! -z "$RANDOM_POOL" ; then
1308 RAND_MSG="Device ($RANDOM_POOL)"
1309else
1310 if test ! -z "$EGD_SOCKET" ; then
1311 RAND_MSG="EGD ($EGD_SOCKET)"
1312 else
1313 RAND_MSG="Builtin (timeout $entropy_timeout)"
1314 fi
1315fi
1316
1317# Someone please show me a better way :)
1318A=`eval echo ${prefix}` ; A=`eval echo ${A}`
1319B=`eval echo ${bindir}` ; B=`eval echo ${B}`
1320C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
1321D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
1322E=`eval echo ${libexecdir}/ssh/ssh-askpass` ; E=`eval echo ${E}`
1323F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
1324G=`eval echo ${piddir}` ; G=`eval echo ${G}`
1325
1326echo ""
1327echo "OpenSSH configured has been configured with the following options."
1328echo " User binaries: $B"
1329echo " System binaries: $C"
1330echo " Configuration files: $D"
1331echo " Askpass program: $E"
1332echo " Manual pages: $F"
1333echo " PID file: $G"
1334echo " Random number collection: $RAND_MSG"
1335echo " Manpage format: $MAN_MSG"
1336echo " PAM support: ${PAM_MSG}"
1337echo " KerberosIV support: $KRB4_MSG"
1338echo " AFS support: $AFS_MSG"
1339echo " S/KEY support: $SKEY_MSG"
1340echo " TCP Wrappers support: $TCPW_MSG"
1341echo " MD5 password support: $MD5_MSG"
1342echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
1343echo " Use IPv4 by default hack: $IPV4_HACK_MSG"
1344echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
1345
1346echo ""
1347
1348echo "Compiler flags: ${CFLAGS}"
1349echo "Linker flags: ${LDFLAGS}"
1350echo "Libraries: ${LIBS}"
1351
1352echo ""
1353