summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2006-05-12 08:53:37 +0000
committerColin Watson <cjwatson@debian.org>2006-05-12 08:53:37 +0000
commit2ee73b36b9a35daeaa4b065046882dc1f5f551b6 (patch)
treef64a4ace625514e94759878c0b94ab0a79805bbd /configure.ac
parent3c190ec8e469477ea65fbf4cc83062c65c281434 (diff)
parent3e2e0ac10674d77618c4c7339e18b83ced247492 (diff)
Merge 4.3p2 to the trunk.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac847
1 files changed, 583 insertions, 264 deletions
diff --git a/configure.ac b/configure.ac
index 849e2f771..9ff199451 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.292 2005/08/31 16:59:49 tim Exp $ 1# $Id: configure.ac,v 1.322.2.6 2006/02/08 11:11:06 dtucker Exp $
2# 2#
3# Copyright (c) 1999-2004 Damien Miller 3# Copyright (c) 1999-2004 Damien Miller
4# 4#
@@ -15,6 +15,7 @@
15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 16
17AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org) 17AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org)
18AC_REVISION($Revision: 1.322.2.6 $)
18AC_CONFIG_SRCDIR([ssh.c]) 19AC_CONFIG_SRCDIR([ssh.c])
19 20
20AC_CONFIG_HEADER(config.h) 21AC_CONFIG_HEADER(config.h)
@@ -27,6 +28,7 @@ AC_PROG_AWK
27AC_PROG_CPP 28AC_PROG_CPP
28AC_PROG_RANLIB 29AC_PROG_RANLIB
29AC_PROG_INSTALL 30AC_PROG_INSTALL
31AC_PROG_EGREP
30AC_PATH_PROG(AR, ar) 32AC_PATH_PROG(AR, ar)
31AC_PATH_PROG(CAT, cat) 33AC_PATH_PROG(CAT, cat)
32AC_PATH_PROG(KILL, kill) 34AC_PATH_PROG(KILL, kill)
@@ -47,6 +49,11 @@ AC_PATH_PROG(PATH_GROUPADD_PROG, groupadd, groupadd,
47AC_PATH_PROG(PATH_USERADD_PROG, useradd, useradd, 49AC_PATH_PROG(PATH_USERADD_PROG, useradd, useradd,
48 [/usr/sbin${PATH_SEPARATOR}/etc]) 50 [/usr/sbin${PATH_SEPARATOR}/etc])
49AC_CHECK_PROG(MAKE_PACKAGE_SUPPORTED, pkgmk, yes, no) 51AC_CHECK_PROG(MAKE_PACKAGE_SUPPORTED, pkgmk, yes, no)
52if test -x /sbin/sh; then
53 AC_SUBST(STARTUP_SCRIPT_SHELL,/sbin/sh)
54else
55 AC_SUBST(STARTUP_SCRIPT_SHELL,/bin/sh)
56fi
50 57
51# System features 58# System features
52AC_SYS_LARGEFILE 59AC_SYS_LARGEFILE
@@ -57,7 +64,9 @@ fi
57 64
58# Use LOGIN_PROGRAM from environment if possible 65# Use LOGIN_PROGRAM from environment if possible
59if test ! -z "$LOGIN_PROGRAM" ; then 66if test ! -z "$LOGIN_PROGRAM" ; then
60 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM") 67 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM",
68 [If your header files don't define LOGIN_PROGRAM,
69 then use this (detected) from environment and PATH])
61else 70else
62 # Search for login 71 # Search for login
63 AC_PATH_PROG(LOGIN_PROGRAM_FALLBACK, login) 72 AC_PATH_PROG(LOGIN_PROGRAM_FALLBACK, login)
@@ -68,7 +77,8 @@ fi
68 77
69AC_PATH_PROG(PATH_PASSWD_PROG, passwd) 78AC_PATH_PROG(PATH_PASSWD_PROG, passwd)
70if test ! -z "$PATH_PASSWD_PROG" ; then 79if test ! -z "$PATH_PASSWD_PROG" ; then
71 AC_DEFINE_UNQUOTED(_PATH_PASSWD_PROG, "$PATH_PASSWD_PROG") 80 AC_DEFINE_UNQUOTED(_PATH_PASSWD_PROG, "$PATH_PASSWD_PROG",
81 [Full path of your "passwd" program])
72fi 82fi
73 83
74if test -z "$LD" ; then 84if test -z "$LD" ; then
@@ -82,12 +92,14 @@ AC_CHECK_DECL(LLONG_MAX, have_llong_max=1, , [#include <limits.h>])
82 92
83if test "$GCC" = "yes" || test "$GCC" = "egcs"; then 93if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
84 CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wuninitialized" 94 CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wuninitialized"
85 GCC_VER=`$CC --version` 95 GCC_VER=`$CC -v 2>&1 | $AWK '/gcc version /{print $3}'`
86 case $GCC_VER in 96 case $GCC_VER in
87 1.*) ;; 97 1.*) ;;
88 2.8* | 2.9*) CFLAGS="$CFLAGS -Wsign-compare" ;; 98 2.8* | 2.9*) CFLAGS="$CFLAGS -Wsign-compare" ;;
89 2.*) ;; 99 2.*) ;;
90 *) CFLAGS="$CFLAGS -Wsign-compare" ;; 100 3.*) CFLAGS="$CFLAGS -Wsign-compare" ;;
101 4.*) CFLAGS="$CFLAGS -Wsign-compare -Wno-pointer-sign" ;;
102 *) ;;
91 esac 103 esac
92 104
93 if test -z "$have_llong_max"; then 105 if test -z "$have_llong_max"; then
@@ -103,70 +115,6 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
103 fi 115 fi
104fi 116fi
105 117
106if test -z "$have_llong_max"; then
107 AC_MSG_CHECKING([for max value of long long])
108 AC_RUN_IFELSE(
109 [AC_LANG_SOURCE([[
110#include <stdio.h>
111/* Why is this so damn hard? */
112#ifdef __GNUC__
113# undef __GNUC__
114#endif
115#define __USE_ISOC99
116#include <limits.h>
117#define DATA "conftest.llminmax"
118int main(void) {
119 FILE *f;
120 long long i, llmin, llmax = 0;
121
122 if((f = fopen(DATA,"w")) == NULL)
123 exit(1);
124
125#if defined(LLONG_MIN) && defined(LLONG_MAX)
126 fprintf(stderr, "Using system header for LLONG_MIN and LLONG_MAX\n");
127 llmin = LLONG_MIN;
128 llmax = LLONG_MAX;
129#else
130 fprintf(stderr, "Calculating LLONG_MIN and LLONG_MAX\n");
131 /* This will work on one's complement and two's complement */
132 for (i = 1; i > llmax; i <<= 1, i++)
133 llmax = i;
134 llmin = llmax + 1LL; /* wrap */
135#endif
136
137 /* Sanity check */
138 if (llmin + 1 < llmin || llmin - 1 < llmin || llmax + 1 > llmax
139 || llmax - 1 > llmax) {
140 fprintf(f, "unknown unknown\n");
141 exit(2);
142 }
143
144 if (fprintf(f ,"%lld %lld", llmin, llmax) < 0)
145 exit(3);
146
147 exit(0);
148}
149 ]])],
150 [
151 llong_min=`$AWK '{print $1}' conftest.llminmax`
152 llong_max=`$AWK '{print $2}' conftest.llminmax`
153 AC_MSG_RESULT($llong_max)
154 AC_DEFINE_UNQUOTED(LLONG_MAX, [${llong_max}LL],
155 [max value of long long calculated by configure])
156 AC_MSG_CHECKING([for min value of long long])
157 AC_MSG_RESULT($llong_min)
158 AC_DEFINE_UNQUOTED(LLONG_MIN, [${llong_min}LL],
159 [min value of long long calculated by configure])
160 ],
161 [
162 AC_MSG_RESULT(not found)
163 ],
164 [
165 AC_MSG_WARN([cross compiling: not checking])
166 ]
167 )
168fi
169
170AC_ARG_WITH(rpath, 118AC_ARG_WITH(rpath,
171 [ --without-rpath Disable auto-added -R linker paths], 119 [ --without-rpath Disable auto-added -R linker paths],
172 [ 120 [
@@ -201,7 +149,8 @@ case "$host" in
201 fi 149 fi
202 LDFLAGS="$saved_LDFLAGS" 150 LDFLAGS="$saved_LDFLAGS"
203 dnl Check for authenticate. Might be in libs.a on older AIXes 151 dnl Check for authenticate. Might be in libs.a on older AIXes
204 AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)], 152 AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE, 1,
153 [Define if you want to enable AIX4's authenticate function])],
205 [AC_CHECK_LIB(s,authenticate, 154 [AC_CHECK_LIB(s,authenticate,
206 [ AC_DEFINE(WITH_AIXAUTHENTICATE) 155 [ AC_DEFINE(WITH_AIXAUTHENTICATE)
207 LIBS="$LIBS -ls" 156 LIBS="$LIBS -ls"
@@ -217,7 +166,9 @@ case "$host" in
217 [#include <usersec.h>], 166 [#include <usersec.h>],
218 [(void)loginfailed("user","host","tty",0);], 167 [(void)loginfailed("user","host","tty",0);],
219 [AC_MSG_RESULT(yes) 168 [AC_MSG_RESULT(yes)
220 AC_DEFINE(AIX_LOGINFAILED_4ARG)], 169 AC_DEFINE(AIX_LOGINFAILED_4ARG, 1,
170 [Define if your AIX loginfailed() function
171 takes 4 arguments (AIX >= 5.2)])],
221 [AC_MSG_RESULT(no)] 172 [AC_MSG_RESULT(no)]
222 )], 173 )],
223 [], 174 [],
@@ -225,25 +176,38 @@ case "$host" in
225 ) 176 )
226 AC_CHECK_FUNCS(setauthdb) 177 AC_CHECK_FUNCS(setauthdb)
227 check_for_aix_broken_getaddrinfo=1 178 check_for_aix_broken_getaddrinfo=1
228 AC_DEFINE(BROKEN_REALPATH) 179 AC_DEFINE(BROKEN_REALPATH, 1, [Define if you have a broken realpath.])
229 AC_DEFINE(SETEUID_BREAKS_SETUID) 180 AC_DEFINE(SETEUID_BREAKS_SETUID, 1,
230 AC_DEFINE(BROKEN_SETREUID) 181 [Define if your platform breaks doing a seteuid before a setuid])
231 AC_DEFINE(BROKEN_SETREGID) 182 AC_DEFINE(BROKEN_SETREUID, 1, [Define if your setreuid() is broken])
183 AC_DEFINE(BROKEN_SETREGID, 1, [Define if your setregid() is broken])
232 dnl AIX handles lastlog as part of its login message 184 dnl AIX handles lastlog as part of its login message
233 AC_DEFINE(DISABLE_LASTLOG) 185 AC_DEFINE(DISABLE_LASTLOG, 1, [Define if you don't want to use lastlog])
234 AC_DEFINE(LOGIN_NEEDS_UTMPX) 186 AC_DEFINE(LOGIN_NEEDS_UTMPX, 1,
235 AC_DEFINE(SPT_TYPE,SPT_REUSEARGV) 187 [Some systems need a utmpx entry for /bin/login to work])
188 AC_DEFINE(SPT_TYPE,SPT_REUSEARGV,
189 [Define to a Set Process Title type if your system is
190 supported by bsd-setproctitle.c])
191 AC_DEFINE(SSHPAM_CHAUTHTOK_NEEDS_RUID, 1,
192 [AIX 5.2 and 5.3 (and presumably newer) require this])
236 ;; 193 ;;
237*-*-cygwin*) 194*-*-cygwin*)
238 check_for_libcrypt_later=1 195 check_for_libcrypt_later=1
239 LIBS="$LIBS /usr/lib/textmode.o" 196 LIBS="$LIBS /usr/lib/textmode.o"
240 AC_DEFINE(HAVE_CYGWIN) 197 AC_DEFINE(HAVE_CYGWIN, 1, [Define if you are on Cygwin])
241 AC_DEFINE(USE_PIPES) 198 AC_DEFINE(USE_PIPES, 1, [Use PIPES instead of a socketpair()])
242 AC_DEFINE(DISABLE_SHADOW) 199 AC_DEFINE(DISABLE_SHADOW, 1,
243 AC_DEFINE(IP_TOS_IS_BROKEN) 200 [Define if you want to disable shadow passwords])
244 AC_DEFINE(NO_X11_UNIX_SOCKETS) 201 AC_DEFINE(IP_TOS_IS_BROKEN, 1,
245 AC_DEFINE(NO_IPPORT_RESERVED_CONCEPT) 202 [Define if your system choked on IP TOS setting])
246 AC_DEFINE(DISABLE_FD_PASSING) 203 AC_DEFINE(NO_X11_UNIX_SOCKETS, 1,
204 [Define if X11 doesn't support AF_UNIX sockets on that system])
205 AC_DEFINE(NO_IPPORT_RESERVED_CONCEPT, 1,
206 [Define if the concept of ports only accessible to
207 superusers isn't known])
208 AC_DEFINE(DISABLE_FD_PASSING, 1,
209 [Define if your platform needs to skip post auth
210 file descriptor passing])
247 ;; 211 ;;
248*-*-dgux*) 212*-*-dgux*)
249 AC_DEFINE(IP_TOS_IS_BROKEN) 213 AC_DEFINE(IP_TOS_IS_BROKEN)
@@ -260,22 +224,26 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
260 exit(1); 224 exit(1);
261}], [AC_MSG_RESULT(working)], 225}], [AC_MSG_RESULT(working)],
262 [AC_MSG_RESULT(buggy) 226 [AC_MSG_RESULT(buggy)
263 AC_DEFINE(BROKEN_GETADDRINFO)], 227 AC_DEFINE(BROKEN_GETADDRINFO, 1, [getaddrinfo is broken (if present)])],
264 [AC_MSG_RESULT(assume it is working)]) 228 [AC_MSG_RESULT(assume it is working)])
265 AC_DEFINE(SETEUID_BREAKS_SETUID) 229 AC_DEFINE(SETEUID_BREAKS_SETUID)
266 AC_DEFINE(BROKEN_SETREUID) 230 AC_DEFINE(BROKEN_SETREUID)
267 AC_DEFINE(BROKEN_SETREGID) 231 AC_DEFINE(BROKEN_SETREGID)
268 AC_DEFINE_UNQUOTED(BIND_8_COMPAT, 1) 232 AC_DEFINE_UNQUOTED(BIND_8_COMPAT, 1,
233 [Define if your resolver libs need this for getrrsetbyname])
269 ;; 234 ;;
270*-*-hpux*) 235*-*-hpux*)
271 # first we define all of the options common to all HP-UX releases 236 # 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" 237 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
273 IPADDR_IN_DISPLAY=yes 238 IPADDR_IN_DISPLAY=yes
274 AC_DEFINE(USE_PIPES) 239 AC_DEFINE(USE_PIPES)
275 AC_DEFINE(LOGIN_NO_ENDOPT) 240 AC_DEFINE(LOGIN_NO_ENDOPT, 1,
241 [Define if your login program cannot handle end of options ("--")])
276 AC_DEFINE(LOGIN_NEEDS_UTMPX) 242 AC_DEFINE(LOGIN_NEEDS_UTMPX)
277 AC_DEFINE(LOCKED_PASSWD_STRING, "*") 243 AC_DEFINE(LOCKED_PASSWD_STRING, "*",
244 [String used in /etc/passwd to denote locked account])
278 AC_DEFINE(SPT_TYPE,SPT_PSTAT) 245 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
246 MAIL="/var/mail/username"
279 LIBS="$LIBS -lsec" 247 LIBS="$LIBS -lsec"
280 AC_CHECK_LIB(xnet, t_error, , 248 AC_CHECK_LIB(xnet, t_error, ,
281 AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])) 249 AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***]))
@@ -288,8 +256,12 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
288 fi 256 fi
289 ;; 257 ;;
290 *-*-hpux11*) 258 *-*-hpux11*)
291 AC_DEFINE(PAM_SUN_CODEBASE) 259 AC_DEFINE(PAM_SUN_CODEBASE, 1,
292 AC_DEFINE(DISABLE_UTMP) 260 [Define if you are using Solaris-derived PAM which
261 passes pam_messages to the conversation function
262 with an extra level of indirection])
263 AC_DEFINE(DISABLE_UTMP, 1,
264 [Define if you don't want to use utmp])
293 AC_DEFINE(USE_BTMP, 1, [Use btmp to log bad logins]) 265 AC_DEFINE(USE_BTMP, 1, [Use btmp to log bad logins])
294 check_for_hpux_broken_getaddrinfo=1 266 check_for_hpux_broken_getaddrinfo=1
295 check_for_conflicting_getspnam=1 267 check_for_conflicting_getspnam=1
@@ -299,7 +271,9 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
299 # lastly, we define options specific to minor releases 271 # lastly, we define options specific to minor releases
300 case "$host" in 272 case "$host" in
301 *-*-hpux10.26) 273 *-*-hpux10.26)
302 AC_DEFINE(HAVE_SECUREWARE) 274 AC_DEFINE(HAVE_SECUREWARE, 1,
275 [Define if you have SecureWare-based
276 protected password database])
303 disable_ptmx_check=yes 277 disable_ptmx_check=yes
304 LIBS="$LIBS -lsecpw" 278 LIBS="$LIBS -lsecpw"
305 ;; 279 ;;
@@ -307,24 +281,33 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
307 ;; 281 ;;
308*-*-irix5*) 282*-*-irix5*)
309 PATH="$PATH:/usr/etc" 283 PATH="$PATH:/usr/etc"
310 AC_DEFINE(BROKEN_INET_NTOA) 284 AC_DEFINE(BROKEN_INET_NTOA, 1,
285 [Define if you system's inet_ntoa is busted
286 (e.g. Irix gcc issue)])
311 AC_DEFINE(SETEUID_BREAKS_SETUID) 287 AC_DEFINE(SETEUID_BREAKS_SETUID)
312 AC_DEFINE(BROKEN_SETREUID) 288 AC_DEFINE(BROKEN_SETREUID)
313 AC_DEFINE(BROKEN_SETREGID) 289 AC_DEFINE(BROKEN_SETREGID)
314 AC_DEFINE(WITH_ABBREV_NO_TTY) 290 AC_DEFINE(WITH_ABBREV_NO_TTY, 1,
291 [Define if you shouldn't strip 'tty' from your
292 ttyname in [uw]tmp])
315 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*") 293 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
316 ;; 294 ;;
317*-*-irix6*) 295*-*-irix6*)
318 PATH="$PATH:/usr/etc" 296 PATH="$PATH:/usr/etc"
319 AC_DEFINE(WITH_IRIX_ARRAY) 297 AC_DEFINE(WITH_IRIX_ARRAY, 1,
320 AC_DEFINE(WITH_IRIX_PROJECT) 298 [Define if you have/want arrays
321 AC_DEFINE(WITH_IRIX_AUDIT) 299 (cluster-wide session managment, not C arrays)])
322 AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)]) 300 AC_DEFINE(WITH_IRIX_PROJECT, 1,
301 [Define if you want IRIX project management])
302 AC_DEFINE(WITH_IRIX_AUDIT, 1,
303 [Define if you want IRIX audit trails])
304 AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS, 1,
305 [Define if you want IRIX kernel jobs])])
323 AC_DEFINE(BROKEN_INET_NTOA) 306 AC_DEFINE(BROKEN_INET_NTOA)
324 AC_DEFINE(SETEUID_BREAKS_SETUID) 307 AC_DEFINE(SETEUID_BREAKS_SETUID)
325 AC_DEFINE(BROKEN_SETREUID) 308 AC_DEFINE(BROKEN_SETREUID)
326 AC_DEFINE(BROKEN_SETREGID) 309 AC_DEFINE(BROKEN_SETREGID)
327 AC_DEFINE(BROKEN_UPDWTMPX) 310 AC_DEFINE(BROKEN_UPDWTMPX, 1, [updwtmpx is broken (if present)])
328 AC_DEFINE(WITH_ABBREV_NO_TTY) 311 AC_DEFINE(WITH_ABBREV_NO_TTY)
329 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*") 312 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
330 ;; 313 ;;
@@ -340,22 +323,37 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
340 no_dev_ptmx=1 323 no_dev_ptmx=1
341 check_for_libcrypt_later=1 324 check_for_libcrypt_later=1
342 check_for_openpty_ctty_bug=1 325 check_for_openpty_ctty_bug=1
343 AC_DEFINE(DONT_TRY_OTHER_AF) 326 AC_DEFINE(DONT_TRY_OTHER_AF, 1, [Workaround more Linux IPv6 quirks])
344 AC_DEFINE(PAM_TTY_KLUDGE) 327 AC_DEFINE(PAM_TTY_KLUDGE, 1,
345 AC_DEFINE(LOCKED_PASSWD_PREFIX, "!") 328 [Work around problematic Linux PAM modules handling of PAM_TTY])
329 AC_DEFINE(LOCKED_PASSWD_PREFIX, "!",
330 [String used in /etc/passwd to denote locked account])
346 AC_DEFINE(SPT_TYPE,SPT_REUSEARGV) 331 AC_DEFINE(SPT_TYPE,SPT_REUSEARGV)
347 AC_DEFINE(LINK_OPNOTSUPP_ERRNO, EPERM) 332 AC_DEFINE(LINK_OPNOTSUPP_ERRNO, EPERM,
333 [Define to whatever link() returns for "not supported"
334 if it doesn't return EOPNOTSUPP.])
348 AC_DEFINE(_PATH_BTMP, "/var/log/btmp", [log for bad login attempts]) 335 AC_DEFINE(_PATH_BTMP, "/var/log/btmp", [log for bad login attempts])
349 AC_DEFINE(USE_BTMP, 1, [Use btmp to log bad logins]) 336 AC_DEFINE(USE_BTMP)
350 inet6_default_4in6=yes 337 inet6_default_4in6=yes
351 case `uname -r` in 338 case `uname -r` in
352 1.*|2.0.*) 339 1.*|2.0.*)
353 AC_DEFINE(BROKEN_CMSG_TYPE) 340 AC_DEFINE(BROKEN_CMSG_TYPE, 1,
341 [Define if cmsg_type is not passed correctly])
354 ;; 342 ;;
355 esac 343 esac
344 # tun(4) forwarding compat code
345 AC_CHECK_HEADERS(linux/if_tun.h)
346 if test "x$ac_cv_header_linux_if_tun_h" = "xyes" ; then
347 AC_DEFINE(SSH_TUN_LINUX, 1,
348 [Open tunnel devices the Linux tun/tap way])
349 AC_DEFINE(SSH_TUN_COMPAT_AF, 1,
350 [Use tunnel device compatibility to OpenBSD])
351 AC_DEFINE(SSH_TUN_PREPEND_AF, 1,
352 [Prepend the address family to IP tunnel traffic])
353 fi
356 ;; 354 ;;
357mips-sony-bsd|mips-sony-newsos4) 355mips-sony-bsd|mips-sony-newsos4)
358 AC_DEFINE(NEED_SETPRGP, [], [Need setpgrp to acquire controlling tty]) 356 AC_DEFINE(NEED_SETPGRP, 1, [Need setpgrp to acquire controlling tty])
359 SONY=1 357 SONY=1
360 ;; 358 ;;
361*-*-netbsd*) 359*-*-netbsd*)
@@ -363,9 +361,18 @@ mips-sony-bsd|mips-sony-newsos4)
363 if test "x$withval" != "xno" ; then 361 if test "x$withval" != "xno" ; then
364 need_dash_r=1 362 need_dash_r=1
365 fi 363 fi
364 AC_DEFINE(SSH_TUN_FREEBSD, 1, [Open tunnel devices the FreeBSD way])
365 AC_CHECK_HEADER([net/if_tap.h], ,
366 AC_DEFINE(SSH_TUN_NO_L2, 1, [No layer 2 tunnel support]))
367 AC_DEFINE(SSH_TUN_PREPEND_AF, 1,
368 [Prepend the address family to IP tunnel traffic])
366 ;; 369 ;;
367*-*-freebsd*) 370*-*-freebsd*)
368 check_for_libcrypt_later=1 371 check_for_libcrypt_later=1
372 AC_DEFINE(LOCKED_PASSWD_PREFIX, "*LOCKED*", [Account locked with pw(1)])
373 AC_DEFINE(SSH_TUN_FREEBSD, 1, [Open tunnel devices the FreeBSD way])
374 AC_CHECK_HEADER([net/if_tap.h], ,
375 AC_DEFINE(SSH_TUN_NO_L2, 1, [No layer 2 tunnel support]))
369 ;; 376 ;;
370*-*-bsdi*) 377*-*-bsdi*)
371 AC_DEFINE(SETEUID_BREAKS_SETUID) 378 AC_DEFINE(SETEUID_BREAKS_SETUID)
@@ -377,13 +384,15 @@ mips-sony-bsd|mips-sony-newsos4)
377 conf_utmp_location=/etc/utmp 384 conf_utmp_location=/etc/utmp
378 conf_wtmp_location=/usr/adm/wtmp 385 conf_wtmp_location=/usr/adm/wtmp
379 MAIL=/usr/spool/mail 386 MAIL=/usr/spool/mail
380 AC_DEFINE(HAVE_NEXT) 387 AC_DEFINE(HAVE_NEXT, 1, [Define if you are on NeXT])
381 AC_DEFINE(BROKEN_REALPATH) 388 AC_DEFINE(BROKEN_REALPATH)
382 AC_DEFINE(USE_PIPES) 389 AC_DEFINE(USE_PIPES)
383 AC_DEFINE(BROKEN_SAVED_UIDS) 390 AC_DEFINE(BROKEN_SAVED_UIDS, 1, [Needed for NeXT])
384 ;; 391 ;;
385*-*-openbsd*) 392*-*-openbsd*)
386 AC_DEFINE(HAVE_ATTRIBUTE__SENTINEL__, 1, [OpenBSD's gcc has sentinel]) 393 AC_DEFINE(HAVE_ATTRIBUTE__SENTINEL__, 1, [OpenBSD's gcc has sentinel])
394 AC_DEFINE(HAVE_ATTRIBUTE__BOUNDED__, 1, [OpenBSD's gcc has bounded])
395 AC_DEFINE(SSH_TUN_OPENBSD, 1, [Open tunnel devices the OpenBSD way])
387 ;; 396 ;;
388*-*-solaris*) 397*-*-solaris*)
389 if test "x$withval" != "xno" ; then 398 if test "x$withval" != "xno" ; then
@@ -391,12 +400,18 @@ mips-sony-bsd|mips-sony-newsos4)
391 fi 400 fi
392 AC_DEFINE(PAM_SUN_CODEBASE) 401 AC_DEFINE(PAM_SUN_CODEBASE)
393 AC_DEFINE(LOGIN_NEEDS_UTMPX) 402 AC_DEFINE(LOGIN_NEEDS_UTMPX)
394 AC_DEFINE(LOGIN_NEEDS_TERM) 403 AC_DEFINE(LOGIN_NEEDS_TERM, 1,
404 [Some versions of /bin/login need the TERM supplied
405 on the commandline])
395 AC_DEFINE(PAM_TTY_KLUDGE) 406 AC_DEFINE(PAM_TTY_KLUDGE)
396 AC_DEFINE(SSHPAM_CHAUTHTOK_NEEDS_RUID) 407 AC_DEFINE(SSHPAM_CHAUTHTOK_NEEDS_RUID, 1,
408 [Define if pam_chauthtok wants real uid set
409 to the unpriv'ed user])
397 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*") 410 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
398 # Pushing STREAMS modules will cause sshd to acquire a controlling tty. 411 # Pushing STREAMS modules will cause sshd to acquire a controlling tty.
399 AC_DEFINE(SSHD_ACQUIRES_CTTY) 412 AC_DEFINE(SSHD_ACQUIRES_CTTY, 1,
413 [Define if sshd somehow reacquires a controlling TTY
414 after setsid()])
400 external_path_file=/etc/default/login 415 external_path_file=/etc/default/login
401 # hardwire lastlog location (can't detect it on some versions) 416 # hardwire lastlog location (can't detect it on some versions)
402 conf_lastlog_location="/var/adm/lastlog" 417 conf_lastlog_location="/var/adm/lastlog"
@@ -405,7 +420,8 @@ mips-sony-bsd|mips-sony-newsos4)
405 if test "$sol2ver" -ge 8; then 420 if test "$sol2ver" -ge 8; then
406 AC_MSG_RESULT(yes) 421 AC_MSG_RESULT(yes)
407 AC_DEFINE(DISABLE_UTMP) 422 AC_DEFINE(DISABLE_UTMP)
408 AC_DEFINE(DISABLE_WTMP) 423 AC_DEFINE(DISABLE_WTMP, 1,
424 [Define if you don't want to use wtmp])
409 else 425 else
410 AC_MSG_RESULT(no) 426 AC_MSG_RESULT(no)
411 fi 427 fi
@@ -430,8 +446,8 @@ mips-sony-bsd|mips-sony-newsos4)
430*-sni-sysv*) 446*-sni-sysv*)
431 # /usr/ucblib MUST NOT be searched on ReliantUNIX 447 # /usr/ucblib MUST NOT be searched on ReliantUNIX
432 AC_CHECK_LIB(dl, dlsym, ,) 448 AC_CHECK_LIB(dl, dlsym, ,)
433 # -lresolv needs to be at then end of LIBS or DNS lookups break 449 # -lresolv needs to be at the end of LIBS or DNS lookups break
434 AC_CHECK_LIB(res_query, resolv, [ LIBS="$LIBS -lresolv" ]) 450 AC_CHECK_LIB(resolv, res_query, [ LIBS="$LIBS -lresolv" ])
435 IPADDR_IN_DISPLAY=yes 451 IPADDR_IN_DISPLAY=yes
436 AC_DEFINE(USE_PIPES) 452 AC_DEFINE(USE_PIPES)
437 AC_DEFINE(IP_TOS_IS_BROKEN) 453 AC_DEFINE(IP_TOS_IS_BROKEN)
@@ -446,11 +462,13 @@ mips-sony-bsd|mips-sony-newsos4)
446 ;; 462 ;;
447# UnixWare 1.x, UnixWare 2.x, and others based on code from Univel. 463# UnixWare 1.x, UnixWare 2.x, and others based on code from Univel.
448*-*-sysv4.2*) 464*-*-sysv4.2*)
465 CFLAGS="$CFLAGS -Dva_list=_VA_LIST"
449 AC_DEFINE(USE_PIPES) 466 AC_DEFINE(USE_PIPES)
450 AC_DEFINE(SETEUID_BREAKS_SETUID) 467 AC_DEFINE(SETEUID_BREAKS_SETUID)
451 AC_DEFINE(BROKEN_SETREUID) 468 AC_DEFINE(BROKEN_SETREUID)
452 AC_DEFINE(BROKEN_SETREGID) 469 AC_DEFINE(BROKEN_SETREGID)
453 AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd]) 470 AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd])
471 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
454 ;; 472 ;;
455# UnixWare 7.x, OpenUNIX 8 473# UnixWare 7.x, OpenUNIX 8
456*-*-sysv5*) 474*-*-sysv5*)
@@ -460,11 +478,14 @@ mips-sony-bsd|mips-sony-newsos4)
460 AC_DEFINE(SETEUID_BREAKS_SETUID) 478 AC_DEFINE(SETEUID_BREAKS_SETUID)
461 AC_DEFINE(BROKEN_SETREUID) 479 AC_DEFINE(BROKEN_SETREUID)
462 AC_DEFINE(BROKEN_SETREGID) 480 AC_DEFINE(BROKEN_SETREGID)
463 AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd]) 481 AC_DEFINE(PASSWD_NEEDS_USERNAME)
464 case "$host" in 482 case "$host" in
465 *-*-sysv5SCO_SV*) # SCO OpenServer 6.x 483 *-*-sysv5SCO_SV*) # SCO OpenServer 6.x
466 TEST_SHELL=/u95/bin/sh 484 TEST_SHELL=/u95/bin/sh
467 AC_DEFINE(BROKEN_LIBIAF, 1, [ia_uinfo routines not supported by OS yet]) 485 AC_DEFINE(BROKEN_LIBIAF, 1,
486 [ia_uinfo routines not supported by OS yet])
487 ;;
488 *) AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
468 ;; 489 ;;
469 esac 490 esac
470 ;; 491 ;;
@@ -490,13 +511,14 @@ mips-sony-bsd|mips-sony-newsos4)
490 AC_DEFINE(BROKEN_SETREGID) 511 AC_DEFINE(BROKEN_SETREGID)
491 AC_DEFINE(WITH_ABBREV_NO_TTY) 512 AC_DEFINE(WITH_ABBREV_NO_TTY)
492 AC_DEFINE(BROKEN_UPDWTMPX) 513 AC_DEFINE(BROKEN_UPDWTMPX)
493 AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd]) 514 AC_DEFINE(PASSWD_NEEDS_USERNAME)
494 AC_CHECK_FUNCS(getluid setluid) 515 AC_CHECK_FUNCS(getluid setluid)
495 MANTYPE=man 516 MANTYPE=man
496 TEST_SHELL=ksh 517 TEST_SHELL=ksh
497 ;; 518 ;;
498*-*-unicosmk*) 519*-*-unicosmk*)
499 AC_DEFINE(NO_SSH_LASTLOG) 520 AC_DEFINE(NO_SSH_LASTLOG, 1,
521 [Define if you don't want to use lastlog in session.c])
500 AC_DEFINE(SETEUID_BREAKS_SETUID) 522 AC_DEFINE(SETEUID_BREAKS_SETUID)
501 AC_DEFINE(BROKEN_SETREUID) 523 AC_DEFINE(BROKEN_SETREUID)
502 AC_DEFINE(BROKEN_SETREGID) 524 AC_DEFINE(BROKEN_SETREGID)
@@ -543,13 +565,18 @@ mips-sony-bsd|mips-sony-newsos4)
543 if test -z "$no_osfsia" ; then 565 if test -z "$no_osfsia" ; then
544 if test -f /etc/sia/matrix.conf; then 566 if test -f /etc/sia/matrix.conf; then
545 AC_MSG_RESULT(yes) 567 AC_MSG_RESULT(yes)
546 AC_DEFINE(HAVE_OSF_SIA) 568 AC_DEFINE(HAVE_OSF_SIA, 1,
547 AC_DEFINE(DISABLE_LOGIN) 569 [Define if you have Digital Unix Security
570 Integration Architecture])
571 AC_DEFINE(DISABLE_LOGIN, 1,
572 [Define if you don't want to use your
573 system's login() call])
548 AC_DEFINE(DISABLE_FD_PASSING) 574 AC_DEFINE(DISABLE_FD_PASSING)
549 LIBS="$LIBS -lsecurity -ldb -lm -laud" 575 LIBS="$LIBS -lsecurity -ldb -lm -laud"
550 else 576 else
551 AC_MSG_RESULT(no) 577 AC_MSG_RESULT(no)
552 AC_DEFINE(LOCKED_PASSWD_SUBSTR, "Nologin") 578 AC_DEFINE(LOCKED_PASSWD_SUBSTR, "Nologin",
579 [String used in /etc/passwd to denote locked account])
553 fi 580 fi
554 fi 581 fi
555 AC_DEFINE(BROKEN_GETADDRINFO) 582 AC_DEFINE(BROKEN_GETADDRINFO)
@@ -558,24 +585,25 @@ mips-sony-bsd|mips-sony-newsos4)
558 AC_DEFINE(BROKEN_SETREGID) 585 AC_DEFINE(BROKEN_SETREGID)
559 ;; 586 ;;
560 587
561*-*-nto-qnx) 588*-*-nto-qnx*)
562 AC_DEFINE(USE_PIPES) 589 AC_DEFINE(USE_PIPES)
563 AC_DEFINE(NO_X11_UNIX_SOCKETS) 590 AC_DEFINE(NO_X11_UNIX_SOCKETS)
564 AC_DEFINE(MISSING_NFDBITS) 591 AC_DEFINE(MISSING_NFDBITS, 1, [Define on *nto-qnx systems])
565 AC_DEFINE(MISSING_HOWMANY) 592 AC_DEFINE(MISSING_HOWMANY, 1, [Define on *nto-qnx systems])
566 AC_DEFINE(MISSING_FD_MASK) 593 AC_DEFINE(MISSING_FD_MASK, 1, [Define on *nto-qnx systems])
594 AC_DEFINE(DISABLE_LASTLOG)
567 ;; 595 ;;
568 596
569*-*-ultrix*) 597*-*-ultrix*)
570 AC_DEFINE(BROKEN_GETGROUPS, [], [getgroups(0,NULL) will return -1]) 598 AC_DEFINE(BROKEN_GETGROUPS, 1, [getgroups(0,NULL) will return -1])
571 AC_DEFINE(BROKEN_MMAP, [], [Ultrix mmap can't map files]) 599 AC_DEFINE(BROKEN_MMAP, 1, [Ultrix mmap can't map files])
572 AC_DEFINE(NEED_SETPRGP, [], [Need setpgrp to acquire controlling tty]) 600 AC_DEFINE(NEED_SETPGRP)
573 AC_DEFINE(HAVE_SYS_SYSLOG_H, 1, [Force use of sys/syslog.h on Ultrix]) 601 AC_DEFINE(HAVE_SYS_SYSLOG_H, 1, [Force use of sys/syslog.h on Ultrix])
574 ;; 602 ;;
575 603
576*-*-lynxos) 604*-*-lynxos)
577 CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__" 605 CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"
578 AC_DEFINE(MISSING_HOWMANY) 606 AC_DEFINE(MISSING_HOWMANY)
579 AC_DEFINE(BROKEN_SETVBUF, 1, [LynxOS has broken setvbuf() implementation]) 607 AC_DEFINE(BROKEN_SETVBUF, 1, [LynxOS has broken setvbuf() implementation])
580 ;; 608 ;;
581esac 609esac
@@ -622,7 +650,7 @@ AC_ARG_WITH(Werror,
622 [ 650 [
623 if test -n "$withval" && test "x$withval" != "xno"; then 651 if test -n "$withval" && test "x$withval" != "xno"; then
624 werror_flags="-Werror" 652 werror_flags="-Werror"
625 if "x${withval}" != "xyes"; then 653 if test "x${withval}" != "xyes"; then
626 werror_flags="$withval" 654 werror_flags="$withval"
627 fi 655 fi
628 fi 656 fi
@@ -655,7 +683,6 @@ AC_CHECK_HEADERS( \
655 glob.h \ 683 glob.h \
656 ia.h \ 684 ia.h \
657 iaf.h \ 685 iaf.h \
658 lastlog.h \
659 limits.h \ 686 limits.h \
660 login.h \ 687 login.h \
661 login_cap.h \ 688 login_cap.h \
@@ -663,7 +690,6 @@ AC_CHECK_HEADERS( \
663 ndir.h \ 690 ndir.h \
664 netdb.h \ 691 netdb.h \
665 netgroup.h \ 692 netgroup.h \
666 netinet/in_systm.h \
667 pam/pam_appl.h \ 693 pam/pam_appl.h \
668 paths.h \ 694 paths.h \
669 pty.h \ 695 pty.h \
@@ -705,6 +731,13 @@ AC_CHECK_HEADERS( \
705 vis.h \ 731 vis.h \
706) 732)
707 733
734# lastlog.h requires sys/time.h to be included first on Solaris
735AC_CHECK_HEADERS(lastlog.h, [], [], [
736#ifdef HAVE_SYS_TIME_H
737# include <sys/time.h>
738#endif
739])
740
708# sys/ptms.h requires sys/stream.h to be included first on Solaris 741# sys/ptms.h requires sys/stream.h to be included first on Solaris
709AC_CHECK_HEADERS(sys/ptms.h, [], [], [ 742AC_CHECK_HEADERS(sys/ptms.h, [], [], [
710#ifdef HAVE_SYS_STREAM_H 743#ifdef HAVE_SYS_STREAM_H
@@ -723,8 +756,8 @@ AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[
723 ac_cv_have_broken_dirname, [ 756 ac_cv_have_broken_dirname, [
724 save_LIBS="$LIBS" 757 save_LIBS="$LIBS"
725 LIBS="$LIBS -lgen" 758 LIBS="$LIBS -lgen"
726 AC_TRY_RUN( 759 AC_RUN_IFELSE(
727 [ 760 [AC_LANG_SOURCE([[
728#include <libgen.h> 761#include <libgen.h>
729#include <string.h> 762#include <string.h>
730 763
@@ -739,9 +772,10 @@ int main(int argc, char **argv) {
739 exit(0); 772 exit(0);
740 } 773 }
741} 774}
742 ], 775 ]])],
776 [ ac_cv_have_broken_dirname="no" ],
777 [ ac_cv_have_broken_dirname="yes" ],
743 [ ac_cv_have_broken_dirname="no" ], 778 [ ac_cv_have_broken_dirname="no" ],
744 [ ac_cv_have_broken_dirname="yes" ]
745 ) 779 )
746 LIBS="$save_LIBS" 780 LIBS="$save_LIBS"
747 ]) 781 ])
@@ -755,7 +789,8 @@ int main(int argc, char **argv) {
755 789
756AC_CHECK_FUNC(getspnam, , 790AC_CHECK_FUNC(getspnam, ,
757 AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen")) 791 AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen"))
758AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME)) 792AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME, 1,
793 [Define if you have the basename function.]))
759 794
760dnl zlib is required 795dnl zlib is required
761AC_ARG_WITH(zlib, 796AC_ARG_WITH(zlib,
@@ -859,14 +894,15 @@ dnl UnixWare 2.x
859AC_CHECK_FUNC(strcasecmp, 894AC_CHECK_FUNC(strcasecmp,
860 [], [ AC_CHECK_LIB(resolv, strcasecmp, LIBS="$LIBS -lresolv") ] 895 [], [ AC_CHECK_LIB(resolv, strcasecmp, LIBS="$LIBS -lresolv") ]
861) 896)
862AC_CHECK_FUNC(utimes, 897AC_CHECK_FUNCS(utimes,
863 [], [ AC_CHECK_LIB(c89, utimes, [AC_DEFINE(HAVE_UTIMES) 898 [], [ AC_CHECK_LIB(c89, utimes, [AC_DEFINE(HAVE_UTIMES)
864 LIBS="$LIBS -lc89"]) ] 899 LIBS="$LIBS -lc89"]) ]
865) 900)
866 901
867dnl Checks for libutil functions 902dnl Checks for libutil functions
868AC_CHECK_HEADERS(libutil.h) 903AC_CHECK_HEADERS(libutil.h)
869AC_SEARCH_LIBS(login, util bsd, [AC_DEFINE(HAVE_LOGIN)]) 904AC_SEARCH_LIBS(login, util bsd, [AC_DEFINE(HAVE_LOGIN, 1,
905 [Define if your libraries define login()])])
870AC_CHECK_FUNCS(logout updwtmp logwtmp) 906AC_CHECK_FUNCS(logout updwtmp logwtmp)
871 907
872AC_FUNC_STRFTIME 908AC_FUNC_STRFTIME
@@ -881,7 +917,9 @@ AC_EGREP_CPP(FOUNDIT,
881 #endif 917 #endif
882 ], 918 ],
883 [ 919 [
884 AC_DEFINE(GLOB_HAS_ALTDIRFUNC) 920 AC_DEFINE(GLOB_HAS_ALTDIRFUNC, 1,
921 [Define if your system glob() function has
922 the GLOB_ALTDIRFUNC extension])
885 AC_MSG_RESULT(yes) 923 AC_MSG_RESULT(yes)
886 ], 924 ],
887 [ 925 [
@@ -897,7 +935,9 @@ AC_EGREP_CPP(FOUNDIT,
897 int main(void){glob_t g; g.gl_matchc = 1;} 935 int main(void){glob_t g; g.gl_matchc = 1;}
898 ], 936 ],
899 [ 937 [
900 AC_DEFINE(GLOB_HAS_GL_MATCHC) 938 AC_DEFINE(GLOB_HAS_GL_MATCHC, 1,
939 [Define if your system glob() function has
940 gl_matchc options in glob_t])
901 AC_MSG_RESULT(yes) 941 AC_MSG_RESULT(yes)
902 ], 942 ],
903 [ 943 [
@@ -915,7 +955,9 @@ int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));}
915 [AC_MSG_RESULT(yes)], 955 [AC_MSG_RESULT(yes)],
916 [ 956 [
917 AC_MSG_RESULT(no) 957 AC_MSG_RESULT(no)
918 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME) 958 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME, 1,
959 [Define if your struct dirent expects you to
960 allocate extra space for d_name])
919 ], 961 ],
920 [ 962 [
921 AC_MSG_WARN([cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME]) 963 AC_MSG_WARN([cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME])
@@ -925,7 +967,7 @@ int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));}
925 967
926AC_MSG_CHECKING([for /proc/pid/fd directory]) 968AC_MSG_CHECKING([for /proc/pid/fd directory])
927if test -d "/proc/$$/fd" ; then 969if test -d "/proc/$$/fd" ; then
928 AC_DEFINE(HAVE_PROC_PID) 970 AC_DEFINE(HAVE_PROC_PID, 1, [Define if you have /proc/$pid/fd])
929 AC_MSG_RESULT(yes) 971 AC_MSG_RESULT(yes)
930else 972else
931 AC_MSG_RESULT(no) 973 AC_MSG_RESULT(no)
@@ -943,17 +985,17 @@ AC_ARG_WITH(skey,
943 LDFLAGS="$LDFLAGS -L${withval}/lib" 985 LDFLAGS="$LDFLAGS -L${withval}/lib"
944 fi 986 fi
945 987
946 AC_DEFINE(SKEY) 988 AC_DEFINE(SKEY, 1, [Define if you want S/Key support])
947 LIBS="-lskey $LIBS" 989 LIBS="-lskey $LIBS"
948 SKEY_MSG="yes" 990 SKEY_MSG="yes"
949 991
950 AC_MSG_CHECKING([for s/key support]) 992 AC_MSG_CHECKING([for s/key support])
951 AC_TRY_RUN( 993 AC_LINK_IFELSE(
952 [ 994 [AC_LANG_SOURCE([[
953#include <stdio.h> 995#include <stdio.h>
954#include <skey.h> 996#include <skey.h>
955int main() { char *ff = skey_keyinfo(""); ff=""; exit(0); } 997int main() { char *ff = skey_keyinfo(""); ff=""; exit(0); }
956 ], 998 ]])],
957 [AC_MSG_RESULT(yes)], 999 [AC_MSG_RESULT(yes)],
958 [ 1000 [
959 AC_MSG_RESULT(no) 1001 AC_MSG_RESULT(no)
@@ -965,7 +1007,9 @@ int main() { char *ff = skey_keyinfo(""); ff=""; exit(0); }
965 #include <skey.h>], 1007 #include <skey.h>],
966 [(void)skeychallenge(NULL,"name","",0);], 1008 [(void)skeychallenge(NULL,"name","",0);],
967 [AC_MSG_RESULT(yes) 1009 [AC_MSG_RESULT(yes)
968 AC_DEFINE(SKEYCHALLENGE_4ARG)], 1010 AC_DEFINE(SKEYCHALLENGE_4ARG, 1,
1011 [Define if your skeychallenge()
1012 function takes 4 arguments (NetBSD)])],
969 [AC_MSG_RESULT(no)] 1013 [AC_MSG_RESULT(no)]
970 ) 1014 )
971 fi 1015 fi
@@ -1016,7 +1060,9 @@ AC_ARG_WITH(tcp-wrappers,
1016 [hosts_access(0);], 1060 [hosts_access(0);],
1017 [ 1061 [
1018 AC_MSG_RESULT(yes) 1062 AC_MSG_RESULT(yes)
1019 AC_DEFINE(LIBWRAP) 1063 AC_DEFINE(LIBWRAP, 1,
1064 [Define if you want
1065 TCP Wrappers support])
1020 AC_SUBST(LIBWRAP) 1066 AC_SUBST(LIBWRAP)
1021 TCPW_MSG="yes" 1067 TCPW_MSG="yes"
1022 ], 1068 ],
@@ -1035,11 +1081,15 @@ AC_ARG_WITH(libedit,
1035 [ --with-libedit[[=PATH]] Enable libedit support for sftp], 1081 [ --with-libedit[[=PATH]] Enable libedit support for sftp],
1036 [ if test "x$withval" != "xno" ; then 1082 [ if test "x$withval" != "xno" ; then
1037 if test "x$withval" != "xyes"; then 1083 if test "x$withval" != "xyes"; then
1038 CPPFLAGS="$CPPFLAGS -I$withval/include" 1084 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1039 LDFLAGS="$LDFLAGS -L$withval/lib" 1085 if test -n "${need_dash_r}"; then
1086 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
1087 else
1088 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
1089 fi
1040 fi 1090 fi
1041 AC_CHECK_LIB(edit, el_init, 1091 AC_CHECK_LIB(edit, el_init,
1042 [ AC_DEFINE(USE_LIBEDIT, [], [Use libedit for sftp]) 1092 [ AC_DEFINE(USE_LIBEDIT, 1, [Use libedit for sftp])
1043 LIBEDIT="-ledit -lcurses" 1093 LIBEDIT="-ledit -lcurses"
1044 LIBEDIT_MSG="yes" 1094 LIBEDIT_MSG="yes"
1045 AC_SUBST(LIBEDIT) 1095 AC_SUBST(LIBEDIT)
@@ -1083,12 +1133,12 @@ AC_ARG_WITH(audit,
1083 [AC_MSG_ERROR(BSM enabled and required function not found)]) 1133 [AC_MSG_ERROR(BSM enabled and required function not found)])
1084 # These are optional 1134 # These are optional
1085 AC_CHECK_FUNCS(getaudit_addr) 1135 AC_CHECK_FUNCS(getaudit_addr)
1086 AC_DEFINE(USE_BSM_AUDIT, [], [Use BSM audit module]) 1136 AC_DEFINE(USE_BSM_AUDIT, 1, [Use BSM audit module])
1087 ;; 1137 ;;
1088 debug) 1138 debug)
1089 AUDIT_MODULE=debug 1139 AUDIT_MODULE=debug
1090 AC_MSG_RESULT(debug) 1140 AC_MSG_RESULT(debug)
1091 AC_DEFINE(SSH_AUDIT_EVENTS, [], Use audit debugging module) 1141 AC_DEFINE(SSH_AUDIT_EVENTS, 1, Use audit debugging module)
1092 ;; 1142 ;;
1093 no) 1143 no)
1094 AC_MSG_RESULT(no) 1144 AC_MSG_RESULT(no)
@@ -1102,6 +1152,7 @@ AC_ARG_WITH(audit,
1102dnl Checks for library functions. Please keep in alphabetical order 1152dnl Checks for library functions. Please keep in alphabetical order
1103AC_CHECK_FUNCS( \ 1153AC_CHECK_FUNCS( \
1104 arc4random \ 1154 arc4random \
1155 asprintf \
1105 b64_ntop \ 1156 b64_ntop \
1106 __b64_ntop \ 1157 __b64_ntop \
1107 b64_pton \ 1158 b64_pton \
@@ -1177,7 +1228,7 @@ AC_CHECK_FUNCS( \
1177 truncate \ 1228 truncate \
1178 unsetenv \ 1229 unsetenv \
1179 updwtmpx \ 1230 updwtmpx \
1180 utimes \ 1231 vasprintf \
1181 vhangup \ 1232 vhangup \
1182 vsnprintf \ 1233 vsnprintf \
1183 waitpid \ 1234 waitpid \
@@ -1198,7 +1249,8 @@ str = gai_strerror(0);],[
1198 AC_DEFINE(HAVE_CONST_GAI_STRERROR_PROTO, 1, 1249 AC_DEFINE(HAVE_CONST_GAI_STRERROR_PROTO, 1,
1199 [Define if gai_strerror() returns const char *])])]) 1250 [Define if gai_strerror() returns const char *])])])
1200 1251
1201AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP)) 1252AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP, 1,
1253 [Some systems put nanosleep outside of libc]))
1202 1254
1203dnl Make sure prototypes are defined for these before using them. 1255dnl Make sure prototypes are defined for these before using them.
1204AC_CHECK_DECL(getrusage, [AC_CHECK_FUNCS(getrusage)]) 1256AC_CHECK_DECL(getrusage, [AC_CHECK_FUNCS(getrusage)])
@@ -1230,7 +1282,8 @@ AC_CHECK_FUNCS(setresuid, [
1230int main(){errno=0; setresuid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);} 1282int main(){errno=0; setresuid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);}
1231 ]])], 1283 ]])],
1232 [AC_MSG_RESULT(yes)], 1284 [AC_MSG_RESULT(yes)],
1233 [AC_DEFINE(BROKEN_SETRESUID) 1285 [AC_DEFINE(BROKEN_SETRESUID, 1,
1286 [Define if your setresuid() is broken])
1234 AC_MSG_RESULT(not implemented)], 1287 AC_MSG_RESULT(not implemented)],
1235 [AC_MSG_WARN([cross compiling: not checking setresuid])] 1288 [AC_MSG_WARN([cross compiling: not checking setresuid])]
1236 ) 1289 )
@@ -1246,7 +1299,8 @@ AC_CHECK_FUNCS(setresgid, [
1246int main(){errno=0; setresgid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);} 1299int main(){errno=0; setresgid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);}
1247 ]])], 1300 ]])],
1248 [AC_MSG_RESULT(yes)], 1301 [AC_MSG_RESULT(yes)],
1249 [AC_DEFINE(BROKEN_SETRESGID) 1302 [AC_DEFINE(BROKEN_SETRESGID, 1,
1303 [Define if your setresgid() is broken])
1250 AC_MSG_RESULT(not implemented)], 1304 AC_MSG_RESULT(not implemented)],
1251 [AC_MSG_WARN([cross compiling: not checking setresuid])] 1305 [AC_MSG_WARN([cross compiling: not checking setresuid])]
1252 ) 1306 )
@@ -1262,13 +1316,16 @@ AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline pututxline )
1262AC_CHECK_FUNCS(setutxent utmpxname) 1316AC_CHECK_FUNCS(setutxent utmpxname)
1263 1317
1264AC_CHECK_FUNC(daemon, 1318AC_CHECK_FUNC(daemon,
1265 [AC_DEFINE(HAVE_DAEMON)], 1319 [AC_DEFINE(HAVE_DAEMON, 1, [Define if your libraries define daemon()])],
1266 [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])] 1320 [AC_CHECK_LIB(bsd, daemon,
1321 [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
1267) 1322)
1268 1323
1269AC_CHECK_FUNC(getpagesize, 1324AC_CHECK_FUNC(getpagesize,
1270 [AC_DEFINE(HAVE_GETPAGESIZE)], 1325 [AC_DEFINE(HAVE_GETPAGESIZE, 1,
1271 [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])] 1326 [Define if your libraries define getpagesize()])],
1327 [AC_CHECK_LIB(ucb, getpagesize,
1328 [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])]
1272) 1329)
1273 1330
1274# Check for broken snprintf 1331# Check for broken snprintf
@@ -1282,13 +1339,62 @@ int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');}
1282 [AC_MSG_RESULT(yes)], 1339 [AC_MSG_RESULT(yes)],
1283 [ 1340 [
1284 AC_MSG_RESULT(no) 1341 AC_MSG_RESULT(no)
1285 AC_DEFINE(BROKEN_SNPRINTF) 1342 AC_DEFINE(BROKEN_SNPRINTF, 1,
1343 [Define if your snprintf is busted])
1286 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor]) 1344 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
1287 ], 1345 ],
1288 [ AC_MSG_WARN([cross compiling: Assuming working snprintf()]) ] 1346 [ AC_MSG_WARN([cross compiling: Assuming working snprintf()]) ]
1289 ) 1347 )
1290fi 1348fi
1291 1349
1350# If we don't have a working asprintf, then we strongly depend on vsnprintf
1351# returning the right thing on overflow: the number of characters it tried to
1352# create (as per SUSv3)
1353if test "x$ac_cv_func_asprintf" != "xyes" && \
1354 test "x$ac_cv_func_vsnprintf" = "xyes" ; then
1355 AC_MSG_CHECKING([whether vsnprintf returns correct values on overflow])
1356 AC_RUN_IFELSE(
1357 [AC_LANG_SOURCE([[
1358#include <sys/types.h>
1359#include <stdio.h>
1360#include <stdarg.h>
1361
1362int x_snprintf(char *str,size_t count,const char *fmt,...)
1363{
1364 size_t ret; va_list ap;
1365 va_start(ap, fmt); ret = vsnprintf(str, count, fmt, ap); va_end(ap);
1366 return ret;
1367}
1368int main(void)
1369{
1370 char x[1];
1371 exit(x_snprintf(x, 1, "%s %d", "hello", 12345) == 11 ? 0 : 1);
1372} ]])],
1373 [AC_MSG_RESULT(yes)],
1374 [
1375 AC_MSG_RESULT(no)
1376 AC_DEFINE(BROKEN_SNPRINTF, 1,
1377 [Define if your snprintf is busted])
1378 AC_MSG_WARN([****** Your vsnprintf() function is broken, complain to your vendor])
1379 ],
1380 [ AC_MSG_WARN([cross compiling: Assuming working vsnprintf()]) ]
1381 )
1382fi
1383
1384# On systems where [v]snprintf is broken, but is declared in stdio,
1385# check that the fmt argument is const char * or just char *.
1386# This is only useful for when BROKEN_SNPRINTF
1387AC_MSG_CHECKING([whether snprintf can declare const char *fmt])
1388AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
1389 int snprintf(char *a, size_t b, const char *c, ...) { return 0; }
1390 int main(void) { snprintf(0, 0, 0); }
1391 ]])],
1392 [AC_MSG_RESULT(yes)
1393 AC_DEFINE(SNPRINTF_CONST, [const],
1394 [Define as const if snprintf() can declare const char *fmt])],
1395 [AC_MSG_RESULT(no)
1396 AC_DEFINE(SNPRINTF_CONST, [/* not const */])])
1397
1292# Check for missing getpeereid (or equiv) support 1398# Check for missing getpeereid (or equiv) support
1293NO_PEERCHECK="" 1399NO_PEERCHECK=""
1294if test "x$ac_cv_func_getpeereid" != "xyes" ; then 1400if test "x$ac_cv_func_getpeereid" != "xyes" ; then
@@ -1298,7 +1404,7 @@ if test "x$ac_cv_func_getpeereid" != "xyes" ; then
1298 #include <sys/socket.h>], 1404 #include <sys/socket.h>],
1299 [int i = SO_PEERCRED;], 1405 [int i = SO_PEERCRED;],
1300 [ AC_MSG_RESULT(yes) 1406 [ AC_MSG_RESULT(yes)
1301 AC_DEFINE(HAVE_SO_PEERCRED, [], [Have PEERCRED socket option]) 1407 AC_DEFINE(HAVE_SO_PEERCRED, 1, [Have PEERCRED socket option])
1302 ], 1408 ],
1303 [AC_MSG_RESULT(no) 1409 [AC_MSG_RESULT(no)
1304 NO_PEERCHECK=1] 1410 NO_PEERCHECK=1]
@@ -1308,21 +1414,21 @@ fi
1308dnl see whether mkstemp() requires XXXXXX 1414dnl see whether mkstemp() requires XXXXXX
1309if test "x$ac_cv_func_mkdtemp" = "xyes" ; then 1415if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
1310AC_MSG_CHECKING([for (overly) strict mkstemp]) 1416AC_MSG_CHECKING([for (overly) strict mkstemp])
1311AC_TRY_RUN( 1417AC_RUN_IFELSE(
1312 [ 1418 [AC_LANG_SOURCE([[
1313#include <stdlib.h> 1419#include <stdlib.h>
1314main() { char template[]="conftest.mkstemp-test"; 1420main() { char template[]="conftest.mkstemp-test";
1315if (mkstemp(template) == -1) 1421if (mkstemp(template) == -1)
1316 exit(1); 1422 exit(1);
1317unlink(template); exit(0); 1423unlink(template); exit(0);
1318} 1424}
1319 ], 1425 ]])],
1320 [ 1426 [
1321 AC_MSG_RESULT(no) 1427 AC_MSG_RESULT(no)
1322 ], 1428 ],
1323 [ 1429 [
1324 AC_MSG_RESULT(yes) 1430 AC_MSG_RESULT(yes)
1325 AC_DEFINE(HAVE_STRICT_MKSTEMP) 1431 AC_DEFINE(HAVE_STRICT_MKSTEMP, 1, [Silly mkstemp()])
1326 ], 1432 ],
1327 [ 1433 [
1328 AC_MSG_RESULT(yes) 1434 AC_MSG_RESULT(yes)
@@ -1334,8 +1440,8 @@ fi
1334dnl make sure that openpty does not reacquire controlling terminal 1440dnl make sure that openpty does not reacquire controlling terminal
1335if test ! -z "$check_for_openpty_ctty_bug"; then 1441if test ! -z "$check_for_openpty_ctty_bug"; then
1336 AC_MSG_CHECKING(if openpty correctly handles controlling tty) 1442 AC_MSG_CHECKING(if openpty correctly handles controlling tty)
1337 AC_TRY_RUN( 1443 AC_RUN_IFELSE(
1338 [ 1444 [AC_LANG_SOURCE([[
1339#include <stdio.h> 1445#include <stdio.h>
1340#include <sys/fcntl.h> 1446#include <sys/fcntl.h>
1341#include <sys/types.h> 1447#include <sys/types.h>
@@ -1367,13 +1473,16 @@ main()
1367 exit(0); /* Did not acquire ctty: OK */ 1473 exit(0); /* Did not acquire ctty: OK */
1368 } 1474 }
1369} 1475}
1370 ], 1476 ]])],
1371 [ 1477 [
1372 AC_MSG_RESULT(yes) 1478 AC_MSG_RESULT(yes)
1373 ], 1479 ],
1374 [ 1480 [
1375 AC_MSG_RESULT(no) 1481 AC_MSG_RESULT(no)
1376 AC_DEFINE(SSHD_ACQUIRES_CTTY) 1482 AC_DEFINE(SSHD_ACQUIRES_CTTY)
1483 ],
1484 [
1485 AC_MSG_RESULT(cross-compiling, assuming yes)
1377 ] 1486 ]
1378 ) 1487 )
1379fi 1488fi
@@ -1381,8 +1490,8 @@ fi
1381if test "x$ac_cv_func_getaddrinfo" = "xyes" && \ 1490if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
1382 test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then 1491 test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then
1383 AC_MSG_CHECKING(if getaddrinfo seems to work) 1492 AC_MSG_CHECKING(if getaddrinfo seems to work)
1384 AC_TRY_RUN( 1493 AC_RUN_IFELSE(
1385 [ 1494 [AC_LANG_SOURCE([[
1386#include <stdio.h> 1495#include <stdio.h>
1387#include <sys/socket.h> 1496#include <sys/socket.h>
1388#include <netdb.h> 1497#include <netdb.h>
@@ -1436,13 +1545,16 @@ main(void)
1436 } 1545 }
1437 exit(0); 1546 exit(0);
1438} 1547}
1439 ], 1548 ]])],
1440 [ 1549 [
1441 AC_MSG_RESULT(yes) 1550 AC_MSG_RESULT(yes)
1442 ], 1551 ],
1443 [ 1552 [
1444 AC_MSG_RESULT(no) 1553 AC_MSG_RESULT(no)
1445 AC_DEFINE(BROKEN_GETADDRINFO) 1554 AC_DEFINE(BROKEN_GETADDRINFO)
1555 ],
1556 [
1557 AC_MSG_RESULT(cross-compiling, assuming yes)
1446 ] 1558 ]
1447 ) 1559 )
1448fi 1560fi
@@ -1450,8 +1562,8 @@ fi
1450if test "x$ac_cv_func_getaddrinfo" = "xyes" && \ 1562if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
1451 test "x$check_for_aix_broken_getaddrinfo" = "x1"; then 1563 test "x$check_for_aix_broken_getaddrinfo" = "x1"; then
1452 AC_MSG_CHECKING(if getaddrinfo seems to work) 1564 AC_MSG_CHECKING(if getaddrinfo seems to work)
1453 AC_TRY_RUN( 1565 AC_RUN_IFELSE(
1454 [ 1566 [AC_LANG_SOURCE([[
1455#include <stdio.h> 1567#include <stdio.h>
1456#include <sys/socket.h> 1568#include <sys/socket.h>
1457#include <netdb.h> 1569#include <netdb.h>
@@ -1493,15 +1605,18 @@ main(void)
1493 } 1605 }
1494 exit(0); 1606 exit(0);
1495} 1607}
1496 ], 1608 ]])],
1497 [ 1609 [
1498 AC_MSG_RESULT(yes) 1610 AC_MSG_RESULT(yes)
1499 AC_DEFINE(AIX_GETNAMEINFO_HACK, [], 1611 AC_DEFINE(AIX_GETNAMEINFO_HACK, 1,
1500[Define if you have a getaddrinfo that fails for the all-zeros IPv6 address]) 1612 [Define if you have a getaddrinfo that fails
1613 for the all-zeros IPv6 address])
1501 ], 1614 ],
1502 [ 1615 [
1503 AC_MSG_RESULT(no) 1616 AC_MSG_RESULT(no)
1504 AC_DEFINE(BROKEN_GETADDRINFO) 1617 AC_DEFINE(BROKEN_GETADDRINFO)
1618 ],
1619 AC_MSG_RESULT(cross-compiling, assuming no)
1505 ] 1620 ]
1506 ) 1621 )
1507fi 1622fi
@@ -1544,7 +1659,8 @@ AC_ARG_WITH(pam,
1544 1659
1545 PAM_MSG="yes" 1660 PAM_MSG="yes"
1546 1661
1547 AC_DEFINE(USE_PAM) 1662 AC_DEFINE(USE_PAM, 1,
1663 [Define if you want to enable PAM support])
1548 if test $ac_cv_lib_dl_dlopen = yes; then 1664 if test $ac_cv_lib_dl_dlopen = yes; then
1549 LIBPAM="-lpam -ldl" 1665 LIBPAM="-lpam -ldl"
1550 else 1666 else
@@ -1571,7 +1687,9 @@ if test "x$PAM_MSG" = "xyes" ; then
1571 [(void)pam_strerror((pam_handle_t *)NULL, -1);], 1687 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
1572 [AC_MSG_RESULT(no)], 1688 [AC_MSG_RESULT(no)],
1573 [ 1689 [
1574 AC_DEFINE(HAVE_OLD_PAM) 1690 AC_DEFINE(HAVE_OLD_PAM, 1,
1691 [Define if you have an old version of PAM
1692 which takes only one argument to pam_strerror])
1575 AC_MSG_RESULT(yes) 1693 AC_MSG_RESULT(yes)
1576 PAM_MSG="yes (old library)" 1694 PAM_MSG="yes (old library)"
1577 ] 1695 ]
@@ -1611,7 +1729,9 @@ AC_ARG_WITH(ssl-dir,
1611 ] 1729 ]
1612) 1730)
1613LIBS="-lcrypto $LIBS" 1731LIBS="-lcrypto $LIBS"
1614AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL), 1732AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL, 1,
1733 [Define if your ssl headers are included
1734 with #include <openssl/header.h>]),
1615 [ 1735 [
1616 dnl Check default openssl install dir 1736 dnl Check default openssl install dir
1617 if test -n "${need_dash_r}"; then 1737 if test -n "${need_dash_r}"; then
@@ -1721,6 +1841,24 @@ Also see contrib/findssl.sh for help identifying header/library mismatches.])
1721 ] 1841 ]
1722) 1842)
1723 1843
1844# Check for OpenSSL without EVP_aes_{192,256}_cbc
1845AC_MSG_CHECKING([whether OpenSSL has crippled AES support])
1846AC_COMPILE_IFELSE(
1847 [AC_LANG_SOURCE([[
1848#include <string.h>
1849#include <openssl/evp.h>
1850int main(void) { exit(EVP_aes_192_cbc() == NULL || EVP_aes_256_cbc() == NULL);}
1851 ]])],
1852 [
1853 AC_MSG_RESULT(no)
1854 ],
1855 [
1856 AC_MSG_RESULT(yes)
1857 AC_DEFINE(OPENSSL_LOBOTOMISED_AES, 1,
1858 [libcrypto is missing AES 192 and 256 bit functions])
1859 ]
1860)
1861
1724# Some systems want crypt() from libcrypt, *not* the version in OpenSSL, 1862# Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
1725# because the system crypt() is more featureful. 1863# because the system crypt() is more featureful.
1726if test "x$check_for_libcrypt_before" = "x1"; then 1864if test "x$check_for_libcrypt_before" = "x1"; then
@@ -1785,7 +1923,8 @@ AC_ARG_WITH(rand-helper,
1785# Which randomness source do we use? 1923# Which randomness source do we use?
1786if test ! -z "$OPENSSL_SEEDS_ITSELF" && test -z "$USE_RAND_HELPER" ; then 1924if test ! -z "$OPENSSL_SEEDS_ITSELF" && test -z "$USE_RAND_HELPER" ; then
1787 # OpenSSL only 1925 # OpenSSL only
1788 AC_DEFINE(OPENSSL_PRNG_ONLY) 1926 AC_DEFINE(OPENSSL_PRNG_ONLY, 1,
1927 [Define if you want OpenSSL's internally seeded PRNG only])
1789 RAND_MSG="OpenSSL internal ONLY" 1928 RAND_MSG="OpenSSL internal ONLY"
1790 INSTALL_SSH_RAND_HELPER="" 1929 INSTALL_SSH_RAND_HELPER=""
1791elif test ! -z "$USE_RAND_HELPER" ; then 1930elif test ! -z "$USE_RAND_HELPER" ; then
@@ -1813,7 +1952,8 @@ AC_ARG_WITH(prngd-port,
1813 esac 1952 esac
1814 if test ! -z "$withval" ; then 1953 if test ! -z "$withval" ; then
1815 PRNGD_PORT="$withval" 1954 PRNGD_PORT="$withval"
1816 AC_DEFINE_UNQUOTED(PRNGD_PORT, $PRNGD_PORT) 1955 AC_DEFINE_UNQUOTED(PRNGD_PORT, $PRNGD_PORT,
1956 [Port number of PRNGD/EGD random number socket])
1817 fi 1957 fi
1818 ] 1958 ]
1819) 1959)
@@ -1844,7 +1984,8 @@ AC_ARG_WITH(prngd-socket,
1844 AC_MSG_WARN(Entropy socket is not readable) 1984 AC_MSG_WARN(Entropy socket is not readable)
1845 fi 1985 fi
1846 PRNGD_SOCKET="$withval" 1986 PRNGD_SOCKET="$withval"
1847 AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET") 1987 AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET",
1988 [Location of PRNGD/EGD random number socket])
1848 fi 1989 fi
1849 ], 1990 ],
1850 [ 1991 [
@@ -1879,7 +2020,8 @@ AC_ARG_WITH(entropy-timeout,
1879 fi 2020 fi
1880 ] 2021 ]
1881) 2022)
1882AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout) 2023AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout,
2024 [Builtin PRNG command timeout])
1883 2025
1884SSH_PRIVSEP_USER=sshd 2026SSH_PRIVSEP_USER=sshd
1885AC_ARG_WITH(privsep-user, 2027AC_ARG_WITH(privsep-user,
@@ -1891,7 +2033,8 @@ AC_ARG_WITH(privsep-user,
1891 fi 2033 fi
1892 ] 2034 ]
1893) 2035)
1894AC_DEFINE_UNQUOTED(SSH_PRIVSEP_USER, "$SSH_PRIVSEP_USER") 2036AC_DEFINE_UNQUOTED(SSH_PRIVSEP_USER, "$SSH_PRIVSEP_USER",
2037 [non-privileged user for privilege separation])
1895AC_SUBST(SSH_PRIVSEP_USER) 2038AC_SUBST(SSH_PRIVSEP_USER)
1896 2039
1897# We do this little dance with the search path to insure 2040# We do this little dance with the search path to insure
@@ -1949,7 +2092,10 @@ if test ! -z "$SONY" ; then
1949 LIBS="$LIBS -liberty"; 2092 LIBS="$LIBS -liberty";
1950fi 2093fi
1951 2094
1952# Checks for data types 2095# Check for long long datatypes
2096AC_CHECK_TYPES([long long, unsigned long long, long double])
2097
2098# Check datatype sizes
1953AC_CHECK_SIZEOF(char, 1) 2099AC_CHECK_SIZEOF(char, 1)
1954AC_CHECK_SIZEOF(short int, 2) 2100AC_CHECK_SIZEOF(short int, 2)
1955AC_CHECK_SIZEOF(int, 4) 2101AC_CHECK_SIZEOF(int, 4)
@@ -1961,6 +2107,84 @@ if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then
1961 ac_cv_sizeof_long_long_int=0 2107 ac_cv_sizeof_long_long_int=0
1962fi 2108fi
1963 2109
2110# compute LLONG_MIN and LLONG_MAX if we don't know them.
2111if test -z "$have_llong_max"; then
2112 AC_MSG_CHECKING([for max value of long long])
2113 AC_RUN_IFELSE(
2114 [AC_LANG_SOURCE([[
2115#include <stdio.h>
2116/* Why is this so damn hard? */
2117#ifdef __GNUC__
2118# undef __GNUC__
2119#endif
2120#define __USE_ISOC99
2121#include <limits.h>
2122#define DATA "conftest.llminmax"
2123int main(void) {
2124 FILE *f;
2125 long long i, llmin, llmax = 0;
2126
2127 if((f = fopen(DATA,"w")) == NULL)
2128 exit(1);
2129
2130#if defined(LLONG_MIN) && defined(LLONG_MAX)
2131 fprintf(stderr, "Using system header for LLONG_MIN and LLONG_MAX\n");
2132 llmin = LLONG_MIN;
2133 llmax = LLONG_MAX;
2134#else
2135 fprintf(stderr, "Calculating LLONG_MIN and LLONG_MAX\n");
2136 /* This will work on one's complement and two's complement */
2137 for (i = 1; i > llmax; i <<= 1, i++)
2138 llmax = i;
2139 llmin = llmax + 1LL; /* wrap */
2140#endif
2141
2142 /* Sanity check */
2143 if (llmin + 1 < llmin || llmin - 1 < llmin || llmax + 1 > llmax
2144 || llmax - 1 > llmax) {
2145 fprintf(f, "unknown unknown\n");
2146 exit(2);
2147 }
2148
2149 if (fprintf(f ,"%lld %lld", llmin, llmax) < 0)
2150 exit(3);
2151
2152 exit(0);
2153}
2154 ]])],
2155 [
2156 llong_min=`$AWK '{print $1}' conftest.llminmax`
2157 llong_max=`$AWK '{print $2}' conftest.llminmax`
2158
2159 # snprintf on some Tru64s doesn't understand "%lld"
2160 case "$host" in
2161 alpha-dec-osf*)
2162 if test "x$ac_cv_sizeof_long_long_int" = "x8" &&
2163 test "x$llong_max" = "xld"; then
2164 llong_min="-9223372036854775808"
2165 llong_max="9223372036854775807"
2166 fi
2167 ;;
2168 esac
2169
2170 AC_MSG_RESULT($llong_max)
2171 AC_DEFINE_UNQUOTED(LLONG_MAX, [${llong_max}LL],
2172 [max value of long long calculated by configure])
2173 AC_MSG_CHECKING([for min value of long long])
2174 AC_MSG_RESULT($llong_min)
2175 AC_DEFINE_UNQUOTED(LLONG_MIN, [${llong_min}LL],
2176 [min value of long long calculated by configure])
2177 ],
2178 [
2179 AC_MSG_RESULT(not found)
2180 ],
2181 [
2182 AC_MSG_WARN([cross compiling: not checking])
2183 ]
2184 )
2185fi
2186
2187
1964# More checks for data types 2188# More checks for data types
1965AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [ 2189AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1966 AC_TRY_COMPILE( 2190 AC_TRY_COMPILE(
@@ -1971,7 +2195,7 @@ AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1971 ) 2195 )
1972]) 2196])
1973if test "x$ac_cv_have_u_int" = "xyes" ; then 2197if test "x$ac_cv_have_u_int" = "xyes" ; then
1974 AC_DEFINE(HAVE_U_INT) 2198 AC_DEFINE(HAVE_U_INT, 1, [define if you have u_int data type])
1975 have_u_int=1 2199 have_u_int=1
1976fi 2200fi
1977 2201
@@ -1984,7 +2208,7 @@ AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1984 ) 2208 )
1985]) 2209])
1986if test "x$ac_cv_have_intxx_t" = "xyes" ; then 2210if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1987 AC_DEFINE(HAVE_INTXX_T) 2211 AC_DEFINE(HAVE_INTXX_T, 1, [define if you have intxx_t data type])
1988 have_intxx_t=1 2212 have_intxx_t=1
1989fi 2213fi
1990 2214
@@ -2021,7 +2245,7 @@ AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
2021 ) 2245 )
2022]) 2246])
2023if test "x$ac_cv_have_int64_t" = "xyes" ; then 2247if test "x$ac_cv_have_int64_t" = "xyes" ; then
2024 AC_DEFINE(HAVE_INT64_T) 2248 AC_DEFINE(HAVE_INT64_T, 1, [define if you have int64_t data type])
2025fi 2249fi
2026 2250
2027AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [ 2251AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
@@ -2033,7 +2257,7 @@ AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
2033 ) 2257 )
2034]) 2258])
2035if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then 2259if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
2036 AC_DEFINE(HAVE_U_INTXX_T) 2260 AC_DEFINE(HAVE_U_INTXX_T, 1, [define if you have u_intxx_t data type])
2037 have_u_intxx_t=1 2261 have_u_intxx_t=1
2038fi 2262fi
2039 2263
@@ -2059,7 +2283,7 @@ AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
2059 ) 2283 )
2060]) 2284])
2061if test "x$ac_cv_have_u_int64_t" = "xyes" ; then 2285if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
2062 AC_DEFINE(HAVE_U_INT64_T) 2286 AC_DEFINE(HAVE_U_INT64_T, 1, [define if you have u_int64_t data type])
2063 have_u_int64_t=1 2287 have_u_int64_t=1
2064fi 2288fi
2065 2289
@@ -2088,7 +2312,8 @@ if test -z "$have_u_intxx_t" ; then
2088 ) 2312 )
2089 ]) 2313 ])
2090 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then 2314 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
2091 AC_DEFINE(HAVE_UINTXX_T) 2315 AC_DEFINE(HAVE_UINTXX_T, 1,
2316 [define if you have uintxx_t data type])
2092 fi 2317 fi
2093fi 2318fi
2094 2319
@@ -2139,7 +2364,7 @@ AC_CACHE_CHECK([for u_char], ac_cv_have_u_char, [
2139 ) 2364 )
2140]) 2365])
2141if test "x$ac_cv_have_u_char" = "xyes" ; then 2366if test "x$ac_cv_have_u_char" = "xyes" ; then
2142 AC_DEFINE(HAVE_U_CHAR) 2367 AC_DEFINE(HAVE_U_CHAR, 1, [define if you have u_char data type])
2143fi 2368fi
2144 2369
2145TYPE_SOCKLEN_T 2370TYPE_SOCKLEN_T
@@ -2161,7 +2386,7 @@ AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
2161 ) 2386 )
2162]) 2387])
2163if test "x$ac_cv_have_size_t" = "xyes" ; then 2388if test "x$ac_cv_have_size_t" = "xyes" ; then
2164 AC_DEFINE(HAVE_SIZE_T) 2389 AC_DEFINE(HAVE_SIZE_T, 1, [define if you have size_t data type])
2165fi 2390fi
2166 2391
2167AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [ 2392AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
@@ -2175,7 +2400,7 @@ AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
2175 ) 2400 )
2176]) 2401])
2177if test "x$ac_cv_have_ssize_t" = "xyes" ; then 2402if test "x$ac_cv_have_ssize_t" = "xyes" ; then
2178 AC_DEFINE(HAVE_SSIZE_T) 2403 AC_DEFINE(HAVE_SSIZE_T, 1, [define if you have ssize_t data type])
2179fi 2404fi
2180 2405
2181AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [ 2406AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [
@@ -2189,7 +2414,7 @@ AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [
2189 ) 2414 )
2190]) 2415])
2191if test "x$ac_cv_have_clock_t" = "xyes" ; then 2416if test "x$ac_cv_have_clock_t" = "xyes" ; then
2192 AC_DEFINE(HAVE_CLOCK_T) 2417 AC_DEFINE(HAVE_CLOCK_T, 1, [define if you have clock_t data type])
2193fi 2418fi
2194 2419
2195AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [ 2420AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
@@ -2214,7 +2439,8 @@ AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
2214 ) 2439 )
2215]) 2440])
2216if test "x$ac_cv_have_sa_family_t" = "xyes" ; then 2441if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
2217 AC_DEFINE(HAVE_SA_FAMILY_T) 2442 AC_DEFINE(HAVE_SA_FAMILY_T, 1,
2443 [define if you have sa_family_t data type])
2218fi 2444fi
2219 2445
2220AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [ 2446AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
@@ -2228,7 +2454,7 @@ AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
2228 ) 2454 )
2229]) 2455])
2230if test "x$ac_cv_have_pid_t" = "xyes" ; then 2456if test "x$ac_cv_have_pid_t" = "xyes" ; then
2231 AC_DEFINE(HAVE_PID_T) 2457 AC_DEFINE(HAVE_PID_T, 1, [define if you have pid_t data type])
2232fi 2458fi
2233 2459
2234AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [ 2460AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
@@ -2242,7 +2468,7 @@ AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
2242 ) 2468 )
2243]) 2469])
2244if test "x$ac_cv_have_mode_t" = "xyes" ; then 2470if test "x$ac_cv_have_mode_t" = "xyes" ; then
2245 AC_DEFINE(HAVE_MODE_T) 2471 AC_DEFINE(HAVE_MODE_T, 1, [define if you have mode_t data type])
2246fi 2472fi
2247 2473
2248 2474
@@ -2258,7 +2484,8 @@ AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage
2258 ) 2484 )
2259]) 2485])
2260if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then 2486if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
2261 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE) 2487 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE, 1,
2488 [define if you have struct sockaddr_storage data type])
2262fi 2489fi
2263 2490
2264AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [ 2491AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
@@ -2273,7 +2500,8 @@ AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
2273 ) 2500 )
2274]) 2501])
2275if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then 2502if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
2276 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6) 2503 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6, 1,
2504 [define if you have struct sockaddr_in6 data type])
2277fi 2505fi
2278 2506
2279AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [ 2507AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
@@ -2288,7 +2516,8 @@ AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
2288 ) 2516 )
2289]) 2517])
2290if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then 2518if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
2291 AC_DEFINE(HAVE_STRUCT_IN6_ADDR) 2519 AC_DEFINE(HAVE_STRUCT_IN6_ADDR, 1,
2520 [define if you have struct in6_addr data type])
2292fi 2521fi
2293 2522
2294AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [ 2523AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
@@ -2304,7 +2533,8 @@ AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
2304 ) 2533 )
2305]) 2534])
2306if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then 2535if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
2307 AC_DEFINE(HAVE_STRUCT_ADDRINFO) 2536 AC_DEFINE(HAVE_STRUCT_ADDRINFO, 1,
2537 [define if you have struct addrinfo data type])
2308fi 2538fi
2309 2539
2310AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [ 2540AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [
@@ -2316,7 +2546,7 @@ AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [
2316 ) 2546 )
2317]) 2547])
2318if test "x$ac_cv_have_struct_timeval" = "xyes" ; then 2548if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
2319 AC_DEFINE(HAVE_STRUCT_TIMEVAL) 2549 AC_DEFINE(HAVE_STRUCT_TIMEVAL, 1, [define if you have struct timeval])
2320 have_struct_timeval=1 2550 have_struct_timeval=1
2321fi 2551fi
2322 2552
@@ -2381,6 +2611,17 @@ OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX)
2381OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX) 2611OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX)
2382 2612
2383AC_CHECK_MEMBERS([struct stat.st_blksize]) 2613AC_CHECK_MEMBERS([struct stat.st_blksize])
2614AC_CHECK_MEMBER([struct __res_state.retrans], [], [AC_DEFINE(__res_state, state,
2615 [Define if we don't have struct __res_state in resolv.h])],
2616[
2617#include <stdio.h>
2618#if HAVE_SYS_TYPES_H
2619# include <sys/types.h>
2620#endif
2621#include <netinet/in.h>
2622#include <arpa/nameser.h>
2623#include <resolv.h>
2624])
2384 2625
2385AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage], 2626AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
2386 ac_cv_have_ss_family_in_struct_ss, [ 2627 ac_cv_have_ss_family_in_struct_ss, [
@@ -2395,7 +2636,7 @@ AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
2395 ) 2636 )
2396]) 2637])
2397if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then 2638if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
2398 AC_DEFINE(HAVE_SS_FAMILY_IN_SS) 2639 AC_DEFINE(HAVE_SS_FAMILY_IN_SS, 1, [Fields in struct sockaddr_storage])
2399fi 2640fi
2400 2641
2401AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage], 2642AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
@@ -2411,7 +2652,8 @@ AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
2411 ) 2652 )
2412]) 2653])
2413if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then 2654if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
2414 AC_DEFINE(HAVE___SS_FAMILY_IN_SS) 2655 AC_DEFINE(HAVE___SS_FAMILY_IN_SS, 1,
2656 [Fields in struct sockaddr_storage])
2415fi 2657fi
2416 2658
2417AC_CACHE_CHECK([for pw_class field in struct passwd], 2659AC_CACHE_CHECK([for pw_class field in struct passwd],
@@ -2426,7 +2668,8 @@ AC_CACHE_CHECK([for pw_class field in struct passwd],
2426 ) 2668 )
2427]) 2669])
2428if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then 2670if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
2429 AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD) 2671 AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD, 1,
2672 [Define if your password has a pw_class field])
2430fi 2673fi
2431 2674
2432AC_CACHE_CHECK([for pw_expire field in struct passwd], 2675AC_CACHE_CHECK([for pw_expire field in struct passwd],
@@ -2441,7 +2684,8 @@ AC_CACHE_CHECK([for pw_expire field in struct passwd],
2441 ) 2684 )
2442]) 2685])
2443if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then 2686if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then
2444 AC_DEFINE(HAVE_PW_EXPIRE_IN_PASSWD) 2687 AC_DEFINE(HAVE_PW_EXPIRE_IN_PASSWD, 1,
2688 [Define if your password has a pw_expire field])
2445fi 2689fi
2446 2690
2447AC_CACHE_CHECK([for pw_change field in struct passwd], 2691AC_CACHE_CHECK([for pw_change field in struct passwd],
@@ -2456,7 +2700,8 @@ AC_CACHE_CHECK([for pw_change field in struct passwd],
2456 ) 2700 )
2457]) 2701])
2458if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then 2702if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then
2459 AC_DEFINE(HAVE_PW_CHANGE_IN_PASSWD) 2703 AC_DEFINE(HAVE_PW_CHANGE_IN_PASSWD, 1,
2704 [Define if your password has a pw_change field])
2460fi 2705fi
2461 2706
2462dnl make sure we're using the real structure members and not defines 2707dnl make sure we're using the real structure members and not defines
@@ -2482,7 +2727,9 @@ exit(0);
2482 ) 2727 )
2483]) 2728])
2484if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then 2729if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
2485 AC_DEFINE(HAVE_ACCRIGHTS_IN_MSGHDR) 2730 AC_DEFINE(HAVE_ACCRIGHTS_IN_MSGHDR, 1,
2731 [Define if your system uses access rights style
2732 file descriptor passing])
2486fi 2733fi
2487 2734
2488AC_CACHE_CHECK([for msg_control field in struct msghdr], 2735AC_CACHE_CHECK([for msg_control field in struct msghdr],
@@ -2507,7 +2754,9 @@ exit(0);
2507 ) 2754 )
2508]) 2755])
2509if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then 2756if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
2510 AC_DEFINE(HAVE_CONTROL_IN_MSGHDR) 2757 AC_DEFINE(HAVE_CONTROL_IN_MSGHDR, 1,
2758 [Define if your system uses ancillary data style
2759 file descriptor passing])
2511fi 2760fi
2512 2761
2513AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [ 2762AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
@@ -2518,7 +2767,7 @@ AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
2518 ) 2767 )
2519]) 2768])
2520if test "x$ac_cv_libc_defines___progname" = "xyes" ; then 2769if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
2521 AC_DEFINE(HAVE___PROGNAME) 2770 AC_DEFINE(HAVE___PROGNAME, 1, [Define if libc defines __progname])
2522fi 2771fi
2523 2772
2524AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNCTION__, [ 2773AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNCTION__, [
@@ -2531,7 +2780,8 @@ AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNC
2531 ) 2780 )
2532]) 2781])
2533if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then 2782if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
2534 AC_DEFINE(HAVE___FUNCTION__) 2783 AC_DEFINE(HAVE___FUNCTION__, 1,
2784 [Define if compiler implements __FUNCTION__])
2535fi 2785fi
2536 2786
2537AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__, [ 2787AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__, [
@@ -2544,7 +2794,33 @@ AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__,
2544 ) 2794 )
2545]) 2795])
2546if test "x$ac_cv_cc_implements___func__" = "xyes" ; then 2796if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
2547 AC_DEFINE(HAVE___func__) 2797 AC_DEFINE(HAVE___func__, 1, [Define if compiler implements __func__])
2798fi
2799
2800AC_CACHE_CHECK([whether va_copy exists], ac_cv_have_va_copy, [
2801 AC_TRY_LINK(
2802 [#include <stdarg.h>
2803 va_list x,y;],
2804 [va_copy(x,y);],
2805 [ ac_cv_have_va_copy="yes" ],
2806 [ ac_cv_have_va_copy="no" ]
2807 )
2808])
2809if test "x$ac_cv_have_va_copy" = "xyes" ; then
2810 AC_DEFINE(HAVE_VA_COPY, 1, [Define if va_copy exists])
2811fi
2812
2813AC_CACHE_CHECK([whether __va_copy exists], ac_cv_have___va_copy, [
2814 AC_TRY_LINK(
2815 [#include <stdarg.h>
2816 va_list x,y;],
2817 [__va_copy(x,y);],
2818 [ ac_cv_have___va_copy="yes" ],
2819 [ ac_cv_have___va_copy="no" ]
2820 )
2821])
2822if test "x$ac_cv_have___va_copy" = "xyes" ; then
2823 AC_DEFINE(HAVE___VA_COPY, 1, [Define if __va_copy exists])
2548fi 2824fi
2549 2825
2550AC_CACHE_CHECK([whether getopt has optreset support], 2826AC_CACHE_CHECK([whether getopt has optreset support],
@@ -2559,7 +2835,8 @@ AC_CACHE_CHECK([whether getopt has optreset support],
2559 ) 2835 )
2560]) 2836])
2561if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then 2837if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
2562 AC_DEFINE(HAVE_GETOPT_OPTRESET) 2838 AC_DEFINE(HAVE_GETOPT_OPTRESET, 1,
2839 [Define if your getopt(3) defines and uses optreset])
2563fi 2840fi
2564 2841
2565AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [ 2842AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
@@ -2570,7 +2847,8 @@ AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
2570 ) 2847 )
2571]) 2848])
2572if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then 2849if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
2573 AC_DEFINE(HAVE_SYS_ERRLIST) 2850 AC_DEFINE(HAVE_SYS_ERRLIST, 1,
2851 [Define if your system defines sys_errlist[]])
2574fi 2852fi
2575 2853
2576 2854
@@ -2582,7 +2860,7 @@ AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [
2582 ) 2860 )
2583]) 2861])
2584if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then 2862if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
2585 AC_DEFINE(HAVE_SYS_NERR) 2863 AC_DEFINE(HAVE_SYS_NERR, 1, [Define if your system defines sys_nerr])
2586fi 2864fi
2587 2865
2588SCARD_MSG="no" 2866SCARD_MSG="no"
@@ -2609,8 +2887,11 @@ AC_ARG_WITH(sectok,
2609 if test "$ac_cv_lib_sectok_sectok_open" != yes; then 2887 if test "$ac_cv_lib_sectok_sectok_open" != yes; then
2610 AC_MSG_ERROR(Can't find libsectok) 2888 AC_MSG_ERROR(Can't find libsectok)
2611 fi 2889 fi
2612 AC_DEFINE(SMARTCARD) 2890 AC_DEFINE(SMARTCARD, 1,
2613 AC_DEFINE(USE_SECTOK) 2891 [Define if you want smartcard support])
2892 AC_DEFINE(USE_SECTOK, 1,
2893 [Define if you want smartcard support
2894 using sectok])
2614 SCARD_MSG="yes, using sectok" 2895 SCARD_MSG="yes, using sectok"
2615 fi 2896 fi
2616 ] 2897 ]
@@ -2619,7 +2900,7 @@ AC_ARG_WITH(sectok,
2619# Check whether user wants OpenSC support 2900# Check whether user wants OpenSC support
2620OPENSC_CONFIG="no" 2901OPENSC_CONFIG="no"
2621AC_ARG_WITH(opensc, 2902AC_ARG_WITH(opensc,
2622 [--with-opensc[[=PFX]] Enable smartcard support using OpenSC (optionally in PATH)], 2903 [ --with-opensc[[=PFX]] Enable smartcard support using OpenSC (optionally in PATH)],
2623 [ 2904 [
2624 if test "x$withval" != "xno" ; then 2905 if test "x$withval" != "xno" ; then
2625 if test "x$withval" != "xyes" ; then 2906 if test "x$withval" != "xyes" ; then
@@ -2633,7 +2914,9 @@ AC_ARG_WITH(opensc,
2633 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS" 2914 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS"
2634 LDFLAGS="$LDFLAGS $LIBOPENSC_LIBS" 2915 LDFLAGS="$LDFLAGS $LIBOPENSC_LIBS"
2635 AC_DEFINE(SMARTCARD) 2916 AC_DEFINE(SMARTCARD)
2636 AC_DEFINE(USE_OPENSC) 2917 AC_DEFINE(USE_OPENSC, 1,
2918 [Define if you want smartcard support
2919 using OpenSC])
2637 SCARD_MSG="yes, using OpenSC" 2920 SCARD_MSG="yes, using OpenSC"
2638 fi 2921 fi
2639 fi 2922 fi
@@ -2642,7 +2925,8 @@ AC_ARG_WITH(opensc,
2642 2925
2643# Check libraries needed by DNS fingerprint support 2926# Check libraries needed by DNS fingerprint support
2644AC_SEARCH_LIBS(getrrsetbyname, resolv, 2927AC_SEARCH_LIBS(getrrsetbyname, resolv,
2645 [AC_DEFINE(HAVE_GETRRSETBYNAME)], 2928 [AC_DEFINE(HAVE_GETRRSETBYNAME, 1,
2929 [Define if getrrsetbyname() exists])],
2646 [ 2930 [
2647 # Needed by our getrrsetbyname() 2931 # Needed by our getrrsetbyname()
2648 AC_SEARCH_LIBS(res_query, resolv) 2932 AC_SEARCH_LIBS(res_query, resolv)
@@ -2671,7 +2955,8 @@ int main()
2671 [#include <sys/types.h> 2955 [#include <sys/types.h>
2672 #include <arpa/nameser.h>]) 2956 #include <arpa/nameser.h>])
2673 AC_CHECK_MEMBER(HEADER.ad, 2957 AC_CHECK_MEMBER(HEADER.ad,
2674 [AC_DEFINE(HAVE_HEADER_AD)],, 2958 [AC_DEFINE(HAVE_HEADER_AD, 1,
2959 [Define if HEADER.ad exists in arpa/nameser.h])],,
2675 [#include <arpa/nameser.h>]) 2960 [#include <arpa/nameser.h>])
2676 ]) 2961 ])
2677 2962
@@ -2698,7 +2983,7 @@ AC_ARG_WITH(kerberos5,
2698 KRB5ROOT=${withval} 2983 KRB5ROOT=${withval}
2699 fi 2984 fi
2700 2985
2701 AC_DEFINE(KRB5) 2986 AC_DEFINE(KRB5, 1, [Define if you want Kerberos 5 support])
2702 KRB5_MSG="yes" 2987 KRB5_MSG="yes"
2703 2988
2704 AC_MSG_CHECKING(for krb5-config) 2989 AC_MSG_CHECKING(for krb5-config)
@@ -2709,7 +2994,9 @@ AC_ARG_WITH(kerberos5,
2709 AC_MSG_CHECKING(for gssapi support) 2994 AC_MSG_CHECKING(for gssapi support)
2710 if $KRB5CONF | grep gssapi >/dev/null ; then 2995 if $KRB5CONF | grep gssapi >/dev/null ; then
2711 AC_MSG_RESULT(yes) 2996 AC_MSG_RESULT(yes)
2712 AC_DEFINE(GSSAPI) 2997 AC_DEFINE(GSSAPI, 1,
2998 [Define this if you want GSSAPI
2999 support in the version 2 protocol])
2713 k5confopts=gssapi 3000 k5confopts=gssapi
2714 else 3001 else
2715 AC_MSG_RESULT(no) 3002 AC_MSG_RESULT(no)
@@ -2722,7 +3009,9 @@ AC_ARG_WITH(kerberos5,
2722 AC_TRY_COMPILE([ #include <krb5.h> ], 3009 AC_TRY_COMPILE([ #include <krb5.h> ],
2723 [ char *tmp = heimdal_version; ], 3010 [ char *tmp = heimdal_version; ],
2724 [ AC_MSG_RESULT(yes) 3011 [ AC_MSG_RESULT(yes)
2725 AC_DEFINE(HEIMDAL) ], 3012 AC_DEFINE(HEIMDAL, 1,
3013 [Define this if you are using the
3014 Heimdal version of Kerberos V5]) ],
2726 AC_MSG_RESULT(no) 3015 AC_MSG_RESULT(no)
2727 ) 3016 )
2728 else 3017 else
@@ -2777,14 +3066,15 @@ AC_ARG_WITH(kerberos5,
2777 if test ! -z "$blibpath" ; then 3066 if test ! -z "$blibpath" ; then
2778 blibpath="$blibpath:${KRB5ROOT}/lib" 3067 blibpath="$blibpath:${KRB5ROOT}/lib"
2779 fi 3068 fi
2780 fi
2781 3069
2782 AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h) 3070 AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h)
2783 AC_CHECK_HEADERS(gssapi_krb5.h gssapi/gssapi_krb5.h) 3071 AC_CHECK_HEADERS(gssapi_krb5.h gssapi/gssapi_krb5.h)
2784 AC_CHECK_HEADERS(gssapi_generic.h gssapi/gssapi_generic.h) 3072 AC_CHECK_HEADERS(gssapi_generic.h gssapi/gssapi_generic.h)
2785 3073
2786 LIBS="$LIBS $K5LIBS" 3074 LIBS="$LIBS $K5LIBS"
2787 AC_SEARCH_LIBS(k_hasafs, kafs, AC_DEFINE(USE_AFS)) 3075 AC_SEARCH_LIBS(k_hasafs, kafs, AC_DEFINE(USE_AFS, 1,
3076 [Define this if you want to use libkafs' AFS support]))
3077 fi
2788 ] 3078 ]
2789) 3079)
2790 3080
@@ -2838,7 +3128,8 @@ if test -z "$xauth_path" ; then
2838 XAUTH_PATH="undefined" 3128 XAUTH_PATH="undefined"
2839 AC_SUBST(XAUTH_PATH) 3129 AC_SUBST(XAUTH_PATH)
2840else 3130else
2841 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path") 3131 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path",
3132 [Define if xauth is found in your path])
2842 XAUTH_PATH=$xauth_path 3133 XAUTH_PATH=$xauth_path
2843 AC_SUBST(XAUTH_PATH) 3134 AC_SUBST(XAUTH_PATH)
2844fi 3135fi
@@ -2846,7 +3137,8 @@ fi
2846# Check for mail directory (last resort if we cannot get it from headers) 3137# Check for mail directory (last resort if we cannot get it from headers)
2847if test ! -z "$MAIL" ; then 3138if test ! -z "$MAIL" ; then
2848 maildir=`dirname $MAIL` 3139 maildir=`dirname $MAIL`
2849 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir") 3140 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir",
3141 [Set this to your mail directory if you don't have maillock.h])
2850fi 3142fi
2851 3143
2852if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; then 3144if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; then
@@ -2857,7 +3149,8 @@ if test -z "$no_dev_ptmx" ; then
2857 if test "x$disable_ptmx_check" != "xyes" ; then 3149 if test "x$disable_ptmx_check" != "xyes" ; then
2858 AC_CHECK_FILE("/dev/ptmx", 3150 AC_CHECK_FILE("/dev/ptmx",
2859 [ 3151 [
2860 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX) 3152 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX, 1,
3153 [Define if you have /dev/ptmx])
2861 have_dev_ptmx=1 3154 have_dev_ptmx=1
2862 ] 3155 ]
2863 ) 3156 )
@@ -2867,7 +3160,8 @@ fi
2867if test ! -z "$cross_compiling" && test "x$cross_compiling" != "xyes"; then 3160if test ! -z "$cross_compiling" && test "x$cross_compiling" != "xyes"; then
2868 AC_CHECK_FILE("/dev/ptc", 3161 AC_CHECK_FILE("/dev/ptc",
2869 [ 3162 [
2870 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC) 3163 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC, 1,
3164 [Define if you have /dev/ptc])
2871 have_dev_ptc=1 3165 have_dev_ptc=1
2872 ] 3166 ]
2873 ) 3167 )
@@ -2914,7 +3208,8 @@ AC_ARG_WITH(md5-passwords,
2914 [ --with-md5-passwords Enable use of MD5 passwords], 3208 [ --with-md5-passwords Enable use of MD5 passwords],
2915 [ 3209 [
2916 if test "x$withval" != "xno" ; then 3210 if test "x$withval" != "xno" ; then
2917 AC_DEFINE(HAVE_MD5_PASSWORDS) 3211 AC_DEFINE(HAVE_MD5_PASSWORDS, 1,
3212 [Define if you want to allow MD5 passwords])
2918 MD5_MSG="yes" 3213 MD5_MSG="yes"
2919 fi 3214 fi
2920 ] 3215 ]
@@ -2944,7 +3239,8 @@ if test -z "$disable_shadow" ; then
2944 3239
2945 if test "x$sp_expire_available" = "xyes" ; then 3240 if test "x$sp_expire_available" = "xyes" ; then
2946 AC_MSG_RESULT(yes) 3241 AC_MSG_RESULT(yes)
2947 AC_DEFINE(HAS_SHADOW_EXPIRE) 3242 AC_DEFINE(HAS_SHADOW_EXPIRE, 1,
3243 [Define if you want to use shadow password expire field])
2948 else 3244 else
2949 AC_MSG_RESULT(no) 3245 AC_MSG_RESULT(no)
2950 fi 3246 fi
@@ -2953,7 +3249,9 @@ fi
2953# Use ip address instead of hostname in $DISPLAY 3249# Use ip address instead of hostname in $DISPLAY
2954if test ! -z "$IPADDR_IN_DISPLAY" ; then 3250if test ! -z "$IPADDR_IN_DISPLAY" ; then
2955 DISPLAY_HACK_MSG="yes" 3251 DISPLAY_HACK_MSG="yes"
2956 AC_DEFINE(IPADDR_IN_DISPLAY) 3252 AC_DEFINE(IPADDR_IN_DISPLAY, 1,
3253 [Define if you need to use IP address
3254 instead of hostname in $DISPLAY])
2957else 3255else
2958 DISPLAY_HACK_MSG="no" 3256 DISPLAY_HACK_MSG="no"
2959 AC_ARG_WITH(ipaddr-display, 3257 AC_ARG_WITH(ipaddr-display,
@@ -2976,17 +3274,21 @@ AC_ARG_ENABLE(etc-default-login,
2976 else 3274 else
2977 etc_default_login=yes 3275 etc_default_login=yes
2978 fi ], 3276 fi ],
2979 [ etc_default_login=yes ] 3277 [ if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes";
3278 then
3279 AC_MSG_WARN([cross compiling: not checking /etc/default/login])
3280 etc_default_login=no
3281 else
3282 etc_default_login=yes
3283 fi ]
2980) 3284)
2981 3285
2982if test "x$etc_default_login" != "xno"; then 3286if test "x$etc_default_login" != "xno"; then
2983 AC_CHECK_FILE("/etc/default/login", 3287 AC_CHECK_FILE("/etc/default/login",
2984 [ external_path_file=/etc/default/login ]) 3288 [ external_path_file=/etc/default/login ])
2985 if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; 3289 if test "x$external_path_file" = "x/etc/default/login"; then
2986 then 3290 AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN, 1,
2987 AC_MSG_WARN([cross compiling: Disabling /etc/default/login test]) 3291 [Define if your system has /etc/default/login])
2988 elif test "x$external_path_file" = "x/etc/default/login"; then
2989 AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN)
2990 fi 3292 fi
2991fi 3293fi
2992 3294
@@ -3023,8 +3325,8 @@ $external_path_file .])
3023If PATH is defined in $external_path_file, ensure the path to scp is included, 3325If PATH is defined in $external_path_file, ensure the path to scp is included,
3024otherwise scp will not work.]) 3326otherwise scp will not work.])
3025 fi 3327 fi
3026 AC_TRY_RUN( 3328 AC_RUN_IFELSE(
3027 [ 3329 [AC_LANG_SOURCE([[
3028/* find out what STDPATH is */ 3330/* find out what STDPATH is */
3029#include <stdio.h> 3331#include <stdio.h>
3030#ifdef HAVE_PATHS_H 3332#ifdef HAVE_PATHS_H
@@ -3056,7 +3358,8 @@ main()
3056 3358
3057 exit(0); 3359 exit(0);
3058} 3360}
3059 ], [ user_path=`cat conftest.stdpath` ], 3361 ]])],
3362 [ user_path=`cat conftest.stdpath` ],
3060 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ], 3363 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ],
3061 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ] 3364 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ]
3062 ) 3365 )
@@ -3079,7 +3382,7 @@ main()
3079 fi ] 3382 fi ]
3080) 3383)
3081if test "x$external_path_file" != "x/etc/login.conf" ; then 3384if test "x$external_path_file" != "x/etc/login.conf" ; then
3082 AC_DEFINE_UNQUOTED(USER_PATH, "$user_path") 3385 AC_DEFINE_UNQUOTED(USER_PATH, "$user_path", [Specify default $PATH])
3083 AC_SUBST(user_path) 3386 AC_SUBST(user_path)
3084fi 3387fi
3085 3388
@@ -3089,7 +3392,9 @@ AC_ARG_WITH(superuser-path,
3089 [ 3392 [
3090 if test -n "$withval" && test "x$withval" != "xno" && \ 3393 if test -n "$withval" && test "x$withval" != "xno" && \
3091 test "x${withval}" != "xyes"; then 3394 test "x${withval}" != "xyes"; then
3092 AC_DEFINE_UNQUOTED(SUPERUSER_PATH, "$withval") 3395 AC_DEFINE_UNQUOTED(SUPERUSER_PATH, "$withval",
3396 [Define if you want a different $PATH
3397 for the superuser])
3093 superuser_path=$withval 3398 superuser_path=$withval
3094 fi 3399 fi
3095 ] 3400 ]
@@ -3103,7 +3408,9 @@ AC_ARG_WITH(4in6,
3103 [ 3408 [
3104 if test "x$withval" != "xno" ; then 3409 if test "x$withval" != "xno" ; then
3105 AC_MSG_RESULT(yes) 3410 AC_MSG_RESULT(yes)
3106 AC_DEFINE(IPV4_IN_IPV6) 3411 AC_DEFINE(IPV4_IN_IPV6, 1,
3412 [Detect IPv4 in IPv6 mapped addresses
3413 and treat as IPv4])
3107 IPV4_IN6_HACK_MSG="yes" 3414 IPV4_IN6_HACK_MSG="yes"
3108 else 3415 else
3109 AC_MSG_RESULT(no) 3416 AC_MSG_RESULT(no)
@@ -3125,7 +3432,8 @@ AC_ARG_WITH(bsd-auth,
3125 [ --with-bsd-auth Enable BSD auth support], 3432 [ --with-bsd-auth Enable BSD auth support],
3126 [ 3433 [
3127 if test "x$withval" != "xno" ; then 3434 if test "x$withval" != "xno" ; then
3128 AC_DEFINE(BSD_AUTH) 3435 AC_DEFINE(BSD_AUTH, 1,
3436 [Define if you have BSD auth support])
3129 BSD_AUTH_MSG=yes 3437 BSD_AUTH_MSG=yes
3130 fi 3438 fi
3131 ] 3439 ]
@@ -3154,7 +3462,7 @@ AC_ARG_WITH(pid-dir,
3154 ] 3462 ]
3155) 3463)
3156 3464
3157AC_DEFINE_UNQUOTED(_PATH_SSH_PIDDIR, "$piddir") 3465AC_DEFINE_UNQUOTED(_PATH_SSH_PIDDIR, "$piddir", [Specify location of ssh.pid])
3158AC_SUBST(piddir) 3466AC_SUBST(piddir)
3159 3467
3160dnl allow user to disable some login recording features 3468dnl allow user to disable some login recording features
@@ -3178,7 +3486,8 @@ AC_ARG_ENABLE(utmpx,
3178 [ --disable-utmpx disable use of utmpx even if detected [no]], 3486 [ --disable-utmpx disable use of utmpx even if detected [no]],
3179 [ 3487 [
3180 if test "x$enableval" = "xno" ; then 3488 if test "x$enableval" = "xno" ; then
3181 AC_DEFINE(DISABLE_UTMPX) 3489 AC_DEFINE(DISABLE_UTMPX, 1,
3490 [Define if you don't want to use utmpx])
3182 fi 3491 fi
3183 ] 3492 ]
3184) 3493)
@@ -3194,7 +3503,8 @@ AC_ARG_ENABLE(wtmpx,
3194 [ --disable-wtmpx disable use of wtmpx even if detected [no]], 3503 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
3195 [ 3504 [
3196 if test "x$enableval" = "xno" ; then 3505 if test "x$enableval" = "xno" ; then
3197 AC_DEFINE(DISABLE_WTMPX) 3506 AC_DEFINE(DISABLE_WTMPX, 1,
3507 [Define if you don't want to use wtmpx])
3198 fi 3508 fi
3199 ] 3509 ]
3200) 3510)
@@ -3210,7 +3520,9 @@ AC_ARG_ENABLE(pututline,
3210 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]], 3520 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
3211 [ 3521 [
3212 if test "x$enableval" = "xno" ; then 3522 if test "x$enableval" = "xno" ; then
3213 AC_DEFINE(DISABLE_PUTUTLINE) 3523 AC_DEFINE(DISABLE_PUTUTLINE, 1,
3524 [Define if you don't want to use pututline()
3525 etc. to write [uw]tmp])
3214 fi 3526 fi
3215 ] 3527 ]
3216) 3528)
@@ -3218,7 +3530,9 @@ AC_ARG_ENABLE(pututxline,
3218 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]], 3530 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
3219 [ 3531 [
3220 if test "x$enableval" = "xno" ; then 3532 if test "x$enableval" = "xno" ; then
3221 AC_DEFINE(DISABLE_PUTUTXLINE) 3533 AC_DEFINE(DISABLE_PUTUTXLINE, 1,
3534 [Define if you don't want to use pututxline()
3535 etc. to write [uw]tmpx])
3222 fi 3536 fi
3223 ] 3537 ]
3224) 3538)
@@ -3293,7 +3607,8 @@ if test -z "$conf_lastlog_location"; then
3293fi 3607fi
3294 3608
3295if test -n "$conf_lastlog_location"; then 3609if test -n "$conf_lastlog_location"; then
3296 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location") 3610 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location",
3611 [Define if you want to specify the path to your lastlog file])
3297fi 3612fi
3298 3613
3299dnl utmp detection 3614dnl utmp detection
@@ -3323,7 +3638,8 @@ if test -z "$conf_utmp_location"; then
3323 fi 3638 fi
3324fi 3639fi
3325if test -n "$conf_utmp_location"; then 3640if test -n "$conf_utmp_location"; then
3326 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location") 3641 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location",
3642 [Define if you want to specify the path to your utmp file])
3327fi 3643fi
3328 3644
3329dnl wtmp detection 3645dnl wtmp detection
@@ -3353,7 +3669,8 @@ if test -z "$conf_wtmp_location"; then
3353 fi 3669 fi
3354fi 3670fi
3355if test -n "$conf_wtmp_location"; then 3671if test -n "$conf_wtmp_location"; then
3356 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location") 3672 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location",
3673 [Define if you want to specify the path to your wtmp file])
3357fi 3674fi
3358 3675
3359 3676
@@ -3381,7 +3698,8 @@ if test -z "$conf_utmpx_location"; then
3381 AC_DEFINE(DISABLE_UTMPX) 3698 AC_DEFINE(DISABLE_UTMPX)
3382 fi 3699 fi
3383else 3700else
3384 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location") 3701 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location",
3702 [Define if you want to specify the path to your utmpx file])
3385fi 3703fi
3386 3704
3387dnl wtmpx detection 3705dnl wtmpx detection
@@ -3406,7 +3724,8 @@ if test -z "$conf_wtmpx_location"; then
3406 AC_DEFINE(DISABLE_WTMPX) 3724 AC_DEFINE(DISABLE_WTMPX)
3407 fi 3725 fi
3408else 3726else
3409 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location") 3727 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location",
3728 [Define if you want to specify the path to your wtmpx file])
3410fi 3729fi
3411 3730
3412 3731