diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 123 |
1 files changed, 111 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index 836e31730..6ba4d244a 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,4 +1,18 @@ | |||
1 | # $Id: configure.ac,v 1.202 2004/02/24 05:47:04 tim Exp $ | 1 | # $Id: configure.ac,v 1.214 2004/04/17 03:03:07 tim Exp $ |
2 | # | ||
3 | # Copyright (c) 1999-2004 Damien Miller | ||
4 | # | ||
5 | # Permission to use, copy, modify, and distribute this software for any | ||
6 | # purpose with or without fee is hereby granted, provided that the above | ||
7 | # copyright notice and this permission notice appear in all copies. | ||
8 | # | ||
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
2 | 16 | ||
3 | AC_INIT | 17 | AC_INIT |
4 | AC_CONFIG_SRCDIR([ssh.c]) | 18 | AC_CONFIG_SRCDIR([ssh.c]) |
@@ -195,10 +209,7 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) | |||
195 | AC_DEFINE(DISABLE_UTMP) | 209 | AC_DEFINE(DISABLE_UTMP) |
196 | AC_DEFINE(LOCKED_PASSWD_STRING, "*") | 210 | AC_DEFINE(LOCKED_PASSWD_STRING, "*") |
197 | AC_DEFINE(SPT_TYPE,SPT_PSTAT) | 211 | AC_DEFINE(SPT_TYPE,SPT_PSTAT) |
198 | case "$host" in | 212 | check_for_hpux_broken_getaddrinfo=1 |
199 | *-*-hpux11.11*) | ||
200 | AC_DEFINE(BROKEN_GETADDRINFO);; | ||
201 | esac | ||
202 | LIBS="$LIBS -lsec" | 213 | LIBS="$LIBS -lsec" |
203 | AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])) | 214 | AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])) |
204 | ;; | 215 | ;; |
@@ -221,6 +232,7 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) | |||
221 | AC_DEFINE(SETEUID_BREAKS_SETUID) | 232 | AC_DEFINE(SETEUID_BREAKS_SETUID) |
222 | AC_DEFINE(BROKEN_SETREUID) | 233 | AC_DEFINE(BROKEN_SETREUID) |
223 | AC_DEFINE(BROKEN_SETREGID) | 234 | AC_DEFINE(BROKEN_SETREGID) |
235 | AC_DEFINE(BROKEN_UPDWTMPX) | ||
224 | AC_DEFINE(WITH_ABBREV_NO_TTY) | 236 | AC_DEFINE(WITH_ABBREV_NO_TTY) |
225 | AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*") | 237 | AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*") |
226 | ;; | 238 | ;; |
@@ -230,7 +242,7 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) | |||
230 | check_for_openpty_ctty_bug=1 | 242 | check_for_openpty_ctty_bug=1 |
231 | AC_DEFINE(DONT_TRY_OTHER_AF) | 243 | AC_DEFINE(DONT_TRY_OTHER_AF) |
232 | AC_DEFINE(PAM_TTY_KLUDGE) | 244 | AC_DEFINE(PAM_TTY_KLUDGE) |
233 | AC_DEFINE(LOCKED_PASSWD_PREFIX, "!!") | 245 | AC_DEFINE(LOCKED_PASSWD_PREFIX, "!") |
234 | AC_DEFINE(SPT_TYPE,SPT_REUSEARGV) | 246 | AC_DEFINE(SPT_TYPE,SPT_REUSEARGV) |
235 | inet6_default_4in6=yes | 247 | inet6_default_4in6=yes |
236 | case `uname -r` in | 248 | case `uname -r` in |
@@ -268,6 +280,9 @@ mips-sony-bsd|mips-sony-newsos4) | |||
268 | AC_DEFINE(BROKEN_SAVED_UIDS) | 280 | AC_DEFINE(BROKEN_SAVED_UIDS) |
269 | ;; | 281 | ;; |
270 | *-*-solaris*) | 282 | *-*-solaris*) |
283 | if test "x$withval" != "xno" ; then | ||
284 | need_dash_r=1 | ||
285 | fi | ||
271 | AC_DEFINE(PAM_SUN_CODEBASE) | 286 | AC_DEFINE(PAM_SUN_CODEBASE) |
272 | AC_DEFINE(LOGIN_NEEDS_UTMPX) | 287 | AC_DEFINE(LOGIN_NEEDS_UTMPX) |
273 | AC_DEFINE(LOGIN_NEEDS_TERM) | 288 | AC_DEFINE(LOGIN_NEEDS_TERM) |
@@ -344,6 +359,9 @@ mips-sony-bsd|mips-sony-newsos4) | |||
344 | AC_DEFINE(HAVE_SECUREWARE) | 359 | AC_DEFINE(HAVE_SECUREWARE) |
345 | AC_DEFINE(DISABLE_SHADOW) | 360 | AC_DEFINE(DISABLE_SHADOW) |
346 | AC_DEFINE(BROKEN_SAVED_UIDS) | 361 | AC_DEFINE(BROKEN_SAVED_UIDS) |
362 | AC_DEFINE(SETEUID_BREAKS_SETUID) | ||
363 | AC_DEFINE(BROKEN_SETREUID) | ||
364 | AC_DEFINE(BROKEN_SETREGID) | ||
347 | AC_DEFINE(WITH_ABBREV_NO_TTY) | 365 | AC_DEFINE(WITH_ABBREV_NO_TTY) |
348 | AC_CHECK_FUNCS(getluid setluid) | 366 | AC_CHECK_FUNCS(getluid setluid) |
349 | MANTYPE=man | 367 | MANTYPE=man |
@@ -491,10 +509,10 @@ AC_CHECK_HEADERS(bstring.h crypt.h endian.h features.h floatingpoint.h \ | |||
491 | netinet/in_systm.h pam/pam_appl.h paths.h pty.h readpassphrase.h \ | 509 | netinet/in_systm.h pam/pam_appl.h paths.h pty.h readpassphrase.h \ |
492 | rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \ | 510 | rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \ |
493 | strings.h sys/strtio.h sys/audit.h sys/bitypes.h sys/bsdtty.h \ | 511 | strings.h sys/strtio.h sys/audit.h sys/bitypes.h sys/bsdtty.h \ |
494 | sys/cdefs.h sys/mman.h sys/pstat.h sys/ptms.h sys/select.h sys/stat.h \ | 512 | sys/cdefs.h sys/mman.h sys/prctl.h sys/pstat.h sys/ptms.h \ |
495 | sys/stream.h sys/stropts.h sys/sysmacros.h sys/time.h sys/timers.h \ | 513 | sys/select.h sys/stat.h sys/stream.h sys/stropts.h \ |
496 | sys/un.h time.h tmpdir.h ttyent.h usersec.h \ | 514 | sys/sysmacros.h sys/time.h sys/timers.h sys/un.h time.h tmpdir.h \ |
497 | util.h utime.h utmp.h utmpx.h vis.h) | 515 | ttyent.h usersec.h util.h utime.h utmp.h utmpx.h vis.h) |
498 | 516 | ||
499 | # Checks for libraries. | 517 | # Checks for libraries. |
500 | AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match)) | 518 | AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match)) |
@@ -728,6 +746,15 @@ int main() { char *ff = skey_keyinfo(""); ff=""; exit(0); } | |||
728 | AC_MSG_RESULT(no) | 746 | AC_MSG_RESULT(no) |
729 | AC_MSG_ERROR([** Incomplete or missing s/key libraries.]) | 747 | AC_MSG_ERROR([** Incomplete or missing s/key libraries.]) |
730 | ]) | 748 | ]) |
749 | AC_MSG_CHECKING(if skeychallenge takes 4 arguments) | ||
750 | AC_TRY_COMPILE( | ||
751 | [#include <stdio.h> | ||
752 | #include <skey.h>], | ||
753 | [(void)skeychallenge(NULL,"name","",0);], | ||
754 | [AC_MSG_RESULT(yes) | ||
755 | AC_DEFINE(SKEYCHALLENGE_4ARG)], | ||
756 | [AC_MSG_RESULT(no)] | ||
757 | ) | ||
731 | fi | 758 | fi |
732 | ] | 759 | ] |
733 | ) | 760 | ) |
@@ -767,6 +794,9 @@ AC_ARG_WITH(tcp-wrappers, | |||
767 | AC_MSG_CHECKING(for libwrap) | 794 | AC_MSG_CHECKING(for libwrap) |
768 | AC_TRY_LINK( | 795 | AC_TRY_LINK( |
769 | [ | 796 | [ |
797 | #include <sys/types.h> | ||
798 | #include <sys/socket.h> | ||
799 | #include <netinet/in.h> | ||
770 | #include <tcpd.h> | 800 | #include <tcpd.h> |
771 | int deny_severity = 0, allow_severity = 0; | 801 | int deny_severity = 0, allow_severity = 0; |
772 | ], | 802 | ], |
@@ -794,12 +824,12 @@ AC_CHECK_FUNCS(\ | |||
794 | getpeereid _getpty getrlimit getttyent glob inet_aton \ | 824 | getpeereid _getpty getrlimit getttyent glob inet_aton \ |
795 | inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove \ | 825 | inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove \ |
796 | mkdtemp mmap ngetaddrinfo nsleep ogetaddrinfo openlog_r openpty \ | 826 | mkdtemp mmap ngetaddrinfo nsleep ogetaddrinfo openlog_r openpty \ |
797 | pstat readpassphrase realpath recvmsg rresvport_af sendmsg \ | 827 | pstat prctl readpassphrase realpath recvmsg rresvport_af sendmsg \ |
798 | setdtablesize setegid setenv seteuid setgroups setlogin setpcred \ | 828 | setdtablesize setegid setenv seteuid setgroups setlogin setpcred \ |
799 | setproctitle setregid setreuid setrlimit \ | 829 | setproctitle setregid setreuid setrlimit \ |
800 | setsid setvbuf sigaction sigvec snprintf socketpair strerror \ | 830 | setsid setvbuf sigaction sigvec snprintf socketpair strerror \ |
801 | strlcat strlcpy strmode strnvis strtoul sysconf tcgetpgrp \ | 831 | strlcat strlcpy strmode strnvis strtoul sysconf tcgetpgrp \ |
802 | truncate updwtmpx utimes vhangup vsnprintf waitpid \ | 832 | truncate unsetenv updwtmpx utimes vhangup vsnprintf waitpid \ |
803 | ) | 833 | ) |
804 | 834 | ||
805 | # IRIX has a const char return value for gai_strerror() | 835 | # IRIX has a const char return value for gai_strerror() |
@@ -967,6 +997,74 @@ main() | |||
967 | ) | 997 | ) |
968 | fi | 998 | fi |
969 | 999 | ||
1000 | if test "x$ac_cv_func_getaddrinfo" = "xyes" -a "x$check_for_hpux_broken_getaddrinfo" = "x1"; then | ||
1001 | AC_MSG_CHECKING(if getaddrinfo seems to work) | ||
1002 | AC_TRY_RUN( | ||
1003 | [ | ||
1004 | #include <stdio.h> | ||
1005 | #include <sys/socket.h> | ||
1006 | #include <netdb.h> | ||
1007 | #include <errno.h> | ||
1008 | #include <netinet/in.h> | ||
1009 | |||
1010 | #define TEST_PORT "2222" | ||
1011 | |||
1012 | int | ||
1013 | main(void) | ||
1014 | { | ||
1015 | int err, sock; | ||
1016 | struct addrinfo *gai_ai, *ai, hints; | ||
1017 | char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL; | ||
1018 | |||
1019 | memset(&hints, 0, sizeof(hints)); | ||
1020 | hints.ai_family = PF_UNSPEC; | ||
1021 | hints.ai_socktype = SOCK_STREAM; | ||
1022 | hints.ai_flags = AI_PASSIVE; | ||
1023 | |||
1024 | err = getaddrinfo(name, TEST_PORT, &hints, &gai_ai); | ||
1025 | if (err != 0) { | ||
1026 | fprintf(stderr, "getaddrinfo failed (%s)", gai_strerror(err)); | ||
1027 | exit(1); | ||
1028 | } | ||
1029 | |||
1030 | for (ai = gai_ai; ai != NULL; ai = ai->ai_next) { | ||
1031 | if (ai->ai_family != AF_INET6) | ||
1032 | continue; | ||
1033 | |||
1034 | err = getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop, | ||
1035 | sizeof(ntop), strport, sizeof(strport), | ||
1036 | NI_NUMERICHOST|NI_NUMERICSERV); | ||
1037 | |||
1038 | if (err != 0) { | ||
1039 | if (err == EAI_SYSTEM) | ||
1040 | perror("getnameinfo EAI_SYSTEM"); | ||
1041 | else | ||
1042 | fprintf(stderr, "getnameinfo failed: %s\n", | ||
1043 | gai_strerror(err)); | ||
1044 | exit(2); | ||
1045 | } | ||
1046 | |||
1047 | sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); | ||
1048 | if (sock < 0) | ||
1049 | perror("socket"); | ||
1050 | if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) { | ||
1051 | if (errno == EBADF) | ||
1052 | exit(3); | ||
1053 | } | ||
1054 | } | ||
1055 | exit(0); | ||
1056 | } | ||
1057 | ], | ||
1058 | [ | ||
1059 | AC_MSG_RESULT(yes) | ||
1060 | ], | ||
1061 | [ | ||
1062 | AC_MSG_RESULT(no) | ||
1063 | AC_DEFINE(BROKEN_GETADDRINFO) | ||
1064 | ] | ||
1065 | ) | ||
1066 | fi | ||
1067 | |||
970 | AC_FUNC_GETPGRP | 1068 | AC_FUNC_GETPGRP |
971 | 1069 | ||
972 | # Check for PAM libs | 1070 | # Check for PAM libs |
@@ -2157,6 +2255,7 @@ AC_ARG_WITH(kerberos5, | |||
2157 | 2255 | ||
2158 | LIBS="$LIBS $K5LIBS" | 2256 | LIBS="$LIBS $K5LIBS" |
2159 | AC_SEARCH_LIBS(k_hasafs, kafs, AC_DEFINE(USE_AFS)) | 2257 | AC_SEARCH_LIBS(k_hasafs, kafs, AC_DEFINE(USE_AFS)) |
2258 | AC_SEARCH_LIBS(krb5_init_ets, $K5LIBS, AC_DEFINE(KRB5_INIT_ETS)) | ||
2160 | ] | 2259 | ] |
2161 | ) | 2260 | ) |
2162 | 2261 | ||