blob: 4dd08c71a5fd82334743ba6b894a4e92fb157272 [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 Miller7b22d652000-06-18 14:07:04 +1000238PAM_MSG="no"
Damien Millera22ba012000-03-02 23:09:20 +1100239AC_ARG_WITH(pam,
240 [ --without-pam Disable PAM support ],
241 [
242 if test "x$withval" = "xno" ; then
243 no_pam=1
244 AC_DEFINE(DISABLE_PAM)
Damien Miller7b22d652000-06-18 14:07:04 +1000245 PAM_MSG="disabled"
Damien Millera22ba012000-03-02 23:09:20 +1100246 fi
247 ]
248)
Damien Milleredb82922000-06-20 13:25:52 +1000249if (test -z "$no_pam" && test "x$ac_cv_header_security_pam_appl_h" = "xyes") ; then
Damien Millera22ba012000-03-02 23:09:20 +1100250 AC_CHECK_LIB(dl, dlopen, , )
251 LIBS="$LIBS -lpam"
252
Damien Miller0e65eed2000-05-17 22:16:05 +1000253 AC_CHECK_FUNCS(pam_getenvlist)
Damien Miller1bead332000-04-30 00:47:29 +1000254
Damien Miller1f335fb2000-06-26 11:31:33 +1000255 disable_shadow=yes
256
Damien Miller7b22d652000-06-18 14:07:04 +1000257 PAM_MSG="yes"
258
Damien Millera22ba012000-03-02 23:09:20 +1100259 # Check PAM strerror arguments (old PAM)
260 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
261 AC_TRY_COMPILE(
262 [
Damien Miller81171112000-04-23 11:14:01 +1000263#include <stdlib.h>
264#include <security/pam_appl.h>
Damien Millera22ba012000-03-02 23:09:20 +1100265 ],
266 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
267 [AC_MSG_RESULT(no)],
268 [
269 AC_DEFINE(HAVE_OLD_PAM)
270 AC_MSG_RESULT(yes)
Damien Miller7b22d652000-06-18 14:07:04 +1000271 PAM_MSG="yes (old library)"
Damien Millera22ba012000-03-02 23:09:20 +1100272 ]
273 )
274fi
275
276# The big search for OpenSSL
277AC_ARG_WITH(ssl-dir,
278 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
279 [
280 if test "x$withval" != "$xno" ; then
281 tryssldir=$withval
282 fi
283 ]
284)
285
286saved_LIBS="$LIBS"
Damien Millera1ad4802000-03-15 10:04:54 +1100287saved_LDFLAGS="$LDFLAGS"
Damien Millera22ba012000-03-02 23:09:20 +1100288saved_CFLAGS="$CFLAGS"
289if test "x$prefix" != "xNONE" ; then
290 tryssldir="$tryssldir $prefix"
291fi
Damien Miller61e50f12000-05-08 20:49:37 +1000292AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [
Damien Millera22ba012000-03-02 23:09:20 +1100293
Damien Miller61e50f12000-05-08 20:49:37 +1000294 for ssldir in "" $tryssldir /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
295 if test ! -z "$ssldir" ; then
296 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
297 CFLAGS="$saved_CFLAGS -I$ssldir/include"
298 if test ! -z "$need_dash_r" ; then
299 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
300 fi
Damien Millera1ad4802000-03-15 10:04:54 +1100301 else
Damien Miller61e50f12000-05-08 20:49:37 +1000302 LDFLAGS="$saved_LDFLAGS"
Damien Millerb85dcad2000-03-11 11:37:00 +1100303 fi
304
Damien Miller3b512e12000-05-17 23:29:18 +1000305 LIBS="$saved_LIBS -lcrypto"
Damien Miller61e50f12000-05-08 20:49:37 +1000306
Damien Miller3b512e12000-05-17 23:29:18 +1000307 # Basic test to check for compatible version and correct linking
308 # *does not* test for RSA - that comes later.
309 AC_TRY_RUN(
310 [
Damien Millere59ce622000-05-01 20:54:17 +1000311#include <string.h>
312#include <openssl/rand.h>
Damien Miller81171112000-04-23 11:14:01 +1000313int main(void)
314{
Damien Miller3b512e12000-05-17 23:29:18 +1000315 char a[2048];
316 memset(a, 0, sizeof(a));
Damien Miller81171112000-04-23 11:14:01 +1000317 RAND_add(a, sizeof(a), sizeof(a));
Damien Miller3b512e12000-05-17 23:29:18 +1000318 return(RAND_status() <= 0);
Damien Miller81171112000-04-23 11:14:01 +1000319}
Damien Miller3b512e12000-05-17 23:29:18 +1000320 ],
321 [
322 found_crypto=1
323 break;
324 ], []
325 )
Damien Miller61e50f12000-05-08 20:49:37 +1000326
327 if test ! -z "$found_crypto" ; then
328 break;
329 fi
Damien Millerb85dcad2000-03-11 11:37:00 +1100330 done
331
Damien Miller61e50f12000-05-08 20:49:37 +1000332 if test -z "$found_crypto" ; then
333 AC_MSG_ERROR([Could not find working SSLeay / OpenSSL libraries, please install])
Damien Millerb85dcad2000-03-11 11:37:00 +1100334 fi
Damien Miller61e50f12000-05-08 20:49:37 +1000335 if test -z "$ssldir" ; then
336 ssldir="(system)"
337 fi
Damien Millera22ba012000-03-02 23:09:20 +1100338
Damien Miller61e50f12000-05-08 20:49:37 +1000339 ac_cv_openssldir=$ssldir
340])
341
Damien Milleredb82922000-06-20 13:25:52 +1000342if (test ! -z "$ac_cv_openssldir" && test "x$ac_cv_openssldir" != "x(system)") ; then
Damien Miller61e50f12000-05-08 20:49:37 +1000343 AC_DEFINE(HAVE_OPENSSL)
344 dnl Need to recover ssldir - test above runs in subshell
345 ssldir=$ac_cv_openssldir
Damien Millera1ad4802000-03-15 10:04:54 +1100346 CFLAGS="$saved_CFLAGS -I$ssldir/include"
347 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
348 if test ! -z "$need_dash_r" ; then
349 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
Damien Millera22ba012000-03-02 23:09:20 +1100350 fi
Damien Miller29ea30d2000-03-17 10:54:15 +1100351 if test ! -z "$blibpath" ; then
352 blibpath="$blibpath:$ssldir:$ssldir/lib"
353 fi
Damien Millera22ba012000-03-02 23:09:20 +1100354fi
Damien Miller3b512e12000-05-17 23:29:18 +1000355LIBS="$saved_LIBS -lcrypto"
Damien Miller61e50f12000-05-08 20:49:37 +1000356
Damien Miller3b512e12000-05-17 23:29:18 +1000357# Now test RSA support
358saved_LIBS="$LIBS"
359AC_MSG_CHECKING([for RSA support])
360for WANTS_RSAREF in "" 1 ; do
361 if test -z "$WANTS_RSAREF" ; then
362 LIBS="$saved_LIBS"
363 else
364 LIBS="$saved_LIBS -lRSAglue -lrsaref"
365 fi
366 AC_TRY_RUN([
367#include <string.h>
368#include <openssl/rand.h>
369#include <openssl/rsa.h>
370#include <openssl/bn.h>
371#include <openssl/sha.h>
372int main(void)
373{
374 int num; RSA *key; static unsigned char p_in[] = "blahblah";
375 unsigned char c[256], p[256];
376 memset(c, 0, sizeof(c)); RAND_add(c, sizeof(c), sizeof(c));
377 if ((key=RSA_generate_key(512, 3, NULL, NULL))==NULL) return(1);
378 num = RSA_public_encrypt(sizeof(p_in) - 1, p_in, c, key, RSA_PKCS1_PADDING);
379 return(-1 == RSA_private_decrypt(num, c, p, key, RSA_PKCS1_PADDING));
380}
381 ],
382 [
383 rsa_works=1
384 break;
385 ], [])
386done
387
388if test ! -z "$no_rsa" ; then
389 AC_MSG_RESULT(disabled)
Damien Miller7b22d652000-06-18 14:07:04 +1000390 RSA_MSG="disabled"
Damien Miller3b512e12000-05-17 23:29:18 +1000391else
392 if test -z "$rsa_works" ; then
393 AC_MSG_WARN([*** No RSA support found *** ])
Damien Miller7b22d652000-06-18 14:07:04 +1000394 RSA_MSG="no"
Damien Miller3b512e12000-05-17 23:29:18 +1000395 else
396 if test -z "$WANTS_RSAREF" ; then
397 AC_MSG_RESULT(yes)
Damien Miller7b22d652000-06-18 14:07:04 +1000398 RSA_MSG="yes"
Damien Miller3b512e12000-05-17 23:29:18 +1000399 else
Damien Miller7b22d652000-06-18 14:07:04 +1000400 RSA_MSG="yes (using RSAref)"
Damien Miller3b512e12000-05-17 23:29:18 +1000401 AC_MSG_RESULT(using RSAref)
402 LIBS="$saved_LIBS -lcrypto -lRSAglue -lrsaref"
403 fi
404 fi
405fi
Damien Millera22ba012000-03-02 23:09:20 +1100406
407# Checks for data types
Damien Millere0f45742000-01-18 09:12:06 +1100408AC_CHECK_SIZEOF(char, 1)
Damien Millerc6398ef1999-11-20 12:18:40 +1100409AC_CHECK_SIZEOF(short int, 2)
410AC_CHECK_SIZEOF(int, 4)
411AC_CHECK_SIZEOF(long int, 4)
412AC_CHECK_SIZEOF(long long int, 8)
413
Damien Millera22ba012000-03-02 23:09:20 +1100414# More checks for data types
Damien Miller61e50f12000-05-08 20:49:37 +1000415AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
416 AC_TRY_COMPILE(
417 [ #include <sys/types.h> ],
418 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
419 [ ac_cv_have_intxx_t="yes" ],
420 [ ac_cv_have_intxx_t="no" ]
421 )
422])
423if test "x$ac_cv_have_intxx_t" = "xyes" ; then
424 AC_DEFINE(HAVE_INTXX_T)
425 have_intxx_t=1
426fi
427
428AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
429 AC_TRY_COMPILE(
430 [ #include <sys/types.h> ],
431 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
432 [ ac_cv_have_u_intxx_t="yes" ],
433 [ ac_cv_have_u_intxx_t="no" ]
434 )
435])
436if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
437 AC_DEFINE(HAVE_U_INTXX_T)
438 have_u_intxx_t=1
439fi
Damien Millerc6398ef1999-11-20 12:18:40 +1100440
Damien Millerc6398ef1999-11-20 12:18:40 +1100441
Damien Milleredb82922000-06-20 13:25:52 +1000442if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
443 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
Damien Millerb29ea912000-01-15 14:12:03 +1100444then
445 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
446 AC_TRY_COMPILE(
Damien Miller61e50f12000-05-08 20:49:37 +1000447 [
448#include <sys/bitypes.h>
449 ],
Damien Millerb29ea912000-01-15 14:12:03 +1100450 [
Damien Miller70494d12000-04-03 15:57:06 +1000451 int8_t a; int16_t b; int32_t c;
452 u_int8_t e; u_int16_t f; u_int32_t g;
453 a = b = c = e = f = g = 1;
Damien Millerb29ea912000-01-15 14:12:03 +1100454 ],
455 [
456 AC_DEFINE(HAVE_U_INTXX_T)
457 AC_DEFINE(HAVE_INTXX_T)
458 AC_MSG_RESULT(yes)
459 ],
460 [AC_MSG_RESULT(no)]
461 )
462fi
463
Damien Millerd6121d22000-03-17 23:26:46 +1100464if test -z "$have_u_intxx_t" ; then
Damien Miller61e50f12000-05-08 20:49:37 +1000465 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
466 AC_TRY_COMPILE(
467 [
468#include <sys/types.h>
469 ],
470 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
471 [ ac_cv_have_uintxx_t="yes" ],
472 [ ac_cv_have_uintxx_t="no" ]
473 )
474 ])
475 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
476 AC_DEFINE(HAVE_UINTXX_T)
477 fi
Damien Millerd6121d22000-03-17 23:26:46 +1100478fi
Damien Millerc6398ef1999-11-20 12:18:40 +1100479
Damien Miller61e50f12000-05-08 20:49:37 +1000480AC_CACHE_CHECK([for socklen_t], ac_cv_have_socklen_t, [
481 AC_TRY_COMPILE(
482 [
Damien Miller81171112000-04-23 11:14:01 +1000483#include <sys/types.h>
484#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000485 ],
486 [socklen_t foo; foo = 1235;],
487 [ ac_cv_have_socklen_t="yes" ],
488 [ ac_cv_have_socklen_t="no" ]
489 )
490])
491if test "x$ac_cv_have_socklen_t" = "xyes" ; then
492 AC_DEFINE(HAVE_SOCKLEN_T)
493fi
Damien Miller74d0d4a1999-12-29 02:24:35 +1100494
Damien Miller61e50f12000-05-08 20:49:37 +1000495AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
496 AC_TRY_COMPILE(
497 [
498#include <sys/types.h>
499 ],
500 [ size_t foo; foo = 1235; ],
501 [ ac_cv_have_size_t="yes" ],
502 [ ac_cv_have_size_t="no" ]
503 )
504])
505if test "x$ac_cv_have_size_t" = "xyes" ; then
506 AC_DEFINE(HAVE_SIZE_T)
507fi
Damien Miller95058511999-12-29 10:36:45 +1100508
Damien Miller615f9392000-05-17 22:53:33 +1000509AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
510 AC_TRY_COMPILE(
511 [
512#include <sys/types.h>
513 ],
514 [ ssize_t foo; foo = 1235; ],
515 [ ac_cv_have_ssize_t="yes" ],
516 [ ac_cv_have_ssize_t="no" ]
517 )
518])
519if test "x$ac_cv_have_ssize_t" = "xyes" ; then
520 AC_DEFINE(HAVE_SSIZE_T)
521fi
522
Damien Millerb54b40e2000-06-23 08:23:34 +1000523AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
524 AC_TRY_COMPILE(
525 [
526#include <sys/types.h>
527#include <sys/socket.h>
528 ],
529 [ sa_family_t foo; foo = 1235; ],
530 [ ac_cv_have_sa_family_t="yes" ],
531 [ ac_cv_have_sa_family_t="no" ]
532 )
533])
534if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
535 AC_DEFINE(HAVE_SA_FAMILY_T)
536fi
537
Damien Miller0f91b4e2000-06-18 15:43:25 +1000538AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
539 AC_TRY_COMPILE(
540 [
541#include <sys/types.h>
542 ],
543 [ pid_t foo; foo = 1235; ],
544 [ ac_cv_have_pid_t="yes" ],
545 [ ac_cv_have_pid_t="no" ]
546 )
547])
548if test "x$ac_cv_have_pid_t" = "xyes" ; then
549 AC_DEFINE(HAVE_PID_T)
550fi
551
552AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
553 AC_TRY_COMPILE(
554 [
555#include <sys/types.h>
556 ],
557 [ mode_t foo; foo = 1235; ],
558 [ ac_cv_have_mode_t="yes" ],
559 [ ac_cv_have_mode_t="no" ]
560 )
561])
562if test "x$ac_cv_have_mode_t" = "xyes" ; then
563 AC_DEFINE(HAVE_MODE_T)
564fi
565
Damien Miller61e50f12000-05-08 20:49:37 +1000566
567AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
568 AC_TRY_COMPILE(
569 [
Damien Miller81171112000-04-23 11:14:01 +1000570#include <sys/types.h>
571#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000572 ],
573 [ struct sockaddr_storage s; ],
574 [ ac_cv_have_struct_sockaddr_storage="yes" ],
575 [ ac_cv_have_struct_sockaddr_storage="no" ]
576 )
577])
578if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
579 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)
580fi
Damien Miller34132e52000-01-14 15:45:46 +1100581
Damien Miller61e50f12000-05-08 20:49:37 +1000582AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
583 AC_TRY_COMPILE(
584 [
Damien Miller7b22d652000-06-18 14:07:04 +1000585#include <sys/types.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000586#include <netinet/in.h>
587 ],
588 [ struct sockaddr_in6 s; s.sin6_family = 0; ],
589 [ ac_cv_have_struct_sockaddr_in6="yes" ],
590 [ ac_cv_have_struct_sockaddr_in6="no" ]
591 )
592])
593if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
594 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)
595fi
Damien Miller34132e52000-01-14 15:45:46 +1100596
Damien Miller61e50f12000-05-08 20:49:37 +1000597AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
598 AC_TRY_COMPILE(
599 [
Damien Miller7b22d652000-06-18 14:07:04 +1000600#include <sys/types.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000601#include <netinet/in.h>
602 ],
603 [ struct in6_addr s; s.s6_addr[0] = 0; ],
604 [ ac_cv_have_struct_in6_addr="yes" ],
605 [ ac_cv_have_struct_in6_addr="no" ]
606 )
607])
608if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
609 AC_DEFINE(HAVE_STRUCT_IN6_ADDR)
610fi
Damien Miller34132e52000-01-14 15:45:46 +1100611
Damien Miller61e50f12000-05-08 20:49:37 +1000612AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
613 AC_TRY_COMPILE(
614 [
Damien Miller81171112000-04-23 11:14:01 +1000615#include <sys/types.h>
616#include <sys/socket.h>
617#include <netdb.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000618 ],
619 [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ],
620 [ ac_cv_have_struct_addrinfo="yes" ],
621 [ ac_cv_have_struct_addrinfo="no" ]
622 )
623])
624if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
625 AC_DEFINE(HAVE_STRUCT_ADDRINFO)
626fi
627
Damien Miller34132e52000-01-14 15:45:46 +1100628
Damien Millera22ba012000-03-02 23:09:20 +1100629# Checks for structure members
Damien Miller34132e52000-01-14 15:45:46 +1100630
Damien Miller61e50f12000-05-08 20:49:37 +1000631OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
632OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX)
633OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX)
634OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP)
635OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP)
Damien Millerad1bc5f2000-05-20 14:53:09 +1000636OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX)
Damien Miller61e50f12000-05-08 20:49:37 +1000637OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP)
638OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP)
639OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP)
640OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX)
641OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP)
642OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX)
andre2ff7b5d2000-06-03 14:57:40 +0000643OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP)
644OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP)
645OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX)
646OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX)
647
Damien Miller61e50f12000-05-08 20:49:37 +1000648AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
649 ac_cv_have_ss_family_in_struct_ss, [
650 AC_TRY_COMPILE(
651 [
Damien Miller81171112000-04-23 11:14:01 +1000652#include <sys/types.h>
653#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000654 ],
655 [ struct sockaddr_storage s; s.ss_family = 1; ],
656 [ ac_cv_have_ss_family_in_struct_ss="yes" ],
657 [ ac_cv_have_ss_family_in_struct_ss="no" ],
658 )
659])
660if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
661 AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
662fi
663
Damien Miller61e50f12000-05-08 20:49:37 +1000664AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
665 ac_cv_have___ss_family_in_struct_ss, [
666 AC_TRY_COMPILE(
667 [
Damien Miller81171112000-04-23 11:14:01 +1000668#include <sys/types.h>
669#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000670 ],
671 [ struct sockaddr_storage s; s.__ss_family = 1; ],
672 [ ac_cv_have___ss_family_in_struct_ss="yes" ],
673 [ ac_cv_have___ss_family_in_struct_ss="no" ]
674 )
675])
676if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
677 AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
678fi
Damien Millerbf1c9b21999-12-09 10:16:54 +1100679
Damien Miller61e50f12000-05-08 20:49:37 +1000680
681AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
682 AC_TRY_LINK([],
683 [ extern char *__progname; printf("%s", __progname); ],
684 [ ac_cv_libc_defines___progname="yes" ],
685 [ ac_cv_libc_defines___progname="no" ]
686 )
687])
688if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
689 AC_DEFINE(HAVE___PROGNAME)
690fi
691
Damien Millera22ba012000-03-02 23:09:20 +1100692
693# Looking for programs, paths and files
694AC_ARG_WITH(rsh,
695 [ --with-rsh=PATH Specify path to remote shell program ],
696 [
Damien Millerb85dcad2000-03-11 11:37:00 +1100697 if test "x$withval" != "$no" ; then
Damien Miller7b22d652000-06-18 14:07:04 +1000698 rsa_path=$withval
Damien Millera22ba012000-03-02 23:09:20 +1100699 fi
700 ],
701 [
702 AC_PATH_PROG(rsh_path, rsh)
703 ]
704)
705
706AC_ARG_WITH(xauth,
707 [ --with-xauth=PATH Specify path to xauth program ],
708 [
709 if test "x$withval" != "$xno" ; then
Damien Miller7b22d652000-06-18 14:07:04 +1000710 xauth_path=$withval
Damien Millera22ba012000-03-02 23:09:20 +1100711 fi
712 ],
713 [
714 AC_PATH_PROG(xauth_path, xauth)
Damien Milleredb82922000-06-20 13:25:52 +1000715 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
Damien Millera22ba012000-03-02 23:09:20 +1100716 xauth_path="/usr/openwin/bin/xauth"
717 fi
718 ]
719)
720
721if test ! -z "$xauth_path" ; then
722 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
723fi
724if test ! -z "$rsh_path" ; then
725 AC_DEFINE_UNQUOTED(RSH_PATH, "$rsh_path")
726fi
727
728# Check for mail directory (last resort if we cannot get it from headers)
729if test ! -z "$MAIL" ; then
730 maildir=`dirname $MAIL`
731 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
732fi
733
Damien Millera22ba012000-03-02 23:09:20 +1100734if test -z "$no_dev_ptmx" ; then
Damien Miller204ad072000-03-02 23:56:12 +1100735 AC_CHECK_FILE("/dev/ptmx",
736 [
737 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
738 have_dev_ptmx=1
739 ]
740 )
Damien Millera22ba012000-03-02 23:09:20 +1100741fi
Damien Miller204ad072000-03-02 23:56:12 +1100742AC_CHECK_FILE("/dev/ptc",
743 [
744 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
745 have_dev_ptc=1
746 ]
747)
748
Damien Millera22ba012000-03-02 23:09:20 +1100749# Options from here on. Some of these are preset by platform above
750
Damien Millera22ba012000-03-02 23:09:20 +1100751# Check for user-specified random device, otherwise check /dev/urandom
752AC_ARG_WITH(random,
753 [ --with-random=FILE read randomness from FILE (default=/dev/urandom)],
754 [
Damien Miller040f3832000-04-03 14:50:43 +1000755 if test "x$withval" != "xno" ; then
756 RANDOM_POOL="$withval";
757 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
758 fi
Damien Millera22ba012000-03-02 23:09:20 +1100759 ],
760 [
761 # Check for random device
762 AC_CHECK_FILE("/dev/urandom",
763 [
764 RANDOM_POOL="/dev/urandom";
765 AC_SUBST(RANDOM_POOL)
766 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
767 ]
768 )
769 ]
770)
771
772# Check for EGD pool file
773AC_ARG_WITH(egd-pool,
774 [ --with-egd-pool=FILE read randomness from EGD pool FILE (default none)],
775 [
Damien Miller040f3832000-04-03 14:50:43 +1000776 if test "x$withval" != "xno" ; then
777 EGD_SOCKET="$withval";
778 AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET")
779 fi
Damien Millera22ba012000-03-02 23:09:20 +1100780 ]
781)
782
Damien Miller0437b332000-05-02 09:56:41 +1000783# detect pathnames for entropy gathering commands, if we need them
784INSTALL_SSH_PRNG_CMDS=""
785rm -f prng_commands
Damien Milleredb82922000-06-20 13:25:52 +1000786if (test -z "$RANDOM_POOL" && test -z "$EGD_SOCKET") ; then
Damien Miller11e37f62000-04-08 18:23:30 +1000787 # Use these commands to collect entropy
Damien Miller61e50f12000-05-08 20:49:37 +1000788 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
789 OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
790 OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
791 OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
792 OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
793 OSSH_PATH_ENTROPY_PROG(PROG_W, w)
794 OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
795 OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
796 OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
797 OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
798 OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
799 OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
800 OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
801 OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
802 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
Damien Miller0437b332000-05-02 09:56:41 +1000803
804 INSTALL_SSH_PRNG_CMDS="yes"
Damien Miller11e37f62000-04-08 18:23:30 +1000805fi
Damien Miller0437b332000-05-02 09:56:41 +1000806AC_SUBST(INSTALL_SSH_PRNG_CMDS)
807
Damien Miller11e37f62000-04-08 18:23:30 +1000808
Damien Miller670a4b82000-01-22 13:53:11 +1100809AC_ARG_WITH(catman,
810 [ --with-catman=man|cat Install preformatted manpages[no]],
811 [
812 MANTYPE='$(CATMAN)'
813 if test x"$withval" != x"yes" ; then
814 mansubdir=$withval
815 else
816 mansubdir=cat
817 fi
818 ], [
819 if test -z "$MANTYPE" ; then
820 MANTYPE='$(TROFFMAN)'
821 mansubdir=man
822 fi
823 ]
824)
825AC_SUBST(MANTYPE)
826AC_SUBST(mansubdir)
Damien Miller8bdeee21999-12-30 15:50:54 +1100827
Damien Millera22ba012000-03-02 23:09:20 +1100828# Check whether user wants Kerberos support
Damien Miller7b22d652000-06-18 14:07:04 +1000829KRB4_MSG="no"
Damien Miller80297751999-11-19 13:03:25 +1100830AC_ARG_WITH(kerberos4,
Damien Miller105b7f02000-01-07 08:45:55 +1100831 [ --with-kerberos4=PATH Enable Kerberos 4 support],
Damien Miller80297751999-11-19 13:03:25 +1100832 [
Damien Millerb85dcad2000-03-11 11:37:00 +1100833 if test "x$withval" != "xno" ; then
Damien Miller105b7f02000-01-07 08:45:55 +1100834
835 if test "x$withval" != "$xyes" ; then
836 CFLAGS="$CFLAGS -I${withval}/include"
837 LDFLAGS="$LDFLAGS -L${withval}/lib"
Damien Miller29ea30d2000-03-17 10:54:15 +1100838 if test ! -z "$need_dash_r" ; then
839 LDFLAGS="$LDFLAGS -R${withval}/lib"
840 fi
841 if test ! -z "$blibpath" ; then
842 blibpath="$blibpath:${withval}/lib"
843 fi
Damien Miller105b7f02000-01-07 08:45:55 +1100844 else
845 if test -d /usr/include/kerberosIV ; then
846 CFLAGS="$CFLAGS -I/usr/include/kerberosIV"
847 fi
848 fi
849
850 AC_CHECK_HEADERS(krb.h)
851 AC_CHECK_LIB(krb, main)
852 if test "$ac_cv_header_krb_h" != yes; then
853 AC_MSG_WARN([Cannot find krb.h, build may fail])
854 fi
855 if test "$ac_cv_lib_krb_main" != yes; then
856 AC_MSG_WARN([Cannot find libkrb, build may fail])
857 fi
858
Damien Millerc85f9b42000-01-29 10:20:21 +1100859 KLIBS="-lkrb -ldes"
Damien Miller105b7f02000-01-07 08:45:55 +1100860 AC_CHECK_LIB(resolv, dn_expand, , )
861 KRB4=yes
Damien Miller7b22d652000-06-18 14:07:04 +1000862 KRB4_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +1100863 AC_DEFINE(KRB4)
Damien Miller8bdeee21999-12-30 15:50:54 +1100864 fi
Damien Miller80297751999-11-19 13:03:25 +1100865 ]
866)
867
Damien Millera22ba012000-03-02 23:09:20 +1100868# Check whether user wants AFS support
Damien Miller7b22d652000-06-18 14:07:04 +1000869AFS_MSG="no"
Damien Millerc6398ef1999-11-20 12:18:40 +1100870AC_ARG_WITH(afs,
Damien Miller105b7f02000-01-07 08:45:55 +1100871 [ --with-afs=PATH Enable AFS support],
Damien Miller80297751999-11-19 13:03:25 +1100872 [
Damien Millerb85dcad2000-03-11 11:37:00 +1100873 if test "x$withval" != "xno" ; then
Damien Miller105b7f02000-01-07 08:45:55 +1100874
875 if test "x$withval" != "$xyes" ; then
876 CFLAGS="$CFLAGS -I${withval}/include"
877 LFLAGS="$LFLAGS -L${withval}/lib"
878 fi
879
880 if test -z "$KRB4" ; then
881 AC_MSG_WARN([AFS requires Kerberos IV support, build may fail])
882 fi
883
Damien Miller8bdeee21999-12-30 15:50:54 +1100884 LIBS="$LIBS -lkafs"
Damien Miller105b7f02000-01-07 08:45:55 +1100885 if test ! -z "$AFS_LIBS" ; then
886 LIBS="$LIBS $AFS_LIBS"
887 fi
888 AC_DEFINE(AFS)
Damien Miller7b22d652000-06-18 14:07:04 +1000889 AFS_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +1100890 fi
Damien Miller80297751999-11-19 13:03:25 +1100891 ]
892)
Damien Millerc85f9b42000-01-29 10:20:21 +1100893LIBS="$LIBS $KLIBS"
Damien Miller80297751999-11-19 13:03:25 +1100894
Damien Millera22ba012000-03-02 23:09:20 +1100895# Check whether user wants S/Key support
Damien Miller7b22d652000-06-18 14:07:04 +1000896SKEY_MSG="no"
Damien Miller80297751999-11-19 13:03:25 +1100897AC_ARG_WITH(skey,
898 [ --with-skey Enable S/Key support],
899 [
Damien Millerb85dcad2000-03-11 11:37:00 +1100900 if test "x$withval" != "xno" ; then
Damien Miller8bdeee21999-12-30 15:50:54 +1100901 AC_DEFINE(SKEY)
902 LIBS="$LIBS -lskey"
Damien Miller7b22d652000-06-18 14:07:04 +1000903 SKEY_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +1100904 fi
Damien Miller80297751999-11-19 13:03:25 +1100905 ]
906)
907
Damien Millera22ba012000-03-02 23:09:20 +1100908# Check whether user wants TCP wrappers support
Damien Miller7b22d652000-06-18 14:07:04 +1000909TCPW_MSG="no"
Damien Millerf7c0f821999-11-22 22:31:49 +1100910AC_ARG_WITH(tcp-wrappers,
Damien Miller80297751999-11-19 13:03:25 +1100911 [ --with-tcp-wrappers Enable tcpwrappers support],
912 [
Damien Millerb85dcad2000-03-11 11:37:00 +1100913 if test "x$withval" != "xno" ; then
Damien Miller65165f82000-03-05 17:02:45 +1100914 saved_LIBS="$LIBS"
Damien Miller105b7f02000-01-07 08:45:55 +1100915 LIBS="$LIBS -lwrap"
Damien Miller65165f82000-03-05 17:02:45 +1100916 AC_MSG_CHECKING(for libwrap)
917 AC_TRY_LINK(
918 [
Damien Miller81171112000-04-23 11:14:01 +1000919#include <tcpd.h>
Damien Miller65165f82000-03-05 17:02:45 +1100920 int deny_severity = 0, allow_severity = 0;
921 ],
922 [hosts_access(0);],
923 [
924 AC_MSG_RESULT(yes)
925 AC_DEFINE(LIBWRAP)
Damien Miller7b22d652000-06-18 14:07:04 +1000926 TCPW_MSG="yes"
Damien Miller65165f82000-03-05 17:02:45 +1100927 ],
928 [
Damien Miller7b22d652000-06-18 14:07:04 +1000929 AC_MSG_ERROR([*** libwrap missing])
Damien Miller65165f82000-03-05 17:02:45 +1100930 ]
931 )
Damien Miller8bdeee21999-12-30 15:50:54 +1100932 fi
Damien Miller80297751999-11-19 13:03:25 +1100933 ]
934)
935
Damien Millera22ba012000-03-02 23:09:20 +1100936# Check whether to enable MD5 passwords
Damien Miller7b22d652000-06-18 14:07:04 +1000937MD5_MSG="no"
Damien Millerf7c0f821999-11-22 22:31:49 +1100938AC_ARG_WITH(md5-passwords,
Damien Millerdd1c7ba1999-11-19 15:53:20 +1100939 [ --with-md5-passwords Enable use of MD5 passwords],
Damien Miller8bdeee21999-12-30 15:50:54 +1100940 [
Damien Millerb85dcad2000-03-11 11:37:00 +1100941 if test "x$withval" != "xno" ; then
Damien Miller8bdeee21999-12-30 15:50:54 +1100942 AC_DEFINE(HAVE_MD5_PASSWORDS)
Damien Miller7b22d652000-06-18 14:07:04 +1000943 MD5_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +1100944 fi
945 ]
Damien Millerdd1c7ba1999-11-19 15:53:20 +1100946)
947
Damien Millera22ba012000-03-02 23:09:20 +1100948# Whether to disable shadow password support
Damien Miller76112de1999-12-21 11:18:08 +1100949AC_ARG_WITH(shadow,
950 [ --without-shadow Disable shadow password support],
951 [
952 if test "x$withval" = "xno" ; then
953 AC_DEFINE(DISABLE_SHADOW)
Damien Miller1f335fb2000-06-26 11:31:33 +1000954 disable_shadow=yes
Damien Miller76112de1999-12-21 11:18:08 +1100955 fi
956 ]
957)
958
Damien Miller1f335fb2000-06-26 11:31:33 +1000959if test -z "$disable_shadow" ; then
960 AC_MSG_CHECKING([if the systems has expire shadow information])
961 AC_TRY_COMPILE(
962 [
963#include <sys/types.h>
964#include <shadow.h>
965 struct spwd sp;
966 ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ],
967 [ sp_expire_available=yes ], []
968 )
969
970 if test "x$sp_expire_available" = "xyes" ; then
971 AC_MSG_RESULT(yes)
972 AC_DEFINE(HAS_SHADOW_EXPIRE)
973 else
974 AC_MSG_RESULT(no)
975 fi
976fi
977
Damien Millera22ba012000-03-02 23:09:20 +1100978# Use ip address instead of hostname in $DISPLAY
Damien Miller7b22d652000-06-18 14:07:04 +1000979DISPLAY_HACK_MSG="no"
Damien Miller76112de1999-12-21 11:18:08 +1100980AC_ARG_WITH(ipaddr-display,
981 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
982 [
Damien Miller66409952000-01-17 21:40:06 +1100983 if test "x$withval" = "xno" ; then
Damien Miller76112de1999-12-21 11:18:08 +1100984 AC_DEFINE(IPADDR_IN_DISPLAY)
Damien Miller7b22d652000-06-18 14:07:04 +1000985 DISPLAY_HACK_MSG="yes"
Damien Miller76112de1999-12-21 11:18:08 +1100986 fi
987 ]
988)
989
Damien Millera22ba012000-03-02 23:09:20 +1100990# Whether to mess with the default path
Damien Miller7b22d652000-06-18 14:07:04 +1000991SERVER_PATH_MSG="(default)"
Damien Millere7f626c1999-12-31 09:49:44 +1100992AC_ARG_WITH(default-path,
Damien Miller5a3e6831999-12-27 09:48:56 +1100993 [ --with-default-path=PATH Specify default \$PATH environment for server],
994 [
995 if test "x$withval" != "xno" ; then
Damien Miller9550a761999-12-29 02:32:22 +1100996 AC_DEFINE_UNQUOTED(USER_PATH, "$withval")
Damien Miller7b22d652000-06-18 14:07:04 +1000997 SERVER_PATH_MSG="$withval"
Damien Miller5a3e6831999-12-27 09:48:56 +1100998 fi
999 ]
1000)
1001
Damien Millera22ba012000-03-02 23:09:20 +11001002# Whether to force IPv4 by default (needed on broken glibc Linux)
Damien Miller7b22d652000-06-18 14:07:04 +10001003IPV4_HACK_MSG="no"
Damien Miller7d80e342000-01-19 14:36:49 +11001004AC_ARG_WITH(ipv4-default,
1005 [ --with-ipv4-default Use IPv4 by connections unless '-6' specified],
1006 [
1007 if test "x$withval" != "xno" ; then
1008 AC_DEFINE(IPV4_DEFAULT)
Damien Miller7b22d652000-06-18 14:07:04 +10001009 IPV4_HACK_MSG="yes"
Damien Miller7d80e342000-01-19 14:36:49 +11001010 fi
1011 ]
1012)
1013
Damien Miller61e50f12000-05-08 20:49:37 +10001014AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
Damien Miller7b22d652000-06-18 14:07:04 +10001015IPV4_IN6_HACK_MSG="no"
Damien Miller7bcb0892000-03-11 20:45:40 +11001016AC_ARG_WITH(4in6,
1017 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
1018 [
1019 if test "x$withval" != "xno" ; then
1020 AC_MSG_RESULT(yes)
1021 AC_DEFINE(IPV4_IN_IPV6)
Damien Miller7b22d652000-06-18 14:07:04 +10001022 IPV4_IN6_HACK_MSG="yes"
Damien Miller7bcb0892000-03-11 20:45:40 +11001023 else
1024 AC_MSG_RESULT(no)
1025 fi
1026 ],[
1027 if test "x$inet6_default_4in6" = "xyes"; then
1028 AC_MSG_RESULT([yes (default)])
1029 AC_DEFINE(IPV4_IN_IPV6)
Damien Miller7b22d652000-06-18 14:07:04 +10001030 IPV4_IN6_HACK_MSG="yes"
Damien Miller7bcb0892000-03-11 20:45:40 +11001031 else
1032 AC_MSG_RESULT([no (default)])
1033 fi
1034 ]
1035)
1036
Damien Millera22ba012000-03-02 23:09:20 +11001037# Where to place sshd.pid
Damien Millerb13c73e2000-01-17 22:02:17 +11001038piddir=/var/run
Damien Miller5eed6a22000-01-16 12:05:18 +11001039AC_ARG_WITH(pid-dir,
1040 [ --with-pid-dir=PATH Specify location of ssh.pid file],
1041 [
1042 if test "x$withval" != "xno" ; then
Damien Millerb13c73e2000-01-17 22:02:17 +11001043 piddir=$withval
Damien Miller5eed6a22000-01-16 12:05:18 +11001044 fi
1045 ]
1046)
Damien Miller4018c192000-04-30 09:30:44 +10001047
Damien Millerdbd250f2000-01-18 08:57:14 +11001048AC_DEFINE_UNQUOTED(PIDDIR, "$piddir")
Damien Millerb13c73e2000-01-17 22:02:17 +11001049AC_SUBST(piddir)
Damien Miller5eed6a22000-01-16 12:05:18 +11001050
andre2ff7b5d2000-06-03 14:57:40 +00001051dnl allow user to disable some login recording features
1052AC_ARG_ENABLE(lastlog,
andre43ca7e22000-06-19 08:23:46 +00001053 [ --disable-lastlog disable use of lastlog even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001054 [ AC_DEFINE(DISABLE_LASTLOG) ]
1055)
1056AC_ARG_ENABLE(utmp,
andre43ca7e22000-06-19 08:23:46 +00001057 [ --disable-utmp disable use of utmp even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001058 [ AC_DEFINE(DISABLE_UTMP) ]
1059)
1060AC_ARG_ENABLE(utmpx,
andre43ca7e22000-06-19 08:23:46 +00001061 [ --disable-utmpx disable use of utmpx even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001062 [ AC_DEFINE(DISABLE_UTMPX) ]
1063)
1064AC_ARG_ENABLE(wtmp,
andre43ca7e22000-06-19 08:23:46 +00001065 [ --disable-wtmp disable use of wtmp even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001066 [ AC_DEFINE(DISABLE_WTMP) ]
1067)
1068AC_ARG_ENABLE(wtmpx,
andre43ca7e22000-06-19 08:23:46 +00001069 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001070 [ AC_DEFINE(DISABLE_WTMPX) ]
1071)
1072AC_ARG_ENABLE(libutil,
andre43ca7e22000-06-19 08:23:46 +00001073 [ --disable-libutil disable use of libutil (login() etc.) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001074 [ AC_DEFINE(DISABLE_LOGIN) ]
1075)
1076AC_ARG_ENABLE(pututline,
andre43ca7e22000-06-19 08:23:46 +00001077 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001078 [ AC_DEFINE(DISABLE_PUTUTLINE) ]
1079)
1080AC_ARG_ENABLE(pututxline,
andre43ca7e22000-06-19 08:23:46 +00001081 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001082 [ AC_DEFINE(DISABLE_PUTUTXLINE) ]
1083)
1084AC_ARG_WITH(lastlog,
andre43ca7e22000-06-19 08:23:46 +00001085 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
andre2ff7b5d2000-06-03 14:57:40 +00001086 [ conf_lastlog_location="$withval"; ],)
1087
1088dnl lastlog, [uw]tmpx? detection
1089dnl NOTE: set the paths in the platform section to avoid the
1090dnl need for command-line parameters
1091dnl lastlog and [uw]tmp are subject to a file search if all else fails
1092
1093dnl lastlog detection
1094dnl NOTE: the code itself will detect if lastlog is a directory
1095AC_MSG_CHECKING([if your system defines LASTLOG_FILE])
1096AC_TRY_COMPILE([
1097#include <sys/types.h>
1098#include <utmp.h>
1099#ifdef HAVE_LASTLOG_H
1100# include <lastlog.h>
1101#endif
Damien Miller2994e082000-06-04 15:51:47 +10001102#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001103# include <paths.h>
1104#endif
1105 ],
1106 [ char *lastlog = LASTLOG_FILE; ],
1107 [ AC_MSG_RESULT(yes) ],
Damien Miller2994e082000-06-04 15:51:47 +10001108 [
1109 AC_MSG_RESULT(no)
1110 AC_MSG_CHECKING([if your system defines _PATH_LASTLOG])
1111 AC_TRY_COMPILE([
1112#include <sys/types.h>
1113#include <utmp.h>
1114#ifdef HAVE_LASTLOG_H
1115# include <lastlog.h>
1116#endif
1117#ifdef HAVE_PATHS_H
1118# include <paths.h>
1119#endif
1120 ],
1121 [ char *lastlog = _PATH_LASTLOG; ],
1122 [ AC_MSG_RESULT(yes) ],
1123 [
andree441aa32000-06-12 22:34:38 +00001124 AC_MSG_RESULT(no)
Damien Miller2994e082000-06-04 15:51:47 +10001125 system_lastlog_path=no
1126 ])
1127 ]
andre2ff7b5d2000-06-03 14:57:40 +00001128)
Damien Miller2994e082000-06-04 15:51:47 +10001129
andre2ff7b5d2000-06-03 14:57:40 +00001130if test -z "$conf_lastlog_location"; then
1131 if test x"$system_lastlog_path" = x"no" ; then
1132 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
Damien Milleredb82922000-06-20 13:25:52 +10001133 if (test -d "$f" || test -f "$f") ; then
andre2ff7b5d2000-06-03 14:57:40 +00001134 conf_lastlog_location=$f
1135 fi
1136 done
1137 if test -z "$conf_lastlog_location"; then
andre45cad512000-06-12 23:27:31 +00001138 AC_MSG_WARN([** Cannot find lastlog **])
1139 dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx
andre2ff7b5d2000-06-03 14:57:40 +00001140 fi
1141 fi
1142fi
1143
1144if test -n "$conf_lastlog_location"; then
1145 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location")
1146fi
1147
1148dnl utmp detection
1149AC_MSG_CHECKING([if your system defines UTMP_FILE])
1150AC_TRY_COMPILE([
1151#include <sys/types.h>
1152#include <utmp.h>
Damien Miller2994e082000-06-04 15:51:47 +10001153#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001154# include <paths.h>
1155#endif
1156 ],
1157 [ char *utmp = UTMP_FILE; ],
1158 [ AC_MSG_RESULT(yes) ],
1159 [ AC_MSG_RESULT(no)
1160 system_utmp_path=no ]
1161)
1162if test -z "$conf_utmp_location"; then
1163 if test x"$system_utmp_path" = x"no" ; then
1164 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
1165 if test -f $f ; then
1166 conf_utmp_location=$f
1167 fi
1168 done
1169 if test -z "$conf_utmp_location"; then
1170 AC_DEFINE(DISABLE_UTMP)
1171 fi
1172 fi
1173fi
1174if test -n "$conf_utmp_location"; then
1175 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location")
1176fi
1177
1178dnl wtmp detection
1179AC_MSG_CHECKING([if your system defines WTMP_FILE])
1180AC_TRY_COMPILE([
1181#include <sys/types.h>
1182#include <utmp.h>
Damien Miller2994e082000-06-04 15:51:47 +10001183#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001184# include <paths.h>
1185#endif
1186 ],
1187 [ char *wtmp = WTMP_FILE; ],
1188 [ AC_MSG_RESULT(yes) ],
1189 [ AC_MSG_RESULT(no)
1190 system_wtmp_path=no ]
1191)
1192if test -z "$conf_wtmp_location"; then
1193 if test x"$system_wtmp_path" = x"no" ; then
1194 for f in /usr/adm/wtmp /var/log/wtmp; do
1195 if test -f $f ; then
1196 conf_wtmp_location=$f
1197 fi
1198 done
1199 if test -z "$conf_wtmp_location"; then
1200 AC_DEFINE(DISABLE_WTMP)
1201 fi
1202 fi
1203fi
1204if test -n "$conf_wtmp_location"; then
1205 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location")
1206fi
1207
1208
1209dnl utmpx detection - I don't know any system so perverse as to require
1210dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out
1211dnl there, though.
1212AC_MSG_CHECKING([if your system defines UTMPX_FILE])
1213AC_TRY_COMPILE([
1214#include <sys/types.h>
1215#include <utmp.h>
1216#ifdef HAVE_UTMPX_H
1217#include <utmpx.h>
1218#endif
Damien Miller2994e082000-06-04 15:51:47 +10001219#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001220# include <paths.h>
1221#endif
1222 ],
1223 [ char *utmpx = UTMPX_FILE; ],
1224 [ AC_MSG_RESULT(yes) ],
1225 [ AC_MSG_RESULT(no)
1226 system_utmpx_path=no ]
1227)
1228if test -z "$conf_utmpx_location"; then
1229 if test x"$system_utmpx_path" = x"no" ; then
1230 AC_DEFINE(DISABLE_UTMPX)
1231 fi
1232else
1233 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location")
1234fi
1235
1236dnl wtmpx detection
1237AC_MSG_CHECKING([if your system defines WTMPX_FILE])
1238AC_TRY_COMPILE([
1239#include <sys/types.h>
1240#include <utmp.h>
1241#ifdef HAVE_UTMPX_H
1242#include <utmpx.h>
1243#endif
Damien Miller2994e082000-06-04 15:51:47 +10001244#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001245# include <paths.h>
1246#endif
1247 ],
1248 [ char *wtmpx = WTMPX_FILE; ],
1249 [ AC_MSG_RESULT(yes) ],
1250 [ AC_MSG_RESULT(no)
1251 system_wtmpx_path=no ]
1252)
1253if test -z "$conf_wtmpx_location"; then
1254 if test x"$system_wtmpx_path" = x"no" ; then
1255 AC_DEFINE(DISABLE_WTMPX)
1256 fi
1257else
1258 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location")
1259fi
1260
Damien Miller4018c192000-04-30 09:30:44 +10001261
1262# Change default command timeout for builtin PRNG
Damien Miller14c12cb2000-06-07 22:20:23 +10001263entropy_timeout=200
Damien Miller4018c192000-04-30 09:30:44 +10001264AC_ARG_WITH(entropy-timeout,
1265 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)],
1266 [
1267 if test "x$withval" != "xno" ; then
1268 entropy_timeout=$withval
1269 fi
1270 ]
1271)
1272AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout)
1273
1274
Damien Miller29ea30d2000-03-17 10:54:15 +11001275if test ! -z "$blibpath" ; then
1276 LDFLAGS="$LDFLAGS -blibpath:$blibpath"
1277 AC_MSG_WARN([Please check and edit -blibpath in LDFLAGS in Makefile])
1278fi
1279
Damien Miller0437b332000-05-02 09:56:41 +10001280AC_OUTPUT(Makefile ssh_prng_cmds)
1281
Damien Miller7b22d652000-06-18 14:07:04 +10001282# Print summary of options
1283
1284if test x$MANTYPE = x'$(CATMAN)' ; then
1285 MAN_MSG=cat
1286else
1287 MAN_MSG=man
1288fi
1289if test ! -z "$RANDOM_POOL" ; then
1290 RAND_MSG="Device ($RANDOM_POOL)"
1291else
1292 if test ! -z "$EGD_SOCKET" ; then
1293 RAND_MSG="EGD ($EGD_SOCKET)"
1294 else
1295 RAND_MSG="Builtin (timeout $entropy_timeout)"
1296 fi
1297fi
1298
1299# Someone please show me a better way :)
1300A=`eval echo ${prefix}` ; A=`eval echo ${A}`
1301B=`eval echo ${bindir}` ; B=`eval echo ${B}`
1302C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
1303D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
1304E=`eval echo ${libexecdir}/ssh/ssh-askpass` ; E=`eval echo ${E}`
1305F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
1306G=`eval echo ${piddir}` ; G=`eval echo ${G}`
1307
1308echo ""
1309echo "OpenSSH configured has been configured with the following options."
1310echo " User binaries: $B"
1311echo " System binaries: $C"
1312echo " Configuration files: $D"
1313echo " Askpass program: $E"
1314echo " Manual pages: $F"
1315echo " PID file: $G"
1316echo " Random number collection: $RAND_MSG"
1317echo " Manpage format: $MAN_MSG"
1318echo " PAM support: ${PAM_MSG}"
1319echo " KerberosIV support: $KRB4_MSG"
1320echo " AFS support: $AFS_MSG"
1321echo " S/KEY support: $SKEY_MSG"
1322echo " TCP Wrappers support: $TCPW_MSG"
1323echo " MD5 password support: $MD5_MSG"
1324echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
1325echo " Use IPv4 by default hack: $IPV4_HACK_MSG"
1326echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
1327
1328echo ""
1329
1330echo "Compiler flags: ${CFLAGS}"
1331echo "Linker flags: ${LDFLAGS}"
1332echo "Libraries: ${LIBS}"
1333
1334echo ""
1335