]> andersk Git - openssh.git/blame - configure.in
- (djm) Patch from Kenji Miyake <kenji@miyake.org> to disable utmp usage
[openssh.git] / configure.in
CommitLineData
4cca272e 1AC_INIT(ssh.c)
5881cd60 2
3AC_CONFIG_HEADER(config.h)
b14b2ae7 4AC_PROG_CC
a7effaac 5AC_CANONICAL_HOST
5881cd60 6
a0391976 7# Checks for programs.
4cca272e 8AC_PROG_CPP
5881cd60 9AC_PROG_RANLIB
cf8dd513 10AC_PROG_INSTALL
d4f11b59 11AC_CHECK_PROG(AR, ar, ar)
a0f84251 12AC_PATH_PROG(PERL, perl)
13AC_SUBST(PERL)
ad85db64 14AC_PATH_PROG(ENT, ent)
15AC_SUBST(ENT)
f498ed15 16
d423d822 17if 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
a0391976 28# Check for some target-specific stuff
a7effaac 29case "$host" in
9d6b1b96 30*-*-aix*)
31 AFS_LIBS="-lld"
84afc958 32 CFLAGS="$CFLAGS -I/usr/local/include"
33 LDFLAGS="$LDFLAGS -L/usr/local/lib"
bd499f9e 34 if test "$LD" != "gcc" -a -z "$blibpath"; then
35 blibpath="/usr/lib:/lib:/usr/local/lib"
36 fi
c1ef8333 37 AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)])
4c8ef3fb 38 AC_DEFINE(BROKEN_GETADDRINFO)
a3cef3ca 39 dnl AIX handles lastlog as part of its login message
40 AC_DEFINE(DISABLE_LASTLOG)
9d6b1b96 41 ;;
a7effaac 42*-*-hpux10*)
43 if test -z "$GCC"; then
fc1e8bf4 44 CFLAGS="$CFLAGS -Ae"
a7effaac 45 fi
46 CFLAGS="$CFLAGS -D_HPUX_SOURCE"
47 AC_DEFINE(IPADDR_IN_DISPLAY)
48 AC_MSG_CHECKING(for HPUX trusted system password database)
49 if test -f /tcb/files/auth/system/default; then
50 AC_MSG_RESULT(yes)
51 AC_DEFINE(HAVE_HPUX_TRUSTED_SYSTEM_PW)
52 LIBS="$LIBS -lsec"
dfb95100 53 AC_MSG_WARN([This configuration is untested])
a7effaac 54 else
55 AC_MSG_RESULT(no)
56 AC_DEFINE(DISABLE_SHADOW)
57 fi
c54a6257 58 MANTYPE='$(CATMAN)'
59 mansubdir=cat
a7effaac 60 ;;
2b763e31 61*-*-hpux11*)
62 if test -z "$GCC"; then
63 CFLAGS="$CFLAGS -Ae"
64 fi
65 CFLAGS="$CFLAGS -D_HPUX_SOURCE"
2b763e31 66 AC_DEFINE(IPADDR_IN_DISPLAY)
2b763e31 67 AC_MSG_CHECKING(for HPUX trusted system password database)
68 if test -f /tcb/files/auth/system/default; then
69 AC_MSG_RESULT(yes)
70 AC_DEFINE(HAVE_HPUX_TRUSTED_SYSTEM_PW)
71 LIBS="$LIBS -lsec"
72 AC_MSG_WARN([This configuration is untested])
73 else
74 AC_MSG_RESULT(no)
75 AC_DEFINE(DISABLE_SHADOW)
76 fi
77 MANTYPE='$(CATMAN)'
78 mansubdir=cat
79 ;;
d94aa2ae 80*-*-irix5*)
84afc958 81 CFLAGS="$CFLAGS -I/usr/local/include"
c5fa2eb0 82 LDFLAGS="$LDFLAGS"
8eb34e02 83 MANTYPE='$(CATMAN)'
b9795b89 84 no_libsocket=1
85 no_libnsl=1
86 ;;
87*-*-irix6*)
84afc958 88 CFLAGS="$CFLAGS -I/usr/local/include"
c5fa2eb0 89 LDFLAGS="$LDFLAGS"
8eb34e02 90 MANTYPE='$(CATMAN)'
91 AC_MSG_WARN([*** Irix 6.x is not tested, please report you experiences *** ])
d94aa2ae 92 no_libsocket=1
93 no_libnsl=1
94 ;;
5cdfe03f 95*-*-linux*)
96 no_dev_ptmx=1
80faa19f 97 AC_DEFINE(DONT_TRY_OTHER_AF)
98 inet6_default_4in6=yes
5cdfe03f 99 ;;
d468fc76 100*-*-netbsd*)
a0391976 101 need_dash_r=1
d468fc76 102 ;;
9d6b1b96 103*-*-solaris*)
84afc958 104 CFLAGS="$CFLAGS -I/usr/local/include"
4696775a 105 LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib -L/usr/ucblib -R/usr/ucblib"
a0391976 106 need_dash_r=1
1d7b9b20 107 # hardwire lastlog location (can't detect it on some versions)
108 conf_lastlog_location="/var/adm/lastlog"
32c80420 109 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
110 sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'`
111 if test "$sol2ver" -ge 8; then
112 AC_MSG_RESULT(yes)
113 AC_DEFINE(DISABLE_UTMP)
114 AC_DEFINE(DISABLE_WTMP)
115 else
116 AC_MSG_RESULT(no)
117 fi
9d6b1b96 118 ;;
a423beaf 119*-*-sunos4*)
120 CFLAGS="$CFLAGS -DSUNOS4"
121 AC_CHECK_FUNCS(getpwanam)
122 ;;
9d6b1b96 123*-*-sysv*)
84afc958 124 CFLAGS="$CFLAGS -I/usr/local/include"
125 LDFLAGS="$LDFLAGS -L/usr/local/lib"
9755cbdb 126 MANTYPE='$(CATMAN)'
127 mansubdir=cat
9d6b1b96 128 LIBS="$LIBS -lgen -lsocket"
129 ;;
a7effaac 130esac
131
8e7b16f8 132# Allow user to specify flags
133AC_ARG_WITH(cflags,
134 [ --with-cflags Specify additional flags to pass to compiler],
135 [
136 if test "x$withval" != "xno" ; then
137 CFLAGS="$CFLAGS $withval"
138 fi
139 ]
140)
141AC_ARG_WITH(ldflags,
142 [ --with-ldlags Specify additional flags to pass to linker],
143 [
144 if test "x$withval" != "xno" ; then
145 LDFLAGS="$LDFLAGS $withval"
146 fi
147 ]
148)
149AC_ARG_WITH(libs,
150 [ --with-libs Specify additional libraries to link with],
151 [
152 if test "x$withval" != "xno" ; then
153 LIBS="$LIBS $withval"
154 fi
155 ]
156)
157
158
a0391976 159# Checks for libraries.
4cca272e 160AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***]))
161AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil")
4cca272e 162
d94aa2ae 163if test -z "$no_libsocket" ; then
164 AC_CHECK_LIB(nsl, yp_match, , )
165fi
166if test -z "$no_libnsl" ; then
167 AC_CHECK_LIB(socket, main, , )
f74efc8d 168fi
4cca272e 169
a0391976 170# Checks for header files.
1d7b9b20 171AC_CHECK_HEADERS(bstring.h endian.h lastlog.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/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h stddef.h time.h util.h utmp.h utmpx.h)
4cca272e 172
a0391976 173# Checks for library functions.
1d7b9b20 174AC_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)
175dnl checks for time functions
176AC_CHECK_FUNCS(gettimeofday time)
177dnl checks for libutil functions
178AC_CHECK_FUNCS(login logout updwtmp logwtmp)
179dnl checks for utmp functions
180AC_CHECK_FUNCS(entutent getutent getutid getutline pututline setutent)
181AC_CHECK_FUNCS(utmpname)
182dnl checks for utmpx functions
183AC_CHECK_FUNCS(entutxent getutxent getutxid getutxline pututxline )
184AC_CHECK_FUNCS(setutxent utmpxname)
76cd7316 185
beb43d31 186AC_CHECK_FUNC(login,
187 [AC_DEFINE(HAVE_LOGIN)],
188 [AC_CHECK_LIB(bsd, login, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_LOGIN)])]
189)
190
191AC_CHECK_FUNC(daemon,
192 [AC_DEFINE(HAVE_DAEMON)],
193 [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
194)
195
aa6bd60a 196AC_CHECK_FUNC(getpagesize,
197 [AC_DEFINE(HAVE_GETPAGESIZE)],
198 [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])]
199)
200
a0391976 201AC_ARG_WITH(pam,
202 [ --without-pam Disable PAM support ],
203 [
204 if test "x$withval" = "xno" ; then
205 no_pam=1
206 AC_DEFINE(DISABLE_PAM)
207 fi
208 ]
209)
210if test -z "$no_pam" -a "x$ac_cv_header_security_pam_appl_h" = "xyes" ; then
211 AC_CHECK_LIB(dl, dlopen, , )
212 LIBS="$LIBS -lpam"
213
28c1d5ce 214 AC_CHECK_FUNCS(pam_getenvlist)
2b763e31 215
a0391976 216 # Check PAM strerror arguments (old PAM)
217 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
218 AC_TRY_COMPILE(
219 [
18ba2aab 220#include <stdlib.h>
221#include <security/pam_appl.h>
a0391976 222 ],
223 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
224 [AC_MSG_RESULT(no)],
225 [
226 AC_DEFINE(HAVE_OLD_PAM)
227 AC_MSG_RESULT(yes)
228 ]
229 )
230fi
231
232# The big search for OpenSSL
233AC_ARG_WITH(ssl-dir,
234 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
235 [
236 if test "x$withval" != "$xno" ; then
237 tryssldir=$withval
238 fi
239 ]
240)
241
242saved_LIBS="$LIBS"
cb0b7ea4 243saved_LDFLAGS="$LDFLAGS"
a0391976 244saved_CFLAGS="$CFLAGS"
245if test "x$prefix" != "xNONE" ; then
246 tryssldir="$tryssldir $prefix"
247fi
58d100bf 248AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [
249
250 for ssldir in "" $tryssldir /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
251 if test ! -z "$ssldir" ; then
252 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
253 CFLAGS="$saved_CFLAGS -I$ssldir/include"
254 if test ! -z "$need_dash_r" ; then
255 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
256 fi
257 else
258 LDFLAGS="$saved_LDFLAGS"
a0391976 259 fi
a0391976 260
d45e3d76 261 LIBS="$saved_LIBS -lcrypto"
bcf36c78 262
d45e3d76 263 # Basic test to check for compatible version and correct linking
264 # *does not* test for RSA - that comes later.
265 AC_TRY_RUN(
266 [
44fb55e9 267#include <string.h>
268#include <openssl/rand.h>
18ba2aab 269int main(void)
270{
d45e3d76 271 char a[2048];
272 memset(a, 0, sizeof(a));
18ba2aab 273 RAND_add(a, sizeof(a), sizeof(a));
d45e3d76 274 return(RAND_status() <= 0);
18ba2aab 275}
d45e3d76 276 ],
277 [
278 found_crypto=1
279 break;
280 ], []
281 )
58d100bf 282
283 if test ! -z "$found_crypto" ; then
284 break;
285 fi
bcf36c78 286 done
287
58d100bf 288 if test -z "$found_crypto" ; then
289 AC_MSG_ERROR([Could not find working SSLeay / OpenSSL libraries, please install])
290 fi
291 if test -z "$ssldir" ; then
292 ssldir="(system)"
bcf36c78 293 fi
a0391976 294
58d100bf 295 ac_cv_openssldir=$ssldir
296])
297
298if test ! -z "$ac_cv_openssldir" -a ! "x$ac_cv_openssldir" = "x(system)" ; then
299 AC_DEFINE(HAVE_OPENSSL)
300 dnl Need to recover ssldir - test above runs in subshell
301 ssldir=$ac_cv_openssldir
cb0b7ea4 302 CFLAGS="$saved_CFLAGS -I$ssldir/include"
303 LDFLAGS="$saved_LDFLAGS -L$ssldir/lib -L$ssldir"
304 if test ! -z "$need_dash_r" ; then
305 LDFLAGS="$LDFLAGS -R$ssldir/lib -R$ssldir"
a0391976 306 fi
bd499f9e 307 if test ! -z "$blibpath" ; then
308 blibpath="$blibpath:$ssldir:$ssldir/lib"
309 fi
a0391976 310fi
d45e3d76 311LIBS="$saved_LIBS -lcrypto"
312
313# Now test RSA support
314saved_LIBS="$LIBS"
315AC_MSG_CHECKING([for RSA support])
316for WANTS_RSAREF in "" 1 ; do
317 if test -z "$WANTS_RSAREF" ; then
318 LIBS="$saved_LIBS"
319 else
320 LIBS="$saved_LIBS -lRSAglue -lrsaref"
321 fi
322 AC_TRY_RUN([
323#include <string.h>
324#include <openssl/rand.h>
325#include <openssl/rsa.h>
326#include <openssl/bn.h>
327#include <openssl/sha.h>
328int main(void)
329{
330 int num; RSA *key; static unsigned char p_in[] = "blahblah";
331 unsigned char c[256], p[256];
332 memset(c, 0, sizeof(c)); RAND_add(c, sizeof(c), sizeof(c));
333 if ((key=RSA_generate_key(512, 3, NULL, NULL))==NULL) return(1);
334 num = RSA_public_encrypt(sizeof(p_in) - 1, p_in, c, key, RSA_PKCS1_PADDING);
335 return(-1 == RSA_private_decrypt(num, c, p, key, RSA_PKCS1_PADDING));
336}
337 ],
338 [
339 rsa_works=1
340 break;
341 ], [])
342done
343
344if test ! -z "$no_rsa" ; then
345 AC_MSG_RESULT(disabled)
cb0b7ea4 346else
d45e3d76 347 if test -z "$rsa_works" ; then
348 AC_MSG_WARN([*** No RSA support found *** ])
349 else
350 if test -z "$WANTS_RSAREF" ; then
351 AC_MSG_RESULT(yes)
352 else
353 AC_MSG_RESULT(using RSAref)
354 LIBS="$saved_LIBS -lcrypto -lRSAglue -lrsaref"
355 fi
356 fi
bcf36c78 357fi
58d100bf 358
a0391976 359# Checks for data types
976f7e19 360AC_CHECK_SIZEOF(char, 1)
2b942fe0 361AC_CHECK_SIZEOF(short int, 2)
362AC_CHECK_SIZEOF(int, 4)
363AC_CHECK_SIZEOF(long int, 4)
364AC_CHECK_SIZEOF(long long int, 8)
365
a0391976 366# More checks for data types
58d100bf 367AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
368 AC_TRY_COMPILE(
369 [ #include <sys/types.h> ],
370 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
371 [ ac_cv_have_intxx_t="yes" ],
372 [ ac_cv_have_intxx_t="no" ]
373 )
374])
375if test "x$ac_cv_have_intxx_t" = "xyes" ; then
376 AC_DEFINE(HAVE_INTXX_T)
377 have_intxx_t=1
378fi
379
380AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
381 AC_TRY_COMPILE(
382 [ #include <sys/types.h> ],
383 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
384 [ ac_cv_have_u_intxx_t="yes" ],
385 [ ac_cv_have_u_intxx_t="no" ]
386 )
387])
388if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
389 AC_DEFINE(HAVE_U_INTXX_T)
390 have_u_intxx_t=1
391fi
2b942fe0 392
2b942fe0 393
20af321f 394if test -z "$have_u_intxx_t" -o -z "$have_intxx_t" -a \
5cdfe03f 395 "x$ac_cv_header_sys_bitypes_h" = "xyes"
396then
397 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
398 AC_TRY_COMPILE(
58d100bf 399 [
400#include <sys/bitypes.h>
401 ],
5cdfe03f 402 [
837c30b8 403 int8_t a; int16_t b; int32_t c;
404 u_int8_t e; u_int16_t f; u_int32_t g;
405 a = b = c = e = f = g = 1;
5cdfe03f 406 ],
407 [
408 AC_DEFINE(HAVE_U_INTXX_T)
409 AC_DEFINE(HAVE_INTXX_T)
410 AC_MSG_RESULT(yes)
411 ],
412 [AC_MSG_RESULT(no)]
413 )
414fi
415
474b5fef 416if test -z "$have_u_intxx_t" ; then
58d100bf 417 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
418 AC_TRY_COMPILE(
419 [
420#include <sys/types.h>
421 ],
422 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ],
423 [ ac_cv_have_uintxx_t="yes" ],
424 [ ac_cv_have_uintxx_t="no" ]
425 )
426 ])
427 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
428 AC_DEFINE(HAVE_UINTXX_T)
429 fi
430fi
431
432AC_CACHE_CHECK([for socklen_t], ac_cv_have_socklen_t, [
474b5fef 433 AC_TRY_COMPILE(
474b5fef 434 [
58d100bf 435#include <sys/types.h>
436#include <sys/socket.h>
474b5fef 437 ],
58d100bf 438 [socklen_t foo; foo = 1235;],
439 [ ac_cv_have_socklen_t="yes" ],
440 [ ac_cv_have_socklen_t="no" ]
441 )
442])
443if test "x$ac_cv_have_socklen_t" = "xyes" ; then
444 AC_DEFINE(HAVE_SOCKLEN_T)
474b5fef 445fi
2b942fe0 446
58d100bf 447AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
448 AC_TRY_COMPILE(
449 [
18ba2aab 450#include <sys/types.h>
58d100bf 451 ],
452 [ size_t foo; foo = 1235; ],
453 [ ac_cv_have_size_t="yes" ],
454 [ ac_cv_have_size_t="no" ]
455 )
456])
457if test "x$ac_cv_have_size_t" = "xyes" ; then
458 AC_DEFINE(HAVE_SIZE_T)
459fi
ea1970a3 460
c04f75f1 461AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
462 AC_TRY_COMPILE(
463 [
464#include <sys/types.h>
465 ],
466 [ ssize_t foo; foo = 1235; ],
467 [ ac_cv_have_ssize_t="yes" ],
468 [ ac_cv_have_ssize_t="no" ]
469 )
470])
471if test "x$ac_cv_have_ssize_t" = "xyes" ; then
472 AC_DEFINE(HAVE_SSIZE_T)
473fi
474
e3a93db0 475
58d100bf 476AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
477 AC_TRY_COMPILE(
478 [
18ba2aab 479#include <sys/types.h>
480#include <sys/socket.h>
58d100bf 481 ],
482 [ struct sockaddr_storage s; ],
483 [ ac_cv_have_struct_sockaddr_storage="yes" ],
484 [ ac_cv_have_struct_sockaddr_storage="no" ]
485 )
486])
487if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
488 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE)
489fi
48e671d5 490
58d100bf 491AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
492 AC_TRY_COMPILE(
493 [
494#include <netinet/in.h>
495 ],
496 [ struct sockaddr_in6 s; s.sin6_family = 0; ],
497 [ ac_cv_have_struct_sockaddr_in6="yes" ],
498 [ ac_cv_have_struct_sockaddr_in6="no" ]
499 )
500])
501if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
502 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)
503fi
48e671d5 504
58d100bf 505AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
506 AC_TRY_COMPILE(
507 [
508#include <netinet/in.h>
509 ],
510 [ struct in6_addr s; s.s6_addr[0] = 0; ],
511 [ ac_cv_have_struct_in6_addr="yes" ],
512 [ ac_cv_have_struct_in6_addr="no" ]
513 )
514])
515if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
516 AC_DEFINE(HAVE_STRUCT_IN6_ADDR)
517fi
48e671d5 518
58d100bf 519AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
520 AC_TRY_COMPILE(
521 [
18ba2aab 522#include <sys/types.h>
523#include <sys/socket.h>
524#include <netdb.h>
58d100bf 525 ],
526 [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ],
527 [ ac_cv_have_struct_addrinfo="yes" ],
528 [ ac_cv_have_struct_addrinfo="no" ]
529 )
530])
531if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
532 AC_DEFINE(HAVE_STRUCT_ADDRINFO)
533fi
534
48e671d5 535
a0391976 536# Checks for structure members
48e671d5 537
58d100bf 538OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP)
539OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX)
540OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX)
541OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP)
542OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP)
25422c70 543OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX)
58d100bf 544OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP)
545OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP)
546OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP)
547OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX)
548OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP)
549OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX)
1d7b9b20 550OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP)
551OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP)
552OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX)
553OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX)
554
58d100bf 555
556
557AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
558 ac_cv_have_ss_family_in_struct_ss, [
559 AC_TRY_COMPILE(
560 [
18ba2aab 561#include <sys/types.h>
562#include <sys/socket.h>
58d100bf 563 ],
564 [ struct sockaddr_storage s; s.ss_family = 1; ],
565 [ ac_cv_have_ss_family_in_struct_ss="yes" ],
566 [ ac_cv_have_ss_family_in_struct_ss="no" ],
567 )
568])
569if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
570 AC_DEFINE(HAVE_SS_FAMILY_IN_SS)
571fi
572
573
574AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
575 ac_cv_have___ss_family_in_struct_ss, [
576 AC_TRY_COMPILE(
577 [
18ba2aab 578#include <sys/types.h>
579#include <sys/socket.h>
58d100bf 580 ],
581 [ struct sockaddr_storage s; s.__ss_family = 1; ],
582 [ ac_cv_have___ss_family_in_struct_ss="yes" ],
583 [ ac_cv_have___ss_family_in_struct_ss="no" ]
584 )
585])
586if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
587 AC_DEFINE(HAVE___SS_FAMILY_IN_SS)
588fi
589
590
591AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
592 AC_TRY_LINK([],
593 [ extern char *__progname; printf("%s", __progname); ],
594 [ ac_cv_libc_defines___progname="yes" ],
595 [ ac_cv_libc_defines___progname="no" ]
596 )
597])
598if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
599 AC_DEFINE(HAVE___PROGNAME)
600fi
8946db53 601
a0391976 602
603# Looking for programs, paths and files
604AC_ARG_WITH(rsh,
605 [ --with-rsh=PATH Specify path to remote shell program ],
606 [
bcf36c78 607 if test "x$withval" != "$no" ; then
a0391976 608 AC_DEFINE_UNQUOTED(RSH_PATH, "$withval")
609 fi
610 ],
611 [
612 AC_PATH_PROG(rsh_path, rsh)
613 ]
614)
615
616AC_ARG_WITH(xauth,
617 [ --with-xauth=PATH Specify path to xauth program ],
618 [
619 if test "x$withval" != "$xno" ; then
620 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$withval")
621 fi
622 ],
623 [
624 AC_PATH_PROG(xauth_path, xauth)
625 if test ! -z "$xauth_path" -a -x "/usr/openwin/bin/xauth" ; then
626 xauth_path="/usr/openwin/bin/xauth"
627 fi
628 ]
629)
630
631if test ! -z "$xauth_path" ; then
632 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
633fi
634if test ! -z "$rsh_path" ; then
635 AC_DEFINE_UNQUOTED(RSH_PATH, "$rsh_path")
636fi
637
638# Check for mail directory (last resort if we cannot get it from headers)
639if test ! -z "$MAIL" ; then
640 maildir=`dirname $MAIL`
641 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir")
642fi
643
a0391976 644if test -z "$no_dev_ptmx" ; then
3276571c 645 AC_CHECK_FILE("/dev/ptmx",
646 [
647 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
648 have_dev_ptmx=1
649 ]
650 )
651fi
652AC_CHECK_FILE("/dev/ptc",
653 [
654 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
655 have_dev_ptc=1
656 ]
657)
658
a0391976 659# Options from here on. Some of these are preset by platform above
660
a0391976 661# Check for user-specified random device, otherwise check /dev/urandom
662AC_ARG_WITH(random,
663 [ --with-random=FILE read randomness from FILE (default=/dev/urandom)],
664 [
bfc9a610 665 if test "x$withval" != "xno" ; then
666 RANDOM_POOL="$withval";
667 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
668 fi
a0391976 669 ],
670 [
671 # Check for random device
672 AC_CHECK_FILE("/dev/urandom",
673 [
674 RANDOM_POOL="/dev/urandom";
675 AC_SUBST(RANDOM_POOL)
676 AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL")
677 ]
678 )
679 ]
680)
681
682# Check for EGD pool file
683AC_ARG_WITH(egd-pool,
684 [ --with-egd-pool=FILE read randomness from EGD pool FILE (default none)],
685 [
bfc9a610 686 if test "x$withval" != "xno" ; then
687 EGD_SOCKET="$withval";
688 AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET")
689 fi
a0391976 690 ]
691)
692
d3083fbd 693# detect pathnames for entropy gathering commands, if we need them
694INSTALL_SSH_PRNG_CMDS=""
695rm -f prng_commands
9d98aaf6 696if test -z "$RANDOM_POOL" -a -z "$EGD_SOCKET" ; then
697 # Use these commands to collect entropy
58d100bf 698 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
699 OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
700 OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
701 OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
702 OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
703 OSSH_PATH_ENTROPY_PROG(PROG_W, w)
704 OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
705 OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
706 OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
707 OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
708 OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
709 OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
710 OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
711 OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
712 OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
d3083fbd 713
714 INSTALL_SSH_PRNG_CMDS="yes"
9d98aaf6 715fi
d3083fbd 716AC_SUBST(INSTALL_SSH_PRNG_CMDS)
717
9d98aaf6 718
c54a6257 719AC_ARG_WITH(catman,
720 [ --with-catman=man|cat Install preformatted manpages[no]],
721 [
722 MANTYPE='$(CATMAN)'
723 if test x"$withval" != x"yes" ; then
724 mansubdir=$withval
725 else
726 mansubdir=cat
727 fi
728 ], [
729 if test -z "$MANTYPE" ; then
730 MANTYPE='$(TROFFMAN)'
731 mansubdir=man
732 fi
733 ]
734)
735AC_SUBST(MANTYPE)
736AC_SUBST(mansubdir)
0bc5b6fb 737
a0391976 738# Check whether user wants Kerberos support
91b8065d 739AC_ARG_WITH(kerberos4,
dfb95100 740 [ --with-kerberos4=PATH Enable Kerberos 4 support],
91b8065d 741 [
bcf36c78 742 if test "x$withval" != "xno" ; then
dfb95100 743
744 if test "x$withval" != "$xyes" ; then
745 CFLAGS="$CFLAGS -I${withval}/include"
746 LDFLAGS="$LDFLAGS -L${withval}/lib"
bd499f9e 747 if test ! -z "$need_dash_r" ; then
748 LDFLAGS="$LDFLAGS -R${withval}/lib"
749 fi
750 if test ! -z "$blibpath" ; then
751 blibpath="$blibpath:${withval}/lib"
752 fi
dfb95100 753 else
754 if test -d /usr/include/kerberosIV ; then
755 CFLAGS="$CFLAGS -I/usr/include/kerberosIV"
756 fi
757 fi
758
759 AC_CHECK_HEADERS(krb.h)
760 AC_CHECK_LIB(krb, main)
761 if test "$ac_cv_header_krb_h" != yes; then
762 AC_MSG_WARN([Cannot find krb.h, build may fail])
763 fi
764 if test "$ac_cv_lib_krb_main" != yes; then
765 AC_MSG_WARN([Cannot find libkrb, build may fail])
766 fi
767
587120ad 768 KLIBS="-lkrb -ldes"
dfb95100 769 AC_CHECK_LIB(resolv, dn_expand, , )
770 KRB4=yes
0bc5b6fb 771 AC_DEFINE(KRB4)
0bc5b6fb 772 fi
91b8065d 773 ]
774)
775
a0391976 776# Check whether user wants AFS support
2b942fe0 777AC_ARG_WITH(afs,
dfb95100 778 [ --with-afs=PATH Enable AFS support],
91b8065d 779 [
bcf36c78 780 if test "x$withval" != "xno" ; then
dfb95100 781
782 if test "x$withval" != "$xyes" ; then
783 CFLAGS="$CFLAGS -I${withval}/include"
784 LFLAGS="$LFLAGS -L${withval}/lib"
785 fi
786
787 if test -z "$KRB4" ; then
788 AC_MSG_WARN([AFS requires Kerberos IV support, build may fail])
789 fi
790
0bc5b6fb 791 LIBS="$LIBS -lkafs"
dfb95100 792 if test ! -z "$AFS_LIBS" ; then
793 LIBS="$LIBS $AFS_LIBS"
794 fi
795 AC_DEFINE(AFS)
0bc5b6fb 796 fi
91b8065d 797 ]
798)
587120ad 799LIBS="$LIBS $KLIBS"
91b8065d 800
a0391976 801# Check whether user wants S/Key support
91b8065d 802AC_ARG_WITH(skey,
803 [ --with-skey Enable S/Key support],
804 [
bcf36c78 805 if test "x$withval" != "xno" ; then
0bc5b6fb 806 AC_DEFINE(SKEY)
807 LIBS="$LIBS -lskey"
808 fi
91b8065d 809 ]
810)
811
a0391976 812# Check whether user wants TCP wrappers support
2ddcfdf3 813AC_ARG_WITH(tcp-wrappers,
91b8065d 814 [ --with-tcp-wrappers Enable tcpwrappers support],
815 [
bcf36c78 816 if test "x$withval" != "xno" ; then
9fc7867e 817 saved_LIBS="$LIBS"
dfb95100 818 LIBS="$LIBS -lwrap"
9fc7867e 819 AC_MSG_CHECKING(for libwrap)
820 AC_TRY_LINK(
821 [
18ba2aab 822#include <tcpd.h>
9fc7867e 823 int deny_severity = 0, allow_severity = 0;
824 ],
825 [hosts_access(0);],
826 [
827 AC_MSG_RESULT(yes)
828 AC_DEFINE(LIBWRAP)
829 ],
830 [
831 AC_MSG_RESULT(no)
832 AC_MSG_WARN([*** libwrap missing - tcpwrapper support disabled ***])
833 LIBS="$saved_LIBS"
834 ]
835 )
0bc5b6fb 836 fi
91b8065d 837 ]
838)
839
a0391976 840# Check whether to enable MD5 passwords
2ddcfdf3 841AC_ARG_WITH(md5-passwords,
caf3bc51 842 [ --with-md5-passwords Enable use of MD5 passwords],
0bc5b6fb 843 [
bcf36c78 844 if test "x$withval" != "xno" ; then
0bc5b6fb 845 AC_DEFINE(HAVE_MD5_PASSWORDS)
846 fi
847 ]
caf3bc51 848)
849
a0391976 850# Whether to disable shadow password support
a7effaac 851AC_ARG_WITH(shadow,
852 [ --without-shadow Disable shadow password support],
853 [
854 if test "x$withval" = "xno" ; then
855 AC_DEFINE(DISABLE_SHADOW)
856 fi
857 ]
858)
859
a0391976 860# Use ip address instead of hostname in $DISPLAY
a7effaac 861AC_ARG_WITH(ipaddr-display,
862 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
863 [
5957fd29 864 if test "x$withval" = "xno" ; then
a7effaac 865 AC_DEFINE(IPADDR_IN_DISPLAY)
866 fi
867 ]
868)
869
a0391976 870# Whether to mess with the default path
c43d69a9 871AC_ARG_WITH(default-path,
cb807f40 872 [ --with-default-path=PATH Specify default \$PATH environment for server],
873 [
874 if test "x$withval" != "xno" ; then
c73a0cb5 875 AC_DEFINE_UNQUOTED(USER_PATH, "$withval")
cb807f40 876 fi
877 ]
878)
879
a0391976 880# Whether to force IPv4 by default (needed on broken glibc Linux)
59e76f33 881AC_ARG_WITH(ipv4-default,
882 [ --with-ipv4-default Use IPv4 by connections unless '-6' specified],
883 [
884 if test "x$withval" != "xno" ; then
885 AC_DEFINE(IPV4_DEFAULT)
886 fi
887 ]
888)
889
58d100bf 890AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses])
80faa19f 891AC_ARG_WITH(4in6,
892 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
893 [
894 if test "x$withval" != "xno" ; then
895 AC_MSG_RESULT(yes)
896 AC_DEFINE(IPV4_IN_IPV6)
897 else
898 AC_MSG_RESULT(no)
899 fi
900 ],[
901 if test "x$inet6_default_4in6" = "xyes"; then
902 AC_MSG_RESULT([yes (default)])
903 AC_DEFINE(IPV4_IN_IPV6)
904 else
905 AC_MSG_RESULT([no (default)])
906 fi
907 ]
908)
909
a0391976 910# Where to place sshd.pid
19d9ac2a 911piddir=/var/run
47e45e44 912AC_ARG_WITH(pid-dir,
913 [ --with-pid-dir=PATH Specify location of ssh.pid file],
914 [
915 if test "x$withval" != "xno" ; then
19d9ac2a 916 piddir=$withval
47e45e44 917 fi
918 ]
919)
b7a87eea 920
a63a7f37 921AC_DEFINE_UNQUOTED(PIDDIR, "$piddir")
19d9ac2a 922AC_SUBST(piddir)
47e45e44 923
1d7b9b20 924dnl allow user to disable some login recording features
925AC_ARG_ENABLE(lastlog,
926 [ --disable-lastlog disable use of lastlog even if detected [no]],
927 [ AC_DEFINE(DISABLE_LASTLOG) ]
928)
929AC_ARG_ENABLE(utmp,
930 [ --disable-utmp disable use of utmp even if detected [no]],
931 [ AC_DEFINE(DISABLE_UTMP) ]
932)
933AC_ARG_ENABLE(utmpx,
934 [ --disable-utmpx disable use of utmpx even if detected [no]],
935 [ AC_DEFINE(DISABLE_UTMPX) ]
936)
937AC_ARG_ENABLE(wtmp,
938 [ --disable-wtmp disable use of wtmp even if detected [no]],
939 [ AC_DEFINE(DISABLE_WTMP) ]
940)
941AC_ARG_ENABLE(wtmpx,
942 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
943 [ AC_DEFINE(DISABLE_WTMPX) ]
944)
945AC_ARG_ENABLE(libutil,
946 [ --disable-libutil disable use of libutil (login() etc.) [no]],
947 [ AC_DEFINE(DISABLE_LOGIN) ]
948)
949AC_ARG_ENABLE(pututline,
950 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
951 [ AC_DEFINE(DISABLE_PUTUTLINE) ]
952)
953AC_ARG_ENABLE(pututxline,
954 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
955 [ AC_DEFINE(DISABLE_PUTUTXLINE) ]
956)
957AC_ARG_WITH(lastlog,
958 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
959 [ conf_lastlog_location="$withval"; ],)
960
961dnl lastlog, [uw]tmpx? detection
962dnl NOTE: set the paths in the platform section to avoid the
963dnl need for command-line parameters
964dnl lastlog and [uw]tmp are subject to a file search if all else fails
965
966dnl lastlog detection
967dnl NOTE: the code itself will detect if lastlog is a directory
968AC_MSG_CHECKING([if your system defines LASTLOG_FILE])
969AC_TRY_COMPILE([
970#include <sys/types.h>
971#include <utmp.h>
972#ifdef HAVE_LASTLOG_H
973# include <lastlog.h>
974#endif
d7c0f3d5 975#ifdef HAVE_PATHS_H
1d7b9b20 976# include <paths.h>
977#endif
978 ],
979 [ char *lastlog = LASTLOG_FILE; ],
980 [ AC_MSG_RESULT(yes) ],
d7c0f3d5 981 [
982 AC_MSG_RESULT(no)
983 AC_MSG_CHECKING([if your system defines _PATH_LASTLOG])
984 AC_TRY_COMPILE([
985#include <sys/types.h>
986#include <utmp.h>
987#ifdef HAVE_LASTLOG_H
988# include <lastlog.h>
989#endif
990#ifdef HAVE_PATHS_H
991# include <paths.h>
992#endif
993 ],
994 [ char *lastlog = _PATH_LASTLOG; ],
995 [ AC_MSG_RESULT(yes) ],
996 [
997 AC_MSG_RESULT(no),
998 system_lastlog_path=no
999 ])
1000 ]
1d7b9b20 1001)
d7c0f3d5 1002
1d7b9b20 1003if test -z "$conf_lastlog_location"; then
1004 if test x"$system_lastlog_path" = x"no" ; then
1005 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
d7c0f3d5 1006 if test -d "$f" -o -e "$f" ; then
1d7b9b20 1007 conf_lastlog_location=$f
1008 fi
1009 done
1010 if test -z "$conf_lastlog_location"; then
1011 AC_MSG_WARN([** Cannot find lastlog - disabling feature **])
1012 AC_DEFINE(DISABLE_LASTLOG)
1013 fi
1014 fi
1015fi
1016
1017if test -n "$conf_lastlog_location"; then
1018 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location")
1019fi
1020
1021dnl utmp detection
1022AC_MSG_CHECKING([if your system defines UTMP_FILE])
1023AC_TRY_COMPILE([
1024#include <sys/types.h>
1025#include <utmp.h>
d7c0f3d5 1026#ifdef HAVE_PATHS_H
1d7b9b20 1027# include <paths.h>
1028#endif
1029 ],
1030 [ char *utmp = UTMP_FILE; ],
1031 [ AC_MSG_RESULT(yes) ],
1032 [ AC_MSG_RESULT(no)
1033 system_utmp_path=no ]
1034)
1035if test -z "$conf_utmp_location"; then
1036 if test x"$system_utmp_path" = x"no" ; then
1037 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
1038 if test -f $f ; then
1039 conf_utmp_location=$f
1040 fi
1041 done
1042 if test -z "$conf_utmp_location"; then
1043 AC_DEFINE(DISABLE_UTMP)
1044 fi
1045 fi
1046fi
1047if test -n "$conf_utmp_location"; then
1048 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location")
1049fi
1050
1051dnl wtmp detection
1052AC_MSG_CHECKING([if your system defines WTMP_FILE])
1053AC_TRY_COMPILE([
1054#include <sys/types.h>
1055#include <utmp.h>
d7c0f3d5 1056#ifdef HAVE_PATHS_H
1d7b9b20 1057# include <paths.h>
1058#endif
1059 ],
1060 [ char *wtmp = WTMP_FILE; ],
1061 [ AC_MSG_RESULT(yes) ],
1062 [ AC_MSG_RESULT(no)
1063 system_wtmp_path=no ]
1064)
1065if test -z "$conf_wtmp_location"; then
1066 if test x"$system_wtmp_path" = x"no" ; then
1067 for f in /usr/adm/wtmp /var/log/wtmp; do
1068 if test -f $f ; then
1069 conf_wtmp_location=$f
1070 fi
1071 done
1072 if test -z "$conf_wtmp_location"; then
1073 AC_DEFINE(DISABLE_WTMP)
1074 fi
1075 fi
1076fi
1077if test -n "$conf_wtmp_location"; then
1078 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location")
1079fi
1080
1081
1082dnl utmpx detection - I don't know any system so perverse as to require
1083dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out
1084dnl there, though.
1085AC_MSG_CHECKING([if your system defines UTMPX_FILE])
1086AC_TRY_COMPILE([
1087#include <sys/types.h>
1088#include <utmp.h>
1089#ifdef HAVE_UTMPX_H
1090#include <utmpx.h>
1091#endif
d7c0f3d5 1092#ifdef HAVE_PATHS_H
1d7b9b20 1093# include <paths.h>
1094#endif
1095 ],
1096 [ char *utmpx = UTMPX_FILE; ],
1097 [ AC_MSG_RESULT(yes) ],
1098 [ AC_MSG_RESULT(no)
1099 system_utmpx_path=no ]
1100)
1101if test -z "$conf_utmpx_location"; then
1102 if test x"$system_utmpx_path" = x"no" ; then
1103 AC_DEFINE(DISABLE_UTMPX)
1104 fi
1105else
1106 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location")
1107fi
1108
1109dnl wtmpx detection
1110AC_MSG_CHECKING([if your system defines WTMPX_FILE])
1111AC_TRY_COMPILE([
1112#include <sys/types.h>
1113#include <utmp.h>
1114#ifdef HAVE_UTMPX_H
1115#include <utmpx.h>
1116#endif
d7c0f3d5 1117#ifdef HAVE_PATHS_H
1d7b9b20 1118# include <paths.h>
1119#endif
1120 ],
1121 [ char *wtmpx = WTMPX_FILE; ],
1122 [ AC_MSG_RESULT(yes) ],
1123 [ AC_MSG_RESULT(no)
1124 system_wtmpx_path=no ]
1125)
1126if test -z "$conf_wtmpx_location"; then
1127 if test x"$system_wtmpx_path" = x"no" ; then
1128 AC_DEFINE(DISABLE_WTMPX)
1129 fi
1130else
1131 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location")
1132fi
1133
b7a87eea 1134
1135# Change default command timeout for builtin PRNG
48c99b2c 1136entropy_timeout=200
b7a87eea 1137AC_ARG_WITH(entropy-timeout,
1138 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)],
1139 [
1140 if test "x$withval" != "xno" ; then
1141 entropy_timeout=$withval
1142 fi
1143 ]
1144)
1145AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout)
1146
1147
bd499f9e 1148if test ! -z "$blibpath" ; then
1149 LDFLAGS="$LDFLAGS -blibpath:$blibpath"
1150 AC_MSG_WARN([Please check and edit -blibpath in LDFLAGS in Makefile])
1151fi
1152
d3083fbd 1153AC_OUTPUT(Makefile ssh_prng_cmds)
1154
1155
This page took 0.247001 seconds and 5 git commands to generate.