diff options
author | Colin Watson <cjwatson@debian.org> | 2003-09-23 18:08:35 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2003-09-23 18:08:35 +0000 |
commit | d59fd3e421aa81b8e5e118f3f806081df2aca879 (patch) | |
tree | 356a4e607edc979c625bb33db63c656d771478bd /configure.ac | |
parent | 7505658c58e96b8d270f1928a0e1fa7f3e0c266b (diff) | |
parent | 45431c9b4677608680cd071768cbf156b316a7e8 (diff) |
Merge 3.7.1p2 to the trunk. I have absolutely no idea yet whether this will
work.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 493 |
1 files changed, 313 insertions, 180 deletions
diff --git a/configure.ac b/configure.ac index e5a8d6f05..7ddcb777f 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,4 +1,4 @@ | |||
1 | # $Id: configure.ac,v 1.113.2.1 2003/04/29 09:12:08 djm Exp $ | 1 | # $Id: configure.ac,v 1.154.2.1 2003/09/16 05:48:15 tim Exp $ |
2 | 2 | ||
3 | AC_INIT | 3 | AC_INIT |
4 | AC_CONFIG_SRCDIR([ssh.c]) | 4 | AC_CONFIG_SRCDIR([ssh.c]) |
@@ -9,6 +9,7 @@ AC_CANONICAL_HOST | |||
9 | AC_C_BIGENDIAN | 9 | AC_C_BIGENDIAN |
10 | 10 | ||
11 | # Checks for programs. | 11 | # Checks for programs. |
12 | AC_PROG_AWK | ||
12 | AC_PROG_CPP | 13 | AC_PROG_CPP |
13 | AC_PROG_RANLIB | 14 | AC_PROG_RANLIB |
14 | AC_PROG_INSTALL | 15 | AC_PROG_INSTALL |
@@ -54,7 +55,6 @@ fi | |||
54 | # Check for some target-specific stuff | 55 | # Check for some target-specific stuff |
55 | case "$host" in | 56 | case "$host" in |
56 | *-*-aix*) | 57 | *-*-aix*) |
57 | AFS_LIBS="-lld" | ||
58 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" | 58 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
59 | LDFLAGS="$LDFLAGS -L/usr/local/lib" | 59 | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
60 | AC_MSG_CHECKING([how to specify blibpath for linker ($LD)]) | 60 | AC_MSG_CHECKING([how to specify blibpath for linker ($LD)]) |
@@ -75,19 +75,36 @@ case "$host" in | |||
75 | AC_MSG_RESULT($blibflags) | 75 | AC_MSG_RESULT($blibflags) |
76 | fi | 76 | fi |
77 | LDFLAGS="$saved_LDFLAGS" | 77 | LDFLAGS="$saved_LDFLAGS" |
78 | dnl Check for authenticate. Might be in libs.a on older AIXes | ||
78 | AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)], | 79 | AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)], |
79 | [AC_CHECK_LIB(s,authenticate, | 80 | [AC_CHECK_LIB(s,authenticate, |
80 | [ AC_DEFINE(WITH_AIXAUTHENTICATE) | 81 | [ AC_DEFINE(WITH_AIXAUTHENTICATE) |
81 | LIBS="$LIBS -ls" | 82 | LIBS="$LIBS -ls" |
82 | ]) | 83 | ]) |
83 | ]) | 84 | ]) |
85 | dnl Check if loginfailed is declared and takes 4 arguments (AIX >= 5.2) | ||
86 | AC_CHECK_DECL(loginfailed, | ||
87 | [AC_MSG_CHECKING(if loginfailed takes 4 arguments) | ||
88 | AC_TRY_COMPILE( | ||
89 | [#include <usersec.h>], | ||
90 | [(void)loginfailed("user","host","tty",0);], | ||
91 | [AC_MSG_RESULT(yes) | ||
92 | AC_DEFINE(AIX_LOGINFAILED_4ARG)], | ||
93 | [AC_MSG_RESULT(no)] | ||
94 | )], | ||
95 | [], | ||
96 | [#include <usersec.h>] | ||
97 | ) | ||
98 | AC_CHECK_FUNCS(setauthdb) | ||
84 | AC_DEFINE(BROKEN_GETADDRINFO) | 99 | AC_DEFINE(BROKEN_GETADDRINFO) |
85 | AC_DEFINE(BROKEN_REALPATH) | 100 | AC_DEFINE(BROKEN_REALPATH) |
101 | AC_DEFINE(SETEUID_BREAKS_SETUID) | ||
102 | AC_DEFINE(BROKEN_SETREUID) | ||
103 | AC_DEFINE(BROKEN_SETREGID) | ||
86 | dnl AIX handles lastlog as part of its login message | 104 | dnl AIX handles lastlog as part of its login message |
87 | AC_DEFINE(DISABLE_LASTLOG) | 105 | AC_DEFINE(DISABLE_LASTLOG) |
88 | AC_DEFINE(LOGIN_NEEDS_UTMPX) | 106 | AC_DEFINE(LOGIN_NEEDS_UTMPX) |
89 | AC_DEFINE(SETPROCTITLE_STRATEGY,PS_USE_CLOBBER_ARGV) | 107 | AC_DEFINE(SPT_TYPE,SPT_REUSEARGV) |
90 | AC_DEFINE(SETPROCTITLE_PS_PADDING, '\0') | ||
91 | ;; | 108 | ;; |
92 | *-*-cygwin*) | 109 | *-*-cygwin*) |
93 | check_for_libcrypt_later=1 | 110 | check_for_libcrypt_later=1 |
@@ -95,7 +112,6 @@ case "$host" in | |||
95 | AC_DEFINE(HAVE_CYGWIN) | 112 | AC_DEFINE(HAVE_CYGWIN) |
96 | AC_DEFINE(USE_PIPES) | 113 | AC_DEFINE(USE_PIPES) |
97 | AC_DEFINE(DISABLE_SHADOW) | 114 | AC_DEFINE(DISABLE_SHADOW) |
98 | AC_DEFINE(IPV4_DEFAULT) | ||
99 | AC_DEFINE(IP_TOS_IS_BROKEN) | 115 | AC_DEFINE(IP_TOS_IS_BROKEN) |
100 | AC_DEFINE(NO_X11_UNIX_SOCKETS) | 116 | AC_DEFINE(NO_X11_UNIX_SOCKETS) |
101 | AC_DEFINE(NO_IPPORT_RESERVED_CONCEPT) | 117 | AC_DEFINE(NO_IPPORT_RESERVED_CONCEPT) |
@@ -129,7 +145,8 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) | |||
129 | AC_DEFINE(LOGIN_NEEDS_UTMPX) | 145 | AC_DEFINE(LOGIN_NEEDS_UTMPX) |
130 | AC_DEFINE(DISABLE_SHADOW) | 146 | AC_DEFINE(DISABLE_SHADOW) |
131 | AC_DEFINE(DISABLE_UTMP) | 147 | AC_DEFINE(DISABLE_UTMP) |
132 | AC_DEFINE(SETPROCTITLE_STRATEGY,PS_USE_PSTAT) | 148 | AC_DEFINE(LOCKED_PASSWD_STRING, "*") |
149 | AC_DEFINE(SPT_TYPE,SPT_PSTAT) | ||
133 | LIBS="$LIBS -lsec -lsecpw" | 150 | LIBS="$LIBS -lsec -lsecpw" |
134 | AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])) | 151 | AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])) |
135 | disable_ptmx_check=yes | 152 | disable_ptmx_check=yes |
@@ -145,7 +162,8 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) | |||
145 | AC_DEFINE(LOGIN_NEEDS_UTMPX) | 162 | AC_DEFINE(LOGIN_NEEDS_UTMPX) |
146 | AC_DEFINE(DISABLE_SHADOW) | 163 | AC_DEFINE(DISABLE_SHADOW) |
147 | AC_DEFINE(DISABLE_UTMP) | 164 | AC_DEFINE(DISABLE_UTMP) |
148 | AC_DEFINE(SETPROCTITLE_STRATEGY,PS_USE_PSTAT) | 165 | AC_DEFINE(LOCKED_PASSWD_STRING, "*") |
166 | AC_DEFINE(SPT_TYPE,SPT_PSTAT) | ||
149 | LIBS="$LIBS -lsec" | 167 | LIBS="$LIBS -lsec" |
150 | AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])) | 168 | AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])) |
151 | ;; | 169 | ;; |
@@ -158,7 +176,8 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) | |||
158 | AC_DEFINE(LOGIN_NEEDS_UTMPX) | 176 | AC_DEFINE(LOGIN_NEEDS_UTMPX) |
159 | AC_DEFINE(DISABLE_SHADOW) | 177 | AC_DEFINE(DISABLE_SHADOW) |
160 | AC_DEFINE(DISABLE_UTMP) | 178 | AC_DEFINE(DISABLE_UTMP) |
161 | AC_DEFINE(SETPROCTITLE_STRATEGY,PS_USE_PSTAT) | 179 | AC_DEFINE(LOCKED_PASSWD_STRING, "*") |
180 | AC_DEFINE(SPT_TYPE,SPT_PSTAT) | ||
162 | LIBS="$LIBS -lsec" | 181 | LIBS="$LIBS -lsec" |
163 | AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])) | 182 | AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])) |
164 | ;; | 183 | ;; |
@@ -168,6 +187,7 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) | |||
168 | PATH="$PATH:/usr/etc" | 187 | PATH="$PATH:/usr/etc" |
169 | AC_DEFINE(BROKEN_INET_NTOA) | 188 | AC_DEFINE(BROKEN_INET_NTOA) |
170 | AC_DEFINE(WITH_ABBREV_NO_TTY) | 189 | AC_DEFINE(WITH_ABBREV_NO_TTY) |
190 | AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*") | ||
171 | ;; | 191 | ;; |
172 | *-*-irix6*) | 192 | *-*-irix6*) |
173 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" | 193 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
@@ -179,15 +199,22 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) | |||
179 | AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)]) | 199 | AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)]) |
180 | AC_DEFINE(BROKEN_INET_NTOA) | 200 | AC_DEFINE(BROKEN_INET_NTOA) |
181 | AC_DEFINE(WITH_ABBREV_NO_TTY) | 201 | AC_DEFINE(WITH_ABBREV_NO_TTY) |
202 | AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*") | ||
182 | ;; | 203 | ;; |
183 | *-*-linux*) | 204 | *-*-linux*) |
184 | no_dev_ptmx=1 | 205 | no_dev_ptmx=1 |
185 | check_for_libcrypt_later=1 | 206 | check_for_libcrypt_later=1 |
207 | check_for_openpty_ctty_bug=1 | ||
186 | AC_DEFINE(DONT_TRY_OTHER_AF) | 208 | AC_DEFINE(DONT_TRY_OTHER_AF) |
187 | AC_DEFINE(PAM_TTY_KLUDGE) | 209 | AC_DEFINE(PAM_TTY_KLUDGE) |
188 | AC_DEFINE(SETPROCTITLE_STRATEGY,PS_USE_CLOBBER_ARGV) | 210 | AC_DEFINE(LOCKED_PASSWD_PREFIX, "!!") |
189 | AC_DEFINE(SETPROCTITLE_PS_PADDING, '\0') | 211 | AC_DEFINE(SPT_TYPE,SPT_REUSEARGV) |
190 | inet6_default_4in6=yes | 212 | inet6_default_4in6=yes |
213 | case `uname -r` in | ||
214 | 1.*|2.0.*) | ||
215 | AC_DEFINE(BROKEN_CMSG_TYPE) | ||
216 | ;; | ||
217 | esac | ||
191 | ;; | 218 | ;; |
192 | mips-sony-bsd|mips-sony-newsos4) | 219 | mips-sony-bsd|mips-sony-newsos4) |
193 | AC_DEFINE(HAVE_NEWS4) | 220 | AC_DEFINE(HAVE_NEWS4) |
@@ -220,7 +247,10 @@ mips-sony-bsd|mips-sony-newsos4) | |||
220 | AC_DEFINE(LOGIN_NEEDS_UTMPX) | 247 | AC_DEFINE(LOGIN_NEEDS_UTMPX) |
221 | AC_DEFINE(LOGIN_NEEDS_TERM) | 248 | AC_DEFINE(LOGIN_NEEDS_TERM) |
222 | AC_DEFINE(PAM_TTY_KLUDGE) | 249 | AC_DEFINE(PAM_TTY_KLUDGE) |
223 | AC_DEFINE(STREAMS_PUSH_ACQUIRES_CTTY) | 250 | AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*") |
251 | # Pushing STREAMS modules will cause sshd to acquire a controlling tty. | ||
252 | AC_DEFINE(SSHD_ACQUIRES_CTTY) | ||
253 | external_path_file=/etc/default/login | ||
224 | # hardwire lastlog location (can't detect it on some versions) | 254 | # hardwire lastlog location (can't detect it on some versions) |
225 | conf_lastlog_location="/var/adm/lastlog" | 255 | conf_lastlog_location="/var/adm/lastlog" |
226 | AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x) | 256 | AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x) |
@@ -247,6 +277,7 @@ mips-sony-bsd|mips-sony-newsos4) | |||
247 | LDFLAGS="$LDFLAGS -L/usr/local/lib" | 277 | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
248 | LIBS="$LIBS -lc89" | 278 | LIBS="$LIBS -lc89" |
249 | AC_DEFINE(USE_PIPES) | 279 | AC_DEFINE(USE_PIPES) |
280 | AC_DEFINE(SSHD_ACQUIRES_CTTY) | ||
250 | ;; | 281 | ;; |
251 | *-sni-sysv*) | 282 | *-sni-sysv*) |
252 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" | 283 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
@@ -255,6 +286,8 @@ mips-sony-bsd|mips-sony-newsos4) | |||
255 | IPADDR_IN_DISPLAY=yes | 286 | IPADDR_IN_DISPLAY=yes |
256 | AC_DEFINE(USE_PIPES) | 287 | AC_DEFINE(USE_PIPES) |
257 | AC_DEFINE(IP_TOS_IS_BROKEN) | 288 | AC_DEFINE(IP_TOS_IS_BROKEN) |
289 | AC_DEFINE(SSHD_ACQUIRES_CTTY) | ||
290 | external_path_file=/etc/default/login | ||
258 | # /usr/ucblib/libucb.a no longer needed on ReliantUNIX | 291 | # /usr/ucblib/libucb.a no longer needed on ReliantUNIX |
259 | # Attention: always take care to bind libsocket and libnsl before libc, | 292 | # Attention: always take care to bind libsocket and libnsl before libc, |
260 | # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog | 293 | # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog |
@@ -263,11 +296,17 @@ mips-sony-bsd|mips-sony-newsos4) | |||
263 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" | 296 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
264 | LDFLAGS="$LDFLAGS -L/usr/local/lib" | 297 | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
265 | AC_DEFINE(USE_PIPES) | 298 | AC_DEFINE(USE_PIPES) |
299 | AC_DEFINE(SETEUID_BREAKS_SETUID) | ||
300 | AC_DEFINE(BROKEN_SETREUID) | ||
301 | AC_DEFINE(BROKEN_SETREGID) | ||
266 | ;; | 302 | ;; |
267 | *-*-sysv5*) | 303 | *-*-sysv5*) |
268 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" | 304 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
269 | LDFLAGS="$LDFLAGS -L/usr/local/lib" | 305 | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
270 | AC_DEFINE(USE_PIPES) | 306 | AC_DEFINE(USE_PIPES) |
307 | AC_DEFINE(SETEUID_BREAKS_SETUID) | ||
308 | AC_DEFINE(BROKEN_SETREUID) | ||
309 | AC_DEFINE(BROKEN_SETREGID) | ||
271 | ;; | 310 | ;; |
272 | *-*-sysv*) | 311 | *-*-sysv*) |
273 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" | 312 | CPPFLAGS="$CPPFLAGS -I/usr/local/include" |
@@ -284,6 +323,7 @@ mips-sony-bsd|mips-sony-newsos4) | |||
284 | AC_DEFINE(HAVE_SECUREWARE) | 323 | AC_DEFINE(HAVE_SECUREWARE) |
285 | AC_DEFINE(DISABLE_SHADOW) | 324 | AC_DEFINE(DISABLE_SHADOW) |
286 | AC_DEFINE(BROKEN_SAVED_UIDS) | 325 | AC_DEFINE(BROKEN_SAVED_UIDS) |
326 | AC_DEFINE(WITH_ABBREV_NO_TTY) | ||
287 | AC_CHECK_FUNCS(getluid setluid) | 327 | AC_CHECK_FUNCS(getluid setluid) |
288 | MANTYPE=man | 328 | MANTYPE=man |
289 | do_sco3_extra_lib_check=yes | 329 | do_sco3_extra_lib_check=yes |
@@ -300,6 +340,10 @@ mips-sony-bsd|mips-sony-newsos4) | |||
300 | AC_DEFINE(HAVE_SECUREWARE) | 340 | AC_DEFINE(HAVE_SECUREWARE) |
301 | AC_DEFINE(DISABLE_SHADOW) | 341 | AC_DEFINE(DISABLE_SHADOW) |
302 | AC_DEFINE(DISABLE_FD_PASSING) | 342 | AC_DEFINE(DISABLE_FD_PASSING) |
343 | AC_DEFINE(SETEUID_BREAKS_SETUID) | ||
344 | AC_DEFINE(BROKEN_SETREUID) | ||
345 | AC_DEFINE(BROKEN_SETREGID) | ||
346 | AC_DEFINE(WITH_ABBREV_NO_TTY) | ||
303 | AC_CHECK_FUNCS(getluid setluid) | 347 | AC_CHECK_FUNCS(getluid setluid) |
304 | MANTYPE=man | 348 | MANTYPE=man |
305 | ;; | 349 | ;; |
@@ -310,6 +354,14 @@ mips-sony-bsd|mips-sony-newsos4) | |||
310 | LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm" | 354 | LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm" |
311 | MANTYPE=cat | 355 | MANTYPE=cat |
312 | ;; | 356 | ;; |
357 | *-*-unicosmp*) | ||
358 | AC_DEFINE(WITH_ABBREV_NO_TTY) | ||
359 | AC_DEFINE(USE_PIPES) | ||
360 | AC_DEFINE(DISABLE_FD_PASSING) | ||
361 | LDFLAGS="$LDFLAGS" | ||
362 | LIBS="$LIBS -lgen -lacid" | ||
363 | MANTYPE=cat | ||
364 | ;; | ||
313 | *-*-unicos*) | 365 | *-*-unicos*) |
314 | AC_DEFINE(USE_PIPES) | 366 | AC_DEFINE(USE_PIPES) |
315 | AC_DEFINE(DISABLE_FD_PASSING) | 367 | AC_DEFINE(DISABLE_FD_PASSING) |
@@ -342,6 +394,8 @@ mips-sony-bsd|mips-sony-newsos4) | |||
342 | fi | 394 | fi |
343 | fi | 395 | fi |
344 | AC_DEFINE(DISABLE_FD_PASSING) | 396 | AC_DEFINE(DISABLE_FD_PASSING) |
397 | AC_DEFINE(BROKEN_GETADDRINFO) | ||
398 | AC_DEFINE(LOCKED_PASSWD_SUBSTR, "Nologin") | ||
345 | ;; | 399 | ;; |
346 | 400 | ||
347 | *-*-nto-qnx) | 401 | *-*-nto-qnx) |
@@ -387,14 +441,26 @@ AC_ARG_WITH(libs, | |||
387 | ] | 441 | ] |
388 | ) | 442 | ) |
389 | 443 | ||
444 | AC_MSG_CHECKING(compiler and flags for sanity) | ||
445 | AC_TRY_RUN([ | ||
446 | #include <stdio.h> | ||
447 | int main(){exit(0);} | ||
448 | ], | ||
449 | [ AC_MSG_RESULT(yes) ], | ||
450 | [ | ||
451 | AC_MSG_RESULT(no) | ||
452 | AC_MSG_ERROR([*** compiler cannot create working executables, check config.log ***]) | ||
453 | ] | ||
454 | ) | ||
455 | |||
390 | # Checks for header files. | 456 | # Checks for header files. |
391 | AC_CHECK_HEADERS(bstring.h crypt.h endian.h floatingpoint.h \ | 457 | AC_CHECK_HEADERS(bstring.h crypt.h endian.h features.h floatingpoint.h \ |
392 | getopt.h glob.h ia.h lastlog.h libgen.h limits.h login.h \ | 458 | getopt.h glob.h ia.h lastlog.h limits.h login.h \ |
393 | login_cap.h maillock.h netdb.h netgroup.h \ | 459 | login_cap.h maillock.h netdb.h netgroup.h \ |
394 | netinet/in_systm.h paths.h pty.h readpassphrase.h \ | 460 | netinet/in_systm.h paths.h pty.h readpassphrase.h \ |
395 | rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \ | 461 | rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \ |
396 | strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h \ | 462 | strings.h sys/strtio.h sys/audit.h sys/bitypes.h sys/bsdtty.h \ |
397 | sys/mman.h sys/pstat.h sys/select.h sys/stat.h \ | 463 | sys/cdefs.h sys/mman.h sys/pstat.h sys/select.h sys/stat.h \ |
398 | sys/stropts.h sys/sysmacros.h sys/time.h sys/timers.h \ | 464 | sys/stropts.h sys/sysmacros.h sys/time.h sys/timers.h \ |
399 | sys/un.h time.h tmpdir.h ttyent.h usersec.h \ | 465 | sys/un.h time.h tmpdir.h ttyent.h usersec.h \ |
400 | util.h utime.h utmp.h utmpx.h) | 466 | util.h utime.h utmp.h utmpx.h) |
@@ -410,8 +476,46 @@ if test "x$with_tcp_wrappers" != "xno" ; then | |||
410 | fi | 476 | fi |
411 | fi | 477 | fi |
412 | 478 | ||
479 | dnl IRIX and Solaris 2.5.1 have dirname() in libgen | ||
480 | AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[ | ||
481 | AC_CHECK_LIB(gen, dirname,[ | ||
482 | AC_CACHE_CHECK([for broken dirname], | ||
483 | ac_cv_have_broken_dirname, [ | ||
484 | save_LIBS="$LIBS" | ||
485 | LIBS="$LIBS -lgen" | ||
486 | AC_TRY_RUN( | ||
487 | [ | ||
488 | #include <libgen.h> | ||
489 | #include <string.h> | ||
490 | |||
491 | int main(int argc, char **argv) { | ||
492 | char *s, buf[32]; | ||
493 | |||
494 | strncpy(buf,"/etc", 32); | ||
495 | s = dirname(buf); | ||
496 | if (!s || strncmp(s, "/", 32) != 0) { | ||
497 | exit(1); | ||
498 | } else { | ||
499 | exit(0); | ||
500 | } | ||
501 | } | ||
502 | ], | ||
503 | [ ac_cv_have_broken_dirname="no" ], | ||
504 | [ ac_cv_have_broken_dirname="yes" ] | ||
505 | ) | ||
506 | LIBS="$save_LIBS" | ||
507 | ]) | ||
508 | if test "x$ac_cv_have_broken_dirname" = "xno" ; then | ||
509 | LIBS="$LIBS -lgen" | ||
510 | AC_DEFINE(HAVE_DIRNAME) | ||
511 | AC_CHECK_HEADERS(libgen.h) | ||
512 | fi | ||
513 | ]) | ||
514 | ]) | ||
515 | |||
413 | AC_CHECK_FUNC(getspnam, , | 516 | AC_CHECK_FUNC(getspnam, , |
414 | AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen")) | 517 | AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen")) |
518 | AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME)) | ||
415 | 519 | ||
416 | AC_ARG_WITH(rpath, | 520 | AC_ARG_WITH(rpath, |
417 | [ --without-rpath Disable auto-added -R linker paths], | 521 | [ --without-rpath Disable auto-added -R linker paths], |
@@ -608,61 +712,32 @@ AC_ARG_WITH(tcp-wrappers, | |||
608 | 712 | ||
609 | dnl Checks for library functions. Please keep in alphabetical order | 713 | dnl Checks for library functions. Please keep in alphabetical order |
610 | AC_CHECK_FUNCS(\ | 714 | AC_CHECK_FUNCS(\ |
611 | arc4random __b64_ntop b64_ntop __b64_pton b64_pton basename bcopy \ | 715 | arc4random __b64_ntop b64_ntop __b64_pton b64_pton basename \ |
612 | bindresvport_sa clock fchmod fchown freeaddrinfo futimes \ | 716 | bcopy bindresvport_sa clock fchmod fchown freeaddrinfo futimes \ |
613 | gai_strerror getaddrinfo getcwd getgrouplist getnameinfo getopt \ | 717 | gai_strerror getaddrinfo getcwd getgrouplist getnameinfo getopt \ |
614 | getpeereid _getpty getrlimit getrusage getttyent glob inet_aton \ | 718 | getpeereid _getpty getrlimit getttyent glob inet_aton \ |
615 | inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove \ | 719 | inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove \ |
616 | mkdtemp mmap ngetaddrinfo nsleep ogetaddrinfo openpty pstat \ | 720 | mkdtemp mmap ngetaddrinfo nsleep ogetaddrinfo openlog_r openpty \ |
617 | readpassphrase realpath recvmsg rresvport_af sendmsg setdtablesize \ | 721 | pstat readpassphrase realpath recvmsg rresvport_af sendmsg \ |
618 | setegid setenv seteuid setgroups setlogin setpcred setproctitle \ | 722 | setdtablesize setegid setenv seteuid setgroups setlogin setpcred \ |
619 | setresgid setreuid setrlimit setsid setvbuf sigaction sigvec \ | 723 | setproctitle setregid setresgid setresuid setreuid setrlimit \ |
620 | snprintf socketpair strerror strlcat strlcpy strmode strnvis \ | 724 | setsid setvbuf sigaction sigvec snprintf socketpair strerror \ |
621 | sysconf tcgetpgrp truncate utimes vhangup vsnprintf waitpid \ | 725 | strlcat strlcpy strmode strnvis sysconf tcgetpgrp \ |
726 | truncate utimes vhangup vsnprintf waitpid \ | ||
622 | ) | 727 | ) |
623 | 728 | ||
624 | AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP)) | 729 | AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP)) |
625 | AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME)) | ||
626 | 730 | ||
627 | dnl Make sure strsep prototype is defined before defining HAVE_STRSEP | 731 | dnl Make sure prototypes are defined for these before using them. |
628 | AC_CHECK_DECL(strsep, [AC_CHECK_FUNCS(strsep)]) | 732 | AC_CHECK_DECL(strsep, [AC_CHECK_FUNCS(strsep)]) |
733 | AC_CHECK_DECL(getrusage, [AC_CHECK_FUNCS(getrusage)]) | ||
629 | 734 | ||
630 | dnl IRIX and Solaris 2.5.1 have dirname() in libgen | 735 | dnl tcsendbreak might be a macro |
631 | AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[ | 736 | AC_CHECK_DECL(tcsendbreak, |
632 | AC_CHECK_LIB(gen, dirname,[ | 737 | [AC_DEFINE(HAVE_TCSENDBREAK)], |
633 | AC_CACHE_CHECK([for broken dirname], | 738 | [AC_CHECK_FUNCS(tcsendbreak)], |
634 | ac_cv_have_broken_dirname, [ | 739 | [#include <termios.h>] |
635 | save_LIBS="$LIBS" | 740 | ) |
636 | LIBS="$LIBS -lgen" | ||
637 | AC_TRY_RUN( | ||
638 | [ | ||
639 | #include <libgen.h> | ||
640 | #include <string.h> | ||
641 | |||
642 | int main(int argc, char **argv) { | ||
643 | char *s, buf[32]; | ||
644 | |||
645 | strncpy(buf,"/etc", 32); | ||
646 | s = dirname(buf); | ||
647 | if (!s || strncmp(s, "/", 32) != 0) { | ||
648 | exit(1); | ||
649 | } else { | ||
650 | exit(0); | ||
651 | } | ||
652 | } | ||
653 | ], | ||
654 | [ ac_cv_have_broken_dirname="no" ], | ||
655 | [ ac_cv_have_broken_dirname="yes" ] | ||
656 | ) | ||
657 | LIBS="$save_LIBS" | ||
658 | ]) | ||
659 | if test "x$ac_cv_have_broken_dirname" = "xno" ; then | ||
660 | LIBS="$LIBS -lgen" | ||
661 | AC_DEFINE(HAVE_DIRNAME) | ||
662 | AC_CHECK_HEADERS(libgen.h) | ||
663 | fi | ||
664 | ]) | ||
665 | ]) | ||
666 | 741 | ||
667 | dnl Checks for time functions | 742 | dnl Checks for time functions |
668 | AC_CHECK_FUNCS(gettimeofday time) | 743 | AC_CHECK_FUNCS(gettimeofday time) |
@@ -726,6 +801,53 @@ unlink(template); exit(0); | |||
726 | ) | 801 | ) |
727 | fi | 802 | fi |
728 | 803 | ||
804 | dnl make sure that openpty does not reacquire controlling terminal | ||
805 | if test ! -z "$check_for_openpty_ctty_bug"; then | ||
806 | AC_MSG_CHECKING(if openpty correctly handles controlling tty) | ||
807 | AC_TRY_RUN( | ||
808 | [ | ||
809 | #include <stdio.h> | ||
810 | #include <sys/fcntl.h> | ||
811 | #include <sys/types.h> | ||
812 | #include <sys/wait.h> | ||
813 | |||
814 | int | ||
815 | main() | ||
816 | { | ||
817 | pid_t pid; | ||
818 | int fd, ptyfd, ttyfd, status; | ||
819 | |||
820 | pid = fork(); | ||
821 | if (pid < 0) { /* failed */ | ||
822 | exit(1); | ||
823 | } else if (pid > 0) { /* parent */ | ||
824 | waitpid(pid, &status, 0); | ||
825 | if (WIFEXITED(status)) | ||
826 | exit(WEXITSTATUS(status)); | ||
827 | else | ||
828 | exit(2); | ||
829 | } else { /* child */ | ||
830 | close(0); close(1); close(2); | ||
831 | setsid(); | ||
832 | openpty(&ptyfd, &ttyfd, NULL, NULL, NULL); | ||
833 | fd = open("/dev/tty", O_RDWR | O_NOCTTY); | ||
834 | if (fd >= 0) | ||
835 | exit(3); /* Acquired ctty: broken */ | ||
836 | else | ||
837 | exit(0); /* Did not acquire ctty: OK */ | ||
838 | } | ||
839 | } | ||
840 | ], | ||
841 | [ | ||
842 | AC_MSG_RESULT(yes) | ||
843 | ], | ||
844 | [ | ||
845 | AC_MSG_RESULT(no) | ||
846 | AC_DEFINE(SSHD_ACQUIRES_CTTY) | ||
847 | ] | ||
848 | ) | ||
849 | fi | ||
850 | |||
729 | AC_FUNC_GETPGRP | 851 | AC_FUNC_GETPGRP |
730 | 852 | ||
731 | # Check for PAM libs | 853 | # Check for PAM libs |
@@ -741,6 +863,7 @@ AC_ARG_WITH(pam, | |||
741 | AC_CHECK_LIB(dl, dlopen, , ) | 863 | AC_CHECK_LIB(dl, dlopen, , ) |
742 | AC_CHECK_LIB(pam, pam_set_item, , AC_MSG_ERROR([*** libpam missing])) | 864 | AC_CHECK_LIB(pam, pam_set_item, , AC_MSG_ERROR([*** libpam missing])) |
743 | AC_CHECK_FUNCS(pam_getenvlist) | 865 | AC_CHECK_FUNCS(pam_getenvlist) |
866 | AC_CHECK_FUNCS(pam_putenv) | ||
744 | 867 | ||
745 | disable_shadow=yes | 868 | disable_shadow=yes |
746 | PAM_MSG="yes" | 869 | PAM_MSG="yes" |
@@ -905,13 +1028,15 @@ int main(void) { exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); } | |||
905 | ], | 1028 | ], |
906 | [ | 1029 | [ |
907 | AC_MSG_RESULT(no) | 1030 | AC_MSG_RESULT(no) |
908 | AC_MSG_ERROR(Your OpenSSL headers do not match your library) | 1031 | AC_MSG_ERROR([Your OpenSSL headers do not match your library. |
1032 | Check config.log for details. | ||
1033 | Also see contrib/findssl.sh for help identifying header/library mismatches.]) | ||
909 | ] | 1034 | ] |
910 | ) | 1035 | ) |
911 | 1036 | ||
912 | # Some Linux systems (Slackware) need crypt() from libcrypt, *not* the | 1037 | # Some Linux systems (Slackware) need crypt() from libcrypt, *not* the |
913 | # version in OpenSSL. Skip this for PAM | 1038 | # version in OpenSSL. Skip this for PAM |
914 | if test "x$PAM_MSG" = "xno" -a "x$check_for_libcrypt_later" = "x1"; then | 1039 | if test "x$check_for_libcrypt_later" = "x1"; then |
915 | AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt") | 1040 | AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt") |
916 | fi | 1041 | fi |
917 | 1042 | ||
@@ -1752,7 +1877,6 @@ if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then | |||
1752 | fi | 1877 | fi |
1753 | 1878 | ||
1754 | SCARD_MSG="no" | 1879 | SCARD_MSG="no" |
1755 | |||
1756 | # Check whether user wants sectok support | 1880 | # Check whether user wants sectok support |
1757 | AC_ARG_WITH(sectok, | 1881 | AC_ARG_WITH(sectok, |
1758 | [ --with-sectok Enable smartcard support using libsectok], | 1882 | [ --with-sectok Enable smartcard support using libsectok], |
@@ -1802,6 +1926,29 @@ if test x$opensc_config_prefix != x ; then | |||
1802 | fi | 1926 | fi |
1803 | fi | 1927 | fi |
1804 | 1928 | ||
1929 | # Check whether user wants DNS support | ||
1930 | DNS_MSG="no" | ||
1931 | AC_ARG_WITH(dns, | ||
1932 | [ --with-dns Support for fetching keys from DNS (experimental)], | ||
1933 | [ | ||
1934 | if test "x$withval" != "xno" ; then | ||
1935 | DNS_MSG="yes" | ||
1936 | AC_DEFINE(DNS) | ||
1937 | AC_SEARCH_LIBS(getrrsetbyname, resolv, | ||
1938 | [AC_DEFINE(HAVE_GETRRSETBYNAME)], | ||
1939 | [ | ||
1940 | # Needed by our getrrsetbyname() | ||
1941 | AC_SEARCH_LIBS(res_query, resolv) | ||
1942 | AC_SEARCH_LIBS(dn_expand, resolv) | ||
1943 | AC_CHECK_FUNCS(_getshort _getlong) | ||
1944 | AC_CHECK_MEMBER(HEADER.ad, | ||
1945 | [AC_DEFINE(HAVE_HEADER_AD)],, | ||
1946 | [#include <arpa/nameser.h>]) | ||
1947 | ]) | ||
1948 | fi | ||
1949 | ] | ||
1950 | ) | ||
1951 | |||
1805 | # Check whether user wants Kerberos 5 support | 1952 | # Check whether user wants Kerberos 5 support |
1806 | KRB5_MSG="no" | 1953 | KRB5_MSG="no" |
1807 | AC_ARG_WITH(kerberos5, | 1954 | AC_ARG_WITH(kerberos5, |
@@ -1834,93 +1981,38 @@ AC_ARG_WITH(kerberos5, | |||
1834 | if test ! -z "$blibpath" ; then | 1981 | if test ! -z "$blibpath" ; then |
1835 | blibpath="$blibpath:${KRB5ROOT}/lib" | 1982 | blibpath="$blibpath:${KRB5ROOT}/lib" |
1836 | fi | 1983 | fi |
1837 | AC_CHECK_LIB(resolv, dn_expand, , ) | 1984 | AC_SEARCH_LIBS(dn_expand, resolv) |
1985 | |||
1986 | AC_CHECK_LIB(gssapi,gss_init_sec_context, | ||
1987 | [ AC_DEFINE(GSSAPI) | ||
1988 | K5LIBS="-lgssapi $K5LIBS" ], | ||
1989 | [ AC_CHECK_LIB(gssapi_krb5,gss_init_sec_context, | ||
1990 | [ AC_DEFINE(GSSAPI) | ||
1991 | K5LIBS="-lgssapi_krb5 $K5LIBS" ], | ||
1992 | AC_MSG_WARN([Cannot find any suitable gss-api library - build may fail]), | ||
1993 | $K5LIBS) | ||
1994 | ], | ||
1995 | $K5LIBS) | ||
1996 | |||
1997 | AC_CHECK_HEADER(gssapi.h, , | ||
1998 | [ unset ac_cv_header_gssapi_h | ||
1999 | CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi" | ||
2000 | AC_CHECK_HEADERS(gssapi.h, , | ||
2001 | AC_MSG_WARN([Cannot find any suitable gss-api header - build may fail]) | ||
2002 | ) | ||
2003 | ] | ||
2004 | ) | ||
2005 | |||
2006 | oldCPP="$CPPFLAGS" | ||
2007 | CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi" | ||
2008 | AC_CHECK_HEADER(gssapi_krb5.h, , | ||
2009 | [ CPPFLAGS="$oldCPP" ]) | ||
1838 | 2010 | ||
1839 | KRB5=yes | 2011 | KRB5=yes |
1840 | fi | 2012 | fi |
1841 | ] | 2013 | ] |
1842 | ) | 2014 | ) |
1843 | # Check whether user wants Kerberos 4 support | 2015 | LIBS="$LIBS $K5LIBS" |
1844 | KRB4_MSG="no" | ||
1845 | AC_ARG_WITH(kerberos4, | ||
1846 | [ --with-kerberos4=PATH Enable Kerberos 4 support], | ||
1847 | [ | ||
1848 | if test "x$withval" != "xno" ; then | ||
1849 | if test "x$withval" != "xyes" ; then | ||
1850 | CPPFLAGS="$CPPFLAGS -I${withval}/include" | ||
1851 | LDFLAGS="$LDFLAGS -L${withval}/lib" | ||
1852 | if test ! -z "$need_dash_r" ; then | ||
1853 | LDFLAGS="$LDFLAGS -R${withval}/lib" | ||
1854 | fi | ||
1855 | if test ! -z "$blibpath" ; then | ||
1856 | blibpath="$blibpath:${withval}/lib" | ||
1857 | fi | ||
1858 | else | ||
1859 | if test -d /usr/include/kerberosIV ; then | ||
1860 | CPPFLAGS="$CPPFLAGS -I/usr/include/kerberosIV" | ||
1861 | fi | ||
1862 | fi | ||
1863 | |||
1864 | AC_CHECK_HEADERS(krb.h) | ||
1865 | if test "$ac_cv_header_krb_h" != yes; then | ||
1866 | AC_MSG_WARN([Cannot find krb.h, build may fail]) | ||
1867 | fi | ||
1868 | AC_CHECK_LIB(krb, main) | ||
1869 | if test "$ac_cv_lib_krb_main" != yes; then | ||
1870 | AC_CHECK_LIB(krb4, main) | ||
1871 | if test "$ac_cv_lib_krb4_main" != yes; then | ||
1872 | AC_MSG_WARN([Cannot find libkrb nor libkrb4, build may fail]) | ||
1873 | else | ||
1874 | KLIBS="-lkrb4" | ||
1875 | fi | ||
1876 | else | ||
1877 | KLIBS="-lkrb" | ||
1878 | fi | ||
1879 | AC_CHECK_LIB(des, des_cbc_encrypt) | ||
1880 | if test "$ac_cv_lib_des_des_cbc_encrypt" != yes; then | ||
1881 | AC_CHECK_LIB(des425, des_cbc_encrypt) | ||
1882 | if test "$ac_cv_lib_des425_des_cbc_encrypt" != yes; then | ||
1883 | AC_MSG_WARN([Cannot find libdes nor libdes425, build may fail]) | ||
1884 | else | ||
1885 | KLIBS="-ldes425" | ||
1886 | fi | ||
1887 | else | ||
1888 | KLIBS="-ldes" | ||
1889 | fi | ||
1890 | AC_CHECK_LIB(resolv, dn_expand, , ) | ||
1891 | KRB4=yes | ||
1892 | KRB4_MSG="yes" | ||
1893 | AC_DEFINE(KRB4) | ||
1894 | fi | ||
1895 | ] | ||
1896 | ) | ||
1897 | |||
1898 | # Check whether user wants AFS support | ||
1899 | AFS_MSG="no" | ||
1900 | AC_ARG_WITH(afs, | ||
1901 | [ --with-afs=PATH Enable AFS support], | ||
1902 | [ | ||
1903 | if test "x$withval" != "xno" ; then | ||
1904 | |||
1905 | if test "x$withval" != "xyes" ; then | ||
1906 | CPPFLAGS="$CPPFLAGS -I${withval}/include" | ||
1907 | LDFLAGS="$LDFLAGS -L${withval}/lib" | ||
1908 | fi | ||
1909 | |||
1910 | if test -z "$KRB4" ; then | ||
1911 | AC_MSG_WARN([AFS requires Kerberos IV support, build may fail]) | ||
1912 | fi | ||
1913 | |||
1914 | LIBS="-lkafs $LIBS" | ||
1915 | if test ! -z "$AFS_LIBS" ; then | ||
1916 | LIBS="$LIBS $AFS_LIBS" | ||
1917 | fi | ||
1918 | AC_DEFINE(AFS) | ||
1919 | AFS_MSG="yes" | ||
1920 | fi | ||
1921 | ] | ||
1922 | ) | ||
1923 | LIBS="$LIBS $KLIBS $K5LIBS" | ||
1924 | 2016 | ||
1925 | # Looking for programs, paths and files | 2017 | # Looking for programs, paths and files |
1926 | 2018 | ||
@@ -2090,30 +2182,48 @@ else | |||
2090 | ) | 2182 | ) |
2091 | fi | 2183 | fi |
2092 | 2184 | ||
2185 | # check for /etc/default/login and use it if present. | ||
2186 | AC_CHECK_FILE("/etc/default/login", [ external_path_file=/etc/default/login ]) | ||
2187 | |||
2188 | if test "x$external_path_file" = "x/etc/default/login"; then | ||
2189 | AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN) | ||
2190 | fi | ||
2191 | |||
2093 | dnl BSD systems use /etc/login.conf so --with-default-path= has no effect | 2192 | dnl BSD systems use /etc/login.conf so --with-default-path= has no effect |
2094 | if test $ac_cv_func_login_getcapbool = "yes" -a \ | 2193 | if test $ac_cv_func_login_getcapbool = "yes" -a \ |
2095 | $ac_cv_header_login_cap_h = "yes" ; then | 2194 | $ac_cv_header_login_cap_h = "yes" ; then |
2096 | USES_LOGIN_CONF=yes | 2195 | external_path_file=/etc/login.conf |
2097 | fi | 2196 | fi |
2197 | |||
2098 | # Whether to mess with the default path | 2198 | # Whether to mess with the default path |
2099 | SERVER_PATH_MSG="(default)" | 2199 | SERVER_PATH_MSG="(default)" |
2100 | AC_ARG_WITH(default-path, | 2200 | AC_ARG_WITH(default-path, |
2101 | [ --with-default-path= Specify default \$PATH environment for server], | 2201 | [ --with-default-path= Specify default \$PATH environment for server], |
2102 | [ | 2202 | [ |
2103 | if test "$USES_LOGIN_CONF" = "yes" ; then | 2203 | if test "x$external_path_file" = "x/etc/login.conf" ; then |
2104 | AC_MSG_WARN([ | 2204 | AC_MSG_WARN([ |
2105 | --with-default-path=PATH has no effect on this system. | 2205 | --with-default-path=PATH has no effect on this system. |
2106 | Edit /etc/login.conf instead.]) | 2206 | Edit /etc/login.conf instead.]) |
2107 | elif test "x$withval" != "xno" ; then | 2207 | elif test "x$withval" != "xno" ; then |
2208 | if test ! -z "$external_path_file" ; then | ||
2209 | AC_MSG_WARN([ | ||
2210 | --with-default-path=PATH will only be used if PATH is not defined in | ||
2211 | $external_path_file .]) | ||
2212 | fi | ||
2108 | user_path="$withval" | 2213 | user_path="$withval" |
2109 | SERVER_PATH_MSG="$withval" | 2214 | SERVER_PATH_MSG="$withval" |
2110 | fi | 2215 | fi |
2111 | ], | 2216 | ], |
2112 | [ if test "$USES_LOGIN_CONF" = "yes" ; then | 2217 | [ if test "x$external_path_file" = "x/etc/login.conf" ; then |
2113 | AC_MSG_WARN([Make sure the path to scp is in /etc/login.conf]) | 2218 | AC_MSG_WARN([Make sure the path to scp is in /etc/login.conf]) |
2114 | else | 2219 | else |
2115 | AC_TRY_RUN( | 2220 | if test ! -z "$external_path_file" ; then |
2116 | [ | 2221 | AC_MSG_WARN([ |
2222 | If PATH is defined in $external_path_file, ensure the path to scp is included, | ||
2223 | otherwise scp will not work.]) | ||
2224 | fi | ||
2225 | AC_TRY_RUN( | ||
2226 | [ | ||
2117 | /* find out what STDPATH is */ | 2227 | /* find out what STDPATH is */ |
2118 | #include <stdio.h> | 2228 | #include <stdio.h> |
2119 | #ifdef HAVE_PATHS_H | 2229 | #ifdef HAVE_PATHS_H |
@@ -2167,7 +2277,7 @@ main() | |||
2167 | fi | 2277 | fi |
2168 | fi ] | 2278 | fi ] |
2169 | ) | 2279 | ) |
2170 | if test "$USES_LOGIN_CONF" != "yes" ; then | 2280 | if test "x$external_path_file" != "x/etc/login.conf" ; then |
2171 | AC_DEFINE_UNQUOTED(USER_PATH, "$user_path") | 2281 | AC_DEFINE_UNQUOTED(USER_PATH, "$user_path") |
2172 | AC_SUBST(user_path) | 2282 | AC_SUBST(user_path) |
2173 | fi | 2283 | fi |
@@ -2184,18 +2294,6 @@ AC_ARG_WITH(superuser-path, | |||
2184 | ) | 2294 | ) |
2185 | 2295 | ||
2186 | 2296 | ||
2187 | # Whether to force IPv4 by default (needed on broken glibc Linux) | ||
2188 | IPV4_HACK_MSG="no" | ||
2189 | AC_ARG_WITH(ipv4-default, | ||
2190 | [ --with-ipv4-default Use IPv4 by connections unless '-6' specified], | ||
2191 | [ | ||
2192 | if test "x$withval" != "xno" ; then | ||
2193 | AC_DEFINE(IPV4_DEFAULT) | ||
2194 | IPV4_HACK_MSG="yes" | ||
2195 | fi | ||
2196 | ] | ||
2197 | ) | ||
2198 | |||
2199 | AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses]) | 2297 | AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses]) |
2200 | IPV4_IN6_HACK_MSG="no" | 2298 | IPV4_IN6_HACK_MSG="no" |
2201 | AC_ARG_WITH(4in6, | 2299 | AC_ARG_WITH(4in6, |
@@ -2259,35 +2357,67 @@ AC_SUBST(piddir) | |||
2259 | dnl allow user to disable some login recording features | 2357 | dnl allow user to disable some login recording features |
2260 | AC_ARG_ENABLE(lastlog, | 2358 | AC_ARG_ENABLE(lastlog, |
2261 | [ --disable-lastlog disable use of lastlog even if detected [no]], | 2359 | [ --disable-lastlog disable use of lastlog even if detected [no]], |
2262 | [ AC_DEFINE(DISABLE_LASTLOG) ] | 2360 | [ |
2361 | if test "x$enableval" = "xno" ; then | ||
2362 | AC_DEFINE(DISABLE_LASTLOG) | ||
2363 | fi | ||
2364 | ] | ||
2263 | ) | 2365 | ) |
2264 | AC_ARG_ENABLE(utmp, | 2366 | AC_ARG_ENABLE(utmp, |
2265 | [ --disable-utmp disable use of utmp even if detected [no]], | 2367 | [ --disable-utmp disable use of utmp even if detected [no]], |
2266 | [ AC_DEFINE(DISABLE_UTMP) ] | 2368 | [ |
2369 | if test "x$enableval" = "xno" ; then | ||
2370 | AC_DEFINE(DISABLE_UTMP) | ||
2371 | fi | ||
2372 | ] | ||
2267 | ) | 2373 | ) |
2268 | AC_ARG_ENABLE(utmpx, | 2374 | AC_ARG_ENABLE(utmpx, |
2269 | [ --disable-utmpx disable use of utmpx even if detected [no]], | 2375 | [ --disable-utmpx disable use of utmpx even if detected [no]], |
2270 | [ AC_DEFINE(DISABLE_UTMPX) ] | 2376 | [ |
2377 | if test "x$enableval" = "xno" ; then | ||
2378 | AC_DEFINE(DISABLE_UTMPX) | ||
2379 | fi | ||
2380 | ] | ||
2271 | ) | 2381 | ) |
2272 | AC_ARG_ENABLE(wtmp, | 2382 | AC_ARG_ENABLE(wtmp, |
2273 | [ --disable-wtmp disable use of wtmp even if detected [no]], | 2383 | [ --disable-wtmp disable use of wtmp even if detected [no]], |
2274 | [ AC_DEFINE(DISABLE_WTMP) ] | 2384 | [ |
2385 | if test "x$enableval" = "xno" ; then | ||
2386 | AC_DEFINE(DISABLE_WTMP) | ||
2387 | fi | ||
2388 | ] | ||
2275 | ) | 2389 | ) |
2276 | AC_ARG_ENABLE(wtmpx, | 2390 | AC_ARG_ENABLE(wtmpx, |
2277 | [ --disable-wtmpx disable use of wtmpx even if detected [no]], | 2391 | [ --disable-wtmpx disable use of wtmpx even if detected [no]], |
2278 | [ AC_DEFINE(DISABLE_WTMPX) ] | 2392 | [ |
2393 | if test "x$enableval" = "xno" ; then | ||
2394 | AC_DEFINE(DISABLE_WTMPX) | ||
2395 | fi | ||
2396 | ] | ||
2279 | ) | 2397 | ) |
2280 | AC_ARG_ENABLE(libutil, | 2398 | AC_ARG_ENABLE(libutil, |
2281 | [ --disable-libutil disable use of libutil (login() etc.) [no]], | 2399 | [ --disable-libutil disable use of libutil (login() etc.) [no]], |
2282 | [ AC_DEFINE(DISABLE_LOGIN) ] | 2400 | [ |
2401 | if test "x$enableval" = "xno" ; then | ||
2402 | AC_DEFINE(DISABLE_LOGIN) | ||
2403 | fi | ||
2404 | ] | ||
2283 | ) | 2405 | ) |
2284 | AC_ARG_ENABLE(pututline, | 2406 | AC_ARG_ENABLE(pututline, |
2285 | [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]], | 2407 | [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]], |
2286 | [ AC_DEFINE(DISABLE_PUTUTLINE) ] | 2408 | [ |
2409 | if test "x$enableval" = "xno" ; then | ||
2410 | AC_DEFINE(DISABLE_PUTUTLINE) | ||
2411 | fi | ||
2412 | ] | ||
2287 | ) | 2413 | ) |
2288 | AC_ARG_ENABLE(pututxline, | 2414 | AC_ARG_ENABLE(pututxline, |
2289 | [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]], | 2415 | [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]], |
2290 | [ AC_DEFINE(DISABLE_PUTUTXLINE) ] | 2416 | [ |
2417 | if test "x$enableval" = "xno" ; then | ||
2418 | AC_DEFINE(DISABLE_PUTUTXLINE) | ||
2419 | fi | ||
2420 | ] | ||
2291 | ) | 2421 | ) |
2292 | AC_ARG_WITH(lastlog, | 2422 | AC_ARG_WITH(lastlog, |
2293 | [ --with-lastlog=FILE|DIR specify lastlog location [common locations]], | 2423 | [ --with-lastlog=FILE|DIR specify lastlog location [common locations]], |
@@ -2517,25 +2647,28 @@ echo " Askpass program: $E" | |||
2517 | echo " Manual pages: $F" | 2647 | echo " Manual pages: $F" |
2518 | echo " PID file: $G" | 2648 | echo " PID file: $G" |
2519 | echo " Privilege separation chroot path: $H" | 2649 | echo " Privilege separation chroot path: $H" |
2520 | if test "$USES_LOGIN_CONF" = "yes" ; then | 2650 | if test "x$external_path_file" = "x/etc/login.conf" ; then |
2521 | echo " At runtime, sshd will use the path defined in /etc/login.conf" | 2651 | echo " At runtime, sshd will use the path defined in $external_path_file" |
2652 | echo " Make sure the path to scp is present, otherwise scp will not work" | ||
2522 | else | 2653 | else |
2523 | echo " sshd default user PATH: $I" | 2654 | echo " sshd default user PATH: $I" |
2655 | if test ! -z "$external_path_file"; then | ||
2656 | echo " (If PATH is set in $external_path_file it will be used instead. If" | ||
2657 | echo " used, ensure the path to scp is present, otherwise scp will not work.)" | ||
2658 | fi | ||
2524 | fi | 2659 | fi |
2525 | if test ! -z "$superuser_path" ; then | 2660 | if test ! -z "$superuser_path" ; then |
2526 | echo " sshd superuser user PATH: $J" | 2661 | echo " sshd superuser user PATH: $J" |
2527 | fi | 2662 | fi |
2528 | echo " Manpage format: $MANTYPE" | 2663 | echo " Manpage format: $MANTYPE" |
2529 | echo " PAM support: ${PAM_MSG}" | 2664 | echo " DNS support: $DNS_MSG" |
2530 | echo " KerberosIV support: $KRB4_MSG" | 2665 | echo " PAM support: $PAM_MSG" |
2531 | echo " KerberosV support: $KRB5_MSG" | 2666 | echo " KerberosV support: $KRB5_MSG" |
2532 | echo " Smartcard support: $SCARD_MSG" | 2667 | echo " Smartcard support: $SCARD_MSG" |
2533 | echo " AFS support: $AFS_MSG" | ||
2534 | echo " S/KEY support: $SKEY_MSG" | 2668 | echo " S/KEY support: $SKEY_MSG" |
2535 | echo " TCP Wrappers support: $TCPW_MSG" | 2669 | echo " TCP Wrappers support: $TCPW_MSG" |
2536 | echo " MD5 password support: $MD5_MSG" | 2670 | echo " MD5 password support: $MD5_MSG" |
2537 | echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG" | 2671 | echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG" |
2538 | echo " Use IPv4 by default hack: $IPV4_HACK_MSG" | ||
2539 | echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG" | 2672 | echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG" |
2540 | echo " BSD Auth support: $BSD_AUTH_MSG" | 2673 | echo " BSD Auth support: $BSD_AUTH_MSG" |
2541 | echo " Random number source: $RAND_MSG" | 2674 | echo " Random number source: $RAND_MSG" |