summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--aclocal.m44
-rw-r--r--configure.ac446
3 files changed, 299 insertions, 157 deletions
diff --git a/ChangeLog b/ChangeLog
index 16837870f..f5c6f7013 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
120050919
2 - (tim) [aclocal.m4 configure.ac] Delete acconfig.h and add templates to
3 AC_DEFINE and AC_DEFINE_UNQUOTED to quiet autoconf 2.59 warning messages.
4
120050912 520050912
2 - (tim) [configure.ac] Bug 1078. Fix --without-kerberos5. Reported by 6 - (tim) [configure.ac] Bug 1078. Fix --without-kerberos5. Reported by
3 Mike Frysinger. 7 Mike Frysinger.
@@ -2998,4 +3002,4 @@
2998 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 3002 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
2999 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 3003 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
3000 3004
3001$Id: ChangeLog,v 1.3889 2005/09/13 00:36:10 tim Exp $ 3005$Id: ChangeLog,v 1.3890 2005/09/19 16:33:39 tim Exp $
diff --git a/aclocal.m4 b/aclocal.m4
index 2705a9b23..b68a47080 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,4 +1,4 @@
1dnl $Id: aclocal.m4,v 1.5 2001/10/22 00:53:59 tim Exp $ 1dnl $Id: aclocal.m4,v 1.6 2005/09/19 16:33:39 tim Exp $
2dnl 2dnl
3dnl OpenSSH-specific autoconf macros 3dnl OpenSSH-specific autoconf macros
4dnl 4dnl
@@ -26,7 +26,7 @@ AC_DEFUN(OSSH_CHECK_HEADER_FOR_FIELD, [
26 if test -n "`echo $ossh_varname`"; then 26 if test -n "`echo $ossh_varname`"; then
27 AC_MSG_RESULT($ossh_result) 27 AC_MSG_RESULT($ossh_result)
28 if test "x$ossh_result" = "xyes"; then 28 if test "x$ossh_result" = "xyes"; then
29 AC_DEFINE($3) 29 AC_DEFINE($3, 1, [Define if you have $1 in $2])
30 fi 30 fi
31 else 31 else
32 AC_MSG_RESULT(no) 32 AC_MSG_RESULT(no)
diff --git a/configure.ac b/configure.ac
index 21d1719ca..226730f3e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.293 2005/09/13 00:36:10 tim Exp $ 1# $Id: configure.ac,v 1.294 2005/09/19 16:33:39 tim Exp $
2# 2#
3# Copyright (c) 1999-2004 Damien Miller 3# Copyright (c) 1999-2004 Damien Miller
4# 4#
@@ -57,7 +57,9 @@ fi
57 57
58# Use LOGIN_PROGRAM from environment if possible 58# Use LOGIN_PROGRAM from environment if possible
59if test ! -z "$LOGIN_PROGRAM" ; then 59if test ! -z "$LOGIN_PROGRAM" ; then
60 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM") 60 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM",
61 [If your header files don't define LOGIN_PROGRAM,
62 then use this (detected) from environment and PATH])
61else 63else
62 # Search for login 64 # Search for login
63 AC_PATH_PROG(LOGIN_PROGRAM_FALLBACK, login) 65 AC_PATH_PROG(LOGIN_PROGRAM_FALLBACK, login)
@@ -68,7 +70,8 @@ fi
68 70
69AC_PATH_PROG(PATH_PASSWD_PROG, passwd) 71AC_PATH_PROG(PATH_PASSWD_PROG, passwd)
70if test ! -z "$PATH_PASSWD_PROG" ; then 72if test ! -z "$PATH_PASSWD_PROG" ; then
71 AC_DEFINE_UNQUOTED(_PATH_PASSWD_PROG, "$PATH_PASSWD_PROG") 73 AC_DEFINE_UNQUOTED(_PATH_PASSWD_PROG, "$PATH_PASSWD_PROG",
74 [Full path of your "passwd" program])
72fi 75fi
73 76
74if test -z "$LD" ; then 77if test -z "$LD" ; then
@@ -201,7 +204,8 @@ case "$host" in
201 fi 204 fi
202 LDFLAGS="$saved_LDFLAGS" 205 LDFLAGS="$saved_LDFLAGS"
203 dnl Check for authenticate. Might be in libs.a on older AIXes 206 dnl Check for authenticate. Might be in libs.a on older AIXes
204 AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)], 207 AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE, 1,
208 [Define if you want to enable AIX4's authenticate function])],
205 [AC_CHECK_LIB(s,authenticate, 209 [AC_CHECK_LIB(s,authenticate,
206 [ AC_DEFINE(WITH_AIXAUTHENTICATE) 210 [ AC_DEFINE(WITH_AIXAUTHENTICATE)
207 LIBS="$LIBS -ls" 211 LIBS="$LIBS -ls"
@@ -217,7 +221,9 @@ case "$host" in
217 [#include <usersec.h>], 221 [#include <usersec.h>],
218 [(void)loginfailed("user","host","tty",0);], 222 [(void)loginfailed("user","host","tty",0);],
219 [AC_MSG_RESULT(yes) 223 [AC_MSG_RESULT(yes)
220 AC_DEFINE(AIX_LOGINFAILED_4ARG)], 224 AC_DEFINE(AIX_LOGINFAILED_4ARG, 1,
225 [Define if your AIX loginfailed() function
226 takes 4 arguments (AIX >= 5.2)])],
221 [AC_MSG_RESULT(no)] 227 [AC_MSG_RESULT(no)]
222 )], 228 )],
223 [], 229 [],
@@ -225,25 +231,36 @@ case "$host" in
225 ) 231 )
226 AC_CHECK_FUNCS(setauthdb) 232 AC_CHECK_FUNCS(setauthdb)
227 check_for_aix_broken_getaddrinfo=1 233 check_for_aix_broken_getaddrinfo=1
228 AC_DEFINE(BROKEN_REALPATH) 234 AC_DEFINE(BROKEN_REALPATH, 1, [Define if you have a broken realpath.])
229 AC_DEFINE(SETEUID_BREAKS_SETUID) 235 AC_DEFINE(SETEUID_BREAKS_SETUID, 1,
230 AC_DEFINE(BROKEN_SETREUID) 236 [Define if your platform breaks doing a seteuid before a setuid])
231 AC_DEFINE(BROKEN_SETREGID) 237 AC_DEFINE(BROKEN_SETREUID, 1, [Define if your setreuid() is broken])
238 AC_DEFINE(BROKEN_SETREGID, 1, [Define if your setregid() is broken])
232 dnl AIX handles lastlog as part of its login message 239 dnl AIX handles lastlog as part of its login message
233 AC_DEFINE(DISABLE_LASTLOG) 240 AC_DEFINE(DISABLE_LASTLOG, 1, [Define if you don't want to use lastlog])
234 AC_DEFINE(LOGIN_NEEDS_UTMPX) 241 AC_DEFINE(LOGIN_NEEDS_UTMPX, 1,
235 AC_DEFINE(SPT_TYPE,SPT_REUSEARGV) 242 [Some systems need a utmpx entry for /bin/login to work])
243 AC_DEFINE(SPT_TYPE,SPT_REUSEARGV,
244 [Define to a Set Process Title type if your system is
245 supported by bsd-setproctitle.c])
236 ;; 246 ;;
237*-*-cygwin*) 247*-*-cygwin*)
238 check_for_libcrypt_later=1 248 check_for_libcrypt_later=1
239 LIBS="$LIBS /usr/lib/textmode.o" 249 LIBS="$LIBS /usr/lib/textmode.o"
240 AC_DEFINE(HAVE_CYGWIN) 250 AC_DEFINE(HAVE_CYGWIN, 1, [Define if you are on Cygwin])
241 AC_DEFINE(USE_PIPES) 251 AC_DEFINE(USE_PIPES, 1, [Use PIPES instead of a socketpair()])
242 AC_DEFINE(DISABLE_SHADOW) 252 AC_DEFINE(DISABLE_SHADOW, 1,
243 AC_DEFINE(IP_TOS_IS_BROKEN) 253 [Define if you want to disable shadow passwords])
244 AC_DEFINE(NO_X11_UNIX_SOCKETS) 254 AC_DEFINE(IP_TOS_IS_BROKEN, 1,
245 AC_DEFINE(NO_IPPORT_RESERVED_CONCEPT) 255 [Define if your system choked on IP TOS setting])
246 AC_DEFINE(DISABLE_FD_PASSING) 256 AC_DEFINE(NO_X11_UNIX_SOCKETS, 1,
257 [Define if X11 doesn't support AF_UNIX sockets on that system])
258 AC_DEFINE(NO_IPPORT_RESERVED_CONCEPT, 1,
259 [Define if the concept of ports only accessible to
260 superusers isn't known])
261 AC_DEFINE(DISABLE_FD_PASSING, 1,
262 [Define if your platform needs to skip post auth
263 file descriptor passing])
247 ;; 264 ;;
248*-*-dgux*) 265*-*-dgux*)
249 AC_DEFINE(IP_TOS_IS_BROKEN) 266 AC_DEFINE(IP_TOS_IS_BROKEN)
@@ -260,21 +277,24 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
260 exit(1); 277 exit(1);
261}], [AC_MSG_RESULT(working)], 278}], [AC_MSG_RESULT(working)],
262 [AC_MSG_RESULT(buggy) 279 [AC_MSG_RESULT(buggy)
263 AC_DEFINE(BROKEN_GETADDRINFO)], 280 AC_DEFINE(BROKEN_GETADDRINFO, 1, [getaddrinfo is broken (if present)])],
264 [AC_MSG_RESULT(assume it is working)]) 281 [AC_MSG_RESULT(assume it is working)])
265 AC_DEFINE(SETEUID_BREAKS_SETUID) 282 AC_DEFINE(SETEUID_BREAKS_SETUID)
266 AC_DEFINE(BROKEN_SETREUID) 283 AC_DEFINE(BROKEN_SETREUID)
267 AC_DEFINE(BROKEN_SETREGID) 284 AC_DEFINE(BROKEN_SETREGID)
268 AC_DEFINE_UNQUOTED(BIND_8_COMPAT, 1) 285 AC_DEFINE_UNQUOTED(BIND_8_COMPAT, 1,
286 [Define if your resolver libs need this for getrrsetbyname])
269 ;; 287 ;;
270*-*-hpux*) 288*-*-hpux*)
271 # first we define all of the options common to all HP-UX releases 289 # first we define all of the options common to all HP-UX releases
272 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1" 290 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
273 IPADDR_IN_DISPLAY=yes 291 IPADDR_IN_DISPLAY=yes
274 AC_DEFINE(USE_PIPES) 292 AC_DEFINE(USE_PIPES)
275 AC_DEFINE(LOGIN_NO_ENDOPT) 293 AC_DEFINE(LOGIN_NO_ENDOPT, 1,
294 [Define if your login program cannot handle end of options ("--")])
276 AC_DEFINE(LOGIN_NEEDS_UTMPX) 295 AC_DEFINE(LOGIN_NEEDS_UTMPX)
277 AC_DEFINE(LOCKED_PASSWD_STRING, "*") 296 AC_DEFINE(LOCKED_PASSWD_STRING, "*",
297 [String used in /etc/passwd to denote locked account])
278 AC_DEFINE(SPT_TYPE,SPT_PSTAT) 298 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
279 LIBS="$LIBS -lsec" 299 LIBS="$LIBS -lsec"
280 AC_CHECK_LIB(xnet, t_error, , 300 AC_CHECK_LIB(xnet, t_error, ,
@@ -288,8 +308,12 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
288 fi 308 fi
289 ;; 309 ;;
290 *-*-hpux11*) 310 *-*-hpux11*)
291 AC_DEFINE(PAM_SUN_CODEBASE) 311 AC_DEFINE(PAM_SUN_CODEBASE, 1,
292 AC_DEFINE(DISABLE_UTMP) 312 [Define if you are using Solaris-derived PAM which
313 passes pam_messages to the conversation function
314 with an extra level of indirection])
315 AC_DEFINE(DISABLE_UTMP, 1,
316 [Define if you don't want to use utmp])
293 AC_DEFINE(USE_BTMP, 1, [Use btmp to log bad logins]) 317 AC_DEFINE(USE_BTMP, 1, [Use btmp to log bad logins])
294 check_for_hpux_broken_getaddrinfo=1 318 check_for_hpux_broken_getaddrinfo=1
295 check_for_conflicting_getspnam=1 319 check_for_conflicting_getspnam=1
@@ -299,7 +323,9 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
299 # lastly, we define options specific to minor releases 323 # lastly, we define options specific to minor releases
300 case "$host" in 324 case "$host" in
301 *-*-hpux10.26) 325 *-*-hpux10.26)
302 AC_DEFINE(HAVE_SECUREWARE) 326 AC_DEFINE(HAVE_SECUREWARE, 1,
327 [Define if you have SecureWare-based
328 protected password database])
303 disable_ptmx_check=yes 329 disable_ptmx_check=yes
304 LIBS="$LIBS -lsecpw" 330 LIBS="$LIBS -lsecpw"
305 ;; 331 ;;
@@ -307,24 +333,33 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
307 ;; 333 ;;
308*-*-irix5*) 334*-*-irix5*)
309 PATH="$PATH:/usr/etc" 335 PATH="$PATH:/usr/etc"
310 AC_DEFINE(BROKEN_INET_NTOA) 336 AC_DEFINE(BROKEN_INET_NTOA, 1,
337 [Define if you system's inet_ntoa is busted
338 (e.g. Irix gcc issue)])
311 AC_DEFINE(SETEUID_BREAKS_SETUID) 339 AC_DEFINE(SETEUID_BREAKS_SETUID)
312 AC_DEFINE(BROKEN_SETREUID) 340 AC_DEFINE(BROKEN_SETREUID)
313 AC_DEFINE(BROKEN_SETREGID) 341 AC_DEFINE(BROKEN_SETREGID)
314 AC_DEFINE(WITH_ABBREV_NO_TTY) 342 AC_DEFINE(WITH_ABBREV_NO_TTY, 1,
343 [Define if you shouldn't strip 'tty' from your
344 ttyname in [uw]tmp])
315 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*") 345 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
316 ;; 346 ;;
317*-*-irix6*) 347*-*-irix6*)
318 PATH="$PATH:/usr/etc" 348 PATH="$PATH:/usr/etc"
319 AC_DEFINE(WITH_IRIX_ARRAY) 349 AC_DEFINE(WITH_IRIX_ARRAY, 1,
320 AC_DEFINE(WITH_IRIX_PROJECT) 350 [Define if you have/want arrays
321 AC_DEFINE(WITH_IRIX_AUDIT) 351 (cluster-wide session managment, not C arrays)])
322 AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)]) 352 AC_DEFINE(WITH_IRIX_PROJECT, 1,
353 [Define if you want IRIX project management])
354 AC_DEFINE(WITH_IRIX_AUDIT, 1,
355 [Define if you want IRIX audit trails])
356 AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS, 1,
357 [Define if you want IRIX kernel jobs])])
323 AC_DEFINE(BROKEN_INET_NTOA) 358 AC_DEFINE(BROKEN_INET_NTOA)
324 AC_DEFINE(SETEUID_BREAKS_SETUID) 359 AC_DEFINE(SETEUID_BREAKS_SETUID)
325 AC_DEFINE(BROKEN_SETREUID) 360 AC_DEFINE(BROKEN_SETREUID)
326 AC_DEFINE(BROKEN_SETREGID) 361 AC_DEFINE(BROKEN_SETREGID)
327 AC_DEFINE(BROKEN_UPDWTMPX) 362 AC_DEFINE(BROKEN_UPDWTMPX, 1, [updwtmpx is broken (if present)])
328 AC_DEFINE(WITH_ABBREV_NO_TTY) 363 AC_DEFINE(WITH_ABBREV_NO_TTY)
329 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*") 364 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
330 ;; 365 ;;
@@ -332,22 +367,27 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
332 no_dev_ptmx=1 367 no_dev_ptmx=1
333 check_for_libcrypt_later=1 368 check_for_libcrypt_later=1
334 check_for_openpty_ctty_bug=1 369 check_for_openpty_ctty_bug=1
335 AC_DEFINE(DONT_TRY_OTHER_AF) 370 AC_DEFINE(DONT_TRY_OTHER_AF, 1, [Workaround more Linux IPv6 quirks])
336 AC_DEFINE(PAM_TTY_KLUDGE) 371 AC_DEFINE(PAM_TTY_KLUDGE, 1,
337 AC_DEFINE(LOCKED_PASSWD_PREFIX, "!") 372 [Work around problematic Linux PAM modules handling of PAM_TTY])
373 AC_DEFINE(LOCKED_PASSWD_PREFIX, "!",
374 [String used in /etc/passwd to denote locked account])
338 AC_DEFINE(SPT_TYPE,SPT_REUSEARGV) 375 AC_DEFINE(SPT_TYPE,SPT_REUSEARGV)
339 AC_DEFINE(LINK_OPNOTSUPP_ERRNO, EPERM) 376 AC_DEFINE(LINK_OPNOTSUPP_ERRNO, EPERM,
377 [Define to whatever link() returns for "not supported"
378 if it doesn't return EOPNOTSUPP.])
340 AC_DEFINE(_PATH_BTMP, "/var/log/btmp", [log for bad login attempts]) 379 AC_DEFINE(_PATH_BTMP, "/var/log/btmp", [log for bad login attempts])
341 AC_DEFINE(USE_BTMP, 1, [Use btmp to log bad logins]) 380 AC_DEFINE(USE_BTMP)
342 inet6_default_4in6=yes 381 inet6_default_4in6=yes
343 case `uname -r` in 382 case `uname -r` in
344 1.*|2.0.*) 383 1.*|2.0.*)
345 AC_DEFINE(BROKEN_CMSG_TYPE) 384 AC_DEFINE(BROKEN_CMSG_TYPE, 1,
385 [Define if cmsg_type is not passed correctly])
346 ;; 386 ;;
347 esac 387 esac
348 ;; 388 ;;
349mips-sony-bsd|mips-sony-newsos4) 389mips-sony-bsd|mips-sony-newsos4)
350 AC_DEFINE(NEED_SETPRGP, [], [Need setpgrp to acquire controlling tty]) 390 AC_DEFINE(NEED_SETPRGP, 1, [Need setpgrp to acquire controlling tty])
351 SONY=1 391 SONY=1
352 ;; 392 ;;
353*-*-netbsd*) 393*-*-netbsd*)
@@ -369,10 +409,10 @@ mips-sony-bsd|mips-sony-newsos4)
369 conf_utmp_location=/etc/utmp 409 conf_utmp_location=/etc/utmp
370 conf_wtmp_location=/usr/adm/wtmp 410 conf_wtmp_location=/usr/adm/wtmp
371 MAIL=/usr/spool/mail 411 MAIL=/usr/spool/mail
372 AC_DEFINE(HAVE_NEXT) 412 AC_DEFINE(HAVE_NEXT, 1, [Define if you are on NeXT])
373 AC_DEFINE(BROKEN_REALPATH) 413 AC_DEFINE(BROKEN_REALPATH)
374 AC_DEFINE(USE_PIPES) 414 AC_DEFINE(USE_PIPES)
375 AC_DEFINE(BROKEN_SAVED_UIDS) 415 AC_DEFINE(BROKEN_SAVED_UIDS, 1, [Needed for NeXT])
376 ;; 416 ;;
377*-*-openbsd*) 417*-*-openbsd*)
378 AC_DEFINE(HAVE_ATTRIBUTE__SENTINEL__, 1, [OpenBSD's gcc has sentinel]) 418 AC_DEFINE(HAVE_ATTRIBUTE__SENTINEL__, 1, [OpenBSD's gcc has sentinel])
@@ -383,12 +423,18 @@ mips-sony-bsd|mips-sony-newsos4)
383 fi 423 fi
384 AC_DEFINE(PAM_SUN_CODEBASE) 424 AC_DEFINE(PAM_SUN_CODEBASE)
385 AC_DEFINE(LOGIN_NEEDS_UTMPX) 425 AC_DEFINE(LOGIN_NEEDS_UTMPX)
386 AC_DEFINE(LOGIN_NEEDS_TERM) 426 AC_DEFINE(LOGIN_NEEDS_TERM, 1,
427 [Some versions of /bin/login need the TERM supplied
428 on the commandline])
387 AC_DEFINE(PAM_TTY_KLUDGE) 429 AC_DEFINE(PAM_TTY_KLUDGE)
388 AC_DEFINE(SSHPAM_CHAUTHTOK_NEEDS_RUID) 430 AC_DEFINE(SSHPAM_CHAUTHTOK_NEEDS_RUID, 1,
431 [Define if pam_chauthtok wants real uid set
432 to the unpriv'ed user])
389 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*") 433 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
390 # Pushing STREAMS modules will cause sshd to acquire a controlling tty. 434 # Pushing STREAMS modules will cause sshd to acquire a controlling tty.
391 AC_DEFINE(SSHD_ACQUIRES_CTTY) 435 AC_DEFINE(SSHD_ACQUIRES_CTTY, 1,
436 [Define if sshd somehow reacquires a controlling TTY
437 after setsid()])
392 external_path_file=/etc/default/login 438 external_path_file=/etc/default/login
393 # hardwire lastlog location (can't detect it on some versions) 439 # hardwire lastlog location (can't detect it on some versions)
394 conf_lastlog_location="/var/adm/lastlog" 440 conf_lastlog_location="/var/adm/lastlog"
@@ -397,7 +443,8 @@ mips-sony-bsd|mips-sony-newsos4)
397 if test "$sol2ver" -ge 8; then 443 if test "$sol2ver" -ge 8; then
398 AC_MSG_RESULT(yes) 444 AC_MSG_RESULT(yes)
399 AC_DEFINE(DISABLE_UTMP) 445 AC_DEFINE(DISABLE_UTMP)
400 AC_DEFINE(DISABLE_WTMP) 446 AC_DEFINE(DISABLE_WTMP, 1,
447 [Define if you don't want to use wtmp])
401 else 448 else
402 AC_MSG_RESULT(no) 449 AC_MSG_RESULT(no)
403 fi 450 fi
@@ -452,11 +499,12 @@ mips-sony-bsd|mips-sony-newsos4)
452 AC_DEFINE(SETEUID_BREAKS_SETUID) 499 AC_DEFINE(SETEUID_BREAKS_SETUID)
453 AC_DEFINE(BROKEN_SETREUID) 500 AC_DEFINE(BROKEN_SETREUID)
454 AC_DEFINE(BROKEN_SETREGID) 501 AC_DEFINE(BROKEN_SETREGID)
455 AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd]) 502 AC_DEFINE(PASSWD_NEEDS_USERNAME)
456 case "$host" in 503 case "$host" in
457 *-*-sysv5SCO_SV*) # SCO OpenServer 6.x 504 *-*-sysv5SCO_SV*) # SCO OpenServer 6.x
458 TEST_SHELL=/u95/bin/sh 505 TEST_SHELL=/u95/bin/sh
459 AC_DEFINE(BROKEN_LIBIAF, 1, [ia_uinfo routines not supported by OS yet]) 506 AC_DEFINE(BROKEN_LIBIAF, 1,
507 [ia_uinfo routines not supported by OS yet])
460 ;; 508 ;;
461 esac 509 esac
462 ;; 510 ;;
@@ -482,13 +530,14 @@ mips-sony-bsd|mips-sony-newsos4)
482 AC_DEFINE(BROKEN_SETREGID) 530 AC_DEFINE(BROKEN_SETREGID)
483 AC_DEFINE(WITH_ABBREV_NO_TTY) 531 AC_DEFINE(WITH_ABBREV_NO_TTY)
484 AC_DEFINE(BROKEN_UPDWTMPX) 532 AC_DEFINE(BROKEN_UPDWTMPX)
485 AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd]) 533 AC_DEFINE(PASSWD_NEEDS_USERNAME)
486 AC_CHECK_FUNCS(getluid setluid) 534 AC_CHECK_FUNCS(getluid setluid)
487 MANTYPE=man 535 MANTYPE=man
488 TEST_SHELL=ksh 536 TEST_SHELL=ksh
489 ;; 537 ;;
490*-*-unicosmk*) 538*-*-unicosmk*)
491 AC_DEFINE(NO_SSH_LASTLOG) 539 AC_DEFINE(NO_SSH_LASTLOG, 1,
540 [Define if you don't want to use lastlog in session.c])
492 AC_DEFINE(SETEUID_BREAKS_SETUID) 541 AC_DEFINE(SETEUID_BREAKS_SETUID)
493 AC_DEFINE(BROKEN_SETREUID) 542 AC_DEFINE(BROKEN_SETREUID)
494 AC_DEFINE(BROKEN_SETREGID) 543 AC_DEFINE(BROKEN_SETREGID)
@@ -535,13 +584,18 @@ mips-sony-bsd|mips-sony-newsos4)
535 if test -z "$no_osfsia" ; then 584 if test -z "$no_osfsia" ; then
536 if test -f /etc/sia/matrix.conf; then 585 if test -f /etc/sia/matrix.conf; then
537 AC_MSG_RESULT(yes) 586 AC_MSG_RESULT(yes)
538 AC_DEFINE(HAVE_OSF_SIA) 587 AC_DEFINE(HAVE_OSF_SIA, 1,
539 AC_DEFINE(DISABLE_LOGIN) 588 [Define if you have Digital Unix Security
589 Integration Architecture])
590 AC_DEFINE(DISABLE_LOGIN, 1,
591 [Define if you don't want to use your
592 system's login() call])
540 AC_DEFINE(DISABLE_FD_PASSING) 593 AC_DEFINE(DISABLE_FD_PASSING)
541 LIBS="$LIBS -lsecurity -ldb -lm -laud" 594 LIBS="$LIBS -lsecurity -ldb -lm -laud"
542 else 595 else
543 AC_MSG_RESULT(no) 596 AC_MSG_RESULT(no)
544 AC_DEFINE(LOCKED_PASSWD_SUBSTR, "Nologin") 597 AC_DEFINE(LOCKED_PASSWD_SUBSTR, "Nologin",
598 [String used in /etc/passwd to denote locked account])
545 fi 599 fi
546 fi 600 fi
547 AC_DEFINE(BROKEN_GETADDRINFO) 601 AC_DEFINE(BROKEN_GETADDRINFO)
@@ -553,21 +607,21 @@ mips-sony-bsd|mips-sony-newsos4)
553*-*-nto-qnx) 607*-*-nto-qnx)
554 AC_DEFINE(USE_PIPES) 608 AC_DEFINE(USE_PIPES)
555 AC_DEFINE(NO_X11_UNIX_SOCKETS) 609 AC_DEFINE(NO_X11_UNIX_SOCKETS)
556 AC_DEFINE(MISSING_NFDBITS) 610 AC_DEFINE(MISSING_NFDBITS, 1, [Define on *nto-qnx systems])
557 AC_DEFINE(MISSING_HOWMANY) 611 AC_DEFINE(MISSING_HOWMANY, 1, [Define on *nto-qnx systems])
558 AC_DEFINE(MISSING_FD_MASK) 612 AC_DEFINE(MISSING_FD_MASK, 1, [Define on *nto-qnx systems])
559 ;; 613 ;;
560 614
561*-*-ultrix*) 615*-*-ultrix*)
562 AC_DEFINE(BROKEN_GETGROUPS, [], [getgroups(0,NULL) will return -1]) 616 AC_DEFINE(BROKEN_GETGROUPS, 1, [getgroups(0,NULL) will return -1])
563 AC_DEFINE(BROKEN_MMAP, [], [Ultrix mmap can't map files]) 617 AC_DEFINE(BROKEN_MMAP, 1, [Ultrix mmap can't map files])
564 AC_DEFINE(NEED_SETPRGP, [], [Need setpgrp to acquire controlling tty]) 618 AC_DEFINE(NEED_SETPRGP)
565 AC_DEFINE(HAVE_SYS_SYSLOG_H, 1, [Force use of sys/syslog.h on Ultrix]) 619 AC_DEFINE(HAVE_SYS_SYSLOG_H, 1, [Force use of sys/syslog.h on Ultrix])
566 ;; 620 ;;
567 621
568*-*-lynxos) 622*-*-lynxos)
569 CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__" 623 CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"
570 AC_DEFINE(MISSING_HOWMANY) 624 AC_DEFINE(MISSING_HOWMANY)
571 AC_DEFINE(BROKEN_SETVBUF, 1, [LynxOS has broken setvbuf() implementation]) 625 AC_DEFINE(BROKEN_SETVBUF, 1, [LynxOS has broken setvbuf() implementation])
572 ;; 626 ;;
573esac 627esac
@@ -747,7 +801,8 @@ int main(int argc, char **argv) {
747 801
748AC_CHECK_FUNC(getspnam, , 802AC_CHECK_FUNC(getspnam, ,
749 AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen")) 803 AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen"))
750AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME)) 804AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME, 1,
805 [Define if you have the basename function.]))
751 806
752dnl zlib is required 807dnl zlib is required
753AC_ARG_WITH(zlib, 808AC_ARG_WITH(zlib,
@@ -858,7 +913,8 @@ AC_CHECK_FUNC(utimes,
858 913
859dnl Checks for libutil functions 914dnl Checks for libutil functions
860AC_CHECK_HEADERS(libutil.h) 915AC_CHECK_HEADERS(libutil.h)
861AC_SEARCH_LIBS(login, util bsd, [AC_DEFINE(HAVE_LOGIN)]) 916AC_SEARCH_LIBS(login, util bsd, [AC_DEFINE(HAVE_LOGIN, 1,
917 [Define if your libraries define login()])])
862AC_CHECK_FUNCS(logout updwtmp logwtmp) 918AC_CHECK_FUNCS(logout updwtmp logwtmp)
863 919
864AC_FUNC_STRFTIME 920AC_FUNC_STRFTIME
@@ -873,7 +929,9 @@ AC_EGREP_CPP(FOUNDIT,
873 #endif 929 #endif
874 ], 930 ],
875 [ 931 [
876 AC_DEFINE(GLOB_HAS_ALTDIRFUNC) 932 AC_DEFINE(GLOB_HAS_ALTDIRFUNC, 1,
933 [Define if your system glob() function has
934 the GLOB_ALTDIRFUNC extension])
877 AC_MSG_RESULT(yes) 935 AC_MSG_RESULT(yes)
878 ], 936 ],
879 [ 937 [
@@ -889,7 +947,9 @@ AC_EGREP_CPP(FOUNDIT,
889 int main(void){glob_t g; g.gl_matchc = 1;} 947 int main(void){glob_t g; g.gl_matchc = 1;}
890 ], 948 ],
891 [ 949 [
892 AC_DEFINE(GLOB_HAS_GL_MATCHC) 950 AC_DEFINE(GLOB_HAS_GL_MATCHC, 1,
951 [Define if your system glob() function has
952 gl_matchc options in glob_t])
893 AC_MSG_RESULT(yes) 953 AC_MSG_RESULT(yes)
894 ], 954 ],
895 [ 955 [
@@ -907,7 +967,9 @@ int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));}
907 [AC_MSG_RESULT(yes)], 967 [AC_MSG_RESULT(yes)],
908 [ 968 [
909 AC_MSG_RESULT(no) 969 AC_MSG_RESULT(no)
910 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME) 970 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME, 1,
971 [Define in your struct dirent expects you to
972 allocate extra space for d_name])
911 ], 973 ],
912 [ 974 [
913 AC_MSG_WARN([cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME]) 975 AC_MSG_WARN([cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME])
@@ -917,7 +979,7 @@ int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));}
917 979
918AC_MSG_CHECKING([for /proc/pid/fd directory]) 980AC_MSG_CHECKING([for /proc/pid/fd directory])
919if test -d "/proc/$$/fd" ; then 981if test -d "/proc/$$/fd" ; then
920 AC_DEFINE(HAVE_PROC_PID) 982 AC_DEFINE(HAVE_PROC_PID, 1, [Define if you have /proc/$pid/fd])
921 AC_MSG_RESULT(yes) 983 AC_MSG_RESULT(yes)
922else 984else
923 AC_MSG_RESULT(no) 985 AC_MSG_RESULT(no)
@@ -935,7 +997,7 @@ AC_ARG_WITH(skey,
935 LDFLAGS="$LDFLAGS -L${withval}/lib" 997 LDFLAGS="$LDFLAGS -L${withval}/lib"
936 fi 998 fi
937 999
938 AC_DEFINE(SKEY) 1000 AC_DEFINE(SKEY, 1, [Define if you want S/Key support])
939 LIBS="-lskey $LIBS" 1001 LIBS="-lskey $LIBS"
940 SKEY_MSG="yes" 1002 SKEY_MSG="yes"
941 1003
@@ -957,7 +1019,9 @@ int main() { char *ff = skey_keyinfo(""); ff=""; exit(0); }
957 #include <skey.h>], 1019 #include <skey.h>],
958 [(void)skeychallenge(NULL,"name","",0);], 1020 [(void)skeychallenge(NULL,"name","",0);],
959 [AC_MSG_RESULT(yes) 1021 [AC_MSG_RESULT(yes)
960 AC_DEFINE(SKEYCHALLENGE_4ARG)], 1022 AC_DEFINE(SKEYCHALLENGE_4ARG, 1,
1023 [Define if your skeychallenge()
1024 function takes 4 arguments (NetBSD)])],
961 [AC_MSG_RESULT(no)] 1025 [AC_MSG_RESULT(no)]
962 ) 1026 )
963 fi 1027 fi
@@ -1008,7 +1072,9 @@ AC_ARG_WITH(tcp-wrappers,
1008 [hosts_access(0);], 1072 [hosts_access(0);],
1009 [ 1073 [
1010 AC_MSG_RESULT(yes) 1074 AC_MSG_RESULT(yes)
1011 AC_DEFINE(LIBWRAP) 1075 AC_DEFINE(LIBWRAP, 1,
1076 [Define if you want
1077 TCP Wrappers support])
1012 AC_SUBST(LIBWRAP) 1078 AC_SUBST(LIBWRAP)
1013 TCPW_MSG="yes" 1079 TCPW_MSG="yes"
1014 ], 1080 ],
@@ -1031,7 +1097,7 @@ AC_ARG_WITH(libedit,
1031 LDFLAGS="$LDFLAGS -L$withval/lib" 1097 LDFLAGS="$LDFLAGS -L$withval/lib"
1032 fi 1098 fi
1033 AC_CHECK_LIB(edit, el_init, 1099 AC_CHECK_LIB(edit, el_init,
1034 [ AC_DEFINE(USE_LIBEDIT, [], [Use libedit for sftp]) 1100 [ AC_DEFINE(USE_LIBEDIT, 1, [Use libedit for sftp])
1035 LIBEDIT="-ledit -lcurses" 1101 LIBEDIT="-ledit -lcurses"
1036 LIBEDIT_MSG="yes" 1102 LIBEDIT_MSG="yes"
1037 AC_SUBST(LIBEDIT) 1103 AC_SUBST(LIBEDIT)
@@ -1075,12 +1141,12 @@ AC_ARG_WITH(audit,
1075 [AC_MSG_ERROR(BSM enabled and required function not found)]) 1141 [AC_MSG_ERROR(BSM enabled and required function not found)])
1076 # These are optional 1142 # These are optional
1077 AC_CHECK_FUNCS(getaudit_addr) 1143 AC_CHECK_FUNCS(getaudit_addr)
1078 AC_DEFINE(USE_BSM_AUDIT, [], [Use BSM audit module]) 1144 AC_DEFINE(USE_BSM_AUDIT, 1, [Use BSM audit module])
1079 ;; 1145 ;;
1080 debug) 1146 debug)
1081 AUDIT_MODULE=debug 1147 AUDIT_MODULE=debug
1082 AC_MSG_RESULT(debug) 1148 AC_MSG_RESULT(debug)
1083 AC_DEFINE(SSH_AUDIT_EVENTS, [], Use audit debugging module) 1149 AC_DEFINE(SSH_AUDIT_EVENTS, 1, Use audit debugging module)
1084 ;; 1150 ;;
1085 no) 1151 no)
1086 AC_MSG_RESULT(no) 1152 AC_MSG_RESULT(no)
@@ -1190,7 +1256,8 @@ str = gai_strerror(0);],[
1190 AC_DEFINE(HAVE_CONST_GAI_STRERROR_PROTO, 1, 1256 AC_DEFINE(HAVE_CONST_GAI_STRERROR_PROTO, 1,
1191 [Define if gai_strerror() returns const char *])])]) 1257 [Define if gai_strerror() returns const char *])])])
1192 1258
1193AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP)) 1259AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP, 1,
1260 [Some systems put nanosleep outside of libc]))
1194 1261
1195dnl Make sure prototypes are defined for these before using them. 1262dnl Make sure prototypes are defined for these before using them.
1196AC_CHECK_DECL(getrusage, [AC_CHECK_FUNCS(getrusage)]) 1263AC_CHECK_DECL(getrusage, [AC_CHECK_FUNCS(getrusage)])
@@ -1222,7 +1289,8 @@ AC_CHECK_FUNCS(setresuid, [
1222int main(){errno=0; setresuid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);} 1289int main(){errno=0; setresuid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);}
1223 ]])], 1290 ]])],
1224 [AC_MSG_RESULT(yes)], 1291 [AC_MSG_RESULT(yes)],
1225 [AC_DEFINE(BROKEN_SETRESUID) 1292 [AC_DEFINE(BROKEN_SETRESUID, 1,
1293 [Define if your setresuid() is broken])
1226 AC_MSG_RESULT(not implemented)], 1294 AC_MSG_RESULT(not implemented)],
1227 [AC_MSG_WARN([cross compiling: not checking setresuid])] 1295 [AC_MSG_WARN([cross compiling: not checking setresuid])]
1228 ) 1296 )
@@ -1238,7 +1306,8 @@ AC_CHECK_FUNCS(setresgid, [
1238int main(){errno=0; setresgid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);} 1306int main(){errno=0; setresgid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);}
1239 ]])], 1307 ]])],
1240 [AC_MSG_RESULT(yes)], 1308 [AC_MSG_RESULT(yes)],
1241 [AC_DEFINE(BROKEN_SETRESGID) 1309 [AC_DEFINE(BROKEN_SETRESGID, 1,
1310 [Define if your setresgid() is broken])
1242 AC_MSG_RESULT(not implemented)], 1311 AC_MSG_RESULT(not implemented)],
1243 [AC_MSG_WARN([cross compiling: not checking setresuid])] 1312 [AC_MSG_WARN([cross compiling: not checking setresuid])]
1244 ) 1313 )
@@ -1254,13 +1323,16 @@ AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline pututxline )
1254AC_CHECK_FUNCS(setutxent utmpxname) 1323AC_CHECK_FUNCS(setutxent utmpxname)
1255 1324
1256AC_CHECK_FUNC(daemon, 1325AC_CHECK_FUNC(daemon,
1257 [AC_DEFINE(HAVE_DAEMON)], 1326 [AC_DEFINE(HAVE_DAEMON, 1, [Define if your libraries define daemon()])],
1258 [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])] 1327 [AC_CHECK_LIB(bsd, daemon,
1328 [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
1259) 1329)
1260 1330
1261AC_CHECK_FUNC(getpagesize, 1331AC_CHECK_FUNC(getpagesize,
1262 [AC_DEFINE(HAVE_GETPAGESIZE)], 1332 [AC_DEFINE(HAVE_GETPAGESIZE, 1,
1263 [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])] 1333 [Define if your libraries define getpagesize()])],
1334 [AC_CHECK_LIB(ucb, getpagesize,
1335 [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])]
1264) 1336)
1265 1337
1266# Check for broken snprintf 1338# Check for broken snprintf
@@ -1274,7 +1346,8 @@ int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');}
1274 [AC_MSG_RESULT(yes)], 1346 [AC_MSG_RESULT(yes)],
1275 [ 1347 [
1276 AC_MSG_RESULT(no) 1348 AC_MSG_RESULT(no)
1277 AC_DEFINE(BROKEN_SNPRINTF) 1349 AC_DEFINE(BROKEN_SNPRINTF, 1,
1350 [Define if your snprintf is busted])
1278 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor]) 1351 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
1279 ], 1352 ],
1280 [ AC_MSG_WARN([cross compiling: Assuming working snprintf()]) ] 1353 [ AC_MSG_WARN([cross compiling: Assuming working snprintf()]) ]
@@ -1290,7 +1363,7 @@ if test "x$ac_cv_func_getpeereid" != "xyes" ; then
1290 #include <sys/socket.h>], 1363 #include <sys/socket.h>],
1291 [int i = SO_PEERCRED;], 1364 [int i = SO_PEERCRED;],
1292 [ AC_MSG_RESULT(yes) 1365 [ AC_MSG_RESULT(yes)
1293 AC_DEFINE(HAVE_SO_PEERCRED, [], [Have PEERCRED socket option]) 1366 AC_DEFINE(HAVE_SO_PEERCRED, 1, [Have PEERCRED socket option])
1294 ], 1367 ],
1295 [AC_MSG_RESULT(no) 1368 [AC_MSG_RESULT(no)
1296 NO_PEERCHECK=1] 1369 NO_PEERCHECK=1]
@@ -1314,7 +1387,7 @@ unlink(template); exit(0);
1314 ], 1387 ],
1315 [ 1388 [
1316 AC_MSG_RESULT(yes) 1389 AC_MSG_RESULT(yes)
1317 AC_DEFINE(HAVE_STRICT_MKSTEMP) 1390 AC_DEFINE(HAVE_STRICT_MKSTEMP, 1, [Silly mkstemp()])
1318 ], 1391 ],
1319 [ 1392 [
1320 AC_MSG_RESULT(yes) 1393 AC_MSG_RESULT(yes)
@@ -1488,8 +1561,9 @@ main(void)
1488 ], 1561 ],
1489 [ 1562 [
1490 AC_MSG_RESULT(yes) 1563 AC_MSG_RESULT(yes)
1491 AC_DEFINE(AIX_GETNAMEINFO_HACK, [], 1564 AC_DEFINE(AIX_GETNAMEINFO_HACK, 1,
1492[Define if you have a getaddrinfo that fails for the all-zeros IPv6 address]) 1565 [Define if you have a getaddrinfo that fails
1566 for the all-zeros IPv6 address])
1493 ], 1567 ],
1494 [ 1568 [
1495 AC_MSG_RESULT(no) 1569 AC_MSG_RESULT(no)
@@ -1536,7 +1610,8 @@ AC_ARG_WITH(pam,
1536 1610
1537 PAM_MSG="yes" 1611 PAM_MSG="yes"
1538 1612
1539 AC_DEFINE(USE_PAM) 1613 AC_DEFINE(USE_PAM, 1,
1614 [Define if you want to enable PAM support])
1540 if test $ac_cv_lib_dl_dlopen = yes; then 1615 if test $ac_cv_lib_dl_dlopen = yes; then
1541 LIBPAM="-lpam -ldl" 1616 LIBPAM="-lpam -ldl"
1542 else 1617 else
@@ -1563,7 +1638,9 @@ if test "x$PAM_MSG" = "xyes" ; then
1563 [(void)pam_strerror((pam_handle_t *)NULL, -1);], 1638 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
1564 [AC_MSG_RESULT(no)], 1639 [AC_MSG_RESULT(no)],
1565 [ 1640 [
1566 AC_DEFINE(HAVE_OLD_PAM) 1641 AC_DEFINE(HAVE_OLD_PAM, 1,
1642 [Define if you have an old version of PAM
1643 which takes only one argument to pam_strerror])
1567 AC_MSG_RESULT(yes) 1644 AC_MSG_RESULT(yes)
1568 PAM_MSG="yes (old library)" 1645 PAM_MSG="yes (old library)"
1569 ] 1646 ]
@@ -1603,7 +1680,9 @@ AC_ARG_WITH(ssl-dir,
1603 ] 1680 ]
1604) 1681)
1605LIBS="-lcrypto $LIBS" 1682LIBS="-lcrypto $LIBS"
1606AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL), 1683AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL, 1,
1684 [Define if your ssl headers are included
1685 with #include <openssl/header.h>]),
1607 [ 1686 [
1608 dnl Check default openssl install dir 1687 dnl Check default openssl install dir
1609 if test -n "${need_dash_r}"; then 1688 if test -n "${need_dash_r}"; then
@@ -1777,7 +1856,8 @@ AC_ARG_WITH(rand-helper,
1777# Which randomness source do we use? 1856# Which randomness source do we use?
1778if test ! -z "$OPENSSL_SEEDS_ITSELF" && test -z "$USE_RAND_HELPER" ; then 1857if test ! -z "$OPENSSL_SEEDS_ITSELF" && test -z "$USE_RAND_HELPER" ; then
1779 # OpenSSL only 1858 # OpenSSL only
1780 AC_DEFINE(OPENSSL_PRNG_ONLY) 1859 AC_DEFINE(OPENSSL_PRNG_ONLY, 1,
1860 [Define if you want OpenSSL's internally seeded PRNG only])
1781 RAND_MSG="OpenSSL internal ONLY" 1861 RAND_MSG="OpenSSL internal ONLY"
1782 INSTALL_SSH_RAND_HELPER="" 1862 INSTALL_SSH_RAND_HELPER=""
1783elif test ! -z "$USE_RAND_HELPER" ; then 1863elif test ! -z "$USE_RAND_HELPER" ; then
@@ -1805,7 +1885,8 @@ AC_ARG_WITH(prngd-port,
1805 esac 1885 esac
1806 if test ! -z "$withval" ; then 1886 if test ! -z "$withval" ; then
1807 PRNGD_PORT="$withval" 1887 PRNGD_PORT="$withval"
1808 AC_DEFINE_UNQUOTED(PRNGD_PORT, $PRNGD_PORT) 1888 AC_DEFINE_UNQUOTED(PRNGD_PORT, $PRNGD_PORT,
1889 [Port number of PRNGD/EGD random number socket])
1809 fi 1890 fi
1810 ] 1891 ]
1811) 1892)
@@ -1836,7 +1917,8 @@ AC_ARG_WITH(prngd-socket,
1836 AC_MSG_WARN(Entropy socket is not readable) 1917 AC_MSG_WARN(Entropy socket is not readable)
1837 fi 1918 fi
1838 PRNGD_SOCKET="$withval" 1919 PRNGD_SOCKET="$withval"
1839 AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET") 1920 AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET",
1921 [Location of PRNGD/EGD random number socket])
1840 fi 1922 fi
1841 ], 1923 ],
1842 [ 1924 [
@@ -1871,7 +1953,8 @@ AC_ARG_WITH(entropy-timeout,
1871 fi 1953 fi
1872 ] 1954 ]
1873) 1955)
1874AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout) 1956AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout,
1957 [Builtin PRNG command timeout])
1875 1958
1876SSH_PRIVSEP_USER=sshd 1959SSH_PRIVSEP_USER=sshd
1877AC_ARG_WITH(privsep-user, 1960AC_ARG_WITH(privsep-user,
@@ -1883,7 +1966,8 @@ AC_ARG_WITH(privsep-user,
1883 fi 1966 fi
1884 ] 1967 ]
1885) 1968)
1886AC_DEFINE_UNQUOTED(SSH_PRIVSEP_USER, "$SSH_PRIVSEP_USER") 1969AC_DEFINE_UNQUOTED(SSH_PRIVSEP_USER, "$SSH_PRIVSEP_USER",
1970 [non-privileged user for privilege separation])
1887AC_SUBST(SSH_PRIVSEP_USER) 1971AC_SUBST(SSH_PRIVSEP_USER)
1888 1972
1889# We do this little dance with the search path to insure 1973# We do this little dance with the search path to insure
@@ -1963,7 +2047,7 @@ AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1963 ) 2047 )
1964]) 2048])
1965if test "x$ac_cv_have_u_int" = "xyes" ; then 2049if test "x$ac_cv_have_u_int" = "xyes" ; then
1966 AC_DEFINE(HAVE_U_INT) 2050 AC_DEFINE(HAVE_U_INT, 1, [define if you have u_int data type])
1967 have_u_int=1 2051 have_u_int=1
1968fi 2052fi
1969 2053
@@ -1976,7 +2060,7 @@ AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1976 ) 2060 )
1977]) 2061])
1978if test "x$ac_cv_have_intxx_t" = "xyes" ; then 2062if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1979 AC_DEFINE(HAVE_INTXX_T) 2063 AC_DEFINE(HAVE_INTXX_T, 1, [define if you have intxx_t data type])
1980 have_intxx_t=1 2064 have_intxx_t=1
1981fi 2065fi
1982 2066
@@ -2013,7 +2097,7 @@ AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
2013 ) 2097 )
2014]) 2098])
2015if test "x$ac_cv_have_int64_t" = "xyes" ; then 2099if test "x$ac_cv_have_int64_t" = "xyes" ; then
2016 AC_DEFINE(HAVE_INT64_T) 2100 AC_DEFINE(HAVE_INT64_T, 1, [define if you have int64_t data type])
2017fi 2101fi
2018 2102
2019AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [ 2103AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
@@ -2025,7 +2109,7 @@ AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
2025 ) 2109 )
2026]) 2110])
2027if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then 2111if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
2028 AC_DEFINE(HAVE_U_INTXX_T) 2112 AC_DEFINE(HAVE_U_INTXX_T, 1, [define if you have u_intxx_t data type])
2029 have_u_intxx_t=1 2113 have_u_intxx_t=1
2030fi 2114fi
2031 2115
@@ -2051,7 +2135,7 @@ AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
2051 ) 2135 )
2052]) 2136])
2053if test "x$ac_cv_have_u_int64_t" = "xyes" ; then 2137if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
2054 AC_DEFINE(HAVE_U_INT64_T) 2138 AC_DEFINE(HAVE_U_INT64_T, 1, [define if you have u_int64_t data type])
2055 have_u_int64_t=1 2139 have_u_int64_t=1
2056fi 2140fi
2057 2141
@@ -2080,7 +2164,8 @@ if test -z "$have_u_intxx_t" ; then
2080 ) 2164 )
2081 ]) 2165 ])
2082 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then 2166 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
2083 AC_DEFINE(HAVE_UINTXX_T) 2167 AC_DEFINE(HAVE_UINTXX_T, 1,
2168 [define if you have uintxx_t data type])
2084 fi 2169 fi
2085fi 2170fi
2086 2171
@@ -2131,7 +2216,7 @@ AC_CACHE_CHECK([for u_char], ac_cv_have_u_char, [
2131 ) 2216 )
2132]) 2217])
2133if test "x$ac_cv_have_u_char" = "xyes" ; then 2218if test "x$ac_cv_have_u_char" = "xyes" ; then
2134 AC_DEFINE(HAVE_U_CHAR) 2219 AC_DEFINE(HAVE_U_CHAR, 1, [define if you have u_char data type])
2135fi 2220fi
2136 2221
2137TYPE_SOCKLEN_T 2222TYPE_SOCKLEN_T
@@ -2153,7 +2238,7 @@ AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
2153 ) 2238 )
2154]) 2239])
2155if test "x$ac_cv_have_size_t" = "xyes" ; then 2240if test "x$ac_cv_have_size_t" = "xyes" ; then
2156 AC_DEFINE(HAVE_SIZE_T) 2241 AC_DEFINE(HAVE_SIZE_T, 1, [define if you have size_t data type])
2157fi 2242fi
2158 2243
2159AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [ 2244AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
@@ -2167,7 +2252,7 @@ AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
2167 ) 2252 )
2168]) 2253])
2169if test "x$ac_cv_have_ssize_t" = "xyes" ; then 2254if test "x$ac_cv_have_ssize_t" = "xyes" ; then
2170 AC_DEFINE(HAVE_SSIZE_T) 2255 AC_DEFINE(HAVE_SSIZE_T, 1, [define if you have ssize_t data type])
2171fi 2256fi
2172 2257
2173AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [ 2258AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [
@@ -2181,7 +2266,7 @@ AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [
2181 ) 2266 )
2182]) 2267])
2183if test "x$ac_cv_have_clock_t" = "xyes" ; then 2268if test "x$ac_cv_have_clock_t" = "xyes" ; then
2184 AC_DEFINE(HAVE_CLOCK_T) 2269 AC_DEFINE(HAVE_CLOCK_T, 1, [define if you have clock_t data type])
2185fi 2270fi
2186 2271
2187AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [ 2272AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
@@ -2206,7 +2291,8 @@ AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
2206 ) 2291 )
2207]) 2292])
2208if test "x$ac_cv_have_sa_family_t" = "xyes" ; then 2293if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
2209 AC_DEFINE(HAVE_SA_FAMILY_T) 2294 AC_DEFINE(HAVE_SA_FAMILY_T, 1,
2295 [define if you have sa_family_t data type])
2210fi 2296fi
2211 2297
2212AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [ 2298AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
@@ -2220,7 +2306,7 @@ AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
2220 ) 2306 )
2221]) 2307])
2222if test "x$ac_cv_have_pid_t" = "xyes" ; then 2308if test "x$ac_cv_have_pid_t" = "xyes" ; then
2223 AC_DEFINE(HAVE_PID_T) 2309 AC_DEFINE(HAVE_PID_T, 1, [define if you have pid_t data type])
2224fi 2310fi
2225 2311
2226AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [ 2312AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
@@ -2234,7 +2320,7 @@ AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
2234 ) 2320 )
2235]) 2321])
2236if test "x$ac_cv_have_mode_t" = "xyes" ; then 2322if test "x$ac_cv_have_mode_t" = "xyes" ; then
2237 AC_DEFINE(HAVE_MODE_T) 2323 AC_DEFINE(HAVE_MODE_T, 1, [define if you have mode_t data type])
2238fi 2324fi
2239 2325
2240 2326
@@ -2250,7 +2336,8 @@ AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage
2250 ) 2336 )
2251]) 2337])
2252if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then 2338if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
2253 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE) 2339 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE, 1,
2340 [define if you have struct sockaddr_storage data type])
2254fi 2341fi
2255 2342
2256AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [ 2343AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
@@ -2265,7 +2352,8 @@ AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
2265 ) 2352 )
2266]) 2353])
2267if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then 2354if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
2268 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6) 2355 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6, 1,
2356 [define if you have struct sockaddr_in6 data type])
2269fi 2357fi
2270 2358
2271AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [ 2359AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
@@ -2280,7 +2368,8 @@ AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
2280 ) 2368 )
2281]) 2369])
2282if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then 2370if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
2283 AC_DEFINE(HAVE_STRUCT_IN6_ADDR) 2371 AC_DEFINE(HAVE_STRUCT_IN6_ADDR, 1,
2372 [define if you have struct in6_addr data type])
2284fi 2373fi
2285 2374
2286AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [ 2375AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
@@ -2296,7 +2385,8 @@ AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
2296 ) 2385 )
2297]) 2386])
2298if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then 2387if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
2299 AC_DEFINE(HAVE_STRUCT_ADDRINFO) 2388 AC_DEFINE(HAVE_STRUCT_ADDRINFO, 1,
2389 [define if you have struct addrinfo data type])
2300fi 2390fi
2301 2391
2302AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [ 2392AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [
@@ -2308,7 +2398,7 @@ AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [
2308 ) 2398 )
2309]) 2399])
2310if test "x$ac_cv_have_struct_timeval" = "xyes" ; then 2400if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
2311 AC_DEFINE(HAVE_STRUCT_TIMEVAL) 2401 AC_DEFINE(HAVE_STRUCT_TIMEVAL, 1, [define if you have struct timeval])
2312 have_struct_timeval=1 2402 have_struct_timeval=1
2313fi 2403fi
2314 2404
@@ -2387,7 +2477,7 @@ AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
2387 ) 2477 )
2388]) 2478])
2389if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then 2479if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
2390 AC_DEFINE(HAVE_SS_FAMILY_IN_SS) 2480 AC_DEFINE(HAVE_SS_FAMILY_IN_SS, 1, [Fields in struct sockaddr_storage])
2391fi 2481fi
2392 2482
2393AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage], 2483AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
@@ -2403,7 +2493,8 @@ AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
2403 ) 2493 )
2404]) 2494])
2405if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then 2495if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
2406 AC_DEFINE(HAVE___SS_FAMILY_IN_SS) 2496 AC_DEFINE(HAVE___SS_FAMILY_IN_SS, 1,
2497 [Fields in struct sockaddr_storage])
2407fi 2498fi
2408 2499
2409AC_CACHE_CHECK([for pw_class field in struct passwd], 2500AC_CACHE_CHECK([for pw_class field in struct passwd],
@@ -2418,7 +2509,8 @@ AC_CACHE_CHECK([for pw_class field in struct passwd],
2418 ) 2509 )
2419]) 2510])
2420if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then 2511if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
2421 AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD) 2512 AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD, 1,
2513 [Define if your password has a pw_class field])
2422fi 2514fi
2423 2515
2424AC_CACHE_CHECK([for pw_expire field in struct passwd], 2516AC_CACHE_CHECK([for pw_expire field in struct passwd],
@@ -2433,7 +2525,8 @@ AC_CACHE_CHECK([for pw_expire field in struct passwd],
2433 ) 2525 )
2434]) 2526])
2435if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then 2527if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then
2436 AC_DEFINE(HAVE_PW_EXPIRE_IN_PASSWD) 2528 AC_DEFINE(HAVE_PW_EXPIRE_IN_PASSWD, 1,
2529 [Define if your password has a pw_expire field])
2437fi 2530fi
2438 2531
2439AC_CACHE_CHECK([for pw_change field in struct passwd], 2532AC_CACHE_CHECK([for pw_change field in struct passwd],
@@ -2448,7 +2541,8 @@ AC_CACHE_CHECK([for pw_change field in struct passwd],
2448 ) 2541 )
2449]) 2542])
2450if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then 2543if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then
2451 AC_DEFINE(HAVE_PW_CHANGE_IN_PASSWD) 2544 AC_DEFINE(HAVE_PW_CHANGE_IN_PASSWD, 1,
2545 [Define if your password has a pw_change field])
2452fi 2546fi
2453 2547
2454dnl make sure we're using the real structure members and not defines 2548dnl make sure we're using the real structure members and not defines
@@ -2474,7 +2568,9 @@ exit(0);
2474 ) 2568 )
2475]) 2569])
2476if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then 2570if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
2477 AC_DEFINE(HAVE_ACCRIGHTS_IN_MSGHDR) 2571 AC_DEFINE(HAVE_ACCRIGHTS_IN_MSGHDR, 1,
2572 [Define if your system uses access rights style
2573 file descriptor passing])
2478fi 2574fi
2479 2575
2480AC_CACHE_CHECK([for msg_control field in struct msghdr], 2576AC_CACHE_CHECK([for msg_control field in struct msghdr],
@@ -2499,7 +2595,9 @@ exit(0);
2499 ) 2595 )
2500]) 2596])
2501if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then 2597if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
2502 AC_DEFINE(HAVE_CONTROL_IN_MSGHDR) 2598 AC_DEFINE(HAVE_CONTROL_IN_MSGHDR, 1,
2599 [Define if your system uses ancillary data style
2600 file descriptor passing])
2503fi 2601fi
2504 2602
2505AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [ 2603AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
@@ -2510,7 +2608,7 @@ AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
2510 ) 2608 )
2511]) 2609])
2512if test "x$ac_cv_libc_defines___progname" = "xyes" ; then 2610if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
2513 AC_DEFINE(HAVE___PROGNAME) 2611 AC_DEFINE(HAVE___PROGNAME, 1, [Define if libc defines __progname])
2514fi 2612fi
2515 2613
2516AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNCTION__, [ 2614AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNCTION__, [
@@ -2523,7 +2621,8 @@ AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNC
2523 ) 2621 )
2524]) 2622])
2525if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then 2623if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
2526 AC_DEFINE(HAVE___FUNCTION__) 2624 AC_DEFINE(HAVE___FUNCTION__, 1,
2625 [Define if compiler implements __FUNCTION__])
2527fi 2626fi
2528 2627
2529AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__, [ 2628AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__, [
@@ -2536,7 +2635,7 @@ AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__,
2536 ) 2635 )
2537]) 2636])
2538if test "x$ac_cv_cc_implements___func__" = "xyes" ; then 2637if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
2539 AC_DEFINE(HAVE___func__) 2638 AC_DEFINE(HAVE___func__, 1, [Define if compiler implements __func__])
2540fi 2639fi
2541 2640
2542AC_CACHE_CHECK([whether getopt has optreset support], 2641AC_CACHE_CHECK([whether getopt has optreset support],
@@ -2551,7 +2650,8 @@ AC_CACHE_CHECK([whether getopt has optreset support],
2551 ) 2650 )
2552]) 2651])
2553if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then 2652if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
2554 AC_DEFINE(HAVE_GETOPT_OPTRESET) 2653 AC_DEFINE(HAVE_GETOPT_OPTRESET, 1,
2654 [Define if your getopt(3) defines and uses optreset])
2555fi 2655fi
2556 2656
2557AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [ 2657AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
@@ -2562,7 +2662,8 @@ AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
2562 ) 2662 )
2563]) 2663])
2564if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then 2664if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
2565 AC_DEFINE(HAVE_SYS_ERRLIST) 2665 AC_DEFINE(HAVE_SYS_ERRLIST, 1,
2666 [Define if your system defines sys_errlist[]])
2566fi 2667fi
2567 2668
2568 2669
@@ -2574,7 +2675,7 @@ AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [
2574 ) 2675 )
2575]) 2676])
2576if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then 2677if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
2577 AC_DEFINE(HAVE_SYS_NERR) 2678 AC_DEFINE(HAVE_SYS_NERR, 1, [Define if your system defines sys_nerr])
2578fi 2679fi
2579 2680
2580SCARD_MSG="no" 2681SCARD_MSG="no"
@@ -2601,8 +2702,11 @@ AC_ARG_WITH(sectok,
2601 if test "$ac_cv_lib_sectok_sectok_open" != yes; then 2702 if test "$ac_cv_lib_sectok_sectok_open" != yes; then
2602 AC_MSG_ERROR(Can't find libsectok) 2703 AC_MSG_ERROR(Can't find libsectok)
2603 fi 2704 fi
2604 AC_DEFINE(SMARTCARD) 2705 AC_DEFINE(SMARTCARD, 1,
2605 AC_DEFINE(USE_SECTOK) 2706 [Define if you want smartcard support])
2707 AC_DEFINE(USE_SECTOK, 1,
2708 [Define if you want smartcard support
2709 using sectok])
2606 SCARD_MSG="yes, using sectok" 2710 SCARD_MSG="yes, using sectok"
2607 fi 2711 fi
2608 ] 2712 ]
@@ -2625,7 +2729,9 @@ AC_ARG_WITH(opensc,
2625 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS" 2729 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS"
2626 LDFLAGS="$LDFLAGS $LIBOPENSC_LIBS" 2730 LDFLAGS="$LDFLAGS $LIBOPENSC_LIBS"
2627 AC_DEFINE(SMARTCARD) 2731 AC_DEFINE(SMARTCARD)
2628 AC_DEFINE(USE_OPENSC) 2732 AC_DEFINE(USE_OPENSC, 1,
2733 [Define if you want smartcard support
2734 using OpenSC])
2629 SCARD_MSG="yes, using OpenSC" 2735 SCARD_MSG="yes, using OpenSC"
2630 fi 2736 fi
2631 fi 2737 fi
@@ -2634,7 +2740,8 @@ AC_ARG_WITH(opensc,
2634 2740
2635# Check libraries needed by DNS fingerprint support 2741# Check libraries needed by DNS fingerprint support
2636AC_SEARCH_LIBS(getrrsetbyname, resolv, 2742AC_SEARCH_LIBS(getrrsetbyname, resolv,
2637 [AC_DEFINE(HAVE_GETRRSETBYNAME)], 2743 [AC_DEFINE(HAVE_GETRRSETBYNAME, 1,
2744 [Define if getrrsetbyname() exists])],
2638 [ 2745 [
2639 # Needed by our getrrsetbyname() 2746 # Needed by our getrrsetbyname()
2640 AC_SEARCH_LIBS(res_query, resolv) 2747 AC_SEARCH_LIBS(res_query, resolv)
@@ -2663,7 +2770,8 @@ int main()
2663 [#include <sys/types.h> 2770 [#include <sys/types.h>
2664 #include <arpa/nameser.h>]) 2771 #include <arpa/nameser.h>])
2665 AC_CHECK_MEMBER(HEADER.ad, 2772 AC_CHECK_MEMBER(HEADER.ad,
2666 [AC_DEFINE(HAVE_HEADER_AD)],, 2773 [AC_DEFINE(HAVE_HEADER_AD, 1,
2774 [Define if HEADER.ad exists in arpa/nameser.h])],,
2667 [#include <arpa/nameser.h>]) 2775 [#include <arpa/nameser.h>])
2668 ]) 2776 ])
2669 2777
@@ -2678,7 +2786,7 @@ AC_ARG_WITH(kerberos5,
2678 KRB5ROOT=${withval} 2786 KRB5ROOT=${withval}
2679 fi 2787 fi
2680 2788
2681 AC_DEFINE(KRB5) 2789 AC_DEFINE(KRB5, 1, [Define if you want Kerberos 5 support])
2682 KRB5_MSG="yes" 2790 KRB5_MSG="yes"
2683 2791
2684 AC_MSG_CHECKING(for krb5-config) 2792 AC_MSG_CHECKING(for krb5-config)
@@ -2689,7 +2797,9 @@ AC_ARG_WITH(kerberos5,
2689 AC_MSG_CHECKING(for gssapi support) 2797 AC_MSG_CHECKING(for gssapi support)
2690 if $KRB5CONF | grep gssapi >/dev/null ; then 2798 if $KRB5CONF | grep gssapi >/dev/null ; then
2691 AC_MSG_RESULT(yes) 2799 AC_MSG_RESULT(yes)
2692 AC_DEFINE(GSSAPI) 2800 AC_DEFINE(GSSAPI, 1,
2801 [Define this if you want GSSAPI
2802 support in the version 2 protocol])
2693 k5confopts=gssapi 2803 k5confopts=gssapi
2694 else 2804 else
2695 AC_MSG_RESULT(no) 2805 AC_MSG_RESULT(no)
@@ -2702,7 +2812,9 @@ AC_ARG_WITH(kerberos5,
2702 AC_TRY_COMPILE([ #include <krb5.h> ], 2812 AC_TRY_COMPILE([ #include <krb5.h> ],
2703 [ char *tmp = heimdal_version; ], 2813 [ char *tmp = heimdal_version; ],
2704 [ AC_MSG_RESULT(yes) 2814 [ AC_MSG_RESULT(yes)
2705 AC_DEFINE(HEIMDAL) ], 2815 AC_DEFINE(HEIMDAL, 1,
2816 [Define this if you are using the
2817 Heimdal version of Kerberos V5]) ],
2706 AC_MSG_RESULT(no) 2818 AC_MSG_RESULT(no)
2707 ) 2819 )
2708 else 2820 else
@@ -2763,7 +2875,8 @@ AC_ARG_WITH(kerberos5,
2763 AC_CHECK_HEADERS(gssapi_generic.h gssapi/gssapi_generic.h) 2875 AC_CHECK_HEADERS(gssapi_generic.h gssapi/gssapi_generic.h)
2764 2876
2765 LIBS="$LIBS $K5LIBS" 2877 LIBS="$LIBS $K5LIBS"
2766 AC_SEARCH_LIBS(k_hasafs, kafs, AC_DEFINE(USE_AFS)) 2878 AC_SEARCH_LIBS(k_hasafs, kafs, AC_DEFINE(USE_AFS, 1,
2879 [Define this if you want to use libkafs' AFS support]))
2767 fi 2880 fi
2768 ] 2881 ]
2769) 2882)
@@ -2818,7 +2931,8 @@ if test -z "$xauth_path" ; then
2818 XAUTH_PATH="undefined" 2931 XAUTH_PATH="undefined"
2819 AC_SUBST(XAUTH_PATH) 2932 AC_SUBST(XAUTH_PATH)
2820else 2933else
2821 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path") 2934 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path",
2935 [Define if xauth is found in your path])
2822 XAUTH_PATH=$xauth_path 2936 XAUTH_PATH=$xauth_path
2823 AC_SUBST(XAUTH_PATH) 2937 AC_SUBST(XAUTH_PATH)
2824fi 2938fi
@@ -2826,7 +2940,8 @@ fi
2826# Check for mail directory (last resort if we cannot get it from headers) 2940# Check for mail directory (last resort if we cannot get it from headers)
2827if test ! -z "$MAIL" ; then 2941if test ! -z "$MAIL" ; then
2828 maildir=`dirname $MAIL` 2942 maildir=`dirname $MAIL`
2829 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir") 2943 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir",
2944 [Set this to your mail directory if you don't have maillock.h])
2830fi 2945fi
2831 2946
2832if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; then 2947if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; then
@@ -2837,7 +2952,8 @@ if test -z "$no_dev_ptmx" ; then
2837 if test "x$disable_ptmx_check" != "xyes" ; then 2952 if test "x$disable_ptmx_check" != "xyes" ; then
2838 AC_CHECK_FILE("/dev/ptmx", 2953 AC_CHECK_FILE("/dev/ptmx",
2839 [ 2954 [
2840 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX) 2955 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX, 1,
2956 [Define if you have /dev/ptmx])
2841 have_dev_ptmx=1 2957 have_dev_ptmx=1
2842 ] 2958 ]
2843 ) 2959 )
@@ -2847,7 +2963,8 @@ fi
2847if test ! -z "$cross_compiling" && test "x$cross_compiling" != "xyes"; then 2963if test ! -z "$cross_compiling" && test "x$cross_compiling" != "xyes"; then
2848 AC_CHECK_FILE("/dev/ptc", 2964 AC_CHECK_FILE("/dev/ptc",
2849 [ 2965 [
2850 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC) 2966 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC, 1,
2967 [Define if you have /dev/ptc])
2851 have_dev_ptc=1 2968 have_dev_ptc=1
2852 ] 2969 ]
2853 ) 2970 )
@@ -2894,7 +3011,8 @@ AC_ARG_WITH(md5-passwords,
2894 [ --with-md5-passwords Enable use of MD5 passwords], 3011 [ --with-md5-passwords Enable use of MD5 passwords],
2895 [ 3012 [
2896 if test "x$withval" != "xno" ; then 3013 if test "x$withval" != "xno" ; then
2897 AC_DEFINE(HAVE_MD5_PASSWORDS) 3014 AC_DEFINE(HAVE_MD5_PASSWORDS, 1,
3015 [Define if you want to allow MD5 passwords])
2898 MD5_MSG="yes" 3016 MD5_MSG="yes"
2899 fi 3017 fi
2900 ] 3018 ]
@@ -2924,7 +3042,8 @@ if test -z "$disable_shadow" ; then
2924 3042
2925 if test "x$sp_expire_available" = "xyes" ; then 3043 if test "x$sp_expire_available" = "xyes" ; then
2926 AC_MSG_RESULT(yes) 3044 AC_MSG_RESULT(yes)
2927 AC_DEFINE(HAS_SHADOW_EXPIRE) 3045 AC_DEFINE(HAS_SHADOW_EXPIRE, 1,
3046 [Define if you want to use shadow password expire field])
2928 else 3047 else
2929 AC_MSG_RESULT(no) 3048 AC_MSG_RESULT(no)
2930 fi 3049 fi
@@ -2933,7 +3052,9 @@ fi
2933# Use ip address instead of hostname in $DISPLAY 3052# Use ip address instead of hostname in $DISPLAY
2934if test ! -z "$IPADDR_IN_DISPLAY" ; then 3053if test ! -z "$IPADDR_IN_DISPLAY" ; then
2935 DISPLAY_HACK_MSG="yes" 3054 DISPLAY_HACK_MSG="yes"
2936 AC_DEFINE(IPADDR_IN_DISPLAY) 3055 AC_DEFINE(IPADDR_IN_DISPLAY, 1,
3056 [Define if you need to use IP address
3057 instead of hostname in $DISPLAY])
2937else 3058else
2938 DISPLAY_HACK_MSG="no" 3059 DISPLAY_HACK_MSG="no"
2939 AC_ARG_WITH(ipaddr-display, 3060 AC_ARG_WITH(ipaddr-display,
@@ -2966,7 +3087,8 @@ if test "x$etc_default_login" != "xno"; then
2966 then 3087 then
2967 AC_MSG_WARN([cross compiling: Disabling /etc/default/login test]) 3088 AC_MSG_WARN([cross compiling: Disabling /etc/default/login test])
2968 elif test "x$external_path_file" = "x/etc/default/login"; then 3089 elif test "x$external_path_file" = "x/etc/default/login"; then
2969 AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN) 3090 AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN, 1,
3091 [Define if your system has /etc/default/login])
2970 fi 3092 fi
2971fi 3093fi
2972 3094
@@ -3059,7 +3181,7 @@ main()
3059 fi ] 3181 fi ]
3060) 3182)
3061if test "x$external_path_file" != "x/etc/login.conf" ; then 3183if test "x$external_path_file" != "x/etc/login.conf" ; then
3062 AC_DEFINE_UNQUOTED(USER_PATH, "$user_path") 3184 AC_DEFINE_UNQUOTED(USER_PATH, "$user_path", [Specify default $PATH])
3063 AC_SUBST(user_path) 3185 AC_SUBST(user_path)
3064fi 3186fi
3065 3187
@@ -3069,7 +3191,9 @@ AC_ARG_WITH(superuser-path,
3069 [ 3191 [
3070 if test -n "$withval" && test "x$withval" != "xno" && \ 3192 if test -n "$withval" && test "x$withval" != "xno" && \
3071 test "x${withval}" != "xyes"; then 3193 test "x${withval}" != "xyes"; then
3072 AC_DEFINE_UNQUOTED(SUPERUSER_PATH, "$withval") 3194 AC_DEFINE_UNQUOTED(SUPERUSER_PATH, "$withval",
3195 [Define if you want a different $PATH
3196 for the superuser])
3073 superuser_path=$withval 3197 superuser_path=$withval
3074 fi 3198 fi
3075 ] 3199 ]
@@ -3083,7 +3207,9 @@ AC_ARG_WITH(4in6,
3083 [ 3207 [
3084 if test "x$withval" != "xno" ; then 3208 if test "x$withval" != "xno" ; then
3085 AC_MSG_RESULT(yes) 3209 AC_MSG_RESULT(yes)
3086 AC_DEFINE(IPV4_IN_IPV6) 3210 AC_DEFINE(IPV4_IN_IPV6, 1,
3211 [Detect IPv4 in IPv6 mapped addresses
3212 and treat as IPv4])
3087 IPV4_IN6_HACK_MSG="yes" 3213 IPV4_IN6_HACK_MSG="yes"
3088 else 3214 else
3089 AC_MSG_RESULT(no) 3215 AC_MSG_RESULT(no)
@@ -3105,7 +3231,8 @@ AC_ARG_WITH(bsd-auth,
3105 [ --with-bsd-auth Enable BSD auth support], 3231 [ --with-bsd-auth Enable BSD auth support],
3106 [ 3232 [
3107 if test "x$withval" != "xno" ; then 3233 if test "x$withval" != "xno" ; then
3108 AC_DEFINE(BSD_AUTH) 3234 AC_DEFINE(BSD_AUTH, 1,
3235 [Define if you have BSD auth support])
3109 BSD_AUTH_MSG=yes 3236 BSD_AUTH_MSG=yes
3110 fi 3237 fi
3111 ] 3238 ]
@@ -3134,7 +3261,7 @@ AC_ARG_WITH(pid-dir,
3134 ] 3261 ]
3135) 3262)
3136 3263
3137AC_DEFINE_UNQUOTED(_PATH_SSH_PIDDIR, "$piddir") 3264AC_DEFINE_UNQUOTED(_PATH_SSH_PIDDIR, "$piddir", [Specify location of ssh.pid])
3138AC_SUBST(piddir) 3265AC_SUBST(piddir)
3139 3266
3140dnl allow user to disable some login recording features 3267dnl allow user to disable some login recording features
@@ -3158,7 +3285,8 @@ AC_ARG_ENABLE(utmpx,
3158 [ --disable-utmpx disable use of utmpx even if detected [no]], 3285 [ --disable-utmpx disable use of utmpx even if detected [no]],
3159 [ 3286 [
3160 if test "x$enableval" = "xno" ; then 3287 if test "x$enableval" = "xno" ; then
3161 AC_DEFINE(DISABLE_UTMPX) 3288 AC_DEFINE(DISABLE_UTMPX, 1,
3289 [Define if you don't want to use utmpx])
3162 fi 3290 fi
3163 ] 3291 ]
3164) 3292)
@@ -3174,7 +3302,8 @@ AC_ARG_ENABLE(wtmpx,
3174 [ --disable-wtmpx disable use of wtmpx even if detected [no]], 3302 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
3175 [ 3303 [
3176 if test "x$enableval" = "xno" ; then 3304 if test "x$enableval" = "xno" ; then
3177 AC_DEFINE(DISABLE_WTMPX) 3305 AC_DEFINE(DISABLE_WTMPX, 1,
3306 [Define if you don't want to use wtmpx])
3178 fi 3307 fi
3179 ] 3308 ]
3180) 3309)
@@ -3190,7 +3319,9 @@ AC_ARG_ENABLE(pututline,
3190 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]], 3319 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
3191 [ 3320 [
3192 if test "x$enableval" = "xno" ; then 3321 if test "x$enableval" = "xno" ; then
3193 AC_DEFINE(DISABLE_PUTUTLINE) 3322 AC_DEFINE(DISABLE_PUTUTLINE, 1,
3323 [Define if you don't want to use pututline()
3324 etc. to write [uw]tmp])
3194 fi 3325 fi
3195 ] 3326 ]
3196) 3327)
@@ -3198,7 +3329,9 @@ AC_ARG_ENABLE(pututxline,
3198 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]], 3329 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
3199 [ 3330 [
3200 if test "x$enableval" = "xno" ; then 3331 if test "x$enableval" = "xno" ; then
3201 AC_DEFINE(DISABLE_PUTUTXLINE) 3332 AC_DEFINE(DISABLE_PUTUTXLINE, 1,
3333 [Define if you don't want to use pututxline()
3334 etc. to write [uw]tmpx])
3202 fi 3335 fi
3203 ] 3336 ]
3204) 3337)
@@ -3273,7 +3406,8 @@ if test -z "$conf_lastlog_location"; then
3273fi 3406fi
3274 3407
3275if test -n "$conf_lastlog_location"; then 3408if test -n "$conf_lastlog_location"; then
3276 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location") 3409 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location",
3410 [Define if you want to specify the path to your lastlog file])
3277fi 3411fi
3278 3412
3279dnl utmp detection 3413dnl utmp detection
@@ -3303,7 +3437,8 @@ if test -z "$conf_utmp_location"; then
3303 fi 3437 fi
3304fi 3438fi
3305if test -n "$conf_utmp_location"; then 3439if test -n "$conf_utmp_location"; then
3306 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location") 3440 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location",
3441 [Define if you want to specify the path to your utmp file])
3307fi 3442fi
3308 3443
3309dnl wtmp detection 3444dnl wtmp detection
@@ -3333,7 +3468,8 @@ if test -z "$conf_wtmp_location"; then
3333 fi 3468 fi
3334fi 3469fi
3335if test -n "$conf_wtmp_location"; then 3470if test -n "$conf_wtmp_location"; then
3336 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location") 3471 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location",
3472 [Define if you want to specify the path to your wtmp file])
3337fi 3473fi
3338 3474
3339 3475
@@ -3361,7 +3497,8 @@ if test -z "$conf_utmpx_location"; then
3361 AC_DEFINE(DISABLE_UTMPX) 3497 AC_DEFINE(DISABLE_UTMPX)
3362 fi 3498 fi
3363else 3499else
3364 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location") 3500 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location",
3501 [Define if you want to specify the path to your utmpx file])
3365fi 3502fi
3366 3503
3367dnl wtmpx detection 3504dnl wtmpx detection
@@ -3386,7 +3523,8 @@ if test -z "$conf_wtmpx_location"; then
3386 AC_DEFINE(DISABLE_WTMPX) 3523 AC_DEFINE(DISABLE_WTMPX)
3387 fi 3524 fi
3388else 3525else
3389 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location") 3526 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location",
3527 [Define if you want to specify the path to your wtmpx file])
3390fi 3528fi
3391 3529
3392 3530