summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2009-12-29 21:34:25 +0000
committerColin Watson <cjwatson@debian.org>2009-12-29 21:34:25 +0000
commitfa585019a79ebcb4e0202b1c33f87ff1c5c9ce1c (patch)
tree28fc9a13eaab935e4de055b561b333d67387a934 /configure.ac
parent04942aa41fa94ec6f2c3ce1d348f600f31bb7c78 (diff)
parent3e2e0ac10674d77618c4c7339e18b83ced247492 (diff)
import openssh-4.3p2-gsskex-20060223.patch
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac893
1 files changed, 607 insertions, 286 deletions
diff --git a/configure.ac b/configure.ac
index 6e36aa22b..cfaaca92d 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,44 +224,50 @@ 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,
269 AC_MSG_CHECKING(if we have the Security Authorization Session API) 233 [Define if your resolver libs need this for getrrsetbyname])
270 AC_TRY_COMPILE([#include <Security/AuthSession.h>], 234 AC_MSG_CHECKING(if we have the Security Authorization Session API)
271 [SessionCreate(0, 0);], 235 AC_TRY_COMPILE([#include <Security/AuthSession.h>],
272 [ac_cv_use_security_session_api="yes" 236 [SessionCreate(0, 0);],
273 AC_DEFINE(USE_SECURITY_SESSION_API) 237 [ac_cv_use_security_session_api="yes"
274 LIBS="$LIBS -framework Security" 238 AC_DEFINE(USE_SECURITY_SESSION_API, 1,
275 AC_MSG_RESULT(yes)], 239 [platform has the Security Authorization Session API])
276 [ac_cv_use_security_session_api="no" 240 LIBS="$LIBS -framework Security"
277 AC_MSG_RESULT(no)]) 241 AC_MSG_RESULT(yes)],
278 AC_MSG_CHECKING(if we have an in-memory credentials cache) 242 [ac_cv_use_security_session_api="no"
279 AC_TRY_COMPILE( 243 AC_MSG_RESULT(no)])
280 [#include <Kerberos/Kerberos.h>], 244 AC_MSG_CHECKING(if we have an in-memory credentials cache)
281 [cc_context_t c; 245 AC_TRY_COMPILE(
282 (void) cc_initialize (&c, 0, NULL, NULL);], 246 [#include <Kerberos/Kerberos.h>],
283 [AC_DEFINE(USE_CCAPI) 247 [cc_context_t c;
284 LIBS="$LIBS -framework Security" 248 (void) cc_initialize (&c, 0, NULL, NULL);],
285 AC_MSG_RESULT(yes) 249 [AC_DEFINE(USE_CCAPI, 1,
286 if test "x$ac_cv_use_security_session_api" = "xno"; then 250 [platform uses an in-memory credentials cache])
287 AC_MSG_ERROR(*** Need a security framework to use the credentials cache API ***) 251 LIBS="$LIBS -framework Security"
288 fi], 252 AC_MSG_RESULT(yes)
289 [AC_MSG_RESULT(no)] 253 if test "x$ac_cv_use_security_session_api" = "xno"; then
290 ) 254 AC_MSG_ERROR(*** Need a security framework to use the credentials cache API ***)
255 fi],
256 [AC_MSG_RESULT(no)]
257 )
291 ;; 258 ;;
292*-*-hpux*) 259*-*-hpux*)
293 # first we define all of the options common to all HP-UX releases 260 # first we define all of the options common to all HP-UX releases
294 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1" 261 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
295 IPADDR_IN_DISPLAY=yes 262 IPADDR_IN_DISPLAY=yes
296 AC_DEFINE(USE_PIPES) 263 AC_DEFINE(USE_PIPES)
297 AC_DEFINE(LOGIN_NO_ENDOPT) 264 AC_DEFINE(LOGIN_NO_ENDOPT, 1,
265 [Define if your login program cannot handle end of options ("--")])
298 AC_DEFINE(LOGIN_NEEDS_UTMPX) 266 AC_DEFINE(LOGIN_NEEDS_UTMPX)
299 AC_DEFINE(LOCKED_PASSWD_STRING, "*") 267 AC_DEFINE(LOCKED_PASSWD_STRING, "*",
268 [String used in /etc/passwd to denote locked account])
300 AC_DEFINE(SPT_TYPE,SPT_PSTAT) 269 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
270 MAIL="/var/mail/username"
301 LIBS="$LIBS -lsec" 271 LIBS="$LIBS -lsec"
302 AC_CHECK_LIB(xnet, t_error, , 272 AC_CHECK_LIB(xnet, t_error, ,
303 AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])) 273 AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***]))
@@ -310,8 +280,12 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
310 fi 280 fi
311 ;; 281 ;;
312 *-*-hpux11*) 282 *-*-hpux11*)
313 AC_DEFINE(PAM_SUN_CODEBASE) 283 AC_DEFINE(PAM_SUN_CODEBASE, 1,
314 AC_DEFINE(DISABLE_UTMP) 284 [Define if you are using Solaris-derived PAM which
285 passes pam_messages to the conversation function
286 with an extra level of indirection])
287 AC_DEFINE(DISABLE_UTMP, 1,
288 [Define if you don't want to use utmp])
315 AC_DEFINE(USE_BTMP, 1, [Use btmp to log bad logins]) 289 AC_DEFINE(USE_BTMP, 1, [Use btmp to log bad logins])
316 check_for_hpux_broken_getaddrinfo=1 290 check_for_hpux_broken_getaddrinfo=1
317 check_for_conflicting_getspnam=1 291 check_for_conflicting_getspnam=1
@@ -321,7 +295,9 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
321 # lastly, we define options specific to minor releases 295 # lastly, we define options specific to minor releases
322 case "$host" in 296 case "$host" in
323 *-*-hpux10.26) 297 *-*-hpux10.26)
324 AC_DEFINE(HAVE_SECUREWARE) 298 AC_DEFINE(HAVE_SECUREWARE, 1,
299 [Define if you have SecureWare-based
300 protected password database])
325 disable_ptmx_check=yes 301 disable_ptmx_check=yes
326 LIBS="$LIBS -lsecpw" 302 LIBS="$LIBS -lsecpw"
327 ;; 303 ;;
@@ -329,24 +305,33 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
329 ;; 305 ;;
330*-*-irix5*) 306*-*-irix5*)
331 PATH="$PATH:/usr/etc" 307 PATH="$PATH:/usr/etc"
332 AC_DEFINE(BROKEN_INET_NTOA) 308 AC_DEFINE(BROKEN_INET_NTOA, 1,
309 [Define if you system's inet_ntoa is busted
310 (e.g. Irix gcc issue)])
333 AC_DEFINE(SETEUID_BREAKS_SETUID) 311 AC_DEFINE(SETEUID_BREAKS_SETUID)
334 AC_DEFINE(BROKEN_SETREUID) 312 AC_DEFINE(BROKEN_SETREUID)
335 AC_DEFINE(BROKEN_SETREGID) 313 AC_DEFINE(BROKEN_SETREGID)
336 AC_DEFINE(WITH_ABBREV_NO_TTY) 314 AC_DEFINE(WITH_ABBREV_NO_TTY, 1,
315 [Define if you shouldn't strip 'tty' from your
316 ttyname in [uw]tmp])
337 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*") 317 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
338 ;; 318 ;;
339*-*-irix6*) 319*-*-irix6*)
340 PATH="$PATH:/usr/etc" 320 PATH="$PATH:/usr/etc"
341 AC_DEFINE(WITH_IRIX_ARRAY) 321 AC_DEFINE(WITH_IRIX_ARRAY, 1,
342 AC_DEFINE(WITH_IRIX_PROJECT) 322 [Define if you have/want arrays
343 AC_DEFINE(WITH_IRIX_AUDIT) 323 (cluster-wide session managment, not C arrays)])
344 AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)]) 324 AC_DEFINE(WITH_IRIX_PROJECT, 1,
325 [Define if you want IRIX project management])
326 AC_DEFINE(WITH_IRIX_AUDIT, 1,
327 [Define if you want IRIX audit trails])
328 AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS, 1,
329 [Define if you want IRIX kernel jobs])])
345 AC_DEFINE(BROKEN_INET_NTOA) 330 AC_DEFINE(BROKEN_INET_NTOA)
346 AC_DEFINE(SETEUID_BREAKS_SETUID) 331 AC_DEFINE(SETEUID_BREAKS_SETUID)
347 AC_DEFINE(BROKEN_SETREUID) 332 AC_DEFINE(BROKEN_SETREUID)
348 AC_DEFINE(BROKEN_SETREGID) 333 AC_DEFINE(BROKEN_SETREGID)
349 AC_DEFINE(BROKEN_UPDWTMPX) 334 AC_DEFINE(BROKEN_UPDWTMPX, 1, [updwtmpx is broken (if present)])
350 AC_DEFINE(WITH_ABBREV_NO_TTY) 335 AC_DEFINE(WITH_ABBREV_NO_TTY)
351 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*") 336 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
352 ;; 337 ;;
@@ -354,22 +339,37 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
354 no_dev_ptmx=1 339 no_dev_ptmx=1
355 check_for_libcrypt_later=1 340 check_for_libcrypt_later=1
356 check_for_openpty_ctty_bug=1 341 check_for_openpty_ctty_bug=1
357 AC_DEFINE(DONT_TRY_OTHER_AF) 342 AC_DEFINE(DONT_TRY_OTHER_AF, 1, [Workaround more Linux IPv6 quirks])
358 AC_DEFINE(PAM_TTY_KLUDGE) 343 AC_DEFINE(PAM_TTY_KLUDGE, 1,
359 AC_DEFINE(LOCKED_PASSWD_PREFIX, "!") 344 [Work around problematic Linux PAM modules handling of PAM_TTY])
345 AC_DEFINE(LOCKED_PASSWD_PREFIX, "!",
346 [String used in /etc/passwd to denote locked account])
360 AC_DEFINE(SPT_TYPE,SPT_REUSEARGV) 347 AC_DEFINE(SPT_TYPE,SPT_REUSEARGV)
361 AC_DEFINE(LINK_OPNOTSUPP_ERRNO, EPERM) 348 AC_DEFINE(LINK_OPNOTSUPP_ERRNO, EPERM,
349 [Define to whatever link() returns for "not supported"
350 if it doesn't return EOPNOTSUPP.])
362 AC_DEFINE(_PATH_BTMP, "/var/log/btmp", [log for bad login attempts]) 351 AC_DEFINE(_PATH_BTMP, "/var/log/btmp", [log for bad login attempts])
363 AC_DEFINE(USE_BTMP, 1, [Use btmp to log bad logins]) 352 AC_DEFINE(USE_BTMP)
364 inet6_default_4in6=yes 353 inet6_default_4in6=yes
365 case `uname -r` in 354 case `uname -r` in
366 1.*|2.0.*) 355 1.*|2.0.*)
367 AC_DEFINE(BROKEN_CMSG_TYPE) 356 AC_DEFINE(BROKEN_CMSG_TYPE, 1,
357 [Define if cmsg_type is not passed correctly])
368 ;; 358 ;;
369 esac 359 esac
360 # tun(4) forwarding compat code
361 AC_CHECK_HEADERS(linux/if_tun.h)
362 if test "x$ac_cv_header_linux_if_tun_h" = "xyes" ; then
363 AC_DEFINE(SSH_TUN_LINUX, 1,
364 [Open tunnel devices the Linux tun/tap way])
365 AC_DEFINE(SSH_TUN_COMPAT_AF, 1,
366 [Use tunnel device compatibility to OpenBSD])
367 AC_DEFINE(SSH_TUN_PREPEND_AF, 1,
368 [Prepend the address family to IP tunnel traffic])
369 fi
370 ;; 370 ;;
371mips-sony-bsd|mips-sony-newsos4) 371mips-sony-bsd|mips-sony-newsos4)
372 AC_DEFINE(NEED_SETPRGP, [], [Need setpgrp to acquire controlling tty]) 372 AC_DEFINE(NEED_SETPGRP, 1, [Need setpgrp to acquire controlling tty])
373 SONY=1 373 SONY=1
374 ;; 374 ;;
375*-*-netbsd*) 375*-*-netbsd*)
@@ -377,9 +377,18 @@ mips-sony-bsd|mips-sony-newsos4)
377 if test "x$withval" != "xno" ; then 377 if test "x$withval" != "xno" ; then
378 need_dash_r=1 378 need_dash_r=1
379 fi 379 fi
380 AC_DEFINE(SSH_TUN_FREEBSD, 1, [Open tunnel devices the FreeBSD way])
381 AC_CHECK_HEADER([net/if_tap.h], ,
382 AC_DEFINE(SSH_TUN_NO_L2, 1, [No layer 2 tunnel support]))
383 AC_DEFINE(SSH_TUN_PREPEND_AF, 1,
384 [Prepend the address family to IP tunnel traffic])
380 ;; 385 ;;
381*-*-freebsd*) 386*-*-freebsd*)
382 check_for_libcrypt_later=1 387 check_for_libcrypt_later=1
388 AC_DEFINE(LOCKED_PASSWD_PREFIX, "*LOCKED*", [Account locked with pw(1)])
389 AC_DEFINE(SSH_TUN_FREEBSD, 1, [Open tunnel devices the FreeBSD way])
390 AC_CHECK_HEADER([net/if_tap.h], ,
391 AC_DEFINE(SSH_TUN_NO_L2, 1, [No layer 2 tunnel support]))
383 ;; 392 ;;
384*-*-bsdi*) 393*-*-bsdi*)
385 AC_DEFINE(SETEUID_BREAKS_SETUID) 394 AC_DEFINE(SETEUID_BREAKS_SETUID)
@@ -391,13 +400,15 @@ mips-sony-bsd|mips-sony-newsos4)
391 conf_utmp_location=/etc/utmp 400 conf_utmp_location=/etc/utmp
392 conf_wtmp_location=/usr/adm/wtmp 401 conf_wtmp_location=/usr/adm/wtmp
393 MAIL=/usr/spool/mail 402 MAIL=/usr/spool/mail
394 AC_DEFINE(HAVE_NEXT) 403 AC_DEFINE(HAVE_NEXT, 1, [Define if you are on NeXT])
395 AC_DEFINE(BROKEN_REALPATH) 404 AC_DEFINE(BROKEN_REALPATH)
396 AC_DEFINE(USE_PIPES) 405 AC_DEFINE(USE_PIPES)
397 AC_DEFINE(BROKEN_SAVED_UIDS) 406 AC_DEFINE(BROKEN_SAVED_UIDS, 1, [Needed for NeXT])
398 ;; 407 ;;
399*-*-openbsd*) 408*-*-openbsd*)
400 AC_DEFINE(HAVE_ATTRIBUTE__SENTINEL__, 1, [OpenBSD's gcc has sentinel]) 409 AC_DEFINE(HAVE_ATTRIBUTE__SENTINEL__, 1, [OpenBSD's gcc has sentinel])
410 AC_DEFINE(HAVE_ATTRIBUTE__BOUNDED__, 1, [OpenBSD's gcc has bounded])
411 AC_DEFINE(SSH_TUN_OPENBSD, 1, [Open tunnel devices the OpenBSD way])
401 ;; 412 ;;
402*-*-solaris*) 413*-*-solaris*)
403 if test "x$withval" != "xno" ; then 414 if test "x$withval" != "xno" ; then
@@ -405,12 +416,18 @@ mips-sony-bsd|mips-sony-newsos4)
405 fi 416 fi
406 AC_DEFINE(PAM_SUN_CODEBASE) 417 AC_DEFINE(PAM_SUN_CODEBASE)
407 AC_DEFINE(LOGIN_NEEDS_UTMPX) 418 AC_DEFINE(LOGIN_NEEDS_UTMPX)
408 AC_DEFINE(LOGIN_NEEDS_TERM) 419 AC_DEFINE(LOGIN_NEEDS_TERM, 1,
420 [Some versions of /bin/login need the TERM supplied
421 on the commandline])
409 AC_DEFINE(PAM_TTY_KLUDGE) 422 AC_DEFINE(PAM_TTY_KLUDGE)
410 AC_DEFINE(SSHPAM_CHAUTHTOK_NEEDS_RUID) 423 AC_DEFINE(SSHPAM_CHAUTHTOK_NEEDS_RUID, 1,
424 [Define if pam_chauthtok wants real uid set
425 to the unpriv'ed user])
411 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*") 426 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
412 # Pushing STREAMS modules will cause sshd to acquire a controlling tty. 427 # Pushing STREAMS modules will cause sshd to acquire a controlling tty.
413 AC_DEFINE(SSHD_ACQUIRES_CTTY) 428 AC_DEFINE(SSHD_ACQUIRES_CTTY, 1,
429 [Define if sshd somehow reacquires a controlling TTY
430 after setsid()])
414 external_path_file=/etc/default/login 431 external_path_file=/etc/default/login
415 # hardwire lastlog location (can't detect it on some versions) 432 # hardwire lastlog location (can't detect it on some versions)
416 conf_lastlog_location="/var/adm/lastlog" 433 conf_lastlog_location="/var/adm/lastlog"
@@ -419,7 +436,8 @@ mips-sony-bsd|mips-sony-newsos4)
419 if test "$sol2ver" -ge 8; then 436 if test "$sol2ver" -ge 8; then
420 AC_MSG_RESULT(yes) 437 AC_MSG_RESULT(yes)
421 AC_DEFINE(DISABLE_UTMP) 438 AC_DEFINE(DISABLE_UTMP)
422 AC_DEFINE(DISABLE_WTMP) 439 AC_DEFINE(DISABLE_WTMP, 1,
440 [Define if you don't want to use wtmp])
423 else 441 else
424 AC_MSG_RESULT(no) 442 AC_MSG_RESULT(no)
425 fi 443 fi
@@ -444,8 +462,8 @@ mips-sony-bsd|mips-sony-newsos4)
444*-sni-sysv*) 462*-sni-sysv*)
445 # /usr/ucblib MUST NOT be searched on ReliantUNIX 463 # /usr/ucblib MUST NOT be searched on ReliantUNIX
446 AC_CHECK_LIB(dl, dlsym, ,) 464 AC_CHECK_LIB(dl, dlsym, ,)
447 # -lresolv needs to be at then end of LIBS or DNS lookups break 465 # -lresolv needs to be at the end of LIBS or DNS lookups break
448 AC_CHECK_LIB(res_query, resolv, [ LIBS="$LIBS -lresolv" ]) 466 AC_CHECK_LIB(resolv, res_query, [ LIBS="$LIBS -lresolv" ])
449 IPADDR_IN_DISPLAY=yes 467 IPADDR_IN_DISPLAY=yes
450 AC_DEFINE(USE_PIPES) 468 AC_DEFINE(USE_PIPES)
451 AC_DEFINE(IP_TOS_IS_BROKEN) 469 AC_DEFINE(IP_TOS_IS_BROKEN)
@@ -460,11 +478,13 @@ mips-sony-bsd|mips-sony-newsos4)
460 ;; 478 ;;
461# UnixWare 1.x, UnixWare 2.x, and others based on code from Univel. 479# UnixWare 1.x, UnixWare 2.x, and others based on code from Univel.
462*-*-sysv4.2*) 480*-*-sysv4.2*)
481 CFLAGS="$CFLAGS -Dva_list=_VA_LIST"
463 AC_DEFINE(USE_PIPES) 482 AC_DEFINE(USE_PIPES)
464 AC_DEFINE(SETEUID_BREAKS_SETUID) 483 AC_DEFINE(SETEUID_BREAKS_SETUID)
465 AC_DEFINE(BROKEN_SETREUID) 484 AC_DEFINE(BROKEN_SETREUID)
466 AC_DEFINE(BROKEN_SETREGID) 485 AC_DEFINE(BROKEN_SETREGID)
467 AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd]) 486 AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd])
487 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
468 ;; 488 ;;
469# UnixWare 7.x, OpenUNIX 8 489# UnixWare 7.x, OpenUNIX 8
470*-*-sysv5*) 490*-*-sysv5*)
@@ -474,11 +494,14 @@ mips-sony-bsd|mips-sony-newsos4)
474 AC_DEFINE(SETEUID_BREAKS_SETUID) 494 AC_DEFINE(SETEUID_BREAKS_SETUID)
475 AC_DEFINE(BROKEN_SETREUID) 495 AC_DEFINE(BROKEN_SETREUID)
476 AC_DEFINE(BROKEN_SETREGID) 496 AC_DEFINE(BROKEN_SETREGID)
477 AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd]) 497 AC_DEFINE(PASSWD_NEEDS_USERNAME)
478 case "$host" in 498 case "$host" in
479 *-*-sysv5SCO_SV*) # SCO OpenServer 6.x 499 *-*-sysv5SCO_SV*) # SCO OpenServer 6.x
480 TEST_SHELL=/u95/bin/sh 500 TEST_SHELL=/u95/bin/sh
481 AC_DEFINE(BROKEN_LIBIAF, 1, [ia_uinfo routines not supported by OS yet]) 501 AC_DEFINE(BROKEN_LIBIAF, 1,
502 [ia_uinfo routines not supported by OS yet])
503 ;;
504 *) AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
482 ;; 505 ;;
483 esac 506 esac
484 ;; 507 ;;
@@ -504,13 +527,14 @@ mips-sony-bsd|mips-sony-newsos4)
504 AC_DEFINE(BROKEN_SETREGID) 527 AC_DEFINE(BROKEN_SETREGID)
505 AC_DEFINE(WITH_ABBREV_NO_TTY) 528 AC_DEFINE(WITH_ABBREV_NO_TTY)
506 AC_DEFINE(BROKEN_UPDWTMPX) 529 AC_DEFINE(BROKEN_UPDWTMPX)
507 AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd]) 530 AC_DEFINE(PASSWD_NEEDS_USERNAME)
508 AC_CHECK_FUNCS(getluid setluid) 531 AC_CHECK_FUNCS(getluid setluid)
509 MANTYPE=man 532 MANTYPE=man
510 TEST_SHELL=ksh 533 TEST_SHELL=ksh
511 ;; 534 ;;
512*-*-unicosmk*) 535*-*-unicosmk*)
513 AC_DEFINE(NO_SSH_LASTLOG) 536 AC_DEFINE(NO_SSH_LASTLOG, 1,
537 [Define if you don't want to use lastlog in session.c])
514 AC_DEFINE(SETEUID_BREAKS_SETUID) 538 AC_DEFINE(SETEUID_BREAKS_SETUID)
515 AC_DEFINE(BROKEN_SETREUID) 539 AC_DEFINE(BROKEN_SETREUID)
516 AC_DEFINE(BROKEN_SETREGID) 540 AC_DEFINE(BROKEN_SETREGID)
@@ -557,13 +581,18 @@ mips-sony-bsd|mips-sony-newsos4)
557 if test -z "$no_osfsia" ; then 581 if test -z "$no_osfsia" ; then
558 if test -f /etc/sia/matrix.conf; then 582 if test -f /etc/sia/matrix.conf; then
559 AC_MSG_RESULT(yes) 583 AC_MSG_RESULT(yes)
560 AC_DEFINE(HAVE_OSF_SIA) 584 AC_DEFINE(HAVE_OSF_SIA, 1,
561 AC_DEFINE(DISABLE_LOGIN) 585 [Define if you have Digital Unix Security
586 Integration Architecture])
587 AC_DEFINE(DISABLE_LOGIN, 1,
588 [Define if you don't want to use your
589 system's login() call])
562 AC_DEFINE(DISABLE_FD_PASSING) 590 AC_DEFINE(DISABLE_FD_PASSING)
563 LIBS="$LIBS -lsecurity -ldb -lm -laud" 591 LIBS="$LIBS -lsecurity -ldb -lm -laud"
564 else 592 else
565 AC_MSG_RESULT(no) 593 AC_MSG_RESULT(no)
566 AC_DEFINE(LOCKED_PASSWD_SUBSTR, "Nologin") 594 AC_DEFINE(LOCKED_PASSWD_SUBSTR, "Nologin",
595 [String used in /etc/passwd to denote locked account])
567 fi 596 fi
568 fi 597 fi
569 AC_DEFINE(BROKEN_GETADDRINFO) 598 AC_DEFINE(BROKEN_GETADDRINFO)
@@ -572,24 +601,25 @@ mips-sony-bsd|mips-sony-newsos4)
572 AC_DEFINE(BROKEN_SETREGID) 601 AC_DEFINE(BROKEN_SETREGID)
573 ;; 602 ;;
574 603
575*-*-nto-qnx) 604*-*-nto-qnx*)
576 AC_DEFINE(USE_PIPES) 605 AC_DEFINE(USE_PIPES)
577 AC_DEFINE(NO_X11_UNIX_SOCKETS) 606 AC_DEFINE(NO_X11_UNIX_SOCKETS)
578 AC_DEFINE(MISSING_NFDBITS) 607 AC_DEFINE(MISSING_NFDBITS, 1, [Define on *nto-qnx systems])
579 AC_DEFINE(MISSING_HOWMANY) 608 AC_DEFINE(MISSING_HOWMANY, 1, [Define on *nto-qnx systems])
580 AC_DEFINE(MISSING_FD_MASK) 609 AC_DEFINE(MISSING_FD_MASK, 1, [Define on *nto-qnx systems])
610 AC_DEFINE(DISABLE_LASTLOG)
581 ;; 611 ;;
582 612
583*-*-ultrix*) 613*-*-ultrix*)
584 AC_DEFINE(BROKEN_GETGROUPS, [], [getgroups(0,NULL) will return -1]) 614 AC_DEFINE(BROKEN_GETGROUPS, 1, [getgroups(0,NULL) will return -1])
585 AC_DEFINE(BROKEN_MMAP, [], [Ultrix mmap can't map files]) 615 AC_DEFINE(BROKEN_MMAP, 1, [Ultrix mmap can't map files])
586 AC_DEFINE(NEED_SETPRGP, [], [Need setpgrp to acquire controlling tty]) 616 AC_DEFINE(NEED_SETPGRP)
587 AC_DEFINE(HAVE_SYS_SYSLOG_H, 1, [Force use of sys/syslog.h on Ultrix]) 617 AC_DEFINE(HAVE_SYS_SYSLOG_H, 1, [Force use of sys/syslog.h on Ultrix])
588 ;; 618 ;;
589 619
590*-*-lynxos) 620*-*-lynxos)
591 CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__" 621 CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"
592 AC_DEFINE(MISSING_HOWMANY) 622 AC_DEFINE(MISSING_HOWMANY)
593 AC_DEFINE(BROKEN_SETVBUF, 1, [LynxOS has broken setvbuf() implementation]) 623 AC_DEFINE(BROKEN_SETVBUF, 1, [LynxOS has broken setvbuf() implementation])
594 ;; 624 ;;
595esac 625esac
@@ -636,7 +666,7 @@ AC_ARG_WITH(Werror,
636 [ 666 [
637 if test -n "$withval" && test "x$withval" != "xno"; then 667 if test -n "$withval" && test "x$withval" != "xno"; then
638 werror_flags="-Werror" 668 werror_flags="-Werror"
639 if "x${withval}" != "xyes"; then 669 if test "x${withval}" != "xyes"; then
640 werror_flags="$withval" 670 werror_flags="$withval"
641 fi 671 fi
642 fi 672 fi
@@ -669,7 +699,6 @@ AC_CHECK_HEADERS( \
669 glob.h \ 699 glob.h \
670 ia.h \ 700 ia.h \
671 iaf.h \ 701 iaf.h \
672 lastlog.h \
673 limits.h \ 702 limits.h \
674 login.h \ 703 login.h \
675 login_cap.h \ 704 login_cap.h \
@@ -677,7 +706,6 @@ AC_CHECK_HEADERS( \
677 ndir.h \ 706 ndir.h \
678 netdb.h \ 707 netdb.h \
679 netgroup.h \ 708 netgroup.h \
680 netinet/in_systm.h \
681 pam/pam_appl.h \ 709 pam/pam_appl.h \
682 paths.h \ 710 paths.h \
683 pty.h \ 711 pty.h \
@@ -719,6 +747,13 @@ AC_CHECK_HEADERS( \
719 vis.h \ 747 vis.h \
720) 748)
721 749
750# lastlog.h requires sys/time.h to be included first on Solaris
751AC_CHECK_HEADERS(lastlog.h, [], [], [
752#ifdef HAVE_SYS_TIME_H
753# include <sys/time.h>
754#endif
755])
756
722# sys/ptms.h requires sys/stream.h to be included first on Solaris 757# sys/ptms.h requires sys/stream.h to be included first on Solaris
723AC_CHECK_HEADERS(sys/ptms.h, [], [], [ 758AC_CHECK_HEADERS(sys/ptms.h, [], [], [
724#ifdef HAVE_SYS_STREAM_H 759#ifdef HAVE_SYS_STREAM_H
@@ -737,8 +772,8 @@ AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[
737 ac_cv_have_broken_dirname, [ 772 ac_cv_have_broken_dirname, [
738 save_LIBS="$LIBS" 773 save_LIBS="$LIBS"
739 LIBS="$LIBS -lgen" 774 LIBS="$LIBS -lgen"
740 AC_TRY_RUN( 775 AC_RUN_IFELSE(
741 [ 776 [AC_LANG_SOURCE([[
742#include <libgen.h> 777#include <libgen.h>
743#include <string.h> 778#include <string.h>
744 779
@@ -753,9 +788,10 @@ int main(int argc, char **argv) {
753 exit(0); 788 exit(0);
754 } 789 }
755} 790}
756 ], 791 ]])],
792 [ ac_cv_have_broken_dirname="no" ],
793 [ ac_cv_have_broken_dirname="yes" ],
757 [ ac_cv_have_broken_dirname="no" ], 794 [ ac_cv_have_broken_dirname="no" ],
758 [ ac_cv_have_broken_dirname="yes" ]
759 ) 795 )
760 LIBS="$save_LIBS" 796 LIBS="$save_LIBS"
761 ]) 797 ])
@@ -769,7 +805,8 @@ int main(int argc, char **argv) {
769 805
770AC_CHECK_FUNC(getspnam, , 806AC_CHECK_FUNC(getspnam, ,
771 AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen")) 807 AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen"))
772AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME)) 808AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME, 1,
809 [Define if you have the basename function.]))
773 810
774dnl zlib is required 811dnl zlib is required
775AC_ARG_WITH(zlib, 812AC_ARG_WITH(zlib,
@@ -873,14 +910,15 @@ dnl UnixWare 2.x
873AC_CHECK_FUNC(strcasecmp, 910AC_CHECK_FUNC(strcasecmp,
874 [], [ AC_CHECK_LIB(resolv, strcasecmp, LIBS="$LIBS -lresolv") ] 911 [], [ AC_CHECK_LIB(resolv, strcasecmp, LIBS="$LIBS -lresolv") ]
875) 912)
876AC_CHECK_FUNC(utimes, 913AC_CHECK_FUNCS(utimes,
877 [], [ AC_CHECK_LIB(c89, utimes, [AC_DEFINE(HAVE_UTIMES) 914 [], [ AC_CHECK_LIB(c89, utimes, [AC_DEFINE(HAVE_UTIMES)
878 LIBS="$LIBS -lc89"]) ] 915 LIBS="$LIBS -lc89"]) ]
879) 916)
880 917
881dnl Checks for libutil functions 918dnl Checks for libutil functions
882AC_CHECK_HEADERS(libutil.h) 919AC_CHECK_HEADERS(libutil.h)
883AC_SEARCH_LIBS(login, util bsd, [AC_DEFINE(HAVE_LOGIN)]) 920AC_SEARCH_LIBS(login, util bsd, [AC_DEFINE(HAVE_LOGIN, 1,
921 [Define if your libraries define login()])])
884AC_CHECK_FUNCS(logout updwtmp logwtmp) 922AC_CHECK_FUNCS(logout updwtmp logwtmp)
885 923
886AC_FUNC_STRFTIME 924AC_FUNC_STRFTIME
@@ -895,7 +933,9 @@ AC_EGREP_CPP(FOUNDIT,
895 #endif 933 #endif
896 ], 934 ],
897 [ 935 [
898 AC_DEFINE(GLOB_HAS_ALTDIRFUNC) 936 AC_DEFINE(GLOB_HAS_ALTDIRFUNC, 1,
937 [Define if your system glob() function has
938 the GLOB_ALTDIRFUNC extension])
899 AC_MSG_RESULT(yes) 939 AC_MSG_RESULT(yes)
900 ], 940 ],
901 [ 941 [
@@ -911,7 +951,9 @@ AC_EGREP_CPP(FOUNDIT,
911 int main(void){glob_t g; g.gl_matchc = 1;} 951 int main(void){glob_t g; g.gl_matchc = 1;}
912 ], 952 ],
913 [ 953 [
914 AC_DEFINE(GLOB_HAS_GL_MATCHC) 954 AC_DEFINE(GLOB_HAS_GL_MATCHC, 1,
955 [Define if your system glob() function has
956 gl_matchc options in glob_t])
915 AC_MSG_RESULT(yes) 957 AC_MSG_RESULT(yes)
916 ], 958 ],
917 [ 959 [
@@ -929,7 +971,9 @@ int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));}
929 [AC_MSG_RESULT(yes)], 971 [AC_MSG_RESULT(yes)],
930 [ 972 [
931 AC_MSG_RESULT(no) 973 AC_MSG_RESULT(no)
932 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME) 974 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME, 1,
975 [Define if your struct dirent expects you to
976 allocate extra space for d_name])
933 ], 977 ],
934 [ 978 [
935 AC_MSG_WARN([cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME]) 979 AC_MSG_WARN([cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME])
@@ -939,7 +983,7 @@ int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));}
939 983
940AC_MSG_CHECKING([for /proc/pid/fd directory]) 984AC_MSG_CHECKING([for /proc/pid/fd directory])
941if test -d "/proc/$$/fd" ; then 985if test -d "/proc/$$/fd" ; then
942 AC_DEFINE(HAVE_PROC_PID) 986 AC_DEFINE(HAVE_PROC_PID, 1, [Define if you have /proc/$pid/fd])
943 AC_MSG_RESULT(yes) 987 AC_MSG_RESULT(yes)
944else 988else
945 AC_MSG_RESULT(no) 989 AC_MSG_RESULT(no)
@@ -957,17 +1001,17 @@ AC_ARG_WITH(skey,
957 LDFLAGS="$LDFLAGS -L${withval}/lib" 1001 LDFLAGS="$LDFLAGS -L${withval}/lib"
958 fi 1002 fi
959 1003
960 AC_DEFINE(SKEY) 1004 AC_DEFINE(SKEY, 1, [Define if you want S/Key support])
961 LIBS="-lskey $LIBS" 1005 LIBS="-lskey $LIBS"
962 SKEY_MSG="yes" 1006 SKEY_MSG="yes"
963 1007
964 AC_MSG_CHECKING([for s/key support]) 1008 AC_MSG_CHECKING([for s/key support])
965 AC_TRY_RUN( 1009 AC_LINK_IFELSE(
966 [ 1010 [AC_LANG_SOURCE([[
967#include <stdio.h> 1011#include <stdio.h>
968#include <skey.h> 1012#include <skey.h>
969int main() { char *ff = skey_keyinfo(""); ff=""; exit(0); } 1013int main() { char *ff = skey_keyinfo(""); ff=""; exit(0); }
970 ], 1014 ]])],
971 [AC_MSG_RESULT(yes)], 1015 [AC_MSG_RESULT(yes)],
972 [ 1016 [
973 AC_MSG_RESULT(no) 1017 AC_MSG_RESULT(no)
@@ -979,7 +1023,9 @@ int main() { char *ff = skey_keyinfo(""); ff=""; exit(0); }
979 #include <skey.h>], 1023 #include <skey.h>],
980 [(void)skeychallenge(NULL,"name","",0);], 1024 [(void)skeychallenge(NULL,"name","",0);],
981 [AC_MSG_RESULT(yes) 1025 [AC_MSG_RESULT(yes)
982 AC_DEFINE(SKEYCHALLENGE_4ARG)], 1026 AC_DEFINE(SKEYCHALLENGE_4ARG, 1,
1027 [Define if your skeychallenge()
1028 function takes 4 arguments (NetBSD)])],
983 [AC_MSG_RESULT(no)] 1029 [AC_MSG_RESULT(no)]
984 ) 1030 )
985 fi 1031 fi
@@ -1030,7 +1076,9 @@ AC_ARG_WITH(tcp-wrappers,
1030 [hosts_access(0);], 1076 [hosts_access(0);],
1031 [ 1077 [
1032 AC_MSG_RESULT(yes) 1078 AC_MSG_RESULT(yes)
1033 AC_DEFINE(LIBWRAP) 1079 AC_DEFINE(LIBWRAP, 1,
1080 [Define if you want
1081 TCP Wrappers support])
1034 AC_SUBST(LIBWRAP) 1082 AC_SUBST(LIBWRAP)
1035 TCPW_MSG="yes" 1083 TCPW_MSG="yes"
1036 ], 1084 ],
@@ -1049,11 +1097,15 @@ AC_ARG_WITH(libedit,
1049 [ --with-libedit[[=PATH]] Enable libedit support for sftp], 1097 [ --with-libedit[[=PATH]] Enable libedit support for sftp],
1050 [ if test "x$withval" != "xno" ; then 1098 [ if test "x$withval" != "xno" ; then
1051 if test "x$withval" != "xyes"; then 1099 if test "x$withval" != "xyes"; then
1052 CPPFLAGS="$CPPFLAGS -I$withval/include" 1100 CPPFLAGS="$CPPFLAGS -I${withval}/include"
1053 LDFLAGS="$LDFLAGS -L$withval/lib" 1101 if test -n "${need_dash_r}"; then
1102 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
1103 else
1104 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
1105 fi
1054 fi 1106 fi
1055 AC_CHECK_LIB(edit, el_init, 1107 AC_CHECK_LIB(edit, el_init,
1056 [ AC_DEFINE(USE_LIBEDIT, [], [Use libedit for sftp]) 1108 [ AC_DEFINE(USE_LIBEDIT, 1, [Use libedit for sftp])
1057 LIBEDIT="-ledit -lcurses" 1109 LIBEDIT="-ledit -lcurses"
1058 LIBEDIT_MSG="yes" 1110 LIBEDIT_MSG="yes"
1059 AC_SUBST(LIBEDIT) 1111 AC_SUBST(LIBEDIT)
@@ -1097,12 +1149,12 @@ AC_ARG_WITH(audit,
1097 [AC_MSG_ERROR(BSM enabled and required function not found)]) 1149 [AC_MSG_ERROR(BSM enabled and required function not found)])
1098 # These are optional 1150 # These are optional
1099 AC_CHECK_FUNCS(getaudit_addr) 1151 AC_CHECK_FUNCS(getaudit_addr)
1100 AC_DEFINE(USE_BSM_AUDIT, [], [Use BSM audit module]) 1152 AC_DEFINE(USE_BSM_AUDIT, 1, [Use BSM audit module])
1101 ;; 1153 ;;
1102 debug) 1154 debug)
1103 AUDIT_MODULE=debug 1155 AUDIT_MODULE=debug
1104 AC_MSG_RESULT(debug) 1156 AC_MSG_RESULT(debug)
1105 AC_DEFINE(SSH_AUDIT_EVENTS, [], Use audit debugging module) 1157 AC_DEFINE(SSH_AUDIT_EVENTS, 1, Use audit debugging module)
1106 ;; 1158 ;;
1107 no) 1159 no)
1108 AC_MSG_RESULT(no) 1160 AC_MSG_RESULT(no)
@@ -1116,6 +1168,7 @@ AC_ARG_WITH(audit,
1116dnl Checks for library functions. Please keep in alphabetical order 1168dnl Checks for library functions. Please keep in alphabetical order
1117AC_CHECK_FUNCS( \ 1169AC_CHECK_FUNCS( \
1118 arc4random \ 1170 arc4random \
1171 asprintf \
1119 b64_ntop \ 1172 b64_ntop \
1120 __b64_ntop \ 1173 __b64_ntop \
1121 b64_pton \ 1174 b64_pton \
@@ -1191,7 +1244,7 @@ AC_CHECK_FUNCS( \
1191 truncate \ 1244 truncate \
1192 unsetenv \ 1245 unsetenv \
1193 updwtmpx \ 1246 updwtmpx \
1194 utimes \ 1247 vasprintf \
1195 vhangup \ 1248 vhangup \
1196 vsnprintf \ 1249 vsnprintf \
1197 waitpid \ 1250 waitpid \
@@ -1212,7 +1265,8 @@ str = gai_strerror(0);],[
1212 AC_DEFINE(HAVE_CONST_GAI_STRERROR_PROTO, 1, 1265 AC_DEFINE(HAVE_CONST_GAI_STRERROR_PROTO, 1,
1213 [Define if gai_strerror() returns const char *])])]) 1266 [Define if gai_strerror() returns const char *])])])
1214 1267
1215AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP)) 1268AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP, 1,
1269 [Some systems put nanosleep outside of libc]))
1216 1270
1217dnl Make sure prototypes are defined for these before using them. 1271dnl Make sure prototypes are defined for these before using them.
1218AC_CHECK_DECL(getrusage, [AC_CHECK_FUNCS(getrusage)]) 1272AC_CHECK_DECL(getrusage, [AC_CHECK_FUNCS(getrusage)])
@@ -1244,7 +1298,8 @@ AC_CHECK_FUNCS(setresuid, [
1244int main(){errno=0; setresuid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);} 1298int main(){errno=0; setresuid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);}
1245 ]])], 1299 ]])],
1246 [AC_MSG_RESULT(yes)], 1300 [AC_MSG_RESULT(yes)],
1247 [AC_DEFINE(BROKEN_SETRESUID) 1301 [AC_DEFINE(BROKEN_SETRESUID, 1,
1302 [Define if your setresuid() is broken])
1248 AC_MSG_RESULT(not implemented)], 1303 AC_MSG_RESULT(not implemented)],
1249 [AC_MSG_WARN([cross compiling: not checking setresuid])] 1304 [AC_MSG_WARN([cross compiling: not checking setresuid])]
1250 ) 1305 )
@@ -1260,7 +1315,8 @@ AC_CHECK_FUNCS(setresgid, [
1260int main(){errno=0; setresgid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);} 1315int main(){errno=0; setresgid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);}
1261 ]])], 1316 ]])],
1262 [AC_MSG_RESULT(yes)], 1317 [AC_MSG_RESULT(yes)],
1263 [AC_DEFINE(BROKEN_SETRESGID) 1318 [AC_DEFINE(BROKEN_SETRESGID, 1,
1319 [Define if your setresgid() is broken])
1264 AC_MSG_RESULT(not implemented)], 1320 AC_MSG_RESULT(not implemented)],
1265 [AC_MSG_WARN([cross compiling: not checking setresuid])] 1321 [AC_MSG_WARN([cross compiling: not checking setresuid])]
1266 ) 1322 )
@@ -1276,13 +1332,16 @@ AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline pututxline )
1276AC_CHECK_FUNCS(setutxent utmpxname) 1332AC_CHECK_FUNCS(setutxent utmpxname)
1277 1333
1278AC_CHECK_FUNC(daemon, 1334AC_CHECK_FUNC(daemon,
1279 [AC_DEFINE(HAVE_DAEMON)], 1335 [AC_DEFINE(HAVE_DAEMON, 1, [Define if your libraries define daemon()])],
1280 [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])] 1336 [AC_CHECK_LIB(bsd, daemon,
1337 [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])]
1281) 1338)
1282 1339
1283AC_CHECK_FUNC(getpagesize, 1340AC_CHECK_FUNC(getpagesize,
1284 [AC_DEFINE(HAVE_GETPAGESIZE)], 1341 [AC_DEFINE(HAVE_GETPAGESIZE, 1,
1285 [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])] 1342 [Define if your libraries define getpagesize()])],
1343 [AC_CHECK_LIB(ucb, getpagesize,
1344 [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])]
1286) 1345)
1287 1346
1288# Check for broken snprintf 1347# Check for broken snprintf
@@ -1296,13 +1355,62 @@ int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');}
1296 [AC_MSG_RESULT(yes)], 1355 [AC_MSG_RESULT(yes)],
1297 [ 1356 [
1298 AC_MSG_RESULT(no) 1357 AC_MSG_RESULT(no)
1299 AC_DEFINE(BROKEN_SNPRINTF) 1358 AC_DEFINE(BROKEN_SNPRINTF, 1,
1359 [Define if your snprintf is busted])
1300 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor]) 1360 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
1301 ], 1361 ],
1302 [ AC_MSG_WARN([cross compiling: Assuming working snprintf()]) ] 1362 [ AC_MSG_WARN([cross compiling: Assuming working snprintf()]) ]
1303 ) 1363 )
1304fi 1364fi
1305 1365
1366# If we don't have a working asprintf, then we strongly depend on vsnprintf
1367# returning the right thing on overflow: the number of characters it tried to
1368# create (as per SUSv3)
1369if test "x$ac_cv_func_asprintf" != "xyes" && \
1370 test "x$ac_cv_func_vsnprintf" = "xyes" ; then
1371 AC_MSG_CHECKING([whether vsnprintf returns correct values on overflow])
1372 AC_RUN_IFELSE(
1373 [AC_LANG_SOURCE([[
1374#include <sys/types.h>
1375#include <stdio.h>
1376#include <stdarg.h>
1377
1378int x_snprintf(char *str,size_t count,const char *fmt,...)
1379{
1380 size_t ret; va_list ap;
1381 va_start(ap, fmt); ret = vsnprintf(str, count, fmt, ap); va_end(ap);
1382 return ret;
1383}
1384int main(void)
1385{
1386 char x[1];
1387 exit(x_snprintf(x, 1, "%s %d", "hello", 12345) == 11 ? 0 : 1);
1388} ]])],
1389 [AC_MSG_RESULT(yes)],
1390 [
1391 AC_MSG_RESULT(no)
1392 AC_DEFINE(BROKEN_SNPRINTF, 1,
1393 [Define if your snprintf is busted])
1394 AC_MSG_WARN([****** Your vsnprintf() function is broken, complain to your vendor])
1395 ],
1396 [ AC_MSG_WARN([cross compiling: Assuming working vsnprintf()]) ]
1397 )
1398fi
1399
1400# On systems where [v]snprintf is broken, but is declared in stdio,
1401# check that the fmt argument is const char * or just char *.
1402# This is only useful for when BROKEN_SNPRINTF
1403AC_MSG_CHECKING([whether snprintf can declare const char *fmt])
1404AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
1405 int snprintf(char *a, size_t b, const char *c, ...) { return 0; }
1406 int main(void) { snprintf(0, 0, 0); }
1407 ]])],
1408 [AC_MSG_RESULT(yes)
1409 AC_DEFINE(SNPRINTF_CONST, [const],
1410 [Define as const if snprintf() can declare const char *fmt])],
1411 [AC_MSG_RESULT(no)
1412 AC_DEFINE(SNPRINTF_CONST, [/* not const */])])
1413
1306# Check for missing getpeereid (or equiv) support 1414# Check for missing getpeereid (or equiv) support
1307NO_PEERCHECK="" 1415NO_PEERCHECK=""
1308if test "x$ac_cv_func_getpeereid" != "xyes" ; then 1416if test "x$ac_cv_func_getpeereid" != "xyes" ; then
@@ -1312,7 +1420,7 @@ if test "x$ac_cv_func_getpeereid" != "xyes" ; then
1312 #include <sys/socket.h>], 1420 #include <sys/socket.h>],
1313 [int i = SO_PEERCRED;], 1421 [int i = SO_PEERCRED;],
1314 [ AC_MSG_RESULT(yes) 1422 [ AC_MSG_RESULT(yes)
1315 AC_DEFINE(HAVE_SO_PEERCRED, [], [Have PEERCRED socket option]) 1423 AC_DEFINE(HAVE_SO_PEERCRED, 1, [Have PEERCRED socket option])
1316 ], 1424 ],
1317 [AC_MSG_RESULT(no) 1425 [AC_MSG_RESULT(no)
1318 NO_PEERCHECK=1] 1426 NO_PEERCHECK=1]
@@ -1322,21 +1430,21 @@ fi
1322dnl see whether mkstemp() requires XXXXXX 1430dnl see whether mkstemp() requires XXXXXX
1323if test "x$ac_cv_func_mkdtemp" = "xyes" ; then 1431if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
1324AC_MSG_CHECKING([for (overly) strict mkstemp]) 1432AC_MSG_CHECKING([for (overly) strict mkstemp])
1325AC_TRY_RUN( 1433AC_RUN_IFELSE(
1326 [ 1434 [AC_LANG_SOURCE([[
1327#include <stdlib.h> 1435#include <stdlib.h>
1328main() { char template[]="conftest.mkstemp-test"; 1436main() { char template[]="conftest.mkstemp-test";
1329if (mkstemp(template) == -1) 1437if (mkstemp(template) == -1)
1330 exit(1); 1438 exit(1);
1331unlink(template); exit(0); 1439unlink(template); exit(0);
1332} 1440}
1333 ], 1441 ]])],
1334 [ 1442 [
1335 AC_MSG_RESULT(no) 1443 AC_MSG_RESULT(no)
1336 ], 1444 ],
1337 [ 1445 [
1338 AC_MSG_RESULT(yes) 1446 AC_MSG_RESULT(yes)
1339 AC_DEFINE(HAVE_STRICT_MKSTEMP) 1447 AC_DEFINE(HAVE_STRICT_MKSTEMP, 1, [Silly mkstemp()])
1340 ], 1448 ],
1341 [ 1449 [
1342 AC_MSG_RESULT(yes) 1450 AC_MSG_RESULT(yes)
@@ -1348,8 +1456,8 @@ fi
1348dnl make sure that openpty does not reacquire controlling terminal 1456dnl make sure that openpty does not reacquire controlling terminal
1349if test ! -z "$check_for_openpty_ctty_bug"; then 1457if test ! -z "$check_for_openpty_ctty_bug"; then
1350 AC_MSG_CHECKING(if openpty correctly handles controlling tty) 1458 AC_MSG_CHECKING(if openpty correctly handles controlling tty)
1351 AC_TRY_RUN( 1459 AC_RUN_IFELSE(
1352 [ 1460 [AC_LANG_SOURCE([[
1353#include <stdio.h> 1461#include <stdio.h>
1354#include <sys/fcntl.h> 1462#include <sys/fcntl.h>
1355#include <sys/types.h> 1463#include <sys/types.h>
@@ -1381,13 +1489,16 @@ main()
1381 exit(0); /* Did not acquire ctty: OK */ 1489 exit(0); /* Did not acquire ctty: OK */
1382 } 1490 }
1383} 1491}
1384 ], 1492 ]])],
1385 [ 1493 [
1386 AC_MSG_RESULT(yes) 1494 AC_MSG_RESULT(yes)
1387 ], 1495 ],
1388 [ 1496 [
1389 AC_MSG_RESULT(no) 1497 AC_MSG_RESULT(no)
1390 AC_DEFINE(SSHD_ACQUIRES_CTTY) 1498 AC_DEFINE(SSHD_ACQUIRES_CTTY)
1499 ],
1500 [
1501 AC_MSG_RESULT(cross-compiling, assuming yes)
1391 ] 1502 ]
1392 ) 1503 )
1393fi 1504fi
@@ -1395,8 +1506,8 @@ fi
1395if test "x$ac_cv_func_getaddrinfo" = "xyes" && \ 1506if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
1396 test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then 1507 test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then
1397 AC_MSG_CHECKING(if getaddrinfo seems to work) 1508 AC_MSG_CHECKING(if getaddrinfo seems to work)
1398 AC_TRY_RUN( 1509 AC_RUN_IFELSE(
1399 [ 1510 [AC_LANG_SOURCE([[
1400#include <stdio.h> 1511#include <stdio.h>
1401#include <sys/socket.h> 1512#include <sys/socket.h>
1402#include <netdb.h> 1513#include <netdb.h>
@@ -1450,13 +1561,16 @@ main(void)
1450 } 1561 }
1451 exit(0); 1562 exit(0);
1452} 1563}
1453 ], 1564 ]])],
1454 [ 1565 [
1455 AC_MSG_RESULT(yes) 1566 AC_MSG_RESULT(yes)
1456 ], 1567 ],
1457 [ 1568 [
1458 AC_MSG_RESULT(no) 1569 AC_MSG_RESULT(no)
1459 AC_DEFINE(BROKEN_GETADDRINFO) 1570 AC_DEFINE(BROKEN_GETADDRINFO)
1571 ],
1572 [
1573 AC_MSG_RESULT(cross-compiling, assuming yes)
1460 ] 1574 ]
1461 ) 1575 )
1462fi 1576fi
@@ -1464,8 +1578,8 @@ fi
1464if test "x$ac_cv_func_getaddrinfo" = "xyes" && \ 1578if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
1465 test "x$check_for_aix_broken_getaddrinfo" = "x1"; then 1579 test "x$check_for_aix_broken_getaddrinfo" = "x1"; then
1466 AC_MSG_CHECKING(if getaddrinfo seems to work) 1580 AC_MSG_CHECKING(if getaddrinfo seems to work)
1467 AC_TRY_RUN( 1581 AC_RUN_IFELSE(
1468 [ 1582 [AC_LANG_SOURCE([[
1469#include <stdio.h> 1583#include <stdio.h>
1470#include <sys/socket.h> 1584#include <sys/socket.h>
1471#include <netdb.h> 1585#include <netdb.h>
@@ -1507,15 +1621,18 @@ main(void)
1507 } 1621 }
1508 exit(0); 1622 exit(0);
1509} 1623}
1510 ], 1624 ]])],
1511 [ 1625 [
1512 AC_MSG_RESULT(yes) 1626 AC_MSG_RESULT(yes)
1513 AC_DEFINE(AIX_GETNAMEINFO_HACK, [], 1627 AC_DEFINE(AIX_GETNAMEINFO_HACK, 1,
1514[Define if you have a getaddrinfo that fails for the all-zeros IPv6 address]) 1628 [Define if you have a getaddrinfo that fails
1629 for the all-zeros IPv6 address])
1515 ], 1630 ],
1516 [ 1631 [
1517 AC_MSG_RESULT(no) 1632 AC_MSG_RESULT(no)
1518 AC_DEFINE(BROKEN_GETADDRINFO) 1633 AC_DEFINE(BROKEN_GETADDRINFO)
1634 ],
1635 AC_MSG_RESULT(cross-compiling, assuming no)
1519 ] 1636 ]
1520 ) 1637 )
1521fi 1638fi
@@ -1558,7 +1675,8 @@ AC_ARG_WITH(pam,
1558 1675
1559 PAM_MSG="yes" 1676 PAM_MSG="yes"
1560 1677
1561 AC_DEFINE(USE_PAM) 1678 AC_DEFINE(USE_PAM, 1,
1679 [Define if you want to enable PAM support])
1562 if test $ac_cv_lib_dl_dlopen = yes; then 1680 if test $ac_cv_lib_dl_dlopen = yes; then
1563 LIBPAM="-lpam -ldl" 1681 LIBPAM="-lpam -ldl"
1564 else 1682 else
@@ -1585,7 +1703,9 @@ if test "x$PAM_MSG" = "xyes" ; then
1585 [(void)pam_strerror((pam_handle_t *)NULL, -1);], 1703 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
1586 [AC_MSG_RESULT(no)], 1704 [AC_MSG_RESULT(no)],
1587 [ 1705 [
1588 AC_DEFINE(HAVE_OLD_PAM) 1706 AC_DEFINE(HAVE_OLD_PAM, 1,
1707 [Define if you have an old version of PAM
1708 which takes only one argument to pam_strerror])
1589 AC_MSG_RESULT(yes) 1709 AC_MSG_RESULT(yes)
1590 PAM_MSG="yes (old library)" 1710 PAM_MSG="yes (old library)"
1591 ] 1711 ]
@@ -1625,7 +1745,9 @@ AC_ARG_WITH(ssl-dir,
1625 ] 1745 ]
1626) 1746)
1627LIBS="-lcrypto $LIBS" 1747LIBS="-lcrypto $LIBS"
1628AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL), 1748AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL, 1,
1749 [Define if your ssl headers are included
1750 with #include <openssl/header.h>]),
1629 [ 1751 [
1630 dnl Check default openssl install dir 1752 dnl Check default openssl install dir
1631 if test -n "${need_dash_r}"; then 1753 if test -n "${need_dash_r}"; then
@@ -1735,6 +1857,24 @@ Also see contrib/findssl.sh for help identifying header/library mismatches.])
1735 ] 1857 ]
1736) 1858)
1737 1859
1860# Check for OpenSSL without EVP_aes_{192,256}_cbc
1861AC_MSG_CHECKING([whether OpenSSL has crippled AES support])
1862AC_COMPILE_IFELSE(
1863 [AC_LANG_SOURCE([[
1864#include <string.h>
1865#include <openssl/evp.h>
1866int main(void) { exit(EVP_aes_192_cbc() == NULL || EVP_aes_256_cbc() == NULL);}
1867 ]])],
1868 [
1869 AC_MSG_RESULT(no)
1870 ],
1871 [
1872 AC_MSG_RESULT(yes)
1873 AC_DEFINE(OPENSSL_LOBOTOMISED_AES, 1,
1874 [libcrypto is missing AES 192 and 256 bit functions])
1875 ]
1876)
1877
1738# Some systems want crypt() from libcrypt, *not* the version in OpenSSL, 1878# Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
1739# because the system crypt() is more featureful. 1879# because the system crypt() is more featureful.
1740if test "x$check_for_libcrypt_before" = "x1"; then 1880if test "x$check_for_libcrypt_before" = "x1"; then
@@ -1799,7 +1939,8 @@ AC_ARG_WITH(rand-helper,
1799# Which randomness source do we use? 1939# Which randomness source do we use?
1800if test ! -z "$OPENSSL_SEEDS_ITSELF" && test -z "$USE_RAND_HELPER" ; then 1940if test ! -z "$OPENSSL_SEEDS_ITSELF" && test -z "$USE_RAND_HELPER" ; then
1801 # OpenSSL only 1941 # OpenSSL only
1802 AC_DEFINE(OPENSSL_PRNG_ONLY) 1942 AC_DEFINE(OPENSSL_PRNG_ONLY, 1,
1943 [Define if you want OpenSSL's internally seeded PRNG only])
1803 RAND_MSG="OpenSSL internal ONLY" 1944 RAND_MSG="OpenSSL internal ONLY"
1804 INSTALL_SSH_RAND_HELPER="" 1945 INSTALL_SSH_RAND_HELPER=""
1805elif test ! -z "$USE_RAND_HELPER" ; then 1946elif test ! -z "$USE_RAND_HELPER" ; then
@@ -1827,7 +1968,8 @@ AC_ARG_WITH(prngd-port,
1827 esac 1968 esac
1828 if test ! -z "$withval" ; then 1969 if test ! -z "$withval" ; then
1829 PRNGD_PORT="$withval" 1970 PRNGD_PORT="$withval"
1830 AC_DEFINE_UNQUOTED(PRNGD_PORT, $PRNGD_PORT) 1971 AC_DEFINE_UNQUOTED(PRNGD_PORT, $PRNGD_PORT,
1972 [Port number of PRNGD/EGD random number socket])
1831 fi 1973 fi
1832 ] 1974 ]
1833) 1975)
@@ -1858,7 +2000,8 @@ AC_ARG_WITH(prngd-socket,
1858 AC_MSG_WARN(Entropy socket is not readable) 2000 AC_MSG_WARN(Entropy socket is not readable)
1859 fi 2001 fi
1860 PRNGD_SOCKET="$withval" 2002 PRNGD_SOCKET="$withval"
1861 AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET") 2003 AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET",
2004 [Location of PRNGD/EGD random number socket])
1862 fi 2005 fi
1863 ], 2006 ],
1864 [ 2007 [
@@ -1893,7 +2036,8 @@ AC_ARG_WITH(entropy-timeout,
1893 fi 2036 fi
1894 ] 2037 ]
1895) 2038)
1896AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout) 2039AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout,
2040 [Builtin PRNG command timeout])
1897 2041
1898SSH_PRIVSEP_USER=sshd 2042SSH_PRIVSEP_USER=sshd
1899AC_ARG_WITH(privsep-user, 2043AC_ARG_WITH(privsep-user,
@@ -1905,7 +2049,8 @@ AC_ARG_WITH(privsep-user,
1905 fi 2049 fi
1906 ] 2050 ]
1907) 2051)
1908AC_DEFINE_UNQUOTED(SSH_PRIVSEP_USER, "$SSH_PRIVSEP_USER") 2052AC_DEFINE_UNQUOTED(SSH_PRIVSEP_USER, "$SSH_PRIVSEP_USER",
2053 [non-privileged user for privilege separation])
1909AC_SUBST(SSH_PRIVSEP_USER) 2054AC_SUBST(SSH_PRIVSEP_USER)
1910 2055
1911# We do this little dance with the search path to insure 2056# We do this little dance with the search path to insure
@@ -1963,7 +2108,10 @@ if test ! -z "$SONY" ; then
1963 LIBS="$LIBS -liberty"; 2108 LIBS="$LIBS -liberty";
1964fi 2109fi
1965 2110
1966# Checks for data types 2111# Check for long long datatypes
2112AC_CHECK_TYPES([long long, unsigned long long, long double])
2113
2114# Check datatype sizes
1967AC_CHECK_SIZEOF(char, 1) 2115AC_CHECK_SIZEOF(char, 1)
1968AC_CHECK_SIZEOF(short int, 2) 2116AC_CHECK_SIZEOF(short int, 2)
1969AC_CHECK_SIZEOF(int, 4) 2117AC_CHECK_SIZEOF(int, 4)
@@ -1975,6 +2123,84 @@ if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then
1975 ac_cv_sizeof_long_long_int=0 2123 ac_cv_sizeof_long_long_int=0
1976fi 2124fi
1977 2125
2126# compute LLONG_MIN and LLONG_MAX if we don't know them.
2127if test -z "$have_llong_max"; then
2128 AC_MSG_CHECKING([for max value of long long])
2129 AC_RUN_IFELSE(
2130 [AC_LANG_SOURCE([[
2131#include <stdio.h>
2132/* Why is this so damn hard? */
2133#ifdef __GNUC__
2134# undef __GNUC__
2135#endif
2136#define __USE_ISOC99
2137#include <limits.h>
2138#define DATA "conftest.llminmax"
2139int main(void) {
2140 FILE *f;
2141 long long i, llmin, llmax = 0;
2142
2143 if((f = fopen(DATA,"w")) == NULL)
2144 exit(1);
2145
2146#if defined(LLONG_MIN) && defined(LLONG_MAX)
2147 fprintf(stderr, "Using system header for LLONG_MIN and LLONG_MAX\n");
2148 llmin = LLONG_MIN;
2149 llmax = LLONG_MAX;
2150#else
2151 fprintf(stderr, "Calculating LLONG_MIN and LLONG_MAX\n");
2152 /* This will work on one's complement and two's complement */
2153 for (i = 1; i > llmax; i <<= 1, i++)
2154 llmax = i;
2155 llmin = llmax + 1LL; /* wrap */
2156#endif
2157
2158 /* Sanity check */
2159 if (llmin + 1 < llmin || llmin - 1 < llmin || llmax + 1 > llmax
2160 || llmax - 1 > llmax) {
2161 fprintf(f, "unknown unknown\n");
2162 exit(2);
2163 }
2164
2165 if (fprintf(f ,"%lld %lld", llmin, llmax) < 0)
2166 exit(3);
2167
2168 exit(0);
2169}
2170 ]])],
2171 [
2172 llong_min=`$AWK '{print $1}' conftest.llminmax`
2173 llong_max=`$AWK '{print $2}' conftest.llminmax`
2174
2175 # snprintf on some Tru64s doesn't understand "%lld"
2176 case "$host" in
2177 alpha-dec-osf*)
2178 if test "x$ac_cv_sizeof_long_long_int" = "x8" &&
2179 test "x$llong_max" = "xld"; then
2180 llong_min="-9223372036854775808"
2181 llong_max="9223372036854775807"
2182 fi
2183 ;;
2184 esac
2185
2186 AC_MSG_RESULT($llong_max)
2187 AC_DEFINE_UNQUOTED(LLONG_MAX, [${llong_max}LL],
2188 [max value of long long calculated by configure])
2189 AC_MSG_CHECKING([for min value of long long])
2190 AC_MSG_RESULT($llong_min)
2191 AC_DEFINE_UNQUOTED(LLONG_MIN, [${llong_min}LL],
2192 [min value of long long calculated by configure])
2193 ],
2194 [
2195 AC_MSG_RESULT(not found)
2196 ],
2197 [
2198 AC_MSG_WARN([cross compiling: not checking])
2199 ]
2200 )
2201fi
2202
2203
1978# More checks for data types 2204# More checks for data types
1979AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [ 2205AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1980 AC_TRY_COMPILE( 2206 AC_TRY_COMPILE(
@@ -1985,7 +2211,7 @@ AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1985 ) 2211 )
1986]) 2212])
1987if test "x$ac_cv_have_u_int" = "xyes" ; then 2213if test "x$ac_cv_have_u_int" = "xyes" ; then
1988 AC_DEFINE(HAVE_U_INT) 2214 AC_DEFINE(HAVE_U_INT, 1, [define if you have u_int data type])
1989 have_u_int=1 2215 have_u_int=1
1990fi 2216fi
1991 2217
@@ -1998,7 +2224,7 @@ AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1998 ) 2224 )
1999]) 2225])
2000if test "x$ac_cv_have_intxx_t" = "xyes" ; then 2226if test "x$ac_cv_have_intxx_t" = "xyes" ; then
2001 AC_DEFINE(HAVE_INTXX_T) 2227 AC_DEFINE(HAVE_INTXX_T, 1, [define if you have intxx_t data type])
2002 have_intxx_t=1 2228 have_intxx_t=1
2003fi 2229fi
2004 2230
@@ -2035,7 +2261,7 @@ AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
2035 ) 2261 )
2036]) 2262])
2037if test "x$ac_cv_have_int64_t" = "xyes" ; then 2263if test "x$ac_cv_have_int64_t" = "xyes" ; then
2038 AC_DEFINE(HAVE_INT64_T) 2264 AC_DEFINE(HAVE_INT64_T, 1, [define if you have int64_t data type])
2039fi 2265fi
2040 2266
2041AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [ 2267AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
@@ -2047,7 +2273,7 @@ AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
2047 ) 2273 )
2048]) 2274])
2049if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then 2275if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
2050 AC_DEFINE(HAVE_U_INTXX_T) 2276 AC_DEFINE(HAVE_U_INTXX_T, 1, [define if you have u_intxx_t data type])
2051 have_u_intxx_t=1 2277 have_u_intxx_t=1
2052fi 2278fi
2053 2279
@@ -2073,7 +2299,7 @@ AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
2073 ) 2299 )
2074]) 2300])
2075if test "x$ac_cv_have_u_int64_t" = "xyes" ; then 2301if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
2076 AC_DEFINE(HAVE_U_INT64_T) 2302 AC_DEFINE(HAVE_U_INT64_T, 1, [define if you have u_int64_t data type])
2077 have_u_int64_t=1 2303 have_u_int64_t=1
2078fi 2304fi
2079 2305
@@ -2102,7 +2328,8 @@ if test -z "$have_u_intxx_t" ; then
2102 ) 2328 )
2103 ]) 2329 ])
2104 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then 2330 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
2105 AC_DEFINE(HAVE_UINTXX_T) 2331 AC_DEFINE(HAVE_UINTXX_T, 1,
2332 [define if you have uintxx_t data type])
2106 fi 2333 fi
2107fi 2334fi
2108 2335
@@ -2153,7 +2380,7 @@ AC_CACHE_CHECK([for u_char], ac_cv_have_u_char, [
2153 ) 2380 )
2154]) 2381])
2155if test "x$ac_cv_have_u_char" = "xyes" ; then 2382if test "x$ac_cv_have_u_char" = "xyes" ; then
2156 AC_DEFINE(HAVE_U_CHAR) 2383 AC_DEFINE(HAVE_U_CHAR, 1, [define if you have u_char data type])
2157fi 2384fi
2158 2385
2159TYPE_SOCKLEN_T 2386TYPE_SOCKLEN_T
@@ -2175,7 +2402,7 @@ AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
2175 ) 2402 )
2176]) 2403])
2177if test "x$ac_cv_have_size_t" = "xyes" ; then 2404if test "x$ac_cv_have_size_t" = "xyes" ; then
2178 AC_DEFINE(HAVE_SIZE_T) 2405 AC_DEFINE(HAVE_SIZE_T, 1, [define if you have size_t data type])
2179fi 2406fi
2180 2407
2181AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [ 2408AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
@@ -2189,7 +2416,7 @@ AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
2189 ) 2416 )
2190]) 2417])
2191if test "x$ac_cv_have_ssize_t" = "xyes" ; then 2418if test "x$ac_cv_have_ssize_t" = "xyes" ; then
2192 AC_DEFINE(HAVE_SSIZE_T) 2419 AC_DEFINE(HAVE_SSIZE_T, 1, [define if you have ssize_t data type])
2193fi 2420fi
2194 2421
2195AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [ 2422AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [
@@ -2203,7 +2430,7 @@ AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [
2203 ) 2430 )
2204]) 2431])
2205if test "x$ac_cv_have_clock_t" = "xyes" ; then 2432if test "x$ac_cv_have_clock_t" = "xyes" ; then
2206 AC_DEFINE(HAVE_CLOCK_T) 2433 AC_DEFINE(HAVE_CLOCK_T, 1, [define if you have clock_t data type])
2207fi 2434fi
2208 2435
2209AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [ 2436AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
@@ -2228,7 +2455,8 @@ AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
2228 ) 2455 )
2229]) 2456])
2230if test "x$ac_cv_have_sa_family_t" = "xyes" ; then 2457if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
2231 AC_DEFINE(HAVE_SA_FAMILY_T) 2458 AC_DEFINE(HAVE_SA_FAMILY_T, 1,
2459 [define if you have sa_family_t data type])
2232fi 2460fi
2233 2461
2234AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [ 2462AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
@@ -2242,7 +2470,7 @@ AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
2242 ) 2470 )
2243]) 2471])
2244if test "x$ac_cv_have_pid_t" = "xyes" ; then 2472if test "x$ac_cv_have_pid_t" = "xyes" ; then
2245 AC_DEFINE(HAVE_PID_T) 2473 AC_DEFINE(HAVE_PID_T, 1, [define if you have pid_t data type])
2246fi 2474fi
2247 2475
2248AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [ 2476AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
@@ -2256,7 +2484,7 @@ AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
2256 ) 2484 )
2257]) 2485])
2258if test "x$ac_cv_have_mode_t" = "xyes" ; then 2486if test "x$ac_cv_have_mode_t" = "xyes" ; then
2259 AC_DEFINE(HAVE_MODE_T) 2487 AC_DEFINE(HAVE_MODE_T, 1, [define if you have mode_t data type])
2260fi 2488fi
2261 2489
2262 2490
@@ -2272,7 +2500,8 @@ AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage
2272 ) 2500 )
2273]) 2501])
2274if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then 2502if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
2275 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE) 2503 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE, 1,
2504 [define if you have struct sockaddr_storage data type])
2276fi 2505fi
2277 2506
2278AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [ 2507AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
@@ -2287,7 +2516,8 @@ AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
2287 ) 2516 )
2288]) 2517])
2289if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then 2518if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
2290 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6) 2519 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6, 1,
2520 [define if you have struct sockaddr_in6 data type])
2291fi 2521fi
2292 2522
2293AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [ 2523AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
@@ -2302,7 +2532,8 @@ AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
2302 ) 2532 )
2303]) 2533])
2304if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then 2534if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
2305 AC_DEFINE(HAVE_STRUCT_IN6_ADDR) 2535 AC_DEFINE(HAVE_STRUCT_IN6_ADDR, 1,
2536 [define if you have struct in6_addr data type])
2306fi 2537fi
2307 2538
2308AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [ 2539AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
@@ -2318,7 +2549,8 @@ AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
2318 ) 2549 )
2319]) 2550])
2320if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then 2551if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
2321 AC_DEFINE(HAVE_STRUCT_ADDRINFO) 2552 AC_DEFINE(HAVE_STRUCT_ADDRINFO, 1,
2553 [define if you have struct addrinfo data type])
2322fi 2554fi
2323 2555
2324AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [ 2556AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [
@@ -2330,7 +2562,7 @@ AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [
2330 ) 2562 )
2331]) 2563])
2332if test "x$ac_cv_have_struct_timeval" = "xyes" ; then 2564if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
2333 AC_DEFINE(HAVE_STRUCT_TIMEVAL) 2565 AC_DEFINE(HAVE_STRUCT_TIMEVAL, 1, [define if you have struct timeval])
2334 have_struct_timeval=1 2566 have_struct_timeval=1
2335fi 2567fi
2336 2568
@@ -2395,6 +2627,17 @@ OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX)
2395OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX) 2627OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX)
2396 2628
2397AC_CHECK_MEMBERS([struct stat.st_blksize]) 2629AC_CHECK_MEMBERS([struct stat.st_blksize])
2630AC_CHECK_MEMBER([struct __res_state.retrans], [], [AC_DEFINE(__res_state, state,
2631 [Define if we don't have struct __res_state in resolv.h])],
2632[
2633#include <stdio.h>
2634#if HAVE_SYS_TYPES_H
2635# include <sys/types.h>
2636#endif
2637#include <netinet/in.h>
2638#include <arpa/nameser.h>
2639#include <resolv.h>
2640])
2398 2641
2399AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage], 2642AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
2400 ac_cv_have_ss_family_in_struct_ss, [ 2643 ac_cv_have_ss_family_in_struct_ss, [
@@ -2409,7 +2652,7 @@ AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
2409 ) 2652 )
2410]) 2653])
2411if 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
2412 AC_DEFINE(HAVE_SS_FAMILY_IN_SS) 2655 AC_DEFINE(HAVE_SS_FAMILY_IN_SS, 1, [Fields in struct sockaddr_storage])
2413fi 2656fi
2414 2657
2415AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage], 2658AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
@@ -2425,7 +2668,8 @@ AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
2425 ) 2668 )
2426]) 2669])
2427if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then 2670if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
2428 AC_DEFINE(HAVE___SS_FAMILY_IN_SS) 2671 AC_DEFINE(HAVE___SS_FAMILY_IN_SS, 1,
2672 [Fields in struct sockaddr_storage])
2429fi 2673fi
2430 2674
2431AC_CACHE_CHECK([for pw_class field in struct passwd], 2675AC_CACHE_CHECK([for pw_class field in struct passwd],
@@ -2440,7 +2684,8 @@ AC_CACHE_CHECK([for pw_class field in struct passwd],
2440 ) 2684 )
2441]) 2685])
2442if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then 2686if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
2443 AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD) 2687 AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD, 1,
2688 [Define if your password has a pw_class field])
2444fi 2689fi
2445 2690
2446AC_CACHE_CHECK([for pw_expire field in struct passwd], 2691AC_CACHE_CHECK([for pw_expire field in struct passwd],
@@ -2455,7 +2700,8 @@ AC_CACHE_CHECK([for pw_expire field in struct passwd],
2455 ) 2700 )
2456]) 2701])
2457if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then 2702if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then
2458 AC_DEFINE(HAVE_PW_EXPIRE_IN_PASSWD) 2703 AC_DEFINE(HAVE_PW_EXPIRE_IN_PASSWD, 1,
2704 [Define if your password has a pw_expire field])
2459fi 2705fi
2460 2706
2461AC_CACHE_CHECK([for pw_change field in struct passwd], 2707AC_CACHE_CHECK([for pw_change field in struct passwd],
@@ -2470,7 +2716,8 @@ AC_CACHE_CHECK([for pw_change field in struct passwd],
2470 ) 2716 )
2471]) 2717])
2472if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then 2718if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then
2473 AC_DEFINE(HAVE_PW_CHANGE_IN_PASSWD) 2719 AC_DEFINE(HAVE_PW_CHANGE_IN_PASSWD, 1,
2720 [Define if your password has a pw_change field])
2474fi 2721fi
2475 2722
2476dnl make sure we're using the real structure members and not defines 2723dnl make sure we're using the real structure members and not defines
@@ -2496,7 +2743,9 @@ exit(0);
2496 ) 2743 )
2497]) 2744])
2498if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then 2745if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
2499 AC_DEFINE(HAVE_ACCRIGHTS_IN_MSGHDR) 2746 AC_DEFINE(HAVE_ACCRIGHTS_IN_MSGHDR, 1,
2747 [Define if your system uses access rights style
2748 file descriptor passing])
2500fi 2749fi
2501 2750
2502AC_CACHE_CHECK([for msg_control field in struct msghdr], 2751AC_CACHE_CHECK([for msg_control field in struct msghdr],
@@ -2521,7 +2770,9 @@ exit(0);
2521 ) 2770 )
2522]) 2771])
2523if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then 2772if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
2524 AC_DEFINE(HAVE_CONTROL_IN_MSGHDR) 2773 AC_DEFINE(HAVE_CONTROL_IN_MSGHDR, 1,
2774 [Define if your system uses ancillary data style
2775 file descriptor passing])
2525fi 2776fi
2526 2777
2527AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [ 2778AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
@@ -2532,7 +2783,7 @@ AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
2532 ) 2783 )
2533]) 2784])
2534if test "x$ac_cv_libc_defines___progname" = "xyes" ; then 2785if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
2535 AC_DEFINE(HAVE___PROGNAME) 2786 AC_DEFINE(HAVE___PROGNAME, 1, [Define if libc defines __progname])
2536fi 2787fi
2537 2788
2538AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNCTION__, [ 2789AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNCTION__, [
@@ -2545,7 +2796,8 @@ AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNC
2545 ) 2796 )
2546]) 2797])
2547if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then 2798if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
2548 AC_DEFINE(HAVE___FUNCTION__) 2799 AC_DEFINE(HAVE___FUNCTION__, 1,
2800 [Define if compiler implements __FUNCTION__])
2549fi 2801fi
2550 2802
2551AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__, [ 2803AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__, [
@@ -2558,7 +2810,33 @@ AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__,
2558 ) 2810 )
2559]) 2811])
2560if test "x$ac_cv_cc_implements___func__" = "xyes" ; then 2812if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
2561 AC_DEFINE(HAVE___func__) 2813 AC_DEFINE(HAVE___func__, 1, [Define if compiler implements __func__])
2814fi
2815
2816AC_CACHE_CHECK([whether va_copy exists], ac_cv_have_va_copy, [
2817 AC_TRY_LINK(
2818 [#include <stdarg.h>
2819 va_list x,y;],
2820 [va_copy(x,y);],
2821 [ ac_cv_have_va_copy="yes" ],
2822 [ ac_cv_have_va_copy="no" ]
2823 )
2824])
2825if test "x$ac_cv_have_va_copy" = "xyes" ; then
2826 AC_DEFINE(HAVE_VA_COPY, 1, [Define if va_copy exists])
2827fi
2828
2829AC_CACHE_CHECK([whether __va_copy exists], ac_cv_have___va_copy, [
2830 AC_TRY_LINK(
2831 [#include <stdarg.h>
2832 va_list x,y;],
2833 [__va_copy(x,y);],
2834 [ ac_cv_have___va_copy="yes" ],
2835 [ ac_cv_have___va_copy="no" ]
2836 )
2837])
2838if test "x$ac_cv_have___va_copy" = "xyes" ; then
2839 AC_DEFINE(HAVE___VA_COPY, 1, [Define if __va_copy exists])
2562fi 2840fi
2563 2841
2564AC_CACHE_CHECK([whether getopt has optreset support], 2842AC_CACHE_CHECK([whether getopt has optreset support],
@@ -2573,7 +2851,8 @@ AC_CACHE_CHECK([whether getopt has optreset support],
2573 ) 2851 )
2574]) 2852])
2575if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then 2853if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
2576 AC_DEFINE(HAVE_GETOPT_OPTRESET) 2854 AC_DEFINE(HAVE_GETOPT_OPTRESET, 1,
2855 [Define if your getopt(3) defines and uses optreset])
2577fi 2856fi
2578 2857
2579AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [ 2858AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
@@ -2584,7 +2863,8 @@ AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
2584 ) 2863 )
2585]) 2864])
2586if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then 2865if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
2587 AC_DEFINE(HAVE_SYS_ERRLIST) 2866 AC_DEFINE(HAVE_SYS_ERRLIST, 1,
2867 [Define if your system defines sys_errlist[]])
2588fi 2868fi
2589 2869
2590 2870
@@ -2596,7 +2876,7 @@ AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [
2596 ) 2876 )
2597]) 2877])
2598if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then 2878if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
2599 AC_DEFINE(HAVE_SYS_NERR) 2879 AC_DEFINE(HAVE_SYS_NERR, 1, [Define if your system defines sys_nerr])
2600fi 2880fi
2601 2881
2602SCARD_MSG="no" 2882SCARD_MSG="no"
@@ -2623,8 +2903,11 @@ AC_ARG_WITH(sectok,
2623 if test "$ac_cv_lib_sectok_sectok_open" != yes; then 2903 if test "$ac_cv_lib_sectok_sectok_open" != yes; then
2624 AC_MSG_ERROR(Can't find libsectok) 2904 AC_MSG_ERROR(Can't find libsectok)
2625 fi 2905 fi
2626 AC_DEFINE(SMARTCARD) 2906 AC_DEFINE(SMARTCARD, 1,
2627 AC_DEFINE(USE_SECTOK) 2907 [Define if you want smartcard support])
2908 AC_DEFINE(USE_SECTOK, 1,
2909 [Define if you want smartcard support
2910 using sectok])
2628 SCARD_MSG="yes, using sectok" 2911 SCARD_MSG="yes, using sectok"
2629 fi 2912 fi
2630 ] 2913 ]
@@ -2633,7 +2916,7 @@ AC_ARG_WITH(sectok,
2633# Check whether user wants OpenSC support 2916# Check whether user wants OpenSC support
2634OPENSC_CONFIG="no" 2917OPENSC_CONFIG="no"
2635AC_ARG_WITH(opensc, 2918AC_ARG_WITH(opensc,
2636 [--with-opensc[[=PFX]] Enable smartcard support using OpenSC (optionally in PATH)], 2919 [ --with-opensc[[=PFX]] Enable smartcard support using OpenSC (optionally in PATH)],
2637 [ 2920 [
2638 if test "x$withval" != "xno" ; then 2921 if test "x$withval" != "xno" ; then
2639 if test "x$withval" != "xyes" ; then 2922 if test "x$withval" != "xyes" ; then
@@ -2647,7 +2930,9 @@ AC_ARG_WITH(opensc,
2647 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS" 2930 CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS"
2648 LDFLAGS="$LDFLAGS $LIBOPENSC_LIBS" 2931 LDFLAGS="$LDFLAGS $LIBOPENSC_LIBS"
2649 AC_DEFINE(SMARTCARD) 2932 AC_DEFINE(SMARTCARD)
2650 AC_DEFINE(USE_OPENSC) 2933 AC_DEFINE(USE_OPENSC, 1,
2934 [Define if you want smartcard support
2935 using OpenSC])
2651 SCARD_MSG="yes, using OpenSC" 2936 SCARD_MSG="yes, using OpenSC"
2652 fi 2937 fi
2653 fi 2938 fi
@@ -2656,7 +2941,8 @@ AC_ARG_WITH(opensc,
2656 2941
2657# Check libraries needed by DNS fingerprint support 2942# Check libraries needed by DNS fingerprint support
2658AC_SEARCH_LIBS(getrrsetbyname, resolv, 2943AC_SEARCH_LIBS(getrrsetbyname, resolv,
2659 [AC_DEFINE(HAVE_GETRRSETBYNAME)], 2944 [AC_DEFINE(HAVE_GETRRSETBYNAME, 1,
2945 [Define if getrrsetbyname() exists])],
2660 [ 2946 [
2661 # Needed by our getrrsetbyname() 2947 # Needed by our getrrsetbyname()
2662 AC_SEARCH_LIBS(res_query, resolv) 2948 AC_SEARCH_LIBS(res_query, resolv)
@@ -2685,7 +2971,8 @@ int main()
2685 [#include <sys/types.h> 2971 [#include <sys/types.h>
2686 #include <arpa/nameser.h>]) 2972 #include <arpa/nameser.h>])
2687 AC_CHECK_MEMBER(HEADER.ad, 2973 AC_CHECK_MEMBER(HEADER.ad,
2688 [AC_DEFINE(HAVE_HEADER_AD)],, 2974 [AC_DEFINE(HAVE_HEADER_AD, 1,
2975 [Define if HEADER.ad exists in arpa/nameser.h])],,
2689 [#include <arpa/nameser.h>]) 2976 [#include <arpa/nameser.h>])
2690 ]) 2977 ])
2691 2978
@@ -2700,7 +2987,7 @@ AC_ARG_WITH(kerberos5,
2700 KRB5ROOT=${withval} 2987 KRB5ROOT=${withval}
2701 fi 2988 fi
2702 2989
2703 AC_DEFINE(KRB5) 2990 AC_DEFINE(KRB5, 1, [Define if you want Kerberos 5 support])
2704 KRB5_MSG="yes" 2991 KRB5_MSG="yes"
2705 2992
2706 AC_MSG_CHECKING(for krb5-config) 2993 AC_MSG_CHECKING(for krb5-config)
@@ -2711,7 +2998,9 @@ AC_ARG_WITH(kerberos5,
2711 AC_MSG_CHECKING(for gssapi support) 2998 AC_MSG_CHECKING(for gssapi support)
2712 if $KRB5CONF | grep gssapi >/dev/null ; then 2999 if $KRB5CONF | grep gssapi >/dev/null ; then
2713 AC_MSG_RESULT(yes) 3000 AC_MSG_RESULT(yes)
2714 AC_DEFINE(GSSAPI) 3001 AC_DEFINE(GSSAPI, 1,
3002 [Define this if you want GSSAPI
3003 support in the version 2 protocol])
2715 k5confopts=gssapi 3004 k5confopts=gssapi
2716 else 3005 else
2717 AC_MSG_RESULT(no) 3006 AC_MSG_RESULT(no)
@@ -2724,7 +3013,9 @@ AC_ARG_WITH(kerberos5,
2724 AC_TRY_COMPILE([ #include <krb5.h> ], 3013 AC_TRY_COMPILE([ #include <krb5.h> ],
2725 [ char *tmp = heimdal_version; ], 3014 [ char *tmp = heimdal_version; ],
2726 [ AC_MSG_RESULT(yes) 3015 [ AC_MSG_RESULT(yes)
2727 AC_DEFINE(HEIMDAL) ], 3016 AC_DEFINE(HEIMDAL, 1,
3017 [Define this if you are using the
3018 Heimdal version of Kerberos V5]) ],
2728 AC_MSG_RESULT(no) 3019 AC_MSG_RESULT(no)
2729 ) 3020 )
2730 else 3021 else
@@ -2779,14 +3070,15 @@ AC_ARG_WITH(kerberos5,
2779 if test ! -z "$blibpath" ; then 3070 if test ! -z "$blibpath" ; then
2780 blibpath="$blibpath:${KRB5ROOT}/lib" 3071 blibpath="$blibpath:${KRB5ROOT}/lib"
2781 fi 3072 fi
2782 fi
2783 3073
2784 AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h) 3074 AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h)
2785 AC_CHECK_HEADERS(gssapi_krb5.h gssapi/gssapi_krb5.h) 3075 AC_CHECK_HEADERS(gssapi_krb5.h gssapi/gssapi_krb5.h)
2786 AC_CHECK_HEADERS(gssapi_generic.h gssapi/gssapi_generic.h) 3076 AC_CHECK_HEADERS(gssapi_generic.h gssapi/gssapi_generic.h)
2787 3077
2788 LIBS="$LIBS $K5LIBS" 3078 LIBS="$LIBS $K5LIBS"
2789 AC_SEARCH_LIBS(k_hasafs, kafs, AC_DEFINE(USE_AFS)) 3079 AC_SEARCH_LIBS(k_hasafs, kafs, AC_DEFINE(USE_AFS, 1,
3080 [Define this if you want to use libkafs' AFS support]))
3081 fi
2790 ] 3082 ]
2791) 3083)
2792 3084
@@ -2840,7 +3132,8 @@ if test -z "$xauth_path" ; then
2840 XAUTH_PATH="undefined" 3132 XAUTH_PATH="undefined"
2841 AC_SUBST(XAUTH_PATH) 3133 AC_SUBST(XAUTH_PATH)
2842else 3134else
2843 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path") 3135 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path",
3136 [Define if xauth is found in your path])
2844 XAUTH_PATH=$xauth_path 3137 XAUTH_PATH=$xauth_path
2845 AC_SUBST(XAUTH_PATH) 3138 AC_SUBST(XAUTH_PATH)
2846fi 3139fi
@@ -2848,7 +3141,8 @@ fi
2848# Check for mail directory (last resort if we cannot get it from headers) 3141# Check for mail directory (last resort if we cannot get it from headers)
2849if test ! -z "$MAIL" ; then 3142if test ! -z "$MAIL" ; then
2850 maildir=`dirname $MAIL` 3143 maildir=`dirname $MAIL`
2851 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir") 3144 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir",
3145 [Set this to your mail directory if you don't have maillock.h])
2852fi 3146fi
2853 3147
2854if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; then 3148if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; then
@@ -2859,7 +3153,8 @@ if test -z "$no_dev_ptmx" ; then
2859 if test "x$disable_ptmx_check" != "xyes" ; then 3153 if test "x$disable_ptmx_check" != "xyes" ; then
2860 AC_CHECK_FILE("/dev/ptmx", 3154 AC_CHECK_FILE("/dev/ptmx",
2861 [ 3155 [
2862 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX) 3156 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX, 1,
3157 [Define if you have /dev/ptmx])
2863 have_dev_ptmx=1 3158 have_dev_ptmx=1
2864 ] 3159 ]
2865 ) 3160 )
@@ -2869,7 +3164,8 @@ fi
2869if test ! -z "$cross_compiling" && test "x$cross_compiling" != "xyes"; then 3164if test ! -z "$cross_compiling" && test "x$cross_compiling" != "xyes"; then
2870 AC_CHECK_FILE("/dev/ptc", 3165 AC_CHECK_FILE("/dev/ptc",
2871 [ 3166 [
2872 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC) 3167 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC, 1,
3168 [Define if you have /dev/ptc])
2873 have_dev_ptc=1 3169 have_dev_ptc=1
2874 ] 3170 ]
2875 ) 3171 )
@@ -2916,7 +3212,8 @@ AC_ARG_WITH(md5-passwords,
2916 [ --with-md5-passwords Enable use of MD5 passwords], 3212 [ --with-md5-passwords Enable use of MD5 passwords],
2917 [ 3213 [
2918 if test "x$withval" != "xno" ; then 3214 if test "x$withval" != "xno" ; then
2919 AC_DEFINE(HAVE_MD5_PASSWORDS) 3215 AC_DEFINE(HAVE_MD5_PASSWORDS, 1,
3216 [Define if you want to allow MD5 passwords])
2920 MD5_MSG="yes" 3217 MD5_MSG="yes"
2921 fi 3218 fi
2922 ] 3219 ]
@@ -2946,7 +3243,8 @@ if test -z "$disable_shadow" ; then
2946 3243
2947 if test "x$sp_expire_available" = "xyes" ; then 3244 if test "x$sp_expire_available" = "xyes" ; then
2948 AC_MSG_RESULT(yes) 3245 AC_MSG_RESULT(yes)
2949 AC_DEFINE(HAS_SHADOW_EXPIRE) 3246 AC_DEFINE(HAS_SHADOW_EXPIRE, 1,
3247 [Define if you want to use shadow password expire field])
2950 else 3248 else
2951 AC_MSG_RESULT(no) 3249 AC_MSG_RESULT(no)
2952 fi 3250 fi
@@ -2955,7 +3253,9 @@ fi
2955# Use ip address instead of hostname in $DISPLAY 3253# Use ip address instead of hostname in $DISPLAY
2956if test ! -z "$IPADDR_IN_DISPLAY" ; then 3254if test ! -z "$IPADDR_IN_DISPLAY" ; then
2957 DISPLAY_HACK_MSG="yes" 3255 DISPLAY_HACK_MSG="yes"
2958 AC_DEFINE(IPADDR_IN_DISPLAY) 3256 AC_DEFINE(IPADDR_IN_DISPLAY, 1,
3257 [Define if you need to use IP address
3258 instead of hostname in $DISPLAY])
2959else 3259else
2960 DISPLAY_HACK_MSG="no" 3260 DISPLAY_HACK_MSG="no"
2961 AC_ARG_WITH(ipaddr-display, 3261 AC_ARG_WITH(ipaddr-display,
@@ -2978,17 +3278,21 @@ AC_ARG_ENABLE(etc-default-login,
2978 else 3278 else
2979 etc_default_login=yes 3279 etc_default_login=yes
2980 fi ], 3280 fi ],
2981 [ etc_default_login=yes ] 3281 [ if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes";
3282 then
3283 AC_MSG_WARN([cross compiling: not checking /etc/default/login])
3284 etc_default_login=no
3285 else
3286 etc_default_login=yes
3287 fi ]
2982) 3288)
2983 3289
2984if test "x$etc_default_login" != "xno"; then 3290if test "x$etc_default_login" != "xno"; then
2985 AC_CHECK_FILE("/etc/default/login", 3291 AC_CHECK_FILE("/etc/default/login",
2986 [ external_path_file=/etc/default/login ]) 3292 [ external_path_file=/etc/default/login ])
2987 if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; 3293 if test "x$external_path_file" = "x/etc/default/login"; then
2988 then 3294 AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN, 1,
2989 AC_MSG_WARN([cross compiling: Disabling /etc/default/login test]) 3295 [Define if your system has /etc/default/login])
2990 elif test "x$external_path_file" = "x/etc/default/login"; then
2991 AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN)
2992 fi 3296 fi
2993fi 3297fi
2994 3298
@@ -3025,8 +3329,8 @@ $external_path_file .])
3025If PATH is defined in $external_path_file, ensure the path to scp is included, 3329If PATH is defined in $external_path_file, ensure the path to scp is included,
3026otherwise scp will not work.]) 3330otherwise scp will not work.])
3027 fi 3331 fi
3028 AC_TRY_RUN( 3332 AC_RUN_IFELSE(
3029 [ 3333 [AC_LANG_SOURCE([[
3030/* find out what STDPATH is */ 3334/* find out what STDPATH is */
3031#include <stdio.h> 3335#include <stdio.h>
3032#ifdef HAVE_PATHS_H 3336#ifdef HAVE_PATHS_H
@@ -3058,7 +3362,8 @@ main()
3058 3362
3059 exit(0); 3363 exit(0);
3060} 3364}
3061 ], [ user_path=`cat conftest.stdpath` ], 3365 ]])],
3366 [ user_path=`cat conftest.stdpath` ],
3062 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ], 3367 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ],
3063 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ] 3368 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ]
3064 ) 3369 )
@@ -3081,7 +3386,7 @@ main()
3081 fi ] 3386 fi ]
3082) 3387)
3083if test "x$external_path_file" != "x/etc/login.conf" ; then 3388if test "x$external_path_file" != "x/etc/login.conf" ; then
3084 AC_DEFINE_UNQUOTED(USER_PATH, "$user_path") 3389 AC_DEFINE_UNQUOTED(USER_PATH, "$user_path", [Specify default $PATH])
3085 AC_SUBST(user_path) 3390 AC_SUBST(user_path)
3086fi 3391fi
3087 3392
@@ -3091,7 +3396,9 @@ AC_ARG_WITH(superuser-path,
3091 [ 3396 [
3092 if test -n "$withval" && test "x$withval" != "xno" && \ 3397 if test -n "$withval" && test "x$withval" != "xno" && \
3093 test "x${withval}" != "xyes"; then 3398 test "x${withval}" != "xyes"; then
3094 AC_DEFINE_UNQUOTED(SUPERUSER_PATH, "$withval") 3399 AC_DEFINE_UNQUOTED(SUPERUSER_PATH, "$withval",
3400 [Define if you want a different $PATH
3401 for the superuser])
3095 superuser_path=$withval 3402 superuser_path=$withval
3096 fi 3403 fi
3097 ] 3404 ]
@@ -3105,7 +3412,9 @@ AC_ARG_WITH(4in6,
3105 [ 3412 [
3106 if test "x$withval" != "xno" ; then 3413 if test "x$withval" != "xno" ; then
3107 AC_MSG_RESULT(yes) 3414 AC_MSG_RESULT(yes)
3108 AC_DEFINE(IPV4_IN_IPV6) 3415 AC_DEFINE(IPV4_IN_IPV6, 1,
3416 [Detect IPv4 in IPv6 mapped addresses
3417 and treat as IPv4])
3109 IPV4_IN6_HACK_MSG="yes" 3418 IPV4_IN6_HACK_MSG="yes"
3110 else 3419 else
3111 AC_MSG_RESULT(no) 3420 AC_MSG_RESULT(no)
@@ -3127,7 +3436,8 @@ AC_ARG_WITH(bsd-auth,
3127 [ --with-bsd-auth Enable BSD auth support], 3436 [ --with-bsd-auth Enable BSD auth support],
3128 [ 3437 [
3129 if test "x$withval" != "xno" ; then 3438 if test "x$withval" != "xno" ; then
3130 AC_DEFINE(BSD_AUTH) 3439 AC_DEFINE(BSD_AUTH, 1,
3440 [Define if you have BSD auth support])
3131 BSD_AUTH_MSG=yes 3441 BSD_AUTH_MSG=yes
3132 fi 3442 fi
3133 ] 3443 ]
@@ -3156,7 +3466,7 @@ AC_ARG_WITH(pid-dir,
3156 ] 3466 ]
3157) 3467)
3158 3468
3159AC_DEFINE_UNQUOTED(_PATH_SSH_PIDDIR, "$piddir") 3469AC_DEFINE_UNQUOTED(_PATH_SSH_PIDDIR, "$piddir", [Specify location of ssh.pid])
3160AC_SUBST(piddir) 3470AC_SUBST(piddir)
3161 3471
3162dnl allow user to disable some login recording features 3472dnl allow user to disable some login recording features
@@ -3180,7 +3490,8 @@ AC_ARG_ENABLE(utmpx,
3180 [ --disable-utmpx disable use of utmpx even if detected [no]], 3490 [ --disable-utmpx disable use of utmpx even if detected [no]],
3181 [ 3491 [
3182 if test "x$enableval" = "xno" ; then 3492 if test "x$enableval" = "xno" ; then
3183 AC_DEFINE(DISABLE_UTMPX) 3493 AC_DEFINE(DISABLE_UTMPX, 1,
3494 [Define if you don't want to use utmpx])
3184 fi 3495 fi
3185 ] 3496 ]
3186) 3497)
@@ -3196,7 +3507,8 @@ AC_ARG_ENABLE(wtmpx,
3196 [ --disable-wtmpx disable use of wtmpx even if detected [no]], 3507 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
3197 [ 3508 [
3198 if test "x$enableval" = "xno" ; then 3509 if test "x$enableval" = "xno" ; then
3199 AC_DEFINE(DISABLE_WTMPX) 3510 AC_DEFINE(DISABLE_WTMPX, 1,
3511 [Define if you don't want to use wtmpx])
3200 fi 3512 fi
3201 ] 3513 ]
3202) 3514)
@@ -3212,7 +3524,9 @@ AC_ARG_ENABLE(pututline,
3212 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]], 3524 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
3213 [ 3525 [
3214 if test "x$enableval" = "xno" ; then 3526 if test "x$enableval" = "xno" ; then
3215 AC_DEFINE(DISABLE_PUTUTLINE) 3527 AC_DEFINE(DISABLE_PUTUTLINE, 1,
3528 [Define if you don't want to use pututline()
3529 etc. to write [uw]tmp])
3216 fi 3530 fi
3217 ] 3531 ]
3218) 3532)
@@ -3220,7 +3534,9 @@ AC_ARG_ENABLE(pututxline,
3220 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]], 3534 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
3221 [ 3535 [
3222 if test "x$enableval" = "xno" ; then 3536 if test "x$enableval" = "xno" ; then
3223 AC_DEFINE(DISABLE_PUTUTXLINE) 3537 AC_DEFINE(DISABLE_PUTUTXLINE, 1,
3538 [Define if you don't want to use pututxline()
3539 etc. to write [uw]tmpx])
3224 fi 3540 fi
3225 ] 3541 ]
3226) 3542)
@@ -3295,7 +3611,8 @@ if test -z "$conf_lastlog_location"; then
3295fi 3611fi
3296 3612
3297if test -n "$conf_lastlog_location"; then 3613if test -n "$conf_lastlog_location"; then
3298 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location") 3614 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location",
3615 [Define if you want to specify the path to your lastlog file])
3299fi 3616fi
3300 3617
3301dnl utmp detection 3618dnl utmp detection
@@ -3325,7 +3642,8 @@ if test -z "$conf_utmp_location"; then
3325 fi 3642 fi
3326fi 3643fi
3327if test -n "$conf_utmp_location"; then 3644if test -n "$conf_utmp_location"; then
3328 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location") 3645 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location",
3646 [Define if you want to specify the path to your utmp file])
3329fi 3647fi
3330 3648
3331dnl wtmp detection 3649dnl wtmp detection
@@ -3355,7 +3673,8 @@ if test -z "$conf_wtmp_location"; then
3355 fi 3673 fi
3356fi 3674fi
3357if test -n "$conf_wtmp_location"; then 3675if test -n "$conf_wtmp_location"; then
3358 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location") 3676 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location",
3677 [Define if you want to specify the path to your wtmp file])
3359fi 3678fi
3360 3679
3361 3680
@@ -3383,7 +3702,8 @@ if test -z "$conf_utmpx_location"; then
3383 AC_DEFINE(DISABLE_UTMPX) 3702 AC_DEFINE(DISABLE_UTMPX)
3384 fi 3703 fi
3385else 3704else
3386 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location") 3705 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location",
3706 [Define if you want to specify the path to your utmpx file])
3387fi 3707fi
3388 3708
3389dnl wtmpx detection 3709dnl wtmpx detection
@@ -3408,7 +3728,8 @@ if test -z "$conf_wtmpx_location"; then
3408 AC_DEFINE(DISABLE_WTMPX) 3728 AC_DEFINE(DISABLE_WTMPX)
3409 fi 3729 fi
3410else 3730else
3411 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location") 3731 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location",
3732 [Define if you want to specify the path to your wtmpx file])
3412fi 3733fi
3413 3734
3414 3735