blob: c1bcb34241aceb65484fa70e864939757394b157 [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 Miller76112de1999-12-21 11:18:08 +1100153esac
154
Damien Millere37bfc12000-06-05 09:37:43 +1000155# Allow user to specify flags
156AC_ARG_WITH(cflags,
157 [ --with-cflags Specify additional flags to pass to compiler],
158 [
159 if test "x$withval" != "xno" ; then
160 CFLAGS="$CFLAGS $withval"
161 fi
162 ]
163)
164AC_ARG_WITH(ldflags,
165 [ --with-ldlags Specify additional flags to pass to linker],
166 [
167 if test "x$withval" != "xno" ; then
168 LDFLAGS="$LDFLAGS $withval"
169 fi
170 ]
171)
172AC_ARG_WITH(libs,
173 [ --with-libs Specify additional libraries to link with],
174 [
175 if test "x$withval" != "xno" ; then
176 LIBS="$LIBS $withval"
177 fi
178 ]
179)
180
181
Damien Millera22ba012000-03-02 23:09:20 +1100182# Checks for libraries.
Damien Millerab18c411999-11-11 10:40:23 +1100183AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***]))
184AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil")
Damien Millerab18c411999-11-11 10:40:23 +1100185
Damien Millerbeb4ba51999-12-28 15:09:35 +1100186if test -z "$no_libsocket" ; then
187 AC_CHECK_LIB(nsl, yp_match, , )
188fi
189if test -z "$no_libnsl" ; then
190 AC_CHECK_LIB(socket, main, , )
Damien Miller32b3cf21999-12-26 10:21:48 +1100191fi
Damien Millerab18c411999-11-11 10:40:23 +1100192
Damien Millera22ba012000-03-02 23:09:20 +1100193# Checks for header files.
Damien Miller0f91b4e2000-06-18 15:43:25 +1000194AC_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 +1100195
Damien Millera22ba012000-03-02 23:09:20 +1100196# Checks for library functions.
andre2ff7b5d2000-06-03 14:57:40 +0000197AC_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)
198dnl checks for time functions
199AC_CHECK_FUNCS(gettimeofday time)
200dnl checks for libutil functions
201AC_CHECK_FUNCS(login logout updwtmp logwtmp)
202dnl checks for utmp functions
203AC_CHECK_FUNCS(entutent getutent getutid getutline pututline setutent)
204AC_CHECK_FUNCS(utmpname)
205dnl checks for utmpx functions
206AC_CHECK_FUNCS(entutxent getutxent getutxid getutxline pututxline )
207AC_CHECK_FUNCS(setutxent utmpxname)
Damien Millercedfecc1999-11-15 14:36:53 +1100208
Damien Miller04f80141999-11-19 15:32:34 +1100209AC_CHECK_FUNC(login,
210 [AC_DEFINE(HAVE_LOGIN)],
211 [AC_CHECK_LIB(bsd, login, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_LOGIN)])]
212)
213
214AC_CHECK_FUNC(daemon,
215 [AC_DEFINE(HAVE_DAEMON)],
216 [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
217)
218
Damien Miller9fb07e42000-03-05 16:22:59 +1100219AC_CHECK_FUNC(getpagesize,
220 [AC_DEFINE(HAVE_GETPAGESIZE)],
221 [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])]
222)
223
Damien Miller7b22d652000-06-18 14:07:04 +1000224PAM_MSG="no"
Damien Millera22ba012000-03-02 23:09:20 +1100225AC_ARG_WITH(pam,
226 [ --without-pam Disable PAM support ],
227 [
228 if test "x$withval" = "xno" ; then
229 no_pam=1
230 AC_DEFINE(DISABLE_PAM)
Damien Miller7b22d652000-06-18 14:07:04 +1000231 PAM_MSG="disabled"
Damien Millera22ba012000-03-02 23:09:20 +1100232 fi
233 ]
234)
Damien Milleredb82922000-06-20 13:25:52 +1000235if (test -z "$no_pam" && test "x$ac_cv_header_security_pam_appl_h" = "xyes") ; then
Damien Millera22ba012000-03-02 23:09:20 +1100236 AC_CHECK_LIB(dl, dlopen, , )
237 LIBS="$LIBS -lpam"
238
Damien Miller0e65eed2000-05-17 22:16:05 +1000239 AC_CHECK_FUNCS(pam_getenvlist)
Damien Miller1bead332000-04-30 00:47:29 +1000240
Damien Miller1f335fb2000-06-26 11:31:33 +1000241 disable_shadow=yes
242
Damien Miller7b22d652000-06-18 14:07:04 +1000243 PAM_MSG="yes"
244
Damien Millera22ba012000-03-02 23:09:20 +1100245 # Check PAM strerror arguments (old PAM)
246 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
247 AC_TRY_COMPILE(
248 [
Damien Miller81171112000-04-23 11:14:01 +1000249#include <stdlib.h>
250#include <security/pam_appl.h>
Damien Millera22ba012000-03-02 23:09:20 +1100251 ],
252 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
253 [AC_MSG_RESULT(no)],
254 [
255 AC_DEFINE(HAVE_OLD_PAM)
256 AC_MSG_RESULT(yes)
Damien Miller7b22d652000-06-18 14:07:04 +1000257 PAM_MSG="yes (old library)"
Damien Millera22ba012000-03-02 23:09:20 +1100258 ]
259 )
260fi
261
262# The big search for OpenSSL
263AC_ARG_WITH(ssl-dir,
264 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
265 [
266 if test "x$withval" != "$xno" ; then
267 tryssldir=$withval
268 fi
269 ]
270)
271
272saved_LIBS="$LIBS"
Damien Millera1ad4802000-03-15 10:04:54 +1100273saved_LDFLAGS="$LDFLAGS"
Damien Millera22ba012000-03-02 23:09:20 +1100274saved_CFLAGS="$CFLAGS"
275if test "x$prefix" != "xNONE" ; then
276 tryssldir="$tryssldir $prefix"
277fi
Damien Miller61e50f12000-05-08 20:49:37 +1000278AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [
Damien Millera22ba012000-03-02 23:09:20 +1100279
Damien Miller61e50f12000-05-08 20:49:37 +1000280 for ssldir in "" $tryssldir /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
281 if test ! -z "$ssldir" ; then
282 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
283 CFLAGS="$saved_CFLAGS -I$ssldir/include"
284 if test ! -z "$need_dash_r" ; then
285 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
286 fi
Damien Millera1ad4802000-03-15 10:04:54 +1100287 else
Damien Miller61e50f12000-05-08 20:49:37 +1000288 LDFLAGS="$saved_LDFLAGS"
Damien Millerb85dcad2000-03-11 11:37:00 +1100289 fi
290
Damien Miller3b512e12000-05-17 23:29:18 +1000291 LIBS="$saved_LIBS -lcrypto"
Damien Miller61e50f12000-05-08 20:49:37 +1000292
Damien Miller3b512e12000-05-17 23:29:18 +1000293 # Basic test to check for compatible version and correct linking
294 # *does not* test for RSA - that comes later.
295 AC_TRY_RUN(
296 [
Damien Millere59ce622000-05-01 20:54:17 +1000297#include <string.h>
298#include <openssl/rand.h>
Damien Miller81171112000-04-23 11:14:01 +1000299int main(void)
300{
Damien Miller3b512e12000-05-17 23:29:18 +1000301 char a[2048];
302 memset(a, 0, sizeof(a));
Damien Miller81171112000-04-23 11:14:01 +1000303 RAND_add(a, sizeof(a), sizeof(a));
Damien Miller3b512e12000-05-17 23:29:18 +1000304 return(RAND_status() <= 0);
Damien Miller81171112000-04-23 11:14:01 +1000305}
Damien Miller3b512e12000-05-17 23:29:18 +1000306 ],
307 [
308 found_crypto=1
309 break;
310 ], []
311 )
Damien Miller61e50f12000-05-08 20:49:37 +1000312
313 if test ! -z "$found_crypto" ; then
314 break;
315 fi
Damien Millerb85dcad2000-03-11 11:37:00 +1100316 done
317
Damien Miller61e50f12000-05-08 20:49:37 +1000318 if test -z "$found_crypto" ; then
319 AC_MSG_ERROR([Could not find working SSLeay / OpenSSL libraries, please install])
Damien Millerb85dcad2000-03-11 11:37:00 +1100320 fi
Damien Miller61e50f12000-05-08 20:49:37 +1000321 if test -z "$ssldir" ; then
322 ssldir="(system)"
323 fi
Damien Millera22ba012000-03-02 23:09:20 +1100324
Damien Miller61e50f12000-05-08 20:49:37 +1000325 ac_cv_openssldir=$ssldir
326])
327
Damien Milleredb82922000-06-20 13:25:52 +1000328if (test ! -z "$ac_cv_openssldir" && test "x$ac_cv_openssldir" != "x(system)") ; then
Damien Miller61e50f12000-05-08 20:49:37 +1000329 AC_DEFINE(HAVE_OPENSSL)
330 dnl Need to recover ssldir - test above runs in subshell
331 ssldir=$ac_cv_openssldir
Damien Millera1ad4802000-03-15 10:04:54 +1100332 CFLAGS="$saved_CFLAGS -I$ssldir/include"
333 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
334 if test ! -z "$need_dash_r" ; then
335 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
Damien Millera22ba012000-03-02 23:09:20 +1100336 fi
Damien Miller29ea30d2000-03-17 10:54:15 +1100337 if test ! -z "$blibpath" ; then
338 blibpath="$blibpath:$ssldir:$ssldir/lib"
339 fi
Damien Millera22ba012000-03-02 23:09:20 +1100340fi
Damien Miller3b512e12000-05-17 23:29:18 +1000341LIBS="$saved_LIBS -lcrypto"
Damien Miller61e50f12000-05-08 20:49:37 +1000342
Damien Miller3b512e12000-05-17 23:29:18 +1000343# Now test RSA support
344saved_LIBS="$LIBS"
345AC_MSG_CHECKING([for RSA support])
346for WANTS_RSAREF in "" 1 ; do
347 if test -z "$WANTS_RSAREF" ; then
348 LIBS="$saved_LIBS"
349 else
350 LIBS="$saved_LIBS -lRSAglue -lrsaref"
351 fi
352 AC_TRY_RUN([
353#include <string.h>
354#include <openssl/rand.h>
355#include <openssl/rsa.h>
356#include <openssl/bn.h>
357#include <openssl/sha.h>
358int main(void)
359{
360 int num; RSA *key; static unsigned char p_in[] = "blahblah";
361 unsigned char c[256], p[256];
362 memset(c, 0, sizeof(c)); RAND_add(c, sizeof(c), sizeof(c));
363 if ((key=RSA_generate_key(512, 3, NULL, NULL))==NULL) return(1);
364 num = RSA_public_encrypt(sizeof(p_in) - 1, p_in, c, key, RSA_PKCS1_PADDING);
365 return(-1 == RSA_private_decrypt(num, c, p, key, RSA_PKCS1_PADDING));
366}
367 ],
368 [
369 rsa_works=1
370 break;
371 ], [])
372done
373
374if test ! -z "$no_rsa" ; then
375 AC_MSG_RESULT(disabled)
Damien Miller7b22d652000-06-18 14:07:04 +1000376 RSA_MSG="disabled"
Damien Miller3b512e12000-05-17 23:29:18 +1000377else
378 if test -z "$rsa_works" ; then
379 AC_MSG_WARN([*** No RSA support found *** ])
Damien Miller7b22d652000-06-18 14:07:04 +1000380 RSA_MSG="no"
Damien Miller3b512e12000-05-17 23:29:18 +1000381 else
382 if test -z "$WANTS_RSAREF" ; then
383 AC_MSG_RESULT(yes)
Damien Miller7b22d652000-06-18 14:07:04 +1000384 RSA_MSG="yes"
Damien Miller3b512e12000-05-17 23:29:18 +1000385 else
Damien Miller7b22d652000-06-18 14:07:04 +1000386 RSA_MSG="yes (using RSAref)"
Damien Miller3b512e12000-05-17 23:29:18 +1000387 AC_MSG_RESULT(using RSAref)
388 LIBS="$saved_LIBS -lcrypto -lRSAglue -lrsaref"
389 fi
390 fi
391fi
Damien Millera22ba012000-03-02 23:09:20 +1100392
393# Checks for data types
Damien Millere0f45742000-01-18 09:12:06 +1100394AC_CHECK_SIZEOF(char, 1)
Damien Millerc6398ef1999-11-20 12:18:40 +1100395AC_CHECK_SIZEOF(short int, 2)
396AC_CHECK_SIZEOF(int, 4)
397AC_CHECK_SIZEOF(long int, 4)
398AC_CHECK_SIZEOF(long long int, 8)
399
Damien Millera22ba012000-03-02 23:09:20 +1100400# More checks for data types
Damien Miller61e50f12000-05-08 20:49:37 +1000401AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
402 AC_TRY_COMPILE(
403 [ #include <sys/types.h> ],
404 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
405 [ ac_cv_have_intxx_t="yes" ],
406 [ ac_cv_have_intxx_t="no" ]
407 )
408])
409if test "x$ac_cv_have_intxx_t" = "xyes" ; then
410 AC_DEFINE(HAVE_INTXX_T)
411 have_intxx_t=1
412fi
413
414AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
415 AC_TRY_COMPILE(
416 [ #include <sys/types.h> ],
417 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
418 [ ac_cv_have_u_intxx_t="yes" ],
419 [ ac_cv_have_u_intxx_t="no" ]
420 )
421])
422if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
423 AC_DEFINE(HAVE_U_INTXX_T)
424 have_u_intxx_t=1
425fi
Damien Millerc6398ef1999-11-20 12:18:40 +1100426
Damien Millerc6398ef1999-11-20 12:18:40 +1100427
Damien Milleredb82922000-06-20 13:25:52 +1000428if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
429 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
Damien Millerb29ea912000-01-15 14:12:03 +1100430then
431 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
432 AC_TRY_COMPILE(
Damien Miller61e50f12000-05-08 20:49:37 +1000433 [
434#include <sys/bitypes.h>
435 ],
Damien Millerb29ea912000-01-15 14:12:03 +1100436 [
Damien Miller70494d12000-04-03 15:57:06 +1000437 int8_t a; int16_t b; int32_t c;
438 u_int8_t e; u_int16_t f; u_int32_t g;
439 a = b = c = e = f = g = 1;
Damien Millerb29ea912000-01-15 14:12:03 +1100440 ],
441 [
442 AC_DEFINE(HAVE_U_INTXX_T)
443 AC_DEFINE(HAVE_INTXX_T)
444 AC_MSG_RESULT(yes)
445 ],
446 [AC_MSG_RESULT(no)]
447 )
448fi
449
Damien Millerd6121d22000-03-17 23:26:46 +1100450if test -z "$have_u_intxx_t" ; then
Damien Miller61e50f12000-05-08 20:49:37 +1000451 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
452 AC_TRY_COMPILE(
453 [
454#include <sys/types.h>
455 ],
456 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
457 [ ac_cv_have_uintxx_t="yes" ],
458 [ ac_cv_have_uintxx_t="no" ]
459 )
460 ])
461 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
462 AC_DEFINE(HAVE_UINTXX_T)
463 fi
Damien Millerd6121d22000-03-17 23:26:46 +1100464fi
Damien Millerc6398ef1999-11-20 12:18:40 +1100465
Damien Miller61e50f12000-05-08 20:49:37 +1000466AC_CACHE_CHECK([for socklen_t], ac_cv_have_socklen_t, [
467 AC_TRY_COMPILE(
468 [
Damien Miller81171112000-04-23 11:14:01 +1000469#include <sys/types.h>
470#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000471 ],
472 [socklen_t foo; foo = 1235;],
473 [ ac_cv_have_socklen_t="yes" ],
474 [ ac_cv_have_socklen_t="no" ]
475 )
476])
477if test "x$ac_cv_have_socklen_t" = "xyes" ; then
478 AC_DEFINE(HAVE_SOCKLEN_T)
479fi
Damien Miller74d0d4a1999-12-29 02:24:35 +1100480
Damien Miller61e50f12000-05-08 20:49:37 +1000481AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
482 AC_TRY_COMPILE(
483 [
484#include <sys/types.h>
485 ],
486 [ size_t foo; foo = 1235; ],
487 [ ac_cv_have_size_t="yes" ],
488 [ ac_cv_have_size_t="no" ]
489 )
490])
491if test "x$ac_cv_have_size_t" = "xyes" ; then
492 AC_DEFINE(HAVE_SIZE_T)
493fi
Damien Miller95058511999-12-29 10:36:45 +1100494
Damien Miller615f9392000-05-17 22:53:33 +1000495AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
496 AC_TRY_COMPILE(
497 [
498#include <sys/types.h>
499 ],
500 [ ssize_t foo; foo = 1235; ],
501 [ ac_cv_have_ssize_t="yes" ],
502 [ ac_cv_have_ssize_t="no" ]
503 )
504])
505if test "x$ac_cv_have_ssize_t" = "xyes" ; then
506 AC_DEFINE(HAVE_SSIZE_T)
507fi
508
Damien Millerb54b40e2000-06-23 08:23:34 +1000509AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
510 AC_TRY_COMPILE(
511 [
512#include <sys/types.h>
513#include <sys/socket.h>
514 ],
515 [ sa_family_t foo; foo = 1235; ],
516 [ ac_cv_have_sa_family_t="yes" ],
517 [ ac_cv_have_sa_family_t="no" ]
518 )
519])
520if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
521 AC_DEFINE(HAVE_SA_FAMILY_T)
522fi
523
Damien Miller0f91b4e2000-06-18 15:43:25 +1000524AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
525 AC_TRY_COMPILE(
526 [
527#include <sys/types.h>
528 ],
529 [ pid_t foo; foo = 1235; ],
530 [ ac_cv_have_pid_t="yes" ],
531 [ ac_cv_have_pid_t="no" ]
532 )
533])
534if test "x$ac_cv_have_pid_t" = "xyes" ; then
535 AC_DEFINE(HAVE_PID_T)
536fi
537
538AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
539 AC_TRY_COMPILE(
540 [
541#include <sys/types.h>
542 ],
543 [ mode_t foo; foo = 1235; ],
544 [ ac_cv_have_mode_t="yes" ],
545 [ ac_cv_have_mode_t="no" ]
546 )
547])
548if test "x$ac_cv_have_mode_t" = "xyes" ; then
549 AC_DEFINE(HAVE_MODE_T)
550fi
551
Damien Miller61e50f12000-05-08 20:49:37 +1000552
553AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
554 AC_TRY_COMPILE(
555 [
Damien Miller81171112000-04-23 11:14:01 +1000556#include <sys/types.h>
557#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000558 ],
559 [ struct sockaddr_storage s; ],
560 [ ac_cv_have_struct_sockaddr_storage="yes" ],
561 [ ac_cv_have_struct_sockaddr_storage="no" ]
562 )
563])
564if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
565 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)
566fi
Damien Miller34132e52000-01-14 15:45:46 +1100567
Damien Miller61e50f12000-05-08 20:49:37 +1000568AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
569 AC_TRY_COMPILE(
570 [
Damien Miller7b22d652000-06-18 14:07:04 +1000571#include <sys/types.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000572#include <netinet/in.h>
573 ],
574 [ struct sockaddr_in6 s; s.sin6_family = 0; ],
575 [ ac_cv_have_struct_sockaddr_in6="yes" ],
576 [ ac_cv_have_struct_sockaddr_in6="no" ]
577 )
578])
579if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
580 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)
581fi
Damien Miller34132e52000-01-14 15:45:46 +1100582
Damien Miller61e50f12000-05-08 20:49:37 +1000583AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
584 AC_TRY_COMPILE(
585 [
Damien Miller7b22d652000-06-18 14:07:04 +1000586#include <sys/types.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000587#include <netinet/in.h>
588 ],
589 [ struct in6_addr s; s.s6_addr[0] = 0; ],
590 [ ac_cv_have_struct_in6_addr="yes" ],
591 [ ac_cv_have_struct_in6_addr="no" ]
592 )
593])
594if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
595 AC_DEFINE(HAVE_STRUCT_IN6_ADDR)
596fi
Damien Miller34132e52000-01-14 15:45:46 +1100597
Damien Miller61e50f12000-05-08 20:49:37 +1000598AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
599 AC_TRY_COMPILE(
600 [
Damien Miller81171112000-04-23 11:14:01 +1000601#include <sys/types.h>
602#include <sys/socket.h>
603#include <netdb.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000604 ],
605 [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ],
606 [ ac_cv_have_struct_addrinfo="yes" ],
607 [ ac_cv_have_struct_addrinfo="no" ]
608 )
609])
610if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
611 AC_DEFINE(HAVE_STRUCT_ADDRINFO)
612fi
613
Damien Miller34132e52000-01-14 15:45:46 +1100614
Damien Millera22ba012000-03-02 23:09:20 +1100615# Checks for structure members
Damien Miller34132e52000-01-14 15:45:46 +1100616
Damien Miller61e50f12000-05-08 20:49:37 +1000617OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
618OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX)
619OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX)
620OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP)
621OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP)
Damien Millerad1bc5f2000-05-20 14:53:09 +1000622OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX)
Damien Miller61e50f12000-05-08 20:49:37 +1000623OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP)
624OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP)
625OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP)
626OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX)
627OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP)
628OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX)
andre2ff7b5d2000-06-03 14:57:40 +0000629OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP)
630OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP)
631OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX)
632OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX)
633
Damien Miller61e50f12000-05-08 20:49:37 +1000634AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
635 ac_cv_have_ss_family_in_struct_ss, [
636 AC_TRY_COMPILE(
637 [
Damien Miller81171112000-04-23 11:14:01 +1000638#include <sys/types.h>
639#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000640 ],
641 [ struct sockaddr_storage s; s.ss_family = 1; ],
642 [ ac_cv_have_ss_family_in_struct_ss="yes" ],
643 [ ac_cv_have_ss_family_in_struct_ss="no" ],
644 )
645])
646if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
647 AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
648fi
649
Damien Miller61e50f12000-05-08 20:49:37 +1000650AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
651 ac_cv_have___ss_family_in_struct_ss, [
652 AC_TRY_COMPILE(
653 [
Damien Miller81171112000-04-23 11:14:01 +1000654#include <sys/types.h>
655#include <sys/socket.h>
Damien Miller61e50f12000-05-08 20:49:37 +1000656 ],
657 [ struct sockaddr_storage s; s.__ss_family = 1; ],
658 [ ac_cv_have___ss_family_in_struct_ss="yes" ],
659 [ ac_cv_have___ss_family_in_struct_ss="no" ]
660 )
661])
662if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
663 AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
664fi
Damien Millerbf1c9b21999-12-09 10:16:54 +1100665
Damien Miller61e50f12000-05-08 20:49:37 +1000666
667AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
668 AC_TRY_LINK([],
669 [ extern char *__progname; printf("%s", __progname); ],
670 [ ac_cv_libc_defines___progname="yes" ],
671 [ ac_cv_libc_defines___progname="no" ]
672 )
673])
674if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
675 AC_DEFINE(HAVE___PROGNAME)
676fi
677
Damien Millera22ba012000-03-02 23:09:20 +1100678
679# Looking for programs, paths and files
680AC_ARG_WITH(rsh,
681 [ --with-rsh=PATH Specify path to remote shell program ],
682 [
Damien Millerb85dcad2000-03-11 11:37:00 +1100683 if test "x$withval" != "$no" ; then
Damien Miller7b22d652000-06-18 14:07:04 +1000684 rsa_path=$withval
Damien Millera22ba012000-03-02 23:09:20 +1100685 fi
686 ],
687 [
688 AC_PATH_PROG(rsh_path, rsh)
689 ]
690)
691
692AC_ARG_WITH(xauth,
693 [ --with-xauth=PATH Specify path to xauth program ],
694 [
695 if test "x$withval" != "$xno" ; then
Damien Miller7b22d652000-06-18 14:07:04 +1000696 xauth_path=$withval
Damien Millera22ba012000-03-02 23:09:20 +1100697 fi
698 ],
699 [
700 AC_PATH_PROG(xauth_path, xauth)
Damien Milleredb82922000-06-20 13:25:52 +1000701 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
Damien Millera22ba012000-03-02 23:09:20 +1100702 xauth_path="/usr/openwin/bin/xauth"
703 fi
704 ]
705)
706
707if test ! -z "$xauth_path" ; then
708 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
709fi
710if test ! -z "$rsh_path" ; then
711 AC_DEFINE_UNQUOTED(RSH_PATH, "$rsh_path")
712fi
713
714# Check for mail directory (last resort if we cannot get it from headers)
715if test ! -z "$MAIL" ; then
716 maildir=`dirname $MAIL`
717 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
718fi
719
Damien Millera22ba012000-03-02 23:09:20 +1100720if test -z "$no_dev_ptmx" ; then
Damien Miller204ad072000-03-02 23:56:12 +1100721 AC_CHECK_FILE("/dev/ptmx",
722 [
723 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
724 have_dev_ptmx=1
725 ]
726 )
Damien Millera22ba012000-03-02 23:09:20 +1100727fi
Damien Miller204ad072000-03-02 23:56:12 +1100728AC_CHECK_FILE("/dev/ptc",
729 [
730 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
731 have_dev_ptc=1
732 ]
733)
734
Damien Millera22ba012000-03-02 23:09:20 +1100735# Options from here on. Some of these are preset by platform above
736
Damien Millera22ba012000-03-02 23:09:20 +1100737# Check for user-specified random device, otherwise check /dev/urandom
738AC_ARG_WITH(random,
739 [ --with-random=FILE read randomness from FILE (default=/dev/urandom)],
740 [
Damien Miller040f3832000-04-03 14:50:43 +1000741 if test "x$withval" != "xno" ; then
742 RANDOM_POOL="$withval";
743 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
744 fi
Damien Millera22ba012000-03-02 23:09:20 +1100745 ],
746 [
747 # Check for random device
748 AC_CHECK_FILE("/dev/urandom",
749 [
750 RANDOM_POOL="/dev/urandom";
751 AC_SUBST(RANDOM_POOL)
752 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
753 ]
754 )
755 ]
756)
757
758# Check for EGD pool file
759AC_ARG_WITH(egd-pool,
760 [ --with-egd-pool=FILE read randomness from EGD pool FILE (default none)],
761 [
Damien Miller040f3832000-04-03 14:50:43 +1000762 if test "x$withval" != "xno" ; then
763 EGD_SOCKET="$withval";
764 AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET")
765 fi
Damien Millera22ba012000-03-02 23:09:20 +1100766 ]
767)
768
Damien Miller0437b332000-05-02 09:56:41 +1000769# detect pathnames for entropy gathering commands, if we need them
770INSTALL_SSH_PRNG_CMDS=""
771rm -f prng_commands
Damien Milleredb82922000-06-20 13:25:52 +1000772if (test -z "$RANDOM_POOL" && test -z "$EGD_SOCKET") ; then
Damien Miller11e37f62000-04-08 18:23:30 +1000773 # Use these commands to collect entropy
Damien Miller61e50f12000-05-08 20:49:37 +1000774 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
775 OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
776 OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
777 OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
778 OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
779 OSSH_PATH_ENTROPY_PROG(PROG_W, w)
780 OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
781 OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
782 OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
783 OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
784 OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
785 OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
786 OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
787 OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
788 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
Damien Miller0437b332000-05-02 09:56:41 +1000789
790 INSTALL_SSH_PRNG_CMDS="yes"
Damien Miller11e37f62000-04-08 18:23:30 +1000791fi
Damien Miller0437b332000-05-02 09:56:41 +1000792AC_SUBST(INSTALL_SSH_PRNG_CMDS)
793
Damien Miller11e37f62000-04-08 18:23:30 +1000794
Damien Miller670a4b82000-01-22 13:53:11 +1100795AC_ARG_WITH(catman,
796 [ --with-catman=man|cat Install preformatted manpages[no]],
797 [
798 MANTYPE='$(CATMAN)'
799 if test x"$withval" != x"yes" ; then
800 mansubdir=$withval
801 else
802 mansubdir=cat
803 fi
804 ], [
805 if test -z "$MANTYPE" ; then
806 MANTYPE='$(TROFFMAN)'
807 mansubdir=man
808 fi
809 ]
810)
811AC_SUBST(MANTYPE)
812AC_SUBST(mansubdir)
Damien Miller8bdeee21999-12-30 15:50:54 +1100813
Damien Millera22ba012000-03-02 23:09:20 +1100814# Check whether user wants Kerberos support
Damien Miller7b22d652000-06-18 14:07:04 +1000815KRB4_MSG="no"
Damien Miller80297751999-11-19 13:03:25 +1100816AC_ARG_WITH(kerberos4,
Damien Miller105b7f02000-01-07 08:45:55 +1100817 [ --with-kerberos4=PATH Enable Kerberos 4 support],
Damien Miller80297751999-11-19 13:03:25 +1100818 [
Damien Millerb85dcad2000-03-11 11:37:00 +1100819 if test "x$withval" != "xno" ; then
Damien Miller105b7f02000-01-07 08:45:55 +1100820
821 if test "x$withval" != "$xyes" ; then
822 CFLAGS="$CFLAGS -I${withval}/include"
823 LDFLAGS="$LDFLAGS -L${withval}/lib"
Damien Miller29ea30d2000-03-17 10:54:15 +1100824 if test ! -z "$need_dash_r" ; then
825 LDFLAGS="$LDFLAGS -R${withval}/lib"
826 fi
827 if test ! -z "$blibpath" ; then
828 blibpath="$blibpath:${withval}/lib"
829 fi
Damien Miller105b7f02000-01-07 08:45:55 +1100830 else
831 if test -d /usr/include/kerberosIV ; then
832 CFLAGS="$CFLAGS -I/usr/include/kerberosIV"
833 fi
834 fi
835
836 AC_CHECK_HEADERS(krb.h)
837 AC_CHECK_LIB(krb, main)
838 if test "$ac_cv_header_krb_h" != yes; then
839 AC_MSG_WARN([Cannot find krb.h, build may fail])
840 fi
841 if test "$ac_cv_lib_krb_main" != yes; then
842 AC_MSG_WARN([Cannot find libkrb, build may fail])
843 fi
844
Damien Millerc85f9b42000-01-29 10:20:21 +1100845 KLIBS="-lkrb -ldes"
Damien Miller105b7f02000-01-07 08:45:55 +1100846 AC_CHECK_LIB(resolv, dn_expand, , )
847 KRB4=yes
Damien Miller7b22d652000-06-18 14:07:04 +1000848 KRB4_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +1100849 AC_DEFINE(KRB4)
Damien Miller8bdeee21999-12-30 15:50:54 +1100850 fi
Damien Miller80297751999-11-19 13:03:25 +1100851 ]
852)
853
Damien Millera22ba012000-03-02 23:09:20 +1100854# Check whether user wants AFS support
Damien Miller7b22d652000-06-18 14:07:04 +1000855AFS_MSG="no"
Damien Millerc6398ef1999-11-20 12:18:40 +1100856AC_ARG_WITH(afs,
Damien Miller105b7f02000-01-07 08:45:55 +1100857 [ --with-afs=PATH Enable AFS support],
Damien Miller80297751999-11-19 13:03:25 +1100858 [
Damien Millerb85dcad2000-03-11 11:37:00 +1100859 if test "x$withval" != "xno" ; then
Damien Miller105b7f02000-01-07 08:45:55 +1100860
861 if test "x$withval" != "$xyes" ; then
862 CFLAGS="$CFLAGS -I${withval}/include"
863 LFLAGS="$LFLAGS -L${withval}/lib"
864 fi
865
866 if test -z "$KRB4" ; then
867 AC_MSG_WARN([AFS requires Kerberos IV support, build may fail])
868 fi
869
Damien Miller8bdeee21999-12-30 15:50:54 +1100870 LIBS="$LIBS -lkafs"
Damien Miller105b7f02000-01-07 08:45:55 +1100871 if test ! -z "$AFS_LIBS" ; then
872 LIBS="$LIBS $AFS_LIBS"
873 fi
874 AC_DEFINE(AFS)
Damien Miller7b22d652000-06-18 14:07:04 +1000875 AFS_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +1100876 fi
Damien Miller80297751999-11-19 13:03:25 +1100877 ]
878)
Damien Millerc85f9b42000-01-29 10:20:21 +1100879LIBS="$LIBS $KLIBS"
Damien Miller80297751999-11-19 13:03:25 +1100880
Damien Millera22ba012000-03-02 23:09:20 +1100881# Check whether user wants S/Key support
Damien Miller7b22d652000-06-18 14:07:04 +1000882SKEY_MSG="no"
Damien Miller80297751999-11-19 13:03:25 +1100883AC_ARG_WITH(skey,
884 [ --with-skey Enable S/Key support],
885 [
Damien Millerb85dcad2000-03-11 11:37:00 +1100886 if test "x$withval" != "xno" ; then
Damien Miller8bdeee21999-12-30 15:50:54 +1100887 AC_DEFINE(SKEY)
888 LIBS="$LIBS -lskey"
Damien Miller7b22d652000-06-18 14:07:04 +1000889 SKEY_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +1100890 fi
Damien Miller80297751999-11-19 13:03:25 +1100891 ]
892)
893
Damien Millera22ba012000-03-02 23:09:20 +1100894# Check whether user wants TCP wrappers support
Damien Miller7b22d652000-06-18 14:07:04 +1000895TCPW_MSG="no"
Damien Millerf7c0f821999-11-22 22:31:49 +1100896AC_ARG_WITH(tcp-wrappers,
Damien Miller80297751999-11-19 13:03:25 +1100897 [ --with-tcp-wrappers Enable tcpwrappers support],
898 [
Damien Millerb85dcad2000-03-11 11:37:00 +1100899 if test "x$withval" != "xno" ; then
Damien Miller65165f82000-03-05 17:02:45 +1100900 saved_LIBS="$LIBS"
Damien Miller105b7f02000-01-07 08:45:55 +1100901 LIBS="$LIBS -lwrap"
Damien Miller65165f82000-03-05 17:02:45 +1100902 AC_MSG_CHECKING(for libwrap)
903 AC_TRY_LINK(
904 [
Damien Miller81171112000-04-23 11:14:01 +1000905#include <tcpd.h>
Damien Miller65165f82000-03-05 17:02:45 +1100906 int deny_severity = 0, allow_severity = 0;
907 ],
908 [hosts_access(0);],
909 [
910 AC_MSG_RESULT(yes)
911 AC_DEFINE(LIBWRAP)
Damien Miller7b22d652000-06-18 14:07:04 +1000912 TCPW_MSG="yes"
Damien Miller65165f82000-03-05 17:02:45 +1100913 ],
914 [
Damien Miller7b22d652000-06-18 14:07:04 +1000915 AC_MSG_ERROR([*** libwrap missing])
Damien Miller65165f82000-03-05 17:02:45 +1100916 ]
917 )
Damien Miller8bdeee21999-12-30 15:50:54 +1100918 fi
Damien Miller80297751999-11-19 13:03:25 +1100919 ]
920)
921
Damien Millera22ba012000-03-02 23:09:20 +1100922# Check whether to enable MD5 passwords
Damien Miller7b22d652000-06-18 14:07:04 +1000923MD5_MSG="no"
Damien Millerf7c0f821999-11-22 22:31:49 +1100924AC_ARG_WITH(md5-passwords,
Damien Millerdd1c7ba1999-11-19 15:53:20 +1100925 [ --with-md5-passwords Enable use of MD5 passwords],
Damien Miller8bdeee21999-12-30 15:50:54 +1100926 [
Damien Millerb85dcad2000-03-11 11:37:00 +1100927 if test "x$withval" != "xno" ; then
Damien Miller8bdeee21999-12-30 15:50:54 +1100928 AC_DEFINE(HAVE_MD5_PASSWORDS)
Damien Miller7b22d652000-06-18 14:07:04 +1000929 MD5_MSG="yes"
Damien Miller8bdeee21999-12-30 15:50:54 +1100930 fi
931 ]
Damien Millerdd1c7ba1999-11-19 15:53:20 +1100932)
933
Damien Millera22ba012000-03-02 23:09:20 +1100934# Whether to disable shadow password support
Damien Miller76112de1999-12-21 11:18:08 +1100935AC_ARG_WITH(shadow,
936 [ --without-shadow Disable shadow password support],
937 [
938 if test "x$withval" = "xno" ; then
939 AC_DEFINE(DISABLE_SHADOW)
Damien Miller1f335fb2000-06-26 11:31:33 +1000940 disable_shadow=yes
Damien Miller76112de1999-12-21 11:18:08 +1100941 fi
942 ]
943)
944
Damien Miller1f335fb2000-06-26 11:31:33 +1000945if test -z "$disable_shadow" ; then
946 AC_MSG_CHECKING([if the systems has expire shadow information])
947 AC_TRY_COMPILE(
948 [
949#include <sys/types.h>
950#include <shadow.h>
951 struct spwd sp;
952 ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ],
953 [ sp_expire_available=yes ], []
954 )
955
956 if test "x$sp_expire_available" = "xyes" ; then
957 AC_MSG_RESULT(yes)
958 AC_DEFINE(HAS_SHADOW_EXPIRE)
959 else
960 AC_MSG_RESULT(no)
961 fi
962fi
963
Damien Millera22ba012000-03-02 23:09:20 +1100964# Use ip address instead of hostname in $DISPLAY
Damien Miller7b22d652000-06-18 14:07:04 +1000965DISPLAY_HACK_MSG="no"
Damien Miller76112de1999-12-21 11:18:08 +1100966AC_ARG_WITH(ipaddr-display,
967 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
968 [
Damien Miller66409952000-01-17 21:40:06 +1100969 if test "x$withval" = "xno" ; then
Damien Miller76112de1999-12-21 11:18:08 +1100970 AC_DEFINE(IPADDR_IN_DISPLAY)
Damien Miller7b22d652000-06-18 14:07:04 +1000971 DISPLAY_HACK_MSG="yes"
Damien Miller76112de1999-12-21 11:18:08 +1100972 fi
973 ]
974)
975
Damien Millera22ba012000-03-02 23:09:20 +1100976# Whether to mess with the default path
Damien Miller7b22d652000-06-18 14:07:04 +1000977SERVER_PATH_MSG="(default)"
Damien Millere7f626c1999-12-31 09:49:44 +1100978AC_ARG_WITH(default-path,
Damien Miller5a3e6831999-12-27 09:48:56 +1100979 [ --with-default-path=PATH Specify default \$PATH environment for server],
980 [
981 if test "x$withval" != "xno" ; then
Damien Miller9550a761999-12-29 02:32:22 +1100982 AC_DEFINE_UNQUOTED(USER_PATH, "$withval")
Damien Miller7b22d652000-06-18 14:07:04 +1000983 SERVER_PATH_MSG="$withval"
Damien Miller5a3e6831999-12-27 09:48:56 +1100984 fi
985 ]
986)
987
Damien Millera22ba012000-03-02 23:09:20 +1100988# Whether to force IPv4 by default (needed on broken glibc Linux)
Damien Miller7b22d652000-06-18 14:07:04 +1000989IPV4_HACK_MSG="no"
Damien Miller7d80e342000-01-19 14:36:49 +1100990AC_ARG_WITH(ipv4-default,
991 [ --with-ipv4-default Use IPv4 by connections unless '-6' specified],
992 [
993 if test "x$withval" != "xno" ; then
994 AC_DEFINE(IPV4_DEFAULT)
Damien Miller7b22d652000-06-18 14:07:04 +1000995 IPV4_HACK_MSG="yes"
Damien Miller7d80e342000-01-19 14:36:49 +1100996 fi
997 ]
998)
999
Damien Miller61e50f12000-05-08 20:49:37 +10001000AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
Damien Miller7b22d652000-06-18 14:07:04 +10001001IPV4_IN6_HACK_MSG="no"
Damien Miller7bcb0892000-03-11 20:45:40 +11001002AC_ARG_WITH(4in6,
1003 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
1004 [
1005 if test "x$withval" != "xno" ; then
1006 AC_MSG_RESULT(yes)
1007 AC_DEFINE(IPV4_IN_IPV6)
Damien Miller7b22d652000-06-18 14:07:04 +10001008 IPV4_IN6_HACK_MSG="yes"
Damien Miller7bcb0892000-03-11 20:45:40 +11001009 else
1010 AC_MSG_RESULT(no)
1011 fi
1012 ],[
1013 if test "x$inet6_default_4in6" = "xyes"; then
1014 AC_MSG_RESULT([yes (default)])
1015 AC_DEFINE(IPV4_IN_IPV6)
Damien Miller7b22d652000-06-18 14:07:04 +10001016 IPV4_IN6_HACK_MSG="yes"
Damien Miller7bcb0892000-03-11 20:45:40 +11001017 else
1018 AC_MSG_RESULT([no (default)])
1019 fi
1020 ]
1021)
1022
Damien Millera22ba012000-03-02 23:09:20 +11001023# Where to place sshd.pid
Damien Millerb13c73e2000-01-17 22:02:17 +11001024piddir=/var/run
Damien Miller5eed6a22000-01-16 12:05:18 +11001025AC_ARG_WITH(pid-dir,
1026 [ --with-pid-dir=PATH Specify location of ssh.pid file],
1027 [
1028 if test "x$withval" != "xno" ; then
Damien Millerb13c73e2000-01-17 22:02:17 +11001029 piddir=$withval
Damien Miller5eed6a22000-01-16 12:05:18 +11001030 fi
1031 ]
1032)
Damien Miller4018c192000-04-30 09:30:44 +10001033
Damien Millerdbd250f2000-01-18 08:57:14 +11001034AC_DEFINE_UNQUOTED(PIDDIR, "$piddir")
Damien Millerb13c73e2000-01-17 22:02:17 +11001035AC_SUBST(piddir)
Damien Miller5eed6a22000-01-16 12:05:18 +11001036
andre2ff7b5d2000-06-03 14:57:40 +00001037dnl allow user to disable some login recording features
1038AC_ARG_ENABLE(lastlog,
andre43ca7e22000-06-19 08:23:46 +00001039 [ --disable-lastlog disable use of lastlog even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001040 [ AC_DEFINE(DISABLE_LASTLOG) ]
1041)
1042AC_ARG_ENABLE(utmp,
andre43ca7e22000-06-19 08:23:46 +00001043 [ --disable-utmp disable use of utmp even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001044 [ AC_DEFINE(DISABLE_UTMP) ]
1045)
1046AC_ARG_ENABLE(utmpx,
andre43ca7e22000-06-19 08:23:46 +00001047 [ --disable-utmpx disable use of utmpx even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001048 [ AC_DEFINE(DISABLE_UTMPX) ]
1049)
1050AC_ARG_ENABLE(wtmp,
andre43ca7e22000-06-19 08:23:46 +00001051 [ --disable-wtmp disable use of wtmp even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001052 [ AC_DEFINE(DISABLE_WTMP) ]
1053)
1054AC_ARG_ENABLE(wtmpx,
andre43ca7e22000-06-19 08:23:46 +00001055 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001056 [ AC_DEFINE(DISABLE_WTMPX) ]
1057)
1058AC_ARG_ENABLE(libutil,
andre43ca7e22000-06-19 08:23:46 +00001059 [ --disable-libutil disable use of libutil (login() etc.) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001060 [ AC_DEFINE(DISABLE_LOGIN) ]
1061)
1062AC_ARG_ENABLE(pututline,
andre43ca7e22000-06-19 08:23:46 +00001063 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001064 [ AC_DEFINE(DISABLE_PUTUTLINE) ]
1065)
1066AC_ARG_ENABLE(pututxline,
andre43ca7e22000-06-19 08:23:46 +00001067 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
andre2ff7b5d2000-06-03 14:57:40 +00001068 [ AC_DEFINE(DISABLE_PUTUTXLINE) ]
1069)
1070AC_ARG_WITH(lastlog,
andre43ca7e22000-06-19 08:23:46 +00001071 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
andre2ff7b5d2000-06-03 14:57:40 +00001072 [ conf_lastlog_location="$withval"; ],)
1073
1074dnl lastlog, [uw]tmpx? detection
1075dnl NOTE: set the paths in the platform section to avoid the
1076dnl need for command-line parameters
1077dnl lastlog and [uw]tmp are subject to a file search if all else fails
1078
1079dnl lastlog detection
1080dnl NOTE: the code itself will detect if lastlog is a directory
1081AC_MSG_CHECKING([if your system defines LASTLOG_FILE])
1082AC_TRY_COMPILE([
1083#include <sys/types.h>
1084#include <utmp.h>
1085#ifdef HAVE_LASTLOG_H
1086# include <lastlog.h>
1087#endif
Damien Miller2994e082000-06-04 15:51:47 +10001088#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001089# include <paths.h>
1090#endif
1091 ],
1092 [ char *lastlog = LASTLOG_FILE; ],
1093 [ AC_MSG_RESULT(yes) ],
Damien Miller2994e082000-06-04 15:51:47 +10001094 [
1095 AC_MSG_RESULT(no)
1096 AC_MSG_CHECKING([if your system defines _PATH_LASTLOG])
1097 AC_TRY_COMPILE([
1098#include <sys/types.h>
1099#include <utmp.h>
1100#ifdef HAVE_LASTLOG_H
1101# include <lastlog.h>
1102#endif
1103#ifdef HAVE_PATHS_H
1104# include <paths.h>
1105#endif
1106 ],
1107 [ char *lastlog = _PATH_LASTLOG; ],
1108 [ AC_MSG_RESULT(yes) ],
1109 [
andree441aa32000-06-12 22:34:38 +00001110 AC_MSG_RESULT(no)
Damien Miller2994e082000-06-04 15:51:47 +10001111 system_lastlog_path=no
1112 ])
1113 ]
andre2ff7b5d2000-06-03 14:57:40 +00001114)
Damien Miller2994e082000-06-04 15:51:47 +10001115
andre2ff7b5d2000-06-03 14:57:40 +00001116if test -z "$conf_lastlog_location"; then
1117 if test x"$system_lastlog_path" = x"no" ; then
1118 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
Damien Milleredb82922000-06-20 13:25:52 +10001119 if (test -d "$f" || test -f "$f") ; then
andre2ff7b5d2000-06-03 14:57:40 +00001120 conf_lastlog_location=$f
1121 fi
1122 done
1123 if test -z "$conf_lastlog_location"; then
andre45cad512000-06-12 23:27:31 +00001124 AC_MSG_WARN([** Cannot find lastlog **])
1125 dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx
andre2ff7b5d2000-06-03 14:57:40 +00001126 fi
1127 fi
1128fi
1129
1130if test -n "$conf_lastlog_location"; then
1131 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location")
1132fi
1133
1134dnl utmp detection
1135AC_MSG_CHECKING([if your system defines UTMP_FILE])
1136AC_TRY_COMPILE([
1137#include <sys/types.h>
1138#include <utmp.h>
Damien Miller2994e082000-06-04 15:51:47 +10001139#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001140# include <paths.h>
1141#endif
1142 ],
1143 [ char *utmp = UTMP_FILE; ],
1144 [ AC_MSG_RESULT(yes) ],
1145 [ AC_MSG_RESULT(no)
1146 system_utmp_path=no ]
1147)
1148if test -z "$conf_utmp_location"; then
1149 if test x"$system_utmp_path" = x"no" ; then
1150 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
1151 if test -f $f ; then
1152 conf_utmp_location=$f
1153 fi
1154 done
1155 if test -z "$conf_utmp_location"; then
1156 AC_DEFINE(DISABLE_UTMP)
1157 fi
1158 fi
1159fi
1160if test -n "$conf_utmp_location"; then
1161 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location")
1162fi
1163
1164dnl wtmp detection
1165AC_MSG_CHECKING([if your system defines WTMP_FILE])
1166AC_TRY_COMPILE([
1167#include <sys/types.h>
1168#include <utmp.h>
Damien Miller2994e082000-06-04 15:51:47 +10001169#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001170# include <paths.h>
1171#endif
1172 ],
1173 [ char *wtmp = WTMP_FILE; ],
1174 [ AC_MSG_RESULT(yes) ],
1175 [ AC_MSG_RESULT(no)
1176 system_wtmp_path=no ]
1177)
1178if test -z "$conf_wtmp_location"; then
1179 if test x"$system_wtmp_path" = x"no" ; then
1180 for f in /usr/adm/wtmp /var/log/wtmp; do
1181 if test -f $f ; then
1182 conf_wtmp_location=$f
1183 fi
1184 done
1185 if test -z "$conf_wtmp_location"; then
1186 AC_DEFINE(DISABLE_WTMP)
1187 fi
1188 fi
1189fi
1190if test -n "$conf_wtmp_location"; then
1191 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location")
1192fi
1193
1194
1195dnl utmpx detection - I don't know any system so perverse as to require
1196dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out
1197dnl there, though.
1198AC_MSG_CHECKING([if your system defines UTMPX_FILE])
1199AC_TRY_COMPILE([
1200#include <sys/types.h>
1201#include <utmp.h>
1202#ifdef HAVE_UTMPX_H
1203#include <utmpx.h>
1204#endif
Damien Miller2994e082000-06-04 15:51:47 +10001205#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001206# include <paths.h>
1207#endif
1208 ],
1209 [ char *utmpx = UTMPX_FILE; ],
1210 [ AC_MSG_RESULT(yes) ],
1211 [ AC_MSG_RESULT(no)
1212 system_utmpx_path=no ]
1213)
1214if test -z "$conf_utmpx_location"; then
1215 if test x"$system_utmpx_path" = x"no" ; then
1216 AC_DEFINE(DISABLE_UTMPX)
1217 fi
1218else
1219 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location")
1220fi
1221
1222dnl wtmpx detection
1223AC_MSG_CHECKING([if your system defines WTMPX_FILE])
1224AC_TRY_COMPILE([
1225#include <sys/types.h>
1226#include <utmp.h>
1227#ifdef HAVE_UTMPX_H
1228#include <utmpx.h>
1229#endif
Damien Miller2994e082000-06-04 15:51:47 +10001230#ifdef HAVE_PATHS_H
andre2ff7b5d2000-06-03 14:57:40 +00001231# include <paths.h>
1232#endif
1233 ],
1234 [ char *wtmpx = WTMPX_FILE; ],
1235 [ AC_MSG_RESULT(yes) ],
1236 [ AC_MSG_RESULT(no)
1237 system_wtmpx_path=no ]
1238)
1239if test -z "$conf_wtmpx_location"; then
1240 if test x"$system_wtmpx_path" = x"no" ; then
1241 AC_DEFINE(DISABLE_WTMPX)
1242 fi
1243else
1244 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location")
1245fi
1246
Damien Miller4018c192000-04-30 09:30:44 +10001247
1248# Change default command timeout for builtin PRNG
Damien Miller14c12cb2000-06-07 22:20:23 +10001249entropy_timeout=200
Damien Miller4018c192000-04-30 09:30:44 +10001250AC_ARG_WITH(entropy-timeout,
1251 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)],
1252 [
1253 if test "x$withval" != "xno" ; then
1254 entropy_timeout=$withval
1255 fi
1256 ]
1257)
1258AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout)
1259
1260
Damien Miller29ea30d2000-03-17 10:54:15 +11001261if test ! -z "$blibpath" ; then
1262 LDFLAGS="$LDFLAGS -blibpath:$blibpath"
1263 AC_MSG_WARN([Please check and edit -blibpath in LDFLAGS in Makefile])
1264fi
1265
Damien Miller0437b332000-05-02 09:56:41 +10001266AC_OUTPUT(Makefile ssh_prng_cmds)
1267
Damien Miller7b22d652000-06-18 14:07:04 +10001268# Print summary of options
1269
1270if test x$MANTYPE = x'$(CATMAN)' ; then
1271 MAN_MSG=cat
1272else
1273 MAN_MSG=man
1274fi
1275if test ! -z "$RANDOM_POOL" ; then
1276 RAND_MSG="Device ($RANDOM_POOL)"
1277else
1278 if test ! -z "$EGD_SOCKET" ; then
1279 RAND_MSG="EGD ($EGD_SOCKET)"
1280 else
1281 RAND_MSG="Builtin (timeout $entropy_timeout)"
1282 fi
1283fi
1284
1285# Someone please show me a better way :)
1286A=`eval echo ${prefix}` ; A=`eval echo ${A}`
1287B=`eval echo ${bindir}` ; B=`eval echo ${B}`
1288C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
1289D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
1290E=`eval echo ${libexecdir}/ssh/ssh-askpass` ; E=`eval echo ${E}`
1291F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
1292G=`eval echo ${piddir}` ; G=`eval echo ${G}`
1293
1294echo ""
1295echo "OpenSSH configured has been configured with the following options."
1296echo " User binaries: $B"
1297echo " System binaries: $C"
1298echo " Configuration files: $D"
1299echo " Askpass program: $E"
1300echo " Manual pages: $F"
1301echo " PID file: $G"
1302echo " Random number collection: $RAND_MSG"
1303echo " Manpage format: $MAN_MSG"
1304echo " PAM support: ${PAM_MSG}"
1305echo " KerberosIV support: $KRB4_MSG"
1306echo " AFS support: $AFS_MSG"
1307echo " S/KEY support: $SKEY_MSG"
1308echo " TCP Wrappers support: $TCPW_MSG"
1309echo " MD5 password support: $MD5_MSG"
1310echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
1311echo " Use IPv4 by default hack: $IPV4_HACK_MSG"
1312echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
1313
1314echo ""
1315
1316echo "Compiler flags: ${CFLAGS}"
1317echo "Linker flags: ${LDFLAGS}"
1318echo "Libraries: ${LIBS}"
1319
1320echo ""
1321