Darren Tucker | 5bb1400 | 2004-04-23 18:53:10 +1000 | [diff] [blame] | 1 | # $Id: configure.ac,v 1.216 2004/04/23 08:53:10 dtucker Exp $ |
Damien Miller | 4fefe24 | 2004-03-11 14:20:10 +1100 | [diff] [blame] | 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. |
Damien Miller | e9cf357 | 2001-02-09 12:55:35 +1100 | [diff] [blame] | 16 | |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 17 | AC_INIT |
| 18 | AC_CONFIG_SRCDIR([ssh.c]) |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 19 | |
| 20 | AC_CONFIG_HEADER(config.h) |
Damien Miller | 856799b | 2000-03-15 21:18:10 +1100 | [diff] [blame] | 21 | AC_PROG_CC |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 22 | AC_CANONICAL_HOST |
Damien Miller | 4df5c76 | 2001-02-28 08:14:22 +1100 | [diff] [blame] | 23 | AC_C_BIGENDIAN |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 24 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 25 | # Checks for programs. |
Darren Tucker | 167bd9c | 2003-09-07 12:34:54 +1000 | [diff] [blame] | 26 | AC_PROG_AWK |
Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 27 | AC_PROG_CPP |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 28 | AC_PROG_RANLIB |
Damien Miller | d8087f6 | 1999-11-25 12:31:26 +1100 | [diff] [blame] | 29 | AC_PROG_INSTALL |
Ben Lindstrom | 582d398 | 2001-02-06 22:54:30 +0000 | [diff] [blame] | 30 | AC_PATH_PROG(AR, ar) |
Tim Rice | b8fbb8e | 2001-04-21 14:31:52 -0700 | [diff] [blame] | 31 | AC_PATH_PROGS(PERL, perl5 perl) |
Tim Rice | d0d7a8b | 2003-01-08 17:22:59 -0800 | [diff] [blame] | 32 | AC_PATH_PROG(SED, sed) |
Damien Miller | e79334a | 1999-12-29 10:03:37 +1100 | [diff] [blame] | 33 | AC_SUBST(PERL) |
Damien Miller | 8d1fd57 | 2000-05-17 21:34:07 +1000 | [diff] [blame] | 34 | AC_PATH_PROG(ENT, ent) |
| 35 | AC_SUBST(ENT) |
Damien Miller | 4864e8f | 2001-02-08 10:07:08 +1100 | [diff] [blame] | 36 | AC_PATH_PROG(TEST_MINUS_S_SH, bash) |
| 37 | AC_PATH_PROG(TEST_MINUS_S_SH, ksh) |
| 38 | AC_PATH_PROG(TEST_MINUS_S_SH, sh) |
Tim Rice | 0502a47 | 2002-05-08 16:04:14 -0700 | [diff] [blame] | 39 | AC_PATH_PROG(SH, sh) |
Damien Miller | 2e1b082 | 1999-12-25 10:11:29 +1100 | [diff] [blame] | 40 | |
Damien Miller | e8bb450 | 2001-09-25 16:39:35 +1000 | [diff] [blame] | 41 | # System features |
| 42 | AC_SYS_LARGEFILE |
| 43 | |
Damien Miller | 3f62aba | 2000-11-29 11:56:35 +1100 | [diff] [blame] | 44 | if test -z "$AR" ; then |
| 45 | AC_MSG_ERROR([*** 'ar' missing, please install or fix your \$PATH ***]) |
| 46 | fi |
| 47 | |
Damien Miller | ad833b3 | 2000-08-23 10:46:23 +1000 | [diff] [blame] | 48 | # Use LOGIN_PROGRAM from environment if possible |
| 49 | if test ! -z "$LOGIN_PROGRAM" ; then |
| 50 | AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM") |
| 51 | else |
| 52 | # Search for login |
| 53 | AC_PATH_PROG(LOGIN_PROGRAM_FALLBACK, login) |
| 54 | if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then |
| 55 | AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM_FALLBACK") |
| 56 | fi |
| 57 | fi |
| 58 | |
Darren Tucker | 23bc8d0 | 2004-02-06 16:24:31 +1100 | [diff] [blame] | 59 | AC_PATH_PROG(PATH_PASSWD_PROG, passwd) |
| 60 | if test ! -z "$PATH_PASSWD_PROG" ; then |
| 61 | AC_DEFINE_UNQUOTED(_PATH_PASSWD_PROG, "$PATH_PASSWD_PROG") |
| 62 | fi |
| 63 | |
Damien Miller | 166bd44 | 2000-03-16 10:48:25 +1100 | [diff] [blame] | 64 | if test -z "$LD" ; then |
| 65 | LD=$CC |
| 66 | fi |
| 67 | AC_SUBST(LD) |
| 68 | |
Damien Miller | 166bd44 | 2000-03-16 10:48:25 +1100 | [diff] [blame] | 69 | AC_C_INLINE |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 70 | if test "$GCC" = "yes" || test "$GCC" = "egcs"; then |
Damien Miller | 649d999 | 2001-06-27 23:35:51 +1000 | [diff] [blame] | 71 | CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wno-uninitialized" |
Damien Miller | 166bd44 | 2000-03-16 10:48:25 +1100 | [diff] [blame] | 72 | fi |
| 73 | |
Tim Rice | 88368a3 | 2003-12-08 12:35:59 -0800 | [diff] [blame] | 74 | AC_ARG_WITH(rpath, |
| 75 | [ --without-rpath Disable auto-added -R linker paths], |
| 76 | [ |
| 77 | if test "x$withval" = "xno" ; then |
| 78 | need_dash_r="" |
| 79 | fi |
| 80 | if test "x$withval" = "xyes" ; then |
| 81 | need_dash_r=1 |
| 82 | fi |
| 83 | ] |
| 84 | ) |
| 85 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 86 | # Check for some target-specific stuff |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 87 | case "$host" in |
Damien Miller | 75b1d10 | 2000-01-07 14:01:41 +1100 | [diff] [blame] | 88 | *-*-aix*) |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 89 | AC_MSG_CHECKING([how to specify blibpath for linker ($LD)]) |
Damien Miller | eab4bae | 2003-04-29 23:22:40 +1000 | [diff] [blame] | 90 | if (test -z "$blibpath"); then |
Tim Rice | fcb6220 | 2004-01-23 18:35:16 -0800 | [diff] [blame] | 91 | blibpath="/usr/lib:/lib" |
Damien Miller | 29ea30d | 2000-03-17 10:54:15 +1100 | [diff] [blame] | 92 | fi |
Damien Miller | eab4bae | 2003-04-29 23:22:40 +1000 | [diff] [blame] | 93 | saved_LDFLAGS="$LDFLAGS" |
| 94 | for tryflags in -blibpath: -Wl,-blibpath: -Wl,-rpath, ;do |
| 95 | if (test -z "$blibflags"); then |
| 96 | LDFLAGS="$saved_LDFLAGS $tryflags$blibpath" |
| 97 | AC_TRY_LINK([], [], [blibflags=$tryflags]) |
| 98 | fi |
| 99 | done |
| 100 | if (test -z "$blibflags"); then |
| 101 | AC_MSG_RESULT(not found) |
| 102 | AC_MSG_ERROR([*** must be able to specify blibpath on AIX - check config.log]) |
| 103 | else |
| 104 | AC_MSG_RESULT($blibflags) |
| 105 | fi |
| 106 | LDFLAGS="$saved_LDFLAGS" |
Darren Tucker | 5c6a91a | 2003-07-14 16:21:44 +1000 | [diff] [blame] | 107 | dnl Check for authenticate. Might be in libs.a on older AIXes |
| 108 | AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)], |
Tim Rice | e958ed3 | 2002-07-05 07:12:33 -0700 | [diff] [blame] | 109 | [AC_CHECK_LIB(s,authenticate, |
Darren Tucker | 5c6a91a | 2003-07-14 16:21:44 +1000 | [diff] [blame] | 110 | [ AC_DEFINE(WITH_AIXAUTHENTICATE) |
Tim Rice | e958ed3 | 2002-07-05 07:12:33 -0700 | [diff] [blame] | 111 | LIBS="$LIBS -ls" |
| 112 | ]) |
| 113 | ]) |
Darren Tucker | 5c6a91a | 2003-07-14 16:21:44 +1000 | [diff] [blame] | 114 | dnl Check if loginfailed is declared and takes 4 arguments (AIX >= 5.2) |
| 115 | AC_CHECK_DECL(loginfailed, |
| 116 | [AC_MSG_CHECKING(if loginfailed takes 4 arguments) |
| 117 | AC_TRY_COMPILE( |
Darren Tucker | a0c0b63 | 2003-07-08 20:52:12 +1000 | [diff] [blame] | 118 | [#include <usersec.h>], |
Darren Tucker | 5c6a91a | 2003-07-14 16:21:44 +1000 | [diff] [blame] | 119 | [(void)loginfailed("user","host","tty",0);], |
| 120 | [AC_MSG_RESULT(yes) |
| 121 | AC_DEFINE(AIX_LOGINFAILED_4ARG)], |
Darren Tucker | a0c0b63 | 2003-07-08 20:52:12 +1000 | [diff] [blame] | 122 | [AC_MSG_RESULT(no)] |
Darren Tucker | 5c6a91a | 2003-07-14 16:21:44 +1000 | [diff] [blame] | 123 | )], |
| 124 | [], |
| 125 | [#include <usersec.h>] |
| 126 | ) |
Darren Tucker | fc3454e | 2003-07-14 16:41:55 +1000 | [diff] [blame] | 127 | AC_CHECK_FUNCS(setauthdb) |
Damien Miller | eca71f8 | 2000-01-20 22:38:27 +1100 | [diff] [blame] | 128 | AC_DEFINE(BROKEN_GETADDRINFO) |
Damien Miller | f5fea44 | 2002-04-23 22:52:45 +1000 | [diff] [blame] | 129 | AC_DEFINE(BROKEN_REALPATH) |
Darren Tucker | 9f18be6 | 2003-09-06 16:44:39 +1000 | [diff] [blame] | 130 | AC_DEFINE(SETEUID_BREAKS_SETUID) |
| 131 | AC_DEFINE(BROKEN_SETREUID) |
| 132 | AC_DEFINE(BROKEN_SETREGID) |
andre | 60f3c98 | 2000-06-03 16:18:19 +0000 | [diff] [blame] | 133 | dnl AIX handles lastlog as part of its login message |
| 134 | AC_DEFINE(DISABLE_LASTLOG) |
Kevin Steves | 90d5de7 | 2002-06-22 18:51:48 +0000 | [diff] [blame] | 135 | AC_DEFINE(LOGIN_NEEDS_UTMPX) |
Damien Miller | 3527625 | 2003-06-03 10:14:28 +1000 | [diff] [blame] | 136 | AC_DEFINE(SPT_TYPE,SPT_REUSEARGV) |
Damien Miller | 75b1d10 | 2000-01-07 14:01:41 +1100 | [diff] [blame] | 137 | ;; |
Damien Miller | bac2d8a | 2000-09-05 16:13:06 +1100 | [diff] [blame] | 138 | *-*-cygwin*) |
Damien Miller | c8936ac | 2003-02-11 10:04:03 +1100 | [diff] [blame] | 139 | check_for_libcrypt_later=1 |
Tim Rice | fe1d100 | 2001-11-26 17:19:43 -0800 | [diff] [blame] | 140 | LIBS="$LIBS /usr/lib/textmode.o" |
Damien Miller | bac2d8a | 2000-09-05 16:13:06 +1100 | [diff] [blame] | 141 | AC_DEFINE(HAVE_CYGWIN) |
Ben Lindstrom | ca60a9b | 2001-05-17 03:32:50 +0000 | [diff] [blame] | 142 | AC_DEFINE(USE_PIPES) |
Damien Miller | bac2d8a | 2000-09-05 16:13:06 +1100 | [diff] [blame] | 143 | AC_DEFINE(DISABLE_SHADOW) |
Damien Miller | bac2d8a | 2000-09-05 16:13:06 +1100 | [diff] [blame] | 144 | AC_DEFINE(IP_TOS_IS_BROKEN) |
Ben Lindstrom | 38e6093 | 2001-02-24 00:55:04 +0000 | [diff] [blame] | 145 | AC_DEFINE(NO_X11_UNIX_SOCKETS) |
Ben Lindstrom | 99a4e14 | 2002-07-09 14:06:40 +0000 | [diff] [blame] | 146 | AC_DEFINE(NO_IPPORT_RESERVED_CONCEPT) |
Tim Rice | 9dd3081 | 2002-07-07 13:43:36 -0700 | [diff] [blame] | 147 | AC_DEFINE(DISABLE_FD_PASSING) |
Ben Lindstrom | 837461b | 2002-06-12 16:57:14 +0000 | [diff] [blame] | 148 | AC_DEFINE(SETGROUPS_NOOP) |
Damien Miller | bac2d8a | 2000-09-05 16:13:06 +1100 | [diff] [blame] | 149 | ;; |
Ben Lindstrom | 5805513 | 2001-02-15 18:34:29 +0000 | [diff] [blame] | 150 | *-*-dgux*) |
| 151 | AC_DEFINE(IP_TOS_IS_BROKEN) |
Darren Tucker | 454da0b | 2003-12-18 12:52:19 +1100 | [diff] [blame] | 152 | AC_DEFINE(SETEUID_BREAKS_SETUID) |
| 153 | AC_DEFINE(BROKEN_SETREUID) |
| 154 | AC_DEFINE(BROKEN_SETREGID) |
Ben Lindstrom | 5805513 | 2001-02-15 18:34:29 +0000 | [diff] [blame] | 155 | ;; |
Ben Lindstrom | fed7bb4 | 2001-07-15 18:30:42 +0000 | [diff] [blame] | 156 | *-*-darwin*) |
Damien Miller | fc93d4b | 2002-09-04 23:26:29 +1000 | [diff] [blame] | 157 | AC_MSG_CHECKING(if we have working getaddrinfo) |
| 158 | AC_TRY_RUN([#include <mach-o/dyld.h> |
| 159 | main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) |
| 160 | exit(0); |
| 161 | else |
| 162 | exit(1); |
| 163 | }], [AC_MSG_RESULT(working)], |
| 164 | [AC_MSG_RESULT(buggy) |
| 165 | AC_DEFINE(BROKEN_GETADDRINFO)], |
Tim Rice | 480ef8d | 2003-09-21 21:38:11 -0700 | [diff] [blame] | 166 | [AC_MSG_RESULT(assume it is working)]) |
Darren Tucker | 20379a3 | 2003-09-22 11:07:40 +1000 | [diff] [blame] | 167 | AC_DEFINE(SETEUID_BREAKS_SETUID) |
| 168 | AC_DEFINE(BROKEN_SETREUID) |
| 169 | AC_DEFINE(BROKEN_SETREGID) |
Damien Miller | 7a2ea78 | 2004-01-02 17:52:10 +1100 | [diff] [blame] | 170 | AC_DEFINE_UNQUOTED(BIND_8_COMPAT, 1) |
Ben Lindstrom | fed7bb4 | 2001-07-15 18:30:42 +0000 | [diff] [blame] | 171 | ;; |
Kevin Steves | 0ea1d9d | 2002-04-25 18:17:04 +0000 | [diff] [blame] | 172 | *-*-hpux10.26) |
| 173 | if test -z "$GCC"; then |
| 174 | CFLAGS="$CFLAGS -Ae" |
| 175 | fi |
| 176 | CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1" |
| 177 | IPADDR_IN_DISPLAY=yes |
| 178 | AC_DEFINE(HAVE_SECUREWARE) |
| 179 | AC_DEFINE(USE_PIPES) |
| 180 | AC_DEFINE(LOGIN_NO_ENDOPT) |
| 181 | AC_DEFINE(LOGIN_NEEDS_UTMPX) |
Darren Tucker | e41bba5 | 2003-08-25 11:51:19 +1000 | [diff] [blame] | 182 | AC_DEFINE(LOCKED_PASSWD_STRING, "*") |
Damien Miller | 3527625 | 2003-06-03 10:14:28 +1000 | [diff] [blame] | 183 | AC_DEFINE(SPT_TYPE,SPT_PSTAT) |
Tim Rice | f028f1e | 2002-07-19 12:41:10 -0700 | [diff] [blame] | 184 | LIBS="$LIBS -lsec -lsecpw" |
| 185 | AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])) |
Kevin Steves | 0ea1d9d | 2002-04-25 18:17:04 +0000 | [diff] [blame] | 186 | disable_ptmx_check=yes |
| 187 | ;; |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 188 | *-*-hpux10*) |
| 189 | if test -z "$GCC"; then |
Damien Miller | fda78d9 | 2000-05-20 15:33:44 +1000 | [diff] [blame] | 190 | CFLAGS="$CFLAGS -Ae" |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 191 | fi |
Kevin Steves | 315f8b7 | 2001-06-28 00:24:41 +0000 | [diff] [blame] | 192 | CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1" |
Damien Miller | 9a94734 | 2000-08-30 10:03:33 +1100 | [diff] [blame] | 193 | IPADDR_IN_DISPLAY=yes |
Damien Miller | b078567 | 2000-08-23 09:10:39 +1000 | [diff] [blame] | 194 | AC_DEFINE(USE_PIPES) |
Kevin Steves | 5feaaef | 2002-04-23 20:45:55 +0000 | [diff] [blame] | 195 | AC_DEFINE(LOGIN_NO_ENDOPT) |
| 196 | AC_DEFINE(LOGIN_NEEDS_UTMPX) |
Darren Tucker | e41bba5 | 2003-08-25 11:51:19 +1000 | [diff] [blame] | 197 | AC_DEFINE(LOCKED_PASSWD_STRING, "*") |
Damien Miller | 3527625 | 2003-06-03 10:14:28 +1000 | [diff] [blame] | 198 | AC_DEFINE(SPT_TYPE,SPT_PSTAT) |
Tim Rice | f028f1e | 2002-07-19 12:41:10 -0700 | [diff] [blame] | 199 | LIBS="$LIBS -lsec" |
| 200 | AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])) |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 201 | ;; |
Damien Miller | 1bead33 | 2000-04-30 00:47:29 +1000 | [diff] [blame] | 202 | *-*-hpux11*) |
Kevin Steves | 6a7b0de | 2001-06-27 16:32:24 +0000 | [diff] [blame] | 203 | CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1" |
Damien Miller | 9a94734 | 2000-08-30 10:03:33 +1100 | [diff] [blame] | 204 | IPADDR_IN_DISPLAY=yes |
Damien Miller | 82cf0ce | 2000-12-20 13:34:48 +1100 | [diff] [blame] | 205 | AC_DEFINE(PAM_SUN_CODEBASE) |
Damien Miller | 5552d7a | 2000-08-30 09:53:24 +1100 | [diff] [blame] | 206 | AC_DEFINE(USE_PIPES) |
Kevin Steves | 5feaaef | 2002-04-23 20:45:55 +0000 | [diff] [blame] | 207 | AC_DEFINE(LOGIN_NO_ENDOPT) |
| 208 | AC_DEFINE(LOGIN_NEEDS_UTMPX) |
Damien Miller | d6f204d | 2000-09-23 13:57:27 +1100 | [diff] [blame] | 209 | AC_DEFINE(DISABLE_UTMP) |
Darren Tucker | e41bba5 | 2003-08-25 11:51:19 +1000 | [diff] [blame] | 210 | AC_DEFINE(LOCKED_PASSWD_STRING, "*") |
Damien Miller | 3527625 | 2003-06-03 10:14:28 +1000 | [diff] [blame] | 211 | AC_DEFINE(SPT_TYPE,SPT_PSTAT) |
Darren Tucker | 4398cf5 | 2004-04-06 21:39:02 +1000 | [diff] [blame] | 212 | check_for_hpux_broken_getaddrinfo=1 |
Tim Rice | f028f1e | 2002-07-19 12:41:10 -0700 | [diff] [blame] | 213 | LIBS="$LIBS -lsec" |
| 214 | AC_CHECK_LIB(xnet, t_error, ,AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])) |
Damien Miller | 1bead33 | 2000-04-30 00:47:29 +1000 | [diff] [blame] | 215 | ;; |
Damien Miller | beb4ba5 | 1999-12-28 15:09:35 +1100 | [diff] [blame] | 216 | *-*-irix5*) |
Damien Miller | 190d5a8 | 2000-09-30 09:43:19 +1100 | [diff] [blame] | 217 | PATH="$PATH:/usr/etc" |
Damien Miller | 11fa2cc | 2000-08-16 10:35:58 +1000 | [diff] [blame] | 218 | AC_DEFINE(BROKEN_INET_NTOA) |
Darren Tucker | beaf679 | 2003-09-24 20:03:48 +1000 | [diff] [blame] | 219 | AC_DEFINE(SETEUID_BREAKS_SETUID) |
| 220 | AC_DEFINE(BROKEN_SETREUID) |
| 221 | AC_DEFINE(BROKEN_SETREGID) |
Damien Miller | f1b9d11 | 2002-04-23 23:09:19 +1000 | [diff] [blame] | 222 | AC_DEFINE(WITH_ABBREV_NO_TTY) |
Darren Tucker | e41bba5 | 2003-08-25 11:51:19 +1000 | [diff] [blame] | 223 | AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*") |
Damien Miller | 1808f38 | 2000-01-06 12:03:12 +1100 | [diff] [blame] | 224 | ;; |
| 225 | *-*-irix6*) |
Damien Miller | 190d5a8 | 2000-09-30 09:43:19 +1100 | [diff] [blame] | 226 | PATH="$PATH:/usr/etc" |
Damien Miller | 91606b1 | 2000-06-28 08:22:29 +1000 | [diff] [blame] | 227 | AC_DEFINE(WITH_IRIX_ARRAY) |
| 228 | AC_DEFINE(WITH_IRIX_PROJECT) |
| 229 | AC_DEFINE(WITH_IRIX_AUDIT) |
Ben Lindstrom | 8ff2a8d | 2002-04-06 18:58:31 +0000 | [diff] [blame] | 230 | AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)]) |
Damien Miller | 11fa2cc | 2000-08-16 10:35:58 +1000 | [diff] [blame] | 231 | AC_DEFINE(BROKEN_INET_NTOA) |
Darren Tucker | be79af1 | 2003-09-22 11:58:21 +1000 | [diff] [blame] | 232 | AC_DEFINE(SETEUID_BREAKS_SETUID) |
| 233 | AC_DEFINE(BROKEN_SETREUID) |
| 234 | AC_DEFINE(BROKEN_SETREGID) |
Darren Tucker | 8db9a0f | 2004-04-06 21:31:12 +1000 | [diff] [blame] | 235 | AC_DEFINE(BROKEN_UPDWTMPX) |
Damien Miller | f1b9d11 | 2002-04-23 23:09:19 +1000 | [diff] [blame] | 236 | AC_DEFINE(WITH_ABBREV_NO_TTY) |
Darren Tucker | e41bba5 | 2003-08-25 11:51:19 +1000 | [diff] [blame] | 237 | AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*") |
Damien Miller | beb4ba5 | 1999-12-28 15:09:35 +1100 | [diff] [blame] | 238 | ;; |
Damien Miller | b29ea91 | 2000-01-15 14:12:03 +1100 | [diff] [blame] | 239 | *-*-linux*) |
| 240 | no_dev_ptmx=1 |
Damien Miller | a64b57a | 2001-01-17 10:44:13 +1100 | [diff] [blame] | 241 | check_for_libcrypt_later=1 |
Darren Tucker | 70a3d55 | 2003-08-21 17:58:29 +1000 | [diff] [blame] | 242 | check_for_openpty_ctty_bug=1 |
Damien Miller | 7bcb089 | 2000-03-11 20:45:40 +1100 | [diff] [blame] | 243 | AC_DEFINE(DONT_TRY_OTHER_AF) |
Damien Miller | 4e99720 | 2000-07-09 21:21:52 +1000 | [diff] [blame] | 244 | AC_DEFINE(PAM_TTY_KLUDGE) |
Darren Tucker | 809031f | 2004-03-30 14:03:45 +1000 | [diff] [blame] | 245 | AC_DEFINE(LOCKED_PASSWD_PREFIX, "!") |
Damien Miller | 3527625 | 2003-06-03 10:14:28 +1000 | [diff] [blame] | 246 | AC_DEFINE(SPT_TYPE,SPT_REUSEARGV) |
Damien Miller | 7bcb089 | 2000-03-11 20:45:40 +1100 | [diff] [blame] | 247 | inet6_default_4in6=yes |
Darren Tucker | 3c01654 | 2003-05-02 20:48:21 +1000 | [diff] [blame] | 248 | case `uname -r` in |
Darren Tucker | c437cda | 2003-05-10 17:05:46 +1000 | [diff] [blame] | 249 | 1.*|2.0.*) |
Darren Tucker | 3c01654 | 2003-05-02 20:48:21 +1000 | [diff] [blame] | 250 | AC_DEFINE(BROKEN_CMSG_TYPE) |
| 251 | ;; |
Darren Tucker | 3c01654 | 2003-05-02 20:48:21 +1000 | [diff] [blame] | 252 | esac |
Damien Miller | b29ea91 | 2000-01-15 14:12:03 +1100 | [diff] [blame] | 253 | ;; |
Ben Lindstrom | b562864 | 2000-10-18 00:02:25 +0000 | [diff] [blame] | 254 | mips-sony-bsd|mips-sony-newsos4) |
| 255 | AC_DEFINE(HAVE_NEWS4) |
| 256 | SONY=1 |
Ben Lindstrom | b562864 | 2000-10-18 00:02:25 +0000 | [diff] [blame] | 257 | ;; |
Damien Miller | ee1c0b3 | 2000-01-21 00:18:15 +1100 | [diff] [blame] | 258 | *-*-netbsd*) |
Damien Miller | fc93d4b | 2002-09-04 23:26:29 +1000 | [diff] [blame] | 259 | check_for_libcrypt_before=1 |
Tim Rice | 88368a3 | 2003-12-08 12:35:59 -0800 | [diff] [blame] | 260 | if test "x$withval" != "xno" ; then |
| 261 | need_dash_r=1 |
| 262 | fi |
Damien Miller | ee1c0b3 | 2000-01-21 00:18:15 +1100 | [diff] [blame] | 263 | ;; |
Damien Miller | fbd884a | 2001-02-27 08:39:07 +1100 | [diff] [blame] | 264 | *-*-freebsd*) |
| 265 | check_for_libcrypt_later=1 |
| 266 | ;; |
Darren Tucker | ed9eb02 | 2003-09-22 11:18:47 +1000 | [diff] [blame] | 267 | *-*-bsdi*) |
| 268 | AC_DEFINE(SETEUID_BREAKS_SETUID) |
| 269 | AC_DEFINE(BROKEN_SETREUID) |
| 270 | AC_DEFINE(BROKEN_SETREGID) |
| 271 | ;; |
Damien Miller | 0f91b4e | 2000-06-18 15:43:25 +1000 | [diff] [blame] | 272 | *-next-*) |
Damien Miller | 0f91b4e | 2000-06-18 15:43:25 +1000 | [diff] [blame] | 273 | conf_lastlog_location="/usr/adm/lastlog" |
Damien Miller | e5192fa | 2000-08-29 14:30:37 +1100 | [diff] [blame] | 274 | conf_utmp_location=/etc/utmp |
| 275 | conf_wtmp_location=/usr/adm/wtmp |
| 276 | MAIL=/usr/spool/mail |
Damien Miller | 0f91b4e | 2000-06-18 15:43:25 +1000 | [diff] [blame] | 277 | AC_DEFINE(HAVE_NEXT) |
Ben Lindstrom | b4df15d | 2000-10-15 00:17:36 +0000 | [diff] [blame] | 278 | AC_DEFINE(BROKEN_REALPATH) |
Ben Lindstrom | 76020ba | 2000-10-25 16:55:00 +0000 | [diff] [blame] | 279 | AC_DEFINE(USE_PIPES) |
Damien Miller | fbd884a | 2001-02-27 08:39:07 +1100 | [diff] [blame] | 280 | AC_DEFINE(BROKEN_SAVED_UIDS) |
Damien Miller | 0f91b4e | 2000-06-18 15:43:25 +1000 | [diff] [blame] | 281 | ;; |
Damien Miller | 75b1d10 | 2000-01-07 14:01:41 +1100 | [diff] [blame] | 282 | *-*-solaris*) |
Tim Rice | ad4a188 | 2004-02-29 15:53:37 -0800 | [diff] [blame] | 283 | if test "x$withval" != "xno" ; then |
| 284 | need_dash_r=1 |
| 285 | fi |
Damien Miller | 82cf0ce | 2000-12-20 13:34:48 +1100 | [diff] [blame] | 286 | AC_DEFINE(PAM_SUN_CODEBASE) |
Ben Lindstrom | 97c677d | 2001-05-08 20:33:05 +0000 | [diff] [blame] | 287 | AC_DEFINE(LOGIN_NEEDS_UTMPX) |
| 288 | AC_DEFINE(LOGIN_NEEDS_TERM) |
Ben Lindstrom | 9527671 | 2001-10-23 17:14:00 +0000 | [diff] [blame] | 289 | AC_DEFINE(PAM_TTY_KLUDGE) |
Darren Tucker | e41bba5 | 2003-08-25 11:51:19 +1000 | [diff] [blame] | 290 | AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*") |
Darren Tucker | c437cda | 2003-05-10 17:05:46 +1000 | [diff] [blame] | 291 | # Pushing STREAMS modules will cause sshd to acquire a controlling tty. |
| 292 | AC_DEFINE(SSHD_ACQUIRES_CTTY) |
Darren Tucker | e1a790d | 2003-09-16 11:52:19 +1000 | [diff] [blame] | 293 | external_path_file=/etc/default/login |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 294 | # hardwire lastlog location (can't detect it on some versions) |
| 295 | conf_lastlog_location="/var/adm/lastlog" |
Damien Miller | a1cb644 | 2000-06-09 11:58:35 +1000 | [diff] [blame] | 296 | AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x) |
| 297 | sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'` |
| 298 | if test "$sol2ver" -ge 8; then |
| 299 | AC_MSG_RESULT(yes) |
| 300 | AC_DEFINE(DISABLE_UTMP) |
| 301 | AC_DEFINE(DISABLE_WTMP) |
| 302 | else |
| 303 | AC_MSG_RESULT(no) |
| 304 | fi |
Damien Miller | 75b1d10 | 2000-01-07 14:01:41 +1100 | [diff] [blame] | 305 | ;; |
Damien Miller | dfc83f4 | 2000-05-20 15:02:59 +1000 | [diff] [blame] | 306 | *-*-sunos4*) |
Ben Lindstrom | 28bfc0d | 2000-12-18 19:58:57 +0000 | [diff] [blame] | 307 | CPPFLAGS="$CPPFLAGS -DSUNOS4" |
Damien Miller | dfc83f4 | 2000-05-20 15:02:59 +1000 | [diff] [blame] | 308 | AC_CHECK_FUNCS(getpwanam) |
Damien Miller | 82cf0ce | 2000-12-20 13:34:48 +1100 | [diff] [blame] | 309 | AC_DEFINE(PAM_SUN_CODEBASE) |
Damien Miller | 36ccb5c | 2000-08-09 16:34:27 +1000 | [diff] [blame] | 310 | conf_utmp_location=/etc/utmp |
| 311 | conf_wtmp_location=/var/adm/wtmp |
| 312 | conf_lastlog_location=/var/adm/lastlog |
Damien Miller | b078567 | 2000-08-23 09:10:39 +1000 | [diff] [blame] | 313 | AC_DEFINE(USE_PIPES) |
Damien Miller | dfc83f4 | 2000-05-20 15:02:59 +1000 | [diff] [blame] | 314 | ;; |
Ben Lindstrom | 603bdfd | 2001-02-12 07:29:45 +0000 | [diff] [blame] | 315 | *-ncr-sysv*) |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 316 | LIBS="$LIBS -lc89" |
Kevin Steves | 0bd4b34 | 2002-01-05 23:24:27 +0000 | [diff] [blame] | 317 | AC_DEFINE(USE_PIPES) |
Darren Tucker | 2972d6c | 2003-05-30 17:43:42 +1000 | [diff] [blame] | 318 | AC_DEFINE(SSHD_ACQUIRES_CTTY) |
Darren Tucker | 0013011 | 2003-09-22 11:40:24 +1000 | [diff] [blame] | 319 | AC_DEFINE(SETEUID_BREAKS_SETUID) |
| 320 | AC_DEFINE(BROKEN_SETREUID) |
| 321 | AC_DEFINE(BROKEN_SETREGID) |
Ben Lindstrom | 603bdfd | 2001-02-12 07:29:45 +0000 | [diff] [blame] | 322 | ;; |
Damien Miller | 2ae714f | 2000-07-11 09:29:50 +1000 | [diff] [blame] | 323 | *-sni-sysv*) |
Tim Rice | ffdf4aa | 2001-10-27 10:45:36 -0700 | [diff] [blame] | 324 | # /usr/ucblib MUST NOT be searched on ReliantUNIX |
Darren Tucker | 89df7a3 | 2003-10-07 20:35:57 +1000 | [diff] [blame] | 325 | AC_CHECK_LIB(dl, dlsym, ,) |
Damien Miller | fd9885e | 2001-01-10 08:16:53 +1100 | [diff] [blame] | 326 | IPADDR_IN_DISPLAY=yes |
| 327 | AC_DEFINE(USE_PIPES) |
Damien Miller | 2ae714f | 2000-07-11 09:29:50 +1000 | [diff] [blame] | 328 | AC_DEFINE(IP_TOS_IS_BROKEN) |
Darren Tucker | 3b2a06c | 2003-10-07 18:37:11 +1000 | [diff] [blame] | 329 | AC_DEFINE(SETEUID_BREAKS_SETUID) |
| 330 | AC_DEFINE(BROKEN_SETREUID) |
| 331 | AC_DEFINE(BROKEN_SETREGID) |
Darren Tucker | 2972d6c | 2003-05-30 17:43:42 +1000 | [diff] [blame] | 332 | AC_DEFINE(SSHD_ACQUIRES_CTTY) |
Darren Tucker | e1a790d | 2003-09-16 11:52:19 +1000 | [diff] [blame] | 333 | external_path_file=/etc/default/login |
Tim Rice | ffdf4aa | 2001-10-27 10:45:36 -0700 | [diff] [blame] | 334 | # /usr/ucblib/libucb.a no longer needed on ReliantUNIX |
| 335 | # Attention: always take care to bind libsocket and libnsl before libc, |
| 336 | # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog |
Damien Miller | 2ae714f | 2000-07-11 09:29:50 +1000 | [diff] [blame] | 337 | ;; |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 338 | *-*-sysv4.2*) |
Damien Miller | 5dfe976 | 2001-02-16 12:05:39 +1100 | [diff] [blame] | 339 | AC_DEFINE(USE_PIPES) |
Tim Rice | d546a84 | 2003-09-11 22:24:36 -0700 | [diff] [blame] | 340 | AC_DEFINE(SETEUID_BREAKS_SETUID) |
| 341 | AC_DEFINE(BROKEN_SETREUID) |
| 342 | AC_DEFINE(BROKEN_SETREGID) |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 343 | ;; |
| 344 | *-*-sysv5*) |
Damien Miller | 5dfe976 | 2001-02-16 12:05:39 +1100 | [diff] [blame] | 345 | AC_DEFINE(USE_PIPES) |
Tim Rice | d546a84 | 2003-09-11 22:24:36 -0700 | [diff] [blame] | 346 | AC_DEFINE(SETEUID_BREAKS_SETUID) |
| 347 | AC_DEFINE(BROKEN_SETREUID) |
| 348 | AC_DEFINE(BROKEN_SETREGID) |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 349 | ;; |
Damien Miller | 75b1d10 | 2000-01-07 14:01:41 +1100 | [diff] [blame] | 350 | *-*-sysv*) |
Damien Miller | 75b1d10 | 2000-01-07 14:01:41 +1100 | [diff] [blame] | 351 | ;; |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 352 | *-*-sco3.2v4*) |
Tim Rice | fcb6220 | 2004-01-23 18:35:16 -0800 | [diff] [blame] | 353 | CPPFLAGS="$CPPFLAGS -Dftruncate=chsize" |
Tim Rice | e8c898a | 2004-02-23 21:47:04 -0800 | [diff] [blame] | 354 | LIBS="$LIBS -los -lprot -lcrypt_i -lx -ltinfo -lm" |
Damien Miller | 5dfe976 | 2001-02-16 12:05:39 +1100 | [diff] [blame] | 355 | RANLIB=true |
| 356 | no_dev_ptmx=1 |
| 357 | AC_DEFINE(BROKEN_SYS_TERMIO_H) |
| 358 | AC_DEFINE(USE_PIPES) |
Kevin Steves | 0ea1d9d | 2002-04-25 18:17:04 +0000 | [diff] [blame] | 359 | AC_DEFINE(HAVE_SECUREWARE) |
Ben Lindstrom | 980754c | 2000-11-12 00:04:24 +0000 | [diff] [blame] | 360 | AC_DEFINE(DISABLE_SHADOW) |
Damien Miller | fbd884a | 2001-02-27 08:39:07 +1100 | [diff] [blame] | 361 | AC_DEFINE(BROKEN_SAVED_UIDS) |
Tim Rice | fe6d5aa | 2004-04-16 20:03:07 -0700 | [diff] [blame] | 362 | AC_DEFINE(SETEUID_BREAKS_SETUID) |
| 363 | AC_DEFINE(BROKEN_SETREUID) |
| 364 | AC_DEFINE(BROKEN_SETREGID) |
Tim Rice | ae477e9 | 2003-09-12 18:15:15 -0700 | [diff] [blame] | 365 | AC_DEFINE(WITH_ABBREV_NO_TTY) |
Damien Miller | 217f567 | 2001-02-16 12:12:41 +1100 | [diff] [blame] | 366 | AC_CHECK_FUNCS(getluid setluid) |
Tim Rice | 07183b8 | 2001-04-25 21:40:28 -0700 | [diff] [blame] | 367 | MANTYPE=man |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 368 | do_sco3_extra_lib_check=yes |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 369 | ;; |
| 370 | *-*-sco3.2v5*) |
Tim Rice | 89fe3f3 | 2003-01-19 20:20:24 -0800 | [diff] [blame] | 371 | if test -z "$GCC"; then |
| 372 | CFLAGS="$CFLAGS -belf" |
| 373 | fi |
Damien Miller | 5dfe976 | 2001-02-16 12:05:39 +1100 | [diff] [blame] | 374 | LIBS="$LIBS -lprot -lx -ltinfo -lm" |
Damien Miller | a66626b | 2000-06-13 18:57:53 +1000 | [diff] [blame] | 375 | no_dev_ptmx=1 |
Damien Miller | 5dfe976 | 2001-02-16 12:05:39 +1100 | [diff] [blame] | 376 | AC_DEFINE(USE_PIPES) |
Kevin Steves | 0ea1d9d | 2002-04-25 18:17:04 +0000 | [diff] [blame] | 377 | AC_DEFINE(HAVE_SECUREWARE) |
Ben Lindstrom | 980754c | 2000-11-12 00:04:24 +0000 | [diff] [blame] | 378 | AC_DEFINE(DISABLE_SHADOW) |
Tim Rice | 9dd3081 | 2002-07-07 13:43:36 -0700 | [diff] [blame] | 379 | AC_DEFINE(DISABLE_FD_PASSING) |
Tim Rice | d546a84 | 2003-09-11 22:24:36 -0700 | [diff] [blame] | 380 | AC_DEFINE(SETEUID_BREAKS_SETUID) |
| 381 | AC_DEFINE(BROKEN_SETREUID) |
| 382 | AC_DEFINE(BROKEN_SETREGID) |
Tim Rice | ae477e9 | 2003-09-12 18:15:15 -0700 | [diff] [blame] | 383 | AC_DEFINE(WITH_ABBREV_NO_TTY) |
Damien Miller | 217f567 | 2001-02-16 12:12:41 +1100 | [diff] [blame] | 384 | AC_CHECK_FUNCS(getluid setluid) |
Tim Rice | 07183b8 | 2001-04-25 21:40:28 -0700 | [diff] [blame] | 385 | MANTYPE=man |
Damien Miller | a66626b | 2000-06-13 18:57:53 +1000 | [diff] [blame] | 386 | ;; |
Ben Lindstrom | 232ccf7 | 2002-07-22 23:34:25 +0000 | [diff] [blame] | 387 | *-*-unicosmk*) |
Darren Tucker | 2df3343 | 2004-01-30 14:34:21 +1100 | [diff] [blame] | 388 | AC_DEFINE(NO_SSH_LASTLOG) |
| 389 | AC_DEFINE(SETEUID_BREAKS_SETUID) |
| 390 | AC_DEFINE(BROKEN_SETREUID) |
| 391 | AC_DEFINE(BROKEN_SETREGID) |
Ben Lindstrom | 232ccf7 | 2002-07-22 23:34:25 +0000 | [diff] [blame] | 392 | AC_DEFINE(USE_PIPES) |
| 393 | AC_DEFINE(DISABLE_FD_PASSING) |
| 394 | LDFLAGS="$LDFLAGS" |
| 395 | LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm" |
| 396 | MANTYPE=cat |
Ben Lindstrom | 762104e | 2002-07-23 00:00:05 +0000 | [diff] [blame] | 397 | ;; |
Darren Tucker | 9f7ffc5 | 2003-09-10 11:39:05 +1000 | [diff] [blame] | 398 | *-*-unicosmp*) |
Darren Tucker | 2df3343 | 2004-01-30 14:34:21 +1100 | [diff] [blame] | 399 | AC_DEFINE(SETEUID_BREAKS_SETUID) |
| 400 | AC_DEFINE(BROKEN_SETREUID) |
| 401 | AC_DEFINE(BROKEN_SETREGID) |
Darren Tucker | 9f7ffc5 | 2003-09-10 11:39:05 +1000 | [diff] [blame] | 402 | AC_DEFINE(WITH_ABBREV_NO_TTY) |
| 403 | AC_DEFINE(USE_PIPES) |
| 404 | AC_DEFINE(DISABLE_FD_PASSING) |
| 405 | LDFLAGS="$LDFLAGS" |
Darren Tucker | 2df3343 | 2004-01-30 14:34:21 +1100 | [diff] [blame] | 406 | LIBS="$LIBS -lgen -lacid -ldb" |
Darren Tucker | 9f7ffc5 | 2003-09-10 11:39:05 +1000 | [diff] [blame] | 407 | MANTYPE=cat |
| 408 | ;; |
Ben Lindstrom | d9e0824 | 2001-07-22 19:32:00 +0000 | [diff] [blame] | 409 | *-*-unicos*) |
Darren Tucker | 2df3343 | 2004-01-30 14:34:21 +1100 | [diff] [blame] | 410 | AC_DEFINE(SETEUID_BREAKS_SETUID) |
| 411 | AC_DEFINE(BROKEN_SETREUID) |
| 412 | AC_DEFINE(BROKEN_SETREGID) |
Ben Lindstrom | d9e0824 | 2001-07-22 19:32:00 +0000 | [diff] [blame] | 413 | AC_DEFINE(USE_PIPES) |
Tim Rice | 9dd3081 | 2002-07-07 13:43:36 -0700 | [diff] [blame] | 414 | AC_DEFINE(DISABLE_FD_PASSING) |
Tim Rice | 81ed518 | 2002-09-25 17:38:46 -0700 | [diff] [blame] | 415 | AC_DEFINE(NO_SSH_LASTLOG) |
Ben Lindstrom | 232ccf7 | 2002-07-22 23:34:25 +0000 | [diff] [blame] | 416 | LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal" |
| 417 | LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm" |
| 418 | MANTYPE=cat |
Tim Rice | e991e3c | 2001-08-07 15:29:07 -0700 | [diff] [blame] | 419 | ;; |
Damien Miller | b8c656e | 2000-06-28 15:22:41 +1000 | [diff] [blame] | 420 | *-dec-osf*) |
Ben Lindstrom | 72af2ef | 2001-05-08 20:42:28 +0000 | [diff] [blame] | 421 | AC_MSG_CHECKING(for Digital Unix SIA) |
| 422 | no_osfsia="" |
| 423 | AC_ARG_WITH(osfsia, |
| 424 | [ --with-osfsia Enable Digital Unix SIA], |
| 425 | [ |
| 426 | if test "x$withval" = "xno" ; then |
| 427 | AC_MSG_RESULT(disabled) |
| 428 | no_osfsia=1 |
| 429 | fi |
| 430 | ], |
| 431 | ) |
| 432 | if test -z "$no_osfsia" ; then |
Damien Miller | b8c656e | 2000-06-28 15:22:41 +1000 | [diff] [blame] | 433 | if test -f /etc/sia/matrix.conf; then |
| 434 | AC_MSG_RESULT(yes) |
| 435 | AC_DEFINE(HAVE_OSF_SIA) |
| 436 | AC_DEFINE(DISABLE_LOGIN) |
Ben Lindstrom | c8c548d | 2003-03-21 01:18:09 +0000 | [diff] [blame] | 437 | AC_DEFINE(DISABLE_FD_PASSING) |
Damien Miller | b8c656e | 2000-06-28 15:22:41 +1000 | [diff] [blame] | 438 | LIBS="$LIBS -lsecurity -ldb -lm -laud" |
| 439 | else |
| 440 | AC_MSG_RESULT(no) |
Darren Tucker | 4e06a1d | 2003-11-22 14:25:15 +1100 | [diff] [blame] | 441 | AC_DEFINE(LOCKED_PASSWD_SUBSTR, "Nologin") |
Damien Miller | b8c656e | 2000-06-28 15:22:41 +1000 | [diff] [blame] | 442 | fi |
| 443 | fi |
Darren Tucker | 3c8e1e1 | 2003-08-25 13:27:40 +1000 | [diff] [blame] | 444 | AC_DEFINE(BROKEN_GETADDRINFO) |
Tim Rice | 7a74c6b | 2003-09-21 21:00:59 -0700 | [diff] [blame] | 445 | AC_DEFINE(SETEUID_BREAKS_SETUID) |
Darren Tucker | ed92b21 | 2003-09-22 11:26:16 +1000 | [diff] [blame] | 446 | AC_DEFINE(BROKEN_SETREUID) |
| 447 | AC_DEFINE(BROKEN_SETREGID) |
Damien Miller | b8c656e | 2000-06-28 15:22:41 +1000 | [diff] [blame] | 448 | ;; |
Ben Lindstrom | 19d7b8d | 2001-08-16 00:09:49 +0000 | [diff] [blame] | 449 | |
| 450 | *-*-nto-qnx) |
| 451 | AC_DEFINE(USE_PIPES) |
| 452 | AC_DEFINE(NO_X11_UNIX_SOCKETS) |
| 453 | AC_DEFINE(MISSING_NFDBITS) |
| 454 | AC_DEFINE(MISSING_HOWMANY) |
| 455 | AC_DEFINE(MISSING_FD_MASK) |
| 456 | ;; |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 457 | esac |
| 458 | |
Damien Miller | e37bfc1 | 2000-06-05 09:37:43 +1000 | [diff] [blame] | 459 | # Allow user to specify flags |
| 460 | AC_ARG_WITH(cflags, |
| 461 | [ --with-cflags Specify additional flags to pass to compiler], |
| 462 | [ |
| 463 | if test "x$withval" != "xno" ; then |
| 464 | CFLAGS="$CFLAGS $withval" |
| 465 | fi |
| 466 | ] |
| 467 | ) |
Ben Lindstrom | 28bfc0d | 2000-12-18 19:58:57 +0000 | [diff] [blame] | 468 | AC_ARG_WITH(cppflags, |
| 469 | [ --with-cppflags Specify additional flags to pass to preprocessor] , |
| 470 | [ |
| 471 | if test "x$withval" != "xno"; then |
| 472 | CPPFLAGS="$CPPFLAGS $withval" |
| 473 | fi |
| 474 | ] |
| 475 | ) |
Damien Miller | e37bfc1 | 2000-06-05 09:37:43 +1000 | [diff] [blame] | 476 | AC_ARG_WITH(ldflags, |
Ben Lindstrom | 2ed9818 | 2000-11-06 07:15:43 +0000 | [diff] [blame] | 477 | [ --with-ldflags Specify additional flags to pass to linker], |
Damien Miller | e37bfc1 | 2000-06-05 09:37:43 +1000 | [diff] [blame] | 478 | [ |
| 479 | if test "x$withval" != "xno" ; then |
| 480 | LDFLAGS="$LDFLAGS $withval" |
| 481 | fi |
| 482 | ] |
| 483 | ) |
| 484 | AC_ARG_WITH(libs, |
| 485 | [ --with-libs Specify additional libraries to link with], |
| 486 | [ |
| 487 | if test "x$withval" != "xno" ; then |
| 488 | LIBS="$LIBS $withval" |
| 489 | fi |
| 490 | ] |
| 491 | ) |
| 492 | |
Darren Tucker | 6eb9304 | 2003-06-29 21:30:41 +1000 | [diff] [blame] | 493 | AC_MSG_CHECKING(compiler and flags for sanity) |
| 494 | AC_TRY_RUN([ |
| 495 | #include <stdio.h> |
| 496 | int main(){exit(0);} |
| 497 | ], |
| 498 | [ AC_MSG_RESULT(yes) ], |
| 499 | [ |
| 500 | AC_MSG_RESULT(no) |
| 501 | AC_MSG_ERROR([*** compiler cannot create working executables, check config.log ***]) |
| 502 | ] |
| 503 | ) |
| 504 | |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 505 | # Checks for header files. |
Damien Miller | 5fe46a4 | 2003-06-05 09:53:31 +1000 | [diff] [blame] | 506 | AC_CHECK_HEADERS(bstring.h crypt.h endian.h features.h floatingpoint.h \ |
Darren Tucker | c82afd5 | 2003-09-11 14:42:55 +1000 | [diff] [blame] | 507 | getopt.h glob.h ia.h lastlog.h limits.h login.h \ |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 508 | login_cap.h maillock.h netdb.h netgroup.h \ |
Damien Miller | 0f47c53 | 2004-01-02 18:01:30 +1100 | [diff] [blame] | 509 | netinet/in_systm.h pam/pam_appl.h paths.h pty.h readpassphrase.h \ |
Ben Lindstrom | 7577fd8 | 2002-03-08 03:11:07 +0000 | [diff] [blame] | 510 | rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \ |
Darren Tucker | a0c0b63 | 2003-07-08 20:52:12 +1000 | [diff] [blame] | 511 | strings.h sys/strtio.h sys/audit.h sys/bitypes.h sys/bsdtty.h \ |
Damien Miller | 6c4914a | 2004-03-03 11:08:59 +1100 | [diff] [blame] | 512 | sys/cdefs.h sys/mman.h sys/prctl.h sys/pstat.h sys/ptms.h \ |
| 513 | sys/select.h sys/stat.h sys/stream.h sys/stropts.h \ |
| 514 | sys/sysmacros.h sys/time.h sys/timers.h sys/un.h time.h tmpdir.h \ |
| 515 | ttyent.h usersec.h util.h utime.h utmp.h utmpx.h vis.h) |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 516 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 517 | # Checks for libraries. |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 518 | AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match)) |
| 519 | AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt)) |
Ben Lindstrom | 3ad650a | 2001-01-03 06:02:51 +0000 | [diff] [blame] | 520 | |
Damien Miller | df28802 | 2001-02-18 13:07:07 +1100 | [diff] [blame] | 521 | dnl SCO OS3 needs this for libwrap |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 522 | if test "x$with_tcp_wrappers" != "xno" ; then |
| 523 | if test "x$do_sco3_extra_lib_check" = "xyes" ; then |
| 524 | AC_CHECK_LIB(rpc, innetgr, LIBS="-lrpc -lyp -lrpc $LIBS" , , -lyp -lrpc) |
| 525 | fi |
| 526 | fi |
Damien Miller | df28802 | 2001-02-18 13:07:07 +1100 | [diff] [blame] | 527 | |
Tim Rice | 1e1ef64 | 2003-09-11 22:19:31 -0700 | [diff] [blame] | 528 | dnl IRIX and Solaris 2.5.1 have dirname() in libgen |
| 529 | AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[ |
| 530 | AC_CHECK_LIB(gen, dirname,[ |
| 531 | AC_CACHE_CHECK([for broken dirname], |
| 532 | ac_cv_have_broken_dirname, [ |
| 533 | save_LIBS="$LIBS" |
| 534 | LIBS="$LIBS -lgen" |
| 535 | AC_TRY_RUN( |
| 536 | [ |
| 537 | #include <libgen.h> |
| 538 | #include <string.h> |
| 539 | |
| 540 | int main(int argc, char **argv) { |
| 541 | char *s, buf[32]; |
| 542 | |
| 543 | strncpy(buf,"/etc", 32); |
| 544 | s = dirname(buf); |
| 545 | if (!s || strncmp(s, "/", 32) != 0) { |
| 546 | exit(1); |
| 547 | } else { |
| 548 | exit(0); |
| 549 | } |
| 550 | } |
| 551 | ], |
| 552 | [ ac_cv_have_broken_dirname="no" ], |
| 553 | [ ac_cv_have_broken_dirname="yes" ] |
| 554 | ) |
| 555 | LIBS="$save_LIBS" |
| 556 | ]) |
| 557 | if test "x$ac_cv_have_broken_dirname" = "xno" ; then |
| 558 | LIBS="$LIBS -lgen" |
| 559 | AC_DEFINE(HAVE_DIRNAME) |
| 560 | AC_CHECK_HEADERS(libgen.h) |
| 561 | fi |
| 562 | ]) |
| 563 | ]) |
| 564 | |
| 565 | AC_CHECK_FUNC(getspnam, , |
| 566 | AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen")) |
| 567 | AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME)) |
| 568 | |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 569 | dnl zlib is required |
| 570 | AC_ARG_WITH(zlib, |
| 571 | [ --with-zlib=PATH Use zlib in PATH], |
| 572 | [ |
Kevin Steves | 7dc8197 | 2002-01-22 21:59:31 +0000 | [diff] [blame] | 573 | if test "x$withval" = "xno" ; then |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 574 | AC_MSG_ERROR([*** zlib is required ***]) |
| 575 | fi |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 576 | if test -d "$withval/lib"; then |
| 577 | if test -n "${need_dash_r}"; then |
Tim Rice | 02cebcd | 2001-10-25 10:01:30 -0700 | [diff] [blame] | 578 | LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 579 | else |
Tim Rice | 02cebcd | 2001-10-25 10:01:30 -0700 | [diff] [blame] | 580 | LDFLAGS="-L${withval}/lib ${LDFLAGS}" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 581 | fi |
| 582 | else |
| 583 | if test -n "${need_dash_r}"; then |
Tim Rice | 02cebcd | 2001-10-25 10:01:30 -0700 | [diff] [blame] | 584 | LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 585 | else |
Tim Rice | 02cebcd | 2001-10-25 10:01:30 -0700 | [diff] [blame] | 586 | LDFLAGS="-L${withval} ${LDFLAGS}" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 587 | fi |
| 588 | fi |
| 589 | if test -d "$withval/include"; then |
Tim Rice | 02cebcd | 2001-10-25 10:01:30 -0700 | [diff] [blame] | 590 | CPPFLAGS="-I${withval}/include ${CPPFLAGS}" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 591 | else |
Tim Rice | 02cebcd | 2001-10-25 10:01:30 -0700 | [diff] [blame] | 592 | CPPFLAGS="-I${withval} ${CPPFLAGS}" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 593 | fi |
| 594 | ] |
| 595 | ) |
| 596 | |
Tim Rice | fcb6220 | 2004-01-23 18:35:16 -0800 | [diff] [blame] | 597 | AC_CHECK_LIB(z, deflate, , |
| 598 | [ |
| 599 | saved_CPPFLAGS="$CPPFLAGS" |
| 600 | saved_LDFLAGS="$LDFLAGS" |
| 601 | save_LIBS="$LIBS" |
| 602 | dnl Check default zlib install dir |
| 603 | if test -n "${need_dash_r}"; then |
| 604 | LDFLAGS="-L/usr/local/lib -R/usr/local/lib ${saved_LDFLAGS}" |
| 605 | else |
| 606 | LDFLAGS="-L/usr/local/lib ${saved_LDFLAGS}" |
| 607 | fi |
| 608 | CPPFLAGS="-I/usr/local/include ${saved_CPPFLAGS}" |
| 609 | LIBS="$LIBS -lz" |
| 610 | AC_TRY_LINK_FUNC(deflate, AC_DEFINE(HAVE_LIBZ), |
| 611 | [ |
| 612 | AC_MSG_ERROR([*** zlib missing - please install first or check config.log ***]) |
| 613 | ] |
| 614 | ) |
| 615 | ] |
| 616 | ) |
Darren Tucker | 2dcd239 | 2004-01-23 17:13:33 +1100 | [diff] [blame] | 617 | AC_CHECK_HEADER([zlib.h], ,AC_MSG_ERROR([*** zlib.h missing - please install first or check config.log ***])) |
Darren Tucker | dcc736b | 2004-01-30 14:20:59 +1100 | [diff] [blame] | 618 | |
| 619 | AC_ARG_WITH(zlib-version-check, |
| 620 | [ --without-zlib-version-check Disable zlib version check], |
| 621 | [ if test "x$withval" = "xno" ; then |
| 622 | zlib_check_nonfatal=1 |
| 623 | fi |
| 624 | ] |
| 625 | ) |
| 626 | |
Darren Tucker | 2dcd239 | 2004-01-23 17:13:33 +1100 | [diff] [blame] | 627 | AC_MSG_CHECKING(for zlib 1.1.4 or greater) |
| 628 | AC_TRY_RUN([ |
| 629 | #include <zlib.h> |
| 630 | int main() |
| 631 | { |
| 632 | int a, b, c, v; |
| 633 | if (sscanf(ZLIB_VERSION, "%d.%d.%d", &a, &b, &c) != 3) |
| 634 | exit(1); |
| 635 | v = a*1000000 + b*1000 + c; |
| 636 | if (v >= 1001004) |
| 637 | exit(0); |
| 638 | exit(2); |
| 639 | } |
| 640 | ], |
| 641 | AC_MSG_RESULT(yes), |
| 642 | [ AC_MSG_RESULT(no) |
Darren Tucker | dcc736b | 2004-01-30 14:20:59 +1100 | [diff] [blame] | 643 | if test -z "$zlib_check_nonfatal" ; then |
| 644 | AC_MSG_ERROR([*** zlib too old - check config.log *** |
| 645 | Your reported zlib version has known security problems. It's possible your |
| 646 | vendor has fixed these problems without changing the version number. If you |
| 647 | are sure this is the case, you can disable the check by running |
| 648 | "./configure --without-zlib-version-check". |
| 649 | If you are in doubt, upgrade zlib to version 1.1.4 or greater.]) |
| 650 | else |
| 651 | AC_MSG_WARN([zlib version may have security problems]) |
| 652 | fi |
| 653 | ] |
Darren Tucker | 2dcd239 | 2004-01-23 17:13:33 +1100 | [diff] [blame] | 654 | ) |
Damien Miller | 6f9c337 | 2000-10-25 10:06:04 +1100 | [diff] [blame] | 655 | |
Ben Lindstrom | 3ad650a | 2001-01-03 06:02:51 +0000 | [diff] [blame] | 656 | dnl UnixWare 2.x |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 657 | AC_CHECK_FUNC(strcasecmp, |
Ben Lindstrom | 3ad650a | 2001-01-03 06:02:51 +0000 | [diff] [blame] | 658 | [], [ AC_CHECK_LIB(resolv, strcasecmp, LIBS="$LIBS -lresolv") ] |
| 659 | ) |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 660 | AC_CHECK_FUNC(utimes, |
Tim Rice | cbb9066 | 2002-07-08 19:17:10 -0700 | [diff] [blame] | 661 | [], [ AC_CHECK_LIB(c89, utimes, [AC_DEFINE(HAVE_UTIMES) |
| 662 | LIBS="$LIBS -lc89"]) ] |
Ben Lindstrom | 3ad650a | 2001-01-03 06:02:51 +0000 | [diff] [blame] | 663 | ) |
Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 664 | |
Tim Rice | e589a29 | 2001-11-03 11:09:32 -0800 | [diff] [blame] | 665 | dnl Checks for libutil functions |
| 666 | AC_CHECK_HEADERS(libutil.h) |
| 667 | AC_SEARCH_LIBS(login, util bsd, [AC_DEFINE(HAVE_LOGIN)]) |
| 668 | AC_CHECK_FUNCS(logout updwtmp logwtmp) |
| 669 | |
Ben Lindstrom | 8697e08 | 2001-02-24 21:41:10 +0000 | [diff] [blame] | 670 | AC_FUNC_STRFTIME |
| 671 | |
Damien Miller | 3c02768 | 2001-03-14 11:39:45 +1100 | [diff] [blame] | 672 | # Check for ALTDIRFUNC glob() extension |
| 673 | AC_MSG_CHECKING(for GLOB_ALTDIRFUNC support) |
| 674 | AC_EGREP_CPP(FOUNDIT, |
| 675 | [ |
| 676 | #include <glob.h> |
| 677 | #ifdef GLOB_ALTDIRFUNC |
| 678 | FOUNDIT |
| 679 | #endif |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 680 | ], |
Damien Miller | 3c02768 | 2001-03-14 11:39:45 +1100 | [diff] [blame] | 681 | [ |
| 682 | AC_DEFINE(GLOB_HAS_ALTDIRFUNC) |
| 683 | AC_MSG_RESULT(yes) |
| 684 | ], |
| 685 | [ |
| 686 | AC_MSG_RESULT(no) |
| 687 | ] |
| 688 | ) |
Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 689 | |
Ben Lindstrom | 45b14db | 2001-03-17 01:15:38 +0000 | [diff] [blame] | 690 | # Check for g.gl_matchc glob() extension |
| 691 | AC_MSG_CHECKING(for gl_matchc field in glob_t) |
| 692 | AC_EGREP_CPP(FOUNDIT, |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 693 | [ |
| 694 | #include <glob.h> |
Ben Lindstrom | 45b14db | 2001-03-17 01:15:38 +0000 | [diff] [blame] | 695 | int main(void){glob_t g; g.gl_matchc = 1;} |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 696 | ], |
| 697 | [ |
| 698 | AC_DEFINE(GLOB_HAS_GL_MATCHC) |
| 699 | AC_MSG_RESULT(yes) |
| 700 | ], |
| 701 | [ |
| 702 | AC_MSG_RESULT(no) |
| 703 | ] |
Ben Lindstrom | 45b14db | 2001-03-17 01:15:38 +0000 | [diff] [blame] | 704 | ) |
| 705 | |
Damien Miller | 18bb473 | 2001-03-28 14:35:30 +1000 | [diff] [blame] | 706 | AC_MSG_CHECKING([whether struct dirent allocates space for d_name]) |
| 707 | AC_TRY_RUN( |
| 708 | [ |
| 709 | #include <sys/types.h> |
| 710 | #include <dirent.h> |
Tim Rice | 2c961ce | 2002-09-23 16:54:10 -0700 | [diff] [blame] | 711 | int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));} |
Damien Miller | 18bb473 | 2001-03-28 14:35:30 +1000 | [diff] [blame] | 712 | ], |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 713 | [AC_MSG_RESULT(yes)], |
Damien Miller | 18bb473 | 2001-03-28 14:35:30 +1000 | [diff] [blame] | 714 | [ |
| 715 | AC_MSG_RESULT(no) |
| 716 | AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME) |
| 717 | ] |
| 718 | ) |
| 719 | |
Damien Miller | c547bf1 | 2001-02-16 10:18:12 +1100 | [diff] [blame] | 720 | # Check whether user wants S/Key support |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 721 | SKEY_MSG="no" |
Damien Miller | c547bf1 | 2001-02-16 10:18:12 +1100 | [diff] [blame] | 722 | AC_ARG_WITH(skey, |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 723 | [ --with-skey[[=PATH]] Enable S/Key support |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 724 | (optionally in PATH)], |
Damien Miller | c547bf1 | 2001-02-16 10:18:12 +1100 | [diff] [blame] | 725 | [ |
| 726 | if test "x$withval" != "xno" ; then |
| 727 | |
| 728 | if test "x$withval" != "xyes" ; then |
| 729 | CPPFLAGS="$CPPFLAGS -I${withval}/include" |
| 730 | LDFLAGS="$LDFLAGS -L${withval}/lib" |
| 731 | fi |
| 732 | |
| 733 | AC_DEFINE(SKEY) |
| 734 | LIBS="-lskey $LIBS" |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 735 | SKEY_MSG="yes" |
Damien Miller | c547bf1 | 2001-02-16 10:18:12 +1100 | [diff] [blame] | 736 | |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 737 | AC_MSG_CHECKING([for s/key support]) |
| 738 | AC_TRY_RUN( |
Damien Miller | c547bf1 | 2001-02-16 10:18:12 +1100 | [diff] [blame] | 739 | [ |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 740 | #include <stdio.h> |
| 741 | #include <skey.h> |
Tim Rice | 2c961ce | 2002-09-23 16:54:10 -0700 | [diff] [blame] | 742 | int main() { char *ff = skey_keyinfo(""); ff=""; exit(0); } |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 743 | ], |
| 744 | [AC_MSG_RESULT(yes)], |
| 745 | [ |
| 746 | AC_MSG_RESULT(no) |
Damien Miller | c547bf1 | 2001-02-16 10:18:12 +1100 | [diff] [blame] | 747 | AC_MSG_ERROR([** Incomplete or missing s/key libraries.]) |
| 748 | ]) |
Darren Tucker | 3b908f6 | 2004-04-14 15:26:39 +1000 | [diff] [blame] | 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 | ) |
Damien Miller | c547bf1 | 2001-02-16 10:18:12 +1100 | [diff] [blame] | 758 | fi |
| 759 | ] |
| 760 | ) |
| 761 | |
| 762 | # Check whether user wants TCP wrappers support |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 763 | TCPW_MSG="no" |
Damien Miller | c547bf1 | 2001-02-16 10:18:12 +1100 | [diff] [blame] | 764 | AC_ARG_WITH(tcp-wrappers, |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 765 | [ --with-tcp-wrappers[[=PATH]] Enable tcpwrappers support |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 766 | (optionally in PATH)], |
Damien Miller | c547bf1 | 2001-02-16 10:18:12 +1100 | [diff] [blame] | 767 | [ |
| 768 | if test "x$withval" != "xno" ; then |
| 769 | saved_LIBS="$LIBS" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 770 | saved_LDFLAGS="$LDFLAGS" |
| 771 | saved_CPPFLAGS="$CPPFLAGS" |
| 772 | if test -n "${withval}" -a "${withval}" != "yes"; then |
| 773 | if test -d "${withval}/lib"; then |
| 774 | if test -n "${need_dash_r}"; then |
Tim Rice | 02cebcd | 2001-10-25 10:01:30 -0700 | [diff] [blame] | 775 | LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 776 | else |
Tim Rice | 02cebcd | 2001-10-25 10:01:30 -0700 | [diff] [blame] | 777 | LDFLAGS="-L${withval}/lib ${LDFLAGS}" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 778 | fi |
| 779 | else |
| 780 | if test -n "${need_dash_r}"; then |
Tim Rice | 02cebcd | 2001-10-25 10:01:30 -0700 | [diff] [blame] | 781 | LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 782 | else |
Tim Rice | 02cebcd | 2001-10-25 10:01:30 -0700 | [diff] [blame] | 783 | LDFLAGS="-L${withval} ${LDFLAGS}" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 784 | fi |
| 785 | fi |
| 786 | if test -d "${withval}/include"; then |
Tim Rice | 02cebcd | 2001-10-25 10:01:30 -0700 | [diff] [blame] | 787 | CPPFLAGS="-I${withval}/include ${CPPFLAGS}" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 788 | else |
Tim Rice | 02cebcd | 2001-10-25 10:01:30 -0700 | [diff] [blame] | 789 | CPPFLAGS="-I${withval} ${CPPFLAGS}" |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 790 | fi |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 791 | fi |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 792 | LIBWRAP="-lwrap" |
| 793 | LIBS="$LIBWRAP $LIBS" |
Damien Miller | c547bf1 | 2001-02-16 10:18:12 +1100 | [diff] [blame] | 794 | AC_MSG_CHECKING(for libwrap) |
| 795 | AC_TRY_LINK( |
| 796 | [ |
Damien Miller | 0ac4500 | 2004-04-14 20:14:26 +1000 | [diff] [blame] | 797 | #include <sys/types.h> |
| 798 | #include <sys/socket.h> |
| 799 | #include <netinet/in.h> |
Damien Miller | c547bf1 | 2001-02-16 10:18:12 +1100 | [diff] [blame] | 800 | #include <tcpd.h> |
| 801 | int deny_severity = 0, allow_severity = 0; |
| 802 | ], |
| 803 | [hosts_access(0);], |
| 804 | [ |
| 805 | AC_MSG_RESULT(yes) |
| 806 | AC_DEFINE(LIBWRAP) |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 807 | AC_SUBST(LIBWRAP) |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 808 | TCPW_MSG="yes" |
Damien Miller | c547bf1 | 2001-02-16 10:18:12 +1100 | [diff] [blame] | 809 | ], |
| 810 | [ |
| 811 | AC_MSG_ERROR([*** libwrap missing]) |
| 812 | ] |
| 813 | ) |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 814 | LIBS="$saved_LIBS" |
Damien Miller | c547bf1 | 2001-02-16 10:18:12 +1100 | [diff] [blame] | 815 | fi |
| 816 | ] |
| 817 | ) |
| 818 | |
Damien Miller | fe1f143 | 2003-02-24 15:45:42 +1100 | [diff] [blame] | 819 | dnl Checks for library functions. Please keep in alphabetical order |
| 820 | AC_CHECK_FUNCS(\ |
Damien Miller | f09ad86 | 2003-09-19 16:41:01 +1000 | [diff] [blame] | 821 | arc4random __b64_ntop b64_ntop __b64_pton b64_pton \ |
Damien Miller | 5fe46a4 | 2003-06-05 09:53:31 +1000 | [diff] [blame] | 822 | bcopy bindresvport_sa clock fchmod fchown freeaddrinfo futimes \ |
Darren Tucker | d5e082f | 2003-09-22 12:08:23 +1000 | [diff] [blame] | 823 | getaddrinfo getcwd getgrouplist getnameinfo getopt \ |
Darren Tucker | f1159b5 | 2003-07-07 19:44:01 +1000 | [diff] [blame] | 824 | getpeereid _getpty getrlimit getttyent glob inet_aton \ |
Damien Miller | fe1f143 | 2003-02-24 15:45:42 +1100 | [diff] [blame] | 825 | inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove \ |
Damien Miller | 1340ec2 | 2003-05-20 09:24:42 +1000 | [diff] [blame] | 826 | mkdtemp mmap ngetaddrinfo nsleep ogetaddrinfo openlog_r openpty \ |
Damien Miller | 6c4914a | 2004-03-03 11:08:59 +1100 | [diff] [blame] | 827 | pstat prctl readpassphrase realpath recvmsg rresvport_af sendmsg \ |
Damien Miller | 1340ec2 | 2003-05-20 09:24:42 +1000 | [diff] [blame] | 828 | setdtablesize setegid setenv seteuid setgroups setlogin setpcred \ |
Darren Tucker | 2a6b029 | 2003-12-31 14:59:17 +1100 | [diff] [blame] | 829 | setproctitle setregid setreuid setrlimit \ |
Damien Miller | 5fe46a4 | 2003-06-05 09:53:31 +1000 | [diff] [blame] | 830 | setsid setvbuf sigaction sigvec snprintf socketpair strerror \ |
Darren Tucker | 2e8c0cc | 2003-10-07 17:49:56 +1000 | [diff] [blame] | 831 | strlcat strlcpy strmode strnvis strtoul sysconf tcgetpgrp \ |
Darren Tucker | 86c093d | 2004-03-08 22:59:03 +1100 | [diff] [blame] | 832 | truncate unsetenv updwtmpx utimes vhangup vsnprintf waitpid \ |
Damien Miller | fe1f143 | 2003-02-24 15:45:42 +1100 | [diff] [blame] | 833 | ) |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 834 | |
Darren Tucker | d5e082f | 2003-09-22 12:08:23 +1000 | [diff] [blame] | 835 | # IRIX has a const char return value for gai_strerror() |
| 836 | AC_CHECK_FUNCS(gai_strerror,[ |
| 837 | AC_DEFINE(HAVE_GAI_STRERROR) |
| 838 | AC_TRY_COMPILE([ |
| 839 | #include <sys/types.h> |
| 840 | #include <sys/socket.h> |
| 841 | #include <netdb.h> |
| 842 | |
| 843 | const char *gai_strerror(int);],[ |
| 844 | char *str; |
| 845 | |
| 846 | str = gai_strerror(0);],[ |
| 847 | AC_DEFINE(HAVE_CONST_GAI_STRERROR_PROTO, 1, |
| 848 | [Define if gai_strerror() returns const char *])])]) |
| 849 | |
Damien Miller | cd6853c | 2003-01-28 11:33:42 +1100 | [diff] [blame] | 850 | AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP)) |
| 851 | |
Darren Tucker | f1159b5 | 2003-07-07 19:44:01 +1000 | [diff] [blame] | 852 | dnl Make sure prototypes are defined for these before using them. |
Ben Lindstrom | 3e00647 | 2002-10-16 00:24:03 +0000 | [diff] [blame] | 853 | AC_CHECK_DECL(strsep, [AC_CHECK_FUNCS(strsep)]) |
Darren Tucker | f1159b5 | 2003-07-07 19:44:01 +1000 | [diff] [blame] | 854 | AC_CHECK_DECL(getrusage, [AC_CHECK_FUNCS(getrusage)]) |
Ben Lindstrom | 3e00647 | 2002-10-16 00:24:03 +0000 | [diff] [blame] | 855 | |
Darren Tucker | b2427c8 | 2003-09-10 15:22:44 +1000 | [diff] [blame] | 856 | dnl tcsendbreak might be a macro |
| 857 | AC_CHECK_DECL(tcsendbreak, |
| 858 | [AC_DEFINE(HAVE_TCSENDBREAK)], |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 859 | [AC_CHECK_FUNCS(tcsendbreak)], |
Darren Tucker | b2427c8 | 2003-09-10 15:22:44 +1000 | [diff] [blame] | 860 | [#include <termios.h>] |
| 861 | ) |
| 862 | |
Darren Tucker | 5bb1400 | 2004-04-23 18:53:10 +1000 | [diff] [blame] | 863 | AC_CHECK_DECLS(h_errno, , ,[#include <netdb.h>]) |
| 864 | |
Darren Tucker | 2a6b029 | 2003-12-31 14:59:17 +1100 | [diff] [blame] | 865 | AC_CHECK_FUNCS(setresuid, [ |
| 866 | dnl Some platorms have setresuid that isn't implemented, test for this |
| 867 | AC_MSG_CHECKING(if setresuid seems to work) |
| 868 | AC_TRY_RUN([ |
Darren Tucker | e937be3 | 2003-12-17 18:53:26 +1100 | [diff] [blame] | 869 | #include <stdlib.h> |
| 870 | #include <errno.h> |
| 871 | int main(){errno=0; setresuid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);} |
Darren Tucker | 2a6b029 | 2003-12-31 14:59:17 +1100 | [diff] [blame] | 872 | ], |
| 873 | [AC_MSG_RESULT(yes)], |
Darren Tucker | fd0894a | 2004-01-09 00:19:25 +1100 | [diff] [blame] | 874 | [AC_DEFINE(BROKEN_SETRESUID) |
Darren Tucker | 2a6b029 | 2003-12-31 14:59:17 +1100 | [diff] [blame] | 875 | AC_MSG_RESULT(not implemented)] |
| 876 | ) |
| 877 | ]) |
Darren Tucker | e937be3 | 2003-12-17 18:53:26 +1100 | [diff] [blame] | 878 | |
Darren Tucker | 2a6b029 | 2003-12-31 14:59:17 +1100 | [diff] [blame] | 879 | AC_CHECK_FUNCS(setresgid, [ |
| 880 | dnl Some platorms have setresgid that isn't implemented, test for this |
| 881 | AC_MSG_CHECKING(if setresgid seems to work) |
| 882 | AC_TRY_RUN([ |
Darren Tucker | e937be3 | 2003-12-17 18:53:26 +1100 | [diff] [blame] | 883 | #include <stdlib.h> |
| 884 | #include <errno.h> |
| 885 | int main(){errno=0; setresgid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);} |
Darren Tucker | 2a6b029 | 2003-12-31 14:59:17 +1100 | [diff] [blame] | 886 | ], |
| 887 | [AC_MSG_RESULT(yes)], |
| 888 | [AC_DEFINE(BROKEN_SETRESGID) |
| 889 | AC_MSG_RESULT(not implemented)] |
| 890 | ) |
| 891 | ]) |
Darren Tucker | e937be3 | 2003-12-17 18:53:26 +1100 | [diff] [blame] | 892 | |
Damien Miller | ad833b3 | 2000-08-23 10:46:23 +1000 | [diff] [blame] | 893 | dnl Checks for time functions |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 894 | AC_CHECK_FUNCS(gettimeofday time) |
Damien Miller | ad833b3 | 2000-08-23 10:46:23 +1000 | [diff] [blame] | 895 | dnl Checks for utmp functions |
Ben Lindstrom | 2c467a2 | 2000-12-27 04:57:41 +0000 | [diff] [blame] | 896 | AC_CHECK_FUNCS(endutent getutent getutid getutline pututline setutent) |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 897 | AC_CHECK_FUNCS(utmpname) |
Damien Miller | ad833b3 | 2000-08-23 10:46:23 +1000 | [diff] [blame] | 898 | dnl Checks for utmpx functions |
Ben Lindstrom | 2c467a2 | 2000-12-27 04:57:41 +0000 | [diff] [blame] | 899 | AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline pututxline ) |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 900 | AC_CHECK_FUNCS(setutxent utmpxname) |
Damien Miller | cedfecc | 1999-11-15 14:36:53 +1100 | [diff] [blame] | 901 | |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 902 | AC_CHECK_FUNC(daemon, |
Damien Miller | 04f8014 | 1999-11-19 15:32:34 +1100 | [diff] [blame] | 903 | [AC_DEFINE(HAVE_DAEMON)], |
| 904 | [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])] |
| 905 | ) |
| 906 | |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 907 | AC_CHECK_FUNC(getpagesize, |
Damien Miller | 9fb07e4 | 2000-03-05 16:22:59 +1100 | [diff] [blame] | 908 | [AC_DEFINE(HAVE_GETPAGESIZE)], |
| 909 | [AC_CHECK_LIB(ucb, getpagesize, [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])] |
| 910 | ) |
| 911 | |
Damien Miller | cb170cb | 2000-07-01 16:52:55 +1000 | [diff] [blame] | 912 | # Check for broken snprintf |
| 913 | if test "x$ac_cv_func_snprintf" = "xyes" ; then |
| 914 | AC_MSG_CHECKING([whether snprintf correctly terminates long strings]) |
| 915 | AC_TRY_RUN( |
| 916 | [ |
| 917 | #include <stdio.h> |
Tim Rice | 2c961ce | 2002-09-23 16:54:10 -0700 | [diff] [blame] | 918 | int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');} |
Damien Miller | cb170cb | 2000-07-01 16:52:55 +1000 | [diff] [blame] | 919 | ], |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 920 | [AC_MSG_RESULT(yes)], |
Damien Miller | cb170cb | 2000-07-01 16:52:55 +1000 | [diff] [blame] | 921 | [ |
| 922 | AC_MSG_RESULT(no) |
| 923 | AC_DEFINE(BROKEN_SNPRINTF) |
| 924 | AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor]) |
| 925 | ] |
| 926 | ) |
| 927 | fi |
| 928 | |
Damien Miller | e832819 | 2003-01-07 15:18:32 +1100 | [diff] [blame] | 929 | dnl see whether mkstemp() requires XXXXXX |
| 930 | if test "x$ac_cv_func_mkdtemp" = "xyes" ; then |
| 931 | AC_MSG_CHECKING([for (overly) strict mkstemp]) |
| 932 | AC_TRY_RUN( |
| 933 | [ |
| 934 | #include <stdlib.h> |
| 935 | main() { char template[]="conftest.mkstemp-test"; |
| 936 | if (mkstemp(template) == -1) |
| 937 | exit(1); |
| 938 | unlink(template); exit(0); |
| 939 | } |
| 940 | ], |
| 941 | [ |
| 942 | AC_MSG_RESULT(no) |
| 943 | ], |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 944 | [ |
Damien Miller | e832819 | 2003-01-07 15:18:32 +1100 | [diff] [blame] | 945 | AC_MSG_RESULT(yes) |
| 946 | AC_DEFINE(HAVE_STRICT_MKSTEMP) |
| 947 | ], |
| 948 | [ |
| 949 | AC_MSG_RESULT(yes) |
| 950 | AC_DEFINE(HAVE_STRICT_MKSTEMP) |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 951 | ] |
Damien Miller | e832819 | 2003-01-07 15:18:32 +1100 | [diff] [blame] | 952 | ) |
| 953 | fi |
| 954 | |
Darren Tucker | 70a3d55 | 2003-08-21 17:58:29 +1000 | [diff] [blame] | 955 | dnl make sure that openpty does not reacquire controlling terminal |
| 956 | if test ! -z "$check_for_openpty_ctty_bug"; then |
| 957 | AC_MSG_CHECKING(if openpty correctly handles controlling tty) |
| 958 | AC_TRY_RUN( |
| 959 | [ |
| 960 | #include <stdio.h> |
| 961 | #include <sys/fcntl.h> |
| 962 | #include <sys/types.h> |
| 963 | #include <sys/wait.h> |
| 964 | |
| 965 | int |
| 966 | main() |
| 967 | { |
| 968 | pid_t pid; |
| 969 | int fd, ptyfd, ttyfd, status; |
| 970 | |
| 971 | pid = fork(); |
| 972 | if (pid < 0) { /* failed */ |
| 973 | exit(1); |
| 974 | } else if (pid > 0) { /* parent */ |
| 975 | waitpid(pid, &status, 0); |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 976 | if (WIFEXITED(status)) |
Darren Tucker | 70a3d55 | 2003-08-21 17:58:29 +1000 | [diff] [blame] | 977 | exit(WEXITSTATUS(status)); |
| 978 | else |
| 979 | exit(2); |
| 980 | } else { /* child */ |
| 981 | close(0); close(1); close(2); |
| 982 | setsid(); |
| 983 | openpty(&ptyfd, &ttyfd, NULL, NULL, NULL); |
| 984 | fd = open("/dev/tty", O_RDWR | O_NOCTTY); |
| 985 | if (fd >= 0) |
| 986 | exit(3); /* Acquired ctty: broken */ |
| 987 | else |
| 988 | exit(0); /* Did not acquire ctty: OK */ |
| 989 | } |
| 990 | } |
| 991 | ], |
| 992 | [ |
| 993 | AC_MSG_RESULT(yes) |
| 994 | ], |
| 995 | [ |
| 996 | AC_MSG_RESULT(no) |
| 997 | AC_DEFINE(SSHD_ACQUIRES_CTTY) |
| 998 | ] |
| 999 | ) |
| 1000 | fi |
| 1001 | |
Darren Tucker | 4398cf5 | 2004-04-06 21:39:02 +1000 | [diff] [blame] | 1002 | if test "x$ac_cv_func_getaddrinfo" = "xyes" -a "x$check_for_hpux_broken_getaddrinfo" = "x1"; then |
| 1003 | AC_MSG_CHECKING(if getaddrinfo seems to work) |
| 1004 | AC_TRY_RUN( |
| 1005 | [ |
| 1006 | #include <stdio.h> |
| 1007 | #include <sys/socket.h> |
| 1008 | #include <netdb.h> |
| 1009 | #include <errno.h> |
| 1010 | #include <netinet/in.h> |
| 1011 | |
| 1012 | #define TEST_PORT "2222" |
| 1013 | |
| 1014 | int |
| 1015 | main(void) |
| 1016 | { |
| 1017 | int err, sock; |
| 1018 | struct addrinfo *gai_ai, *ai, hints; |
| 1019 | char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL; |
| 1020 | |
| 1021 | memset(&hints, 0, sizeof(hints)); |
| 1022 | hints.ai_family = PF_UNSPEC; |
| 1023 | hints.ai_socktype = SOCK_STREAM; |
| 1024 | hints.ai_flags = AI_PASSIVE; |
| 1025 | |
| 1026 | err = getaddrinfo(name, TEST_PORT, &hints, &gai_ai); |
| 1027 | if (err != 0) { |
| 1028 | fprintf(stderr, "getaddrinfo failed (%s)", gai_strerror(err)); |
| 1029 | exit(1); |
| 1030 | } |
| 1031 | |
| 1032 | for (ai = gai_ai; ai != NULL; ai = ai->ai_next) { |
| 1033 | if (ai->ai_family != AF_INET6) |
| 1034 | continue; |
| 1035 | |
| 1036 | err = getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop, |
| 1037 | sizeof(ntop), strport, sizeof(strport), |
| 1038 | NI_NUMERICHOST|NI_NUMERICSERV); |
| 1039 | |
| 1040 | if (err != 0) { |
| 1041 | if (err == EAI_SYSTEM) |
| 1042 | perror("getnameinfo EAI_SYSTEM"); |
| 1043 | else |
| 1044 | fprintf(stderr, "getnameinfo failed: %s\n", |
| 1045 | gai_strerror(err)); |
| 1046 | exit(2); |
| 1047 | } |
| 1048 | |
| 1049 | sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); |
| 1050 | if (sock < 0) |
| 1051 | perror("socket"); |
| 1052 | if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) { |
| 1053 | if (errno == EBADF) |
| 1054 | exit(3); |
| 1055 | } |
| 1056 | } |
| 1057 | exit(0); |
| 1058 | } |
| 1059 | ], |
| 1060 | [ |
| 1061 | AC_MSG_RESULT(yes) |
| 1062 | ], |
| 1063 | [ |
| 1064 | AC_MSG_RESULT(no) |
| 1065 | AC_DEFINE(BROKEN_GETADDRINFO) |
| 1066 | ] |
| 1067 | ) |
| 1068 | fi |
| 1069 | |
Damien Miller | 606f880 | 2000-09-16 15:39:56 +1100 | [diff] [blame] | 1070 | AC_FUNC_GETPGRP |
| 1071 | |
Damien Miller | a64b57a | 2001-01-17 10:44:13 +1100 | [diff] [blame] | 1072 | # Check for PAM libs |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1073 | PAM_MSG="no" |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1074 | AC_ARG_WITH(pam, |
Damien Miller | a64b57a | 2001-01-17 10:44:13 +1100 | [diff] [blame] | 1075 | [ --with-pam Enable PAM support ], |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1076 | [ |
Damien Miller | a64b57a | 2001-01-17 10:44:13 +1100 | [diff] [blame] | 1077 | if test "x$withval" != "xno" ; then |
Damien Miller | 0f47c53 | 2004-01-02 18:01:30 +1100 | [diff] [blame] | 1078 | if test "x$ac_cv_header_security_pam_appl_h" != "xyes" && \ |
| 1079 | test "x$ac_cv_header_pam_pam_appl_h" != "xyes" ; then |
Damien Miller | a64b57a | 2001-01-17 10:44:13 +1100 | [diff] [blame] | 1080 | AC_MSG_ERROR([PAM headers not found]) |
| 1081 | fi |
| 1082 | |
| 1083 | AC_CHECK_LIB(dl, dlopen, , ) |
| 1084 | AC_CHECK_LIB(pam, pam_set_item, , AC_MSG_ERROR([*** libpam missing])) |
| 1085 | AC_CHECK_FUNCS(pam_getenvlist) |
Darren Tucker | 49aaf4a | 2003-08-26 11:58:16 +1000 | [diff] [blame] | 1086 | AC_CHECK_FUNCS(pam_putenv) |
Damien Miller | a64b57a | 2001-01-17 10:44:13 +1100 | [diff] [blame] | 1087 | |
Damien Miller | a64b57a | 2001-01-17 10:44:13 +1100 | [diff] [blame] | 1088 | PAM_MSG="yes" |
| 1089 | |
| 1090 | AC_DEFINE(USE_PAM) |
Tim Rice | 7d2d1f1 | 2002-02-26 22:05:11 -0800 | [diff] [blame] | 1091 | if test $ac_cv_lib_dl_dlopen = yes; then |
| 1092 | LIBPAM="-lpam -ldl" |
| 1093 | else |
| 1094 | LIBPAM="-lpam" |
| 1095 | fi |
| 1096 | AC_SUBST(LIBPAM) |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1097 | fi |
| 1098 | ] |
| 1099 | ) |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1100 | |
Damien Miller | a64b57a | 2001-01-17 10:44:13 +1100 | [diff] [blame] | 1101 | # Check for older PAM |
| 1102 | if test "x$PAM_MSG" = "xyes" ; then |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1103 | # Check PAM strerror arguments (old PAM) |
| 1104 | AC_MSG_CHECKING([whether pam_strerror takes only one argument]) |
| 1105 | AC_TRY_COMPILE( |
| 1106 | [ |
Damien Miller | 8117111 | 2000-04-23 11:14:01 +1000 | [diff] [blame] | 1107 | #include <stdlib.h> |
Damien Miller | 0f47c53 | 2004-01-02 18:01:30 +1100 | [diff] [blame] | 1108 | #if defined(HAVE_SECURITY_PAM_APPL_H) |
Damien Miller | 8117111 | 2000-04-23 11:14:01 +1000 | [diff] [blame] | 1109 | #include <security/pam_appl.h> |
Damien Miller | 0f47c53 | 2004-01-02 18:01:30 +1100 | [diff] [blame] | 1110 | #elif defined (HAVE_PAM_PAM_APPL_H) |
| 1111 | #include <pam/pam_appl.h> |
| 1112 | #endif |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1113 | ], |
| 1114 | [(void)pam_strerror((pam_handle_t *)NULL, -1);], |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1115 | [AC_MSG_RESULT(no)], |
| 1116 | [ |
| 1117 | AC_DEFINE(HAVE_OLD_PAM) |
| 1118 | AC_MSG_RESULT(yes) |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1119 | PAM_MSG="yes (old library)" |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1120 | ] |
Damien Miller | a64b57a | 2001-01-17 10:44:13 +1100 | [diff] [blame] | 1121 | ) |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1122 | fi |
| 1123 | |
Tim Rice | aef7371 | 2002-05-11 13:17:42 -0700 | [diff] [blame] | 1124 | # Search for OpenSSL |
| 1125 | saved_CPPFLAGS="$CPPFLAGS" |
| 1126 | saved_LDFLAGS="$LDFLAGS" |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1127 | AC_ARG_WITH(ssl-dir, |
| 1128 | [ --with-ssl-dir=PATH Specify path to OpenSSL installation ], |
| 1129 | [ |
Ben Lindstrom | 23e1371 | 2000-10-29 22:49:19 +0000 | [diff] [blame] | 1130 | if test "x$withval" != "xno" ; then |
Tim Rice | aef7371 | 2002-05-11 13:17:42 -0700 | [diff] [blame] | 1131 | if test -d "$withval/lib"; then |
| 1132 | if test -n "${need_dash_r}"; then |
| 1133 | LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}" |
| 1134 | else |
| 1135 | LDFLAGS="-L${withval}/lib ${LDFLAGS}" |
| 1136 | fi |
| 1137 | else |
| 1138 | if test -n "${need_dash_r}"; then |
| 1139 | LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}" |
| 1140 | else |
| 1141 | LDFLAGS="-L${withval} ${LDFLAGS}" |
| 1142 | fi |
| 1143 | fi |
| 1144 | if test -d "$withval/include"; then |
| 1145 | CPPFLAGS="-I${withval}/include ${CPPFLAGS}" |
| 1146 | else |
| 1147 | CPPFLAGS="-I${withval} ${CPPFLAGS}" |
| 1148 | fi |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1149 | fi |
| 1150 | ] |
| 1151 | ) |
Tim Rice | 3d5352e | 2004-02-12 09:27:21 -0800 | [diff] [blame] | 1152 | LIBS="-lcrypto $LIBS" |
Tim Rice | aef7371 | 2002-05-11 13:17:42 -0700 | [diff] [blame] | 1153 | AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL), |
Damien Miller | 3b512e1 | 2000-05-17 23:29:18 +1000 | [diff] [blame] | 1154 | [ |
Tim Rice | aef7371 | 2002-05-11 13:17:42 -0700 | [diff] [blame] | 1155 | dnl Check default openssl install dir |
| 1156 | if test -n "${need_dash_r}"; then |
| 1157 | LDFLAGS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib ${saved_LDFLAGS}" |
Damien Miller | 3b512e1 | 2000-05-17 23:29:18 +1000 | [diff] [blame] | 1158 | else |
Tim Rice | aef7371 | 2002-05-11 13:17:42 -0700 | [diff] [blame] | 1159 | LDFLAGS="-L/usr/local/ssl/lib ${saved_LDFLAGS}" |
Damien Miller | 3b512e1 | 2000-05-17 23:29:18 +1000 | [diff] [blame] | 1160 | fi |
Tim Rice | aef7371 | 2002-05-11 13:17:42 -0700 | [diff] [blame] | 1161 | CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}" |
| 1162 | AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL), |
| 1163 | [ |
| 1164 | AC_MSG_ERROR([*** Can't find recent OpenSSL libcrypto (see config.log for details) ***]) |
| 1165 | ] |
| 1166 | ) |
| 1167 | ] |
| 1168 | ) |
| 1169 | |
Tim Rice | d730b78 | 2002-08-13 18:52:10 -0700 | [diff] [blame] | 1170 | # Determine OpenSSL header version |
| 1171 | AC_MSG_CHECKING([OpenSSL header version]) |
| 1172 | AC_TRY_RUN( |
| 1173 | [ |
| 1174 | #include <stdio.h> |
| 1175 | #include <string.h> |
| 1176 | #include <openssl/opensslv.h> |
| 1177 | #define DATA "conftest.sslincver" |
| 1178 | int main(void) { |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1179 | FILE *fd; |
| 1180 | int rc; |
Tim Rice | d730b78 | 2002-08-13 18:52:10 -0700 | [diff] [blame] | 1181 | |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1182 | fd = fopen(DATA,"w"); |
| 1183 | if(fd == NULL) |
| 1184 | exit(1); |
Tim Rice | d730b78 | 2002-08-13 18:52:10 -0700 | [diff] [blame] | 1185 | |
| 1186 | if ((rc = fprintf(fd ,"%x (%s)\n", OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_TEXT)) <0) |
| 1187 | exit(1); |
| 1188 | |
| 1189 | exit(0); |
| 1190 | } |
| 1191 | ], |
| 1192 | [ |
| 1193 | ssl_header_ver=`cat conftest.sslincver` |
| 1194 | AC_MSG_RESULT($ssl_header_ver) |
| 1195 | ], |
| 1196 | [ |
| 1197 | AC_MSG_RESULT(not found) |
| 1198 | AC_MSG_ERROR(OpenSSL version header not found.) |
| 1199 | ] |
| 1200 | ) |
| 1201 | |
| 1202 | # Determine OpenSSL library version |
| 1203 | AC_MSG_CHECKING([OpenSSL library version]) |
| 1204 | AC_TRY_RUN( |
| 1205 | [ |
| 1206 | #include <stdio.h> |
| 1207 | #include <string.h> |
| 1208 | #include <openssl/opensslv.h> |
| 1209 | #include <openssl/crypto.h> |
| 1210 | #define DATA "conftest.ssllibver" |
| 1211 | int main(void) { |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1212 | FILE *fd; |
| 1213 | int rc; |
Tim Rice | d730b78 | 2002-08-13 18:52:10 -0700 | [diff] [blame] | 1214 | |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1215 | fd = fopen(DATA,"w"); |
| 1216 | if(fd == NULL) |
| 1217 | exit(1); |
Tim Rice | d730b78 | 2002-08-13 18:52:10 -0700 | [diff] [blame] | 1218 | |
| 1219 | if ((rc = fprintf(fd ,"%x (%s)\n", SSLeay(), SSLeay_version(SSLEAY_VERSION))) <0) |
| 1220 | exit(1); |
| 1221 | |
| 1222 | exit(0); |
| 1223 | } |
| 1224 | ], |
| 1225 | [ |
| 1226 | ssl_library_ver=`cat conftest.ssllibver` |
| 1227 | AC_MSG_RESULT($ssl_library_ver) |
| 1228 | ], |
| 1229 | [ |
| 1230 | AC_MSG_RESULT(not found) |
| 1231 | AC_MSG_ERROR(OpenSSL library not found.) |
| 1232 | ] |
| 1233 | ) |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1234 | |
Damien Miller | ec93237 | 2002-01-22 22:16:03 +1100 | [diff] [blame] | 1235 | # Sanity check OpenSSL headers |
| 1236 | AC_MSG_CHECKING([whether OpenSSL's headers match the library]) |
| 1237 | AC_TRY_RUN( |
| 1238 | [ |
| 1239 | #include <string.h> |
| 1240 | #include <openssl/opensslv.h> |
Tim Rice | 2c961ce | 2002-09-23 16:54:10 -0700 | [diff] [blame] | 1241 | int main(void) { exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); } |
Damien Miller | ec93237 | 2002-01-22 22:16:03 +1100 | [diff] [blame] | 1242 | ], |
| 1243 | [ |
| 1244 | AC_MSG_RESULT(yes) |
| 1245 | ], |
| 1246 | [ |
| 1247 | AC_MSG_RESULT(no) |
Darren Tucker | a0472e0 | 2003-06-24 20:22:09 +1000 | [diff] [blame] | 1248 | AC_MSG_ERROR([Your OpenSSL headers do not match your library. |
| 1249 | Check config.log for details. |
| 1250 | Also see contrib/findssl.sh for help identifying header/library mismatches.]) |
Damien Miller | ec93237 | 2002-01-22 22:16:03 +1100 | [diff] [blame] | 1251 | ] |
| 1252 | ) |
| 1253 | |
Tim Rice | 3d5352e | 2004-02-12 09:27:21 -0800 | [diff] [blame] | 1254 | # Some systems want crypt() from libcrypt, *not* the version in OpenSSL, |
| 1255 | # because the system crypt() is more featureful. |
| 1256 | if test "x$check_for_libcrypt_before" = "x1"; then |
| 1257 | AC_CHECK_LIB(crypt, crypt) |
| 1258 | fi |
| 1259 | |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1260 | # Some Linux systems (Slackware) need crypt() from libcrypt, *not* the |
Tim Rice | 43fa557 | 2004-02-11 14:46:40 -0800 | [diff] [blame] | 1261 | # version in OpenSSL. |
Damien Miller | 4f9f42a | 2003-05-10 19:28:02 +1000 | [diff] [blame] | 1262 | if test "x$check_for_libcrypt_later" = "x1"; then |
Damien Miller | 95aa2d6 | 2001-03-01 09:16:11 +1100 | [diff] [blame] | 1263 | AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt") |
Damien Miller | a64b57a | 2001-01-17 10:44:13 +1100 | [diff] [blame] | 1264 | fi |
| 1265 | |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 1266 | |
| 1267 | ### Configure cryptographic random number support |
| 1268 | |
| 1269 | # Check wheter OpenSSL seeds itself |
| 1270 | AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded]) |
| 1271 | AC_TRY_RUN( |
| 1272 | [ |
| 1273 | #include <string.h> |
| 1274 | #include <openssl/rand.h> |
Tim Rice | 2c961ce | 2002-09-23 16:54:10 -0700 | [diff] [blame] | 1275 | int main(void) { exit(RAND_status() == 1 ? 0 : 1); } |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 1276 | ], |
| 1277 | [ |
| 1278 | OPENSSL_SEEDS_ITSELF=yes |
| 1279 | AC_MSG_RESULT(yes) |
| 1280 | ], |
| 1281 | [ |
| 1282 | AC_MSG_RESULT(no) |
| 1283 | # Default to use of the rand helper if OpenSSL doesn't |
| 1284 | # seed itself |
| 1285 | USE_RAND_HELPER=yes |
| 1286 | ] |
| 1287 | ) |
| 1288 | |
| 1289 | |
| 1290 | # Do we want to force the use of the rand helper? |
| 1291 | AC_ARG_WITH(rand-helper, |
| 1292 | [ --with-rand-helper Use subprocess to gather strong randomness ], |
| 1293 | [ |
| 1294 | if test "x$withval" = "xno" ; then |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1295 | # Force use of OpenSSL's internal RNG, even if |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 1296 | # the previous test showed it to be unseeded. |
| 1297 | if test -z "$OPENSSL_SEEDS_ITSELF" ; then |
| 1298 | AC_MSG_WARN([*** Forcing use of OpenSSL's non-self-seeding PRNG]) |
| 1299 | OPENSSL_SEEDS_ITSELF=yes |
| 1300 | USE_RAND_HELPER="" |
| 1301 | fi |
| 1302 | else |
| 1303 | USE_RAND_HELPER=yes |
| 1304 | fi |
| 1305 | ], |
| 1306 | ) |
| 1307 | |
| 1308 | # Which randomness source do we use? |
| 1309 | if test ! -z "$OPENSSL_SEEDS_ITSELF" -a -z "$USE_RAND_HELPER" ; then |
| 1310 | # OpenSSL only |
| 1311 | AC_DEFINE(OPENSSL_PRNG_ONLY) |
| 1312 | RAND_MSG="OpenSSL internal ONLY" |
| 1313 | INSTALL_SSH_RAND_HELPER="" |
Tim Rice | 1e2c600 | 2002-01-30 22:14:03 -0800 | [diff] [blame] | 1314 | elif test ! -z "$USE_RAND_HELPER" ; then |
| 1315 | # install rand helper |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 1316 | RAND_MSG="ssh-rand-helper" |
| 1317 | INSTALL_SSH_RAND_HELPER="yes" |
| 1318 | fi |
| 1319 | AC_SUBST(INSTALL_SSH_RAND_HELPER) |
| 1320 | |
| 1321 | ### Configuration of ssh-rand-helper |
| 1322 | |
| 1323 | # PRNGD TCP socket |
| 1324 | AC_ARG_WITH(prngd-port, |
| 1325 | [ --with-prngd-port=PORT read entropy from PRNGD/EGD TCP localhost:PORT], |
| 1326 | [ |
Damien Miller | e996d72 | 2002-01-23 11:20:59 +1100 | [diff] [blame] | 1327 | case "$withval" in |
| 1328 | no) |
| 1329 | withval="" |
| 1330 | ;; |
| 1331 | [[0-9]]*) |
| 1332 | ;; |
| 1333 | *) |
| 1334 | AC_MSG_ERROR(You must specify a numeric port number for --with-prngd-port) |
| 1335 | ;; |
| 1336 | esac |
| 1337 | if test ! -z "$withval" ; then |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 1338 | PRNGD_PORT="$withval" |
| 1339 | AC_DEFINE_UNQUOTED(PRNGD_PORT, $PRNGD_PORT) |
| 1340 | fi |
| 1341 | ] |
| 1342 | ) |
| 1343 | |
| 1344 | # PRNGD Unix domain socket |
| 1345 | AC_ARG_WITH(prngd-socket, |
| 1346 | [ --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)], |
| 1347 | [ |
Damien Miller | e996d72 | 2002-01-23 11:20:59 +1100 | [diff] [blame] | 1348 | case "$withval" in |
| 1349 | yes) |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 1350 | withval="/var/run/egd-pool" |
Damien Miller | e996d72 | 2002-01-23 11:20:59 +1100 | [diff] [blame] | 1351 | ;; |
| 1352 | no) |
| 1353 | withval="" |
| 1354 | ;; |
| 1355 | /*) |
| 1356 | ;; |
| 1357 | *) |
| 1358 | AC_MSG_ERROR(You must specify an absolute path to the entropy socket) |
| 1359 | ;; |
| 1360 | esac |
| 1361 | |
| 1362 | if test ! -z "$withval" ; then |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 1363 | if test ! -z "$PRNGD_PORT" ; then |
| 1364 | AC_MSG_ERROR(You may not specify both a PRNGD/EGD port and socket) |
| 1365 | fi |
Damien Miller | 6385ba0 | 2002-01-23 08:12:36 +1100 | [diff] [blame] | 1366 | if test ! -r "$withval" ; then |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 1367 | AC_MSG_WARN(Entropy socket is not readable) |
| 1368 | fi |
| 1369 | PRNGD_SOCKET="$withval" |
| 1370 | AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET") |
| 1371 | fi |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 1372 | ], |
| 1373 | [ |
| 1374 | # Check for existing socket only if we don't have a random device already |
| 1375 | if test "$USE_RAND_HELPER" = yes ; then |
| 1376 | AC_MSG_CHECKING(for PRNGD/EGD socket) |
| 1377 | # Insert other locations here |
| 1378 | for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do |
| 1379 | if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then |
| 1380 | PRNGD_SOCKET="$sock" |
| 1381 | AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET") |
| 1382 | break; |
| 1383 | fi |
| 1384 | done |
| 1385 | if test ! -z "$PRNGD_SOCKET" ; then |
| 1386 | AC_MSG_RESULT($PRNGD_SOCKET) |
| 1387 | else |
| 1388 | AC_MSG_RESULT(not found) |
| 1389 | fi |
| 1390 | fi |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 1391 | ] |
| 1392 | ) |
| 1393 | |
| 1394 | # Change default command timeout for hashing entropy source |
| 1395 | entropy_timeout=200 |
| 1396 | AC_ARG_WITH(entropy-timeout, |
| 1397 | [ --with-entropy-timeout Specify entropy gathering command timeout (msec)], |
| 1398 | [ |
| 1399 | if test "x$withval" != "xno" ; then |
| 1400 | entropy_timeout=$withval |
| 1401 | fi |
| 1402 | ] |
| 1403 | ) |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 1404 | AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout) |
| 1405 | |
Damien Miller | d3f6ad2 | 2002-06-25 10:24:47 +1000 | [diff] [blame] | 1406 | SSH_PRIVSEP_USER=sshd |
Kevin Steves | 7ff9112 | 2002-04-07 19:22:54 +0000 | [diff] [blame] | 1407 | AC_ARG_WITH(privsep-user, |
Kevin Steves | c81e129 | 2002-05-13 03:51:40 +0000 | [diff] [blame] | 1408 | [ --with-privsep-user=user Specify non-privileged user for privilege separation], |
Kevin Steves | 7ff9112 | 2002-04-07 19:22:54 +0000 | [diff] [blame] | 1409 | [ |
| 1410 | if test -n "$withval"; then |
Damien Miller | d3f6ad2 | 2002-06-25 10:24:47 +1000 | [diff] [blame] | 1411 | SSH_PRIVSEP_USER=$withval |
Kevin Steves | 7ff9112 | 2002-04-07 19:22:54 +0000 | [diff] [blame] | 1412 | fi |
| 1413 | ] |
| 1414 | ) |
Damien Miller | d3f6ad2 | 2002-06-25 10:24:47 +1000 | [diff] [blame] | 1415 | AC_DEFINE_UNQUOTED(SSH_PRIVSEP_USER, "$SSH_PRIVSEP_USER") |
| 1416 | AC_SUBST(SSH_PRIVSEP_USER) |
Kevin Steves | 7ff9112 | 2002-04-07 19:22:54 +0000 | [diff] [blame] | 1417 | |
Tim Rice | 88f2ab5 | 2002-03-17 12:17:34 -0800 | [diff] [blame] | 1418 | # We do this little dance with the search path to insure |
| 1419 | # that programs that we select for use by installed programs |
| 1420 | # (which may be run by the super-user) come from trusted |
| 1421 | # locations before they come from the user's private area. |
| 1422 | # This should help avoid accidentally configuring some |
| 1423 | # random version of a program in someone's personal bin. |
| 1424 | |
| 1425 | OPATH=$PATH |
| 1426 | PATH=/bin:/usr/bin |
Tim Rice | ae49fe6 | 2002-04-12 10:26:21 -0700 | [diff] [blame] | 1427 | test -h /bin 2> /dev/null && PATH=/usr/bin |
Tim Rice | 88f2ab5 | 2002-03-17 12:17:34 -0800 | [diff] [blame] | 1428 | test -d /sbin && PATH=$PATH:/sbin |
| 1429 | test -d /usr/sbin && PATH=$PATH:/usr/sbin |
| 1430 | PATH=$PATH:/etc:$OPATH |
| 1431 | |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1432 | # These programs are used by the command hashing source to gather entropy |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 1433 | OSSH_PATH_ENTROPY_PROG(PROG_LS, ls) |
| 1434 | OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat) |
| 1435 | OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp) |
| 1436 | OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig) |
| 1437 | OSSH_PATH_ENTROPY_PROG(PROG_JSTAT, jstat) |
| 1438 | OSSH_PATH_ENTROPY_PROG(PROG_PS, ps) |
| 1439 | OSSH_PATH_ENTROPY_PROG(PROG_SAR, sar) |
| 1440 | OSSH_PATH_ENTROPY_PROG(PROG_W, w) |
| 1441 | OSSH_PATH_ENTROPY_PROG(PROG_WHO, who) |
| 1442 | OSSH_PATH_ENTROPY_PROG(PROG_LAST, last) |
| 1443 | OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog) |
| 1444 | OSSH_PATH_ENTROPY_PROG(PROG_DF, df) |
| 1445 | OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat) |
| 1446 | OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime) |
| 1447 | OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs) |
| 1448 | OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail) |
Tim Rice | 88f2ab5 | 2002-03-17 12:17:34 -0800 | [diff] [blame] | 1449 | # restore PATH |
| 1450 | PATH=$OPATH |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 1451 | |
| 1452 | # Where does ssh-rand-helper get its randomness from? |
| 1453 | INSTALL_SSH_PRNG_CMDS="" |
| 1454 | if test ! -z "$INSTALL_SSH_RAND_HELPER" ; then |
| 1455 | if test ! -z "$PRNGD_PORT" ; then |
| 1456 | RAND_HELPER_MSG="TCP localhost:$PRNGD_PORT" |
| 1457 | elif test ! -z "$PRNGD_SOCKET" ; then |
| 1458 | RAND_HELPER_MSG="Unix domain socket \"$PRNGD_SOCKET\"" |
| 1459 | else |
| 1460 | RAND_HELPER_MSG="Command hashing (timeout $entropy_timeout)" |
| 1461 | RAND_HELPER_CMDHASH=yes |
| 1462 | INSTALL_SSH_PRNG_CMDS="yes" |
| 1463 | fi |
| 1464 | fi |
| 1465 | AC_SUBST(INSTALL_SSH_PRNG_CMDS) |
| 1466 | |
| 1467 | |
Ben Lindstrom | b562864 | 2000-10-18 00:02:25 +0000 | [diff] [blame] | 1468 | # Cheap hack to ensure NEWS-OS libraries are arranged right. |
| 1469 | if test ! -z "$SONY" ; then |
| 1470 | LIBS="$LIBS -liberty"; |
| 1471 | fi |
| 1472 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1473 | # Checks for data types |
Damien Miller | e0f4574 | 2000-01-18 09:12:06 +1100 | [diff] [blame] | 1474 | AC_CHECK_SIZEOF(char, 1) |
Damien Miller | c6398ef | 1999-11-20 12:18:40 +1100 | [diff] [blame] | 1475 | AC_CHECK_SIZEOF(short int, 2) |
| 1476 | AC_CHECK_SIZEOF(int, 4) |
| 1477 | AC_CHECK_SIZEOF(long int, 4) |
| 1478 | AC_CHECK_SIZEOF(long long int, 8) |
| 1479 | |
Damien Miller | fa2bb69 | 2002-04-23 23:22:25 +1000 | [diff] [blame] | 1480 | # Sanity check long long for some platforms (AIX) |
| 1481 | if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then |
| 1482 | ac_cv_sizeof_long_long_int=0 |
| 1483 | fi |
| 1484 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 1485 | # More checks for data types |
Damien Miller | caf6dd6 | 2000-08-29 11:33:50 +1100 | [diff] [blame] | 1486 | AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [ |
| 1487 | AC_TRY_COMPILE( |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1488 | [ #include <sys/types.h> ], |
| 1489 | [ u_int a; a = 1;], |
Damien Miller | caf6dd6 | 2000-08-29 11:33:50 +1100 | [diff] [blame] | 1490 | [ ac_cv_have_u_int="yes" ], |
| 1491 | [ ac_cv_have_u_int="no" ] |
| 1492 | ) |
| 1493 | ]) |
| 1494 | if test "x$ac_cv_have_u_int" = "xyes" ; then |
| 1495 | AC_DEFINE(HAVE_U_INT) |
| 1496 | have_u_int=1 |
| 1497 | fi |
| 1498 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1499 | AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [ |
| 1500 | AC_TRY_COMPILE( |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1501 | [ #include <sys/types.h> ], |
| 1502 | [ int8_t a; int16_t b; int32_t c; a = b = c = 1;], |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1503 | [ ac_cv_have_intxx_t="yes" ], |
| 1504 | [ ac_cv_have_intxx_t="no" ] |
| 1505 | ) |
| 1506 | ]) |
| 1507 | if test "x$ac_cv_have_intxx_t" = "xyes" ; then |
| 1508 | AC_DEFINE(HAVE_INTXX_T) |
| 1509 | have_intxx_t=1 |
| 1510 | fi |
Ben Lindstrom | 19d7b8d | 2001-08-16 00:09:49 +0000 | [diff] [blame] | 1511 | |
| 1512 | if (test -z "$have_intxx_t" && \ |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1513 | test "x$ac_cv_header_stdint_h" = "xyes") |
Ben Lindstrom | 19d7b8d | 2001-08-16 00:09:49 +0000 | [diff] [blame] | 1514 | then |
| 1515 | AC_MSG_CHECKING([for intXX_t types in stdint.h]) |
| 1516 | AC_TRY_COMPILE( |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1517 | [ #include <stdint.h> ], |
| 1518 | [ int8_t a; int16_t b; int32_t c; a = b = c = 1;], |
Ben Lindstrom | 19d7b8d | 2001-08-16 00:09:49 +0000 | [diff] [blame] | 1519 | [ |
| 1520 | AC_DEFINE(HAVE_INTXX_T) |
| 1521 | AC_MSG_RESULT(yes) |
| 1522 | ], |
| 1523 | [ AC_MSG_RESULT(no) ] |
| 1524 | ) |
| 1525 | fi |
| 1526 | |
Damien Miller | 578783e | 2000-09-23 14:12:24 +1100 | [diff] [blame] | 1527 | AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [ |
| 1528 | AC_TRY_COMPILE( |
Tim Rice | 907881e | 2002-07-18 11:44:50 -0700 | [diff] [blame] | 1529 | [ |
| 1530 | #include <sys/types.h> |
| 1531 | #ifdef HAVE_STDINT_H |
| 1532 | # include <stdint.h> |
| 1533 | #endif |
| 1534 | #include <sys/socket.h> |
| 1535 | #ifdef HAVE_SYS_BITYPES_H |
| 1536 | # include <sys/bitypes.h> |
| 1537 | #endif |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1538 | ], |
| 1539 | [ int64_t a; a = 1;], |
Damien Miller | 578783e | 2000-09-23 14:12:24 +1100 | [diff] [blame] | 1540 | [ ac_cv_have_int64_t="yes" ], |
| 1541 | [ ac_cv_have_int64_t="no" ] |
| 1542 | ) |
| 1543 | ]) |
| 1544 | if test "x$ac_cv_have_int64_t" = "xyes" ; then |
| 1545 | AC_DEFINE(HAVE_INT64_T) |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 1546 | fi |
| 1547 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1548 | AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [ |
| 1549 | AC_TRY_COMPILE( |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1550 | [ #include <sys/types.h> ], |
| 1551 | [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;], |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1552 | [ ac_cv_have_u_intxx_t="yes" ], |
| 1553 | [ ac_cv_have_u_intxx_t="no" ] |
| 1554 | ) |
| 1555 | ]) |
| 1556 | if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then |
| 1557 | AC_DEFINE(HAVE_U_INTXX_T) |
| 1558 | have_u_intxx_t=1 |
| 1559 | fi |
Damien Miller | c6398ef | 1999-11-20 12:18:40 +1100 | [diff] [blame] | 1560 | |
Ben Lindstrom | 19d7b8d | 2001-08-16 00:09:49 +0000 | [diff] [blame] | 1561 | if test -z "$have_u_intxx_t" ; then |
| 1562 | AC_MSG_CHECKING([for u_intXX_t types in sys/socket.h]) |
| 1563 | AC_TRY_COMPILE( |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1564 | [ #include <sys/socket.h> ], |
| 1565 | [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;], |
Ben Lindstrom | 19d7b8d | 2001-08-16 00:09:49 +0000 | [diff] [blame] | 1566 | [ |
| 1567 | AC_DEFINE(HAVE_U_INTXX_T) |
| 1568 | AC_MSG_RESULT(yes) |
| 1569 | ], |
| 1570 | [ AC_MSG_RESULT(no) ] |
| 1571 | ) |
| 1572 | fi |
| 1573 | |
Damien Miller | 578783e | 2000-09-23 14:12:24 +1100 | [diff] [blame] | 1574 | AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [ |
| 1575 | AC_TRY_COMPILE( |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1576 | [ #include <sys/types.h> ], |
| 1577 | [ u_int64_t a; a = 1;], |
Damien Miller | 578783e | 2000-09-23 14:12:24 +1100 | [diff] [blame] | 1578 | [ ac_cv_have_u_int64_t="yes" ], |
| 1579 | [ ac_cv_have_u_int64_t="no" ] |
| 1580 | ) |
| 1581 | ]) |
| 1582 | if test "x$ac_cv_have_u_int64_t" = "xyes" ; then |
| 1583 | AC_DEFINE(HAVE_U_INT64_T) |
| 1584 | have_u_int64_t=1 |
| 1585 | fi |
| 1586 | |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 1587 | if test -z "$have_u_int64_t" ; then |
| 1588 | AC_MSG_CHECKING([for u_int64_t type in sys/bitypes.h]) |
| 1589 | AC_TRY_COMPILE( |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1590 | [ #include <sys/bitypes.h> ], |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 1591 | [ u_int64_t a; a = 1], |
| 1592 | [ |
| 1593 | AC_DEFINE(HAVE_U_INT64_T) |
| 1594 | AC_MSG_RESULT(yes) |
| 1595 | ], |
| 1596 | [ AC_MSG_RESULT(no) ] |
| 1597 | ) |
| 1598 | fi |
| 1599 | |
Ben Lindstrom | 19d7b8d | 2001-08-16 00:09:49 +0000 | [diff] [blame] | 1600 | if test -z "$have_u_intxx_t" ; then |
| 1601 | AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [ |
| 1602 | AC_TRY_COMPILE( |
| 1603 | [ |
| 1604 | #include <sys/types.h> |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1605 | ], |
| 1606 | [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ], |
Ben Lindstrom | 19d7b8d | 2001-08-16 00:09:49 +0000 | [diff] [blame] | 1607 | [ ac_cv_have_uintxx_t="yes" ], |
| 1608 | [ ac_cv_have_uintxx_t="no" ] |
| 1609 | ) |
| 1610 | ]) |
| 1611 | if test "x$ac_cv_have_uintxx_t" = "xyes" ; then |
| 1612 | AC_DEFINE(HAVE_UINTXX_T) |
| 1613 | fi |
| 1614 | fi |
| 1615 | |
| 1616 | if test -z "$have_uintxx_t" ; then |
| 1617 | AC_MSG_CHECKING([for uintXX_t types in stdint.h]) |
| 1618 | AC_TRY_COMPILE( |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1619 | [ #include <stdint.h> ], |
| 1620 | [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;], |
Ben Lindstrom | 19d7b8d | 2001-08-16 00:09:49 +0000 | [diff] [blame] | 1621 | [ |
| 1622 | AC_DEFINE(HAVE_UINTXX_T) |
| 1623 | AC_MSG_RESULT(yes) |
| 1624 | ], |
| 1625 | [ AC_MSG_RESULT(no) ] |
| 1626 | ) |
| 1627 | fi |
| 1628 | |
Damien Miller | edb8292 | 2000-06-20 13:25:52 +1000 | [diff] [blame] | 1629 | if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \ |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1630 | test "x$ac_cv_header_sys_bitypes_h" = "xyes") |
Damien Miller | b29ea91 | 2000-01-15 14:12:03 +1100 | [diff] [blame] | 1631 | then |
| 1632 | AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h]) |
| 1633 | AC_TRY_COMPILE( |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1634 | [ |
| 1635 | #include <sys/bitypes.h> |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1636 | ], |
Damien Miller | b29ea91 | 2000-01-15 14:12:03 +1100 | [diff] [blame] | 1637 | [ |
Damien Miller | 70494d1 | 2000-04-03 15:57:06 +1000 | [diff] [blame] | 1638 | int8_t a; int16_t b; int32_t c; |
| 1639 | u_int8_t e; u_int16_t f; u_int32_t g; |
| 1640 | a = b = c = e = f = g = 1; |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1641 | ], |
Damien Miller | b29ea91 | 2000-01-15 14:12:03 +1100 | [diff] [blame] | 1642 | [ |
| 1643 | AC_DEFINE(HAVE_U_INTXX_T) |
| 1644 | AC_DEFINE(HAVE_INTXX_T) |
| 1645 | AC_MSG_RESULT(yes) |
| 1646 | ], |
| 1647 | [AC_MSG_RESULT(no)] |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1648 | ) |
Damien Miller | b29ea91 | 2000-01-15 14:12:03 +1100 | [diff] [blame] | 1649 | fi |
| 1650 | |
Damien Miller | 58be738 | 2001-09-15 21:31:54 +1000 | [diff] [blame] | 1651 | |
| 1652 | AC_CACHE_CHECK([for u_char], ac_cv_have_u_char, [ |
| 1653 | AC_TRY_COMPILE( |
| 1654 | [ |
| 1655 | #include <sys/types.h> |
| 1656 | ], |
| 1657 | [ u_char foo; foo = 125; ], |
| 1658 | [ ac_cv_have_u_char="yes" ], |
| 1659 | [ ac_cv_have_u_char="no" ] |
| 1660 | ) |
| 1661 | ]) |
| 1662 | if test "x$ac_cv_have_u_char" = "xyes" ; then |
| 1663 | AC_DEFINE(HAVE_U_CHAR) |
| 1664 | fi |
| 1665 | |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 1666 | TYPE_SOCKLEN_T |
Damien Miller | 74d0d4a | 1999-12-29 02:24:35 +1100 | [diff] [blame] | 1667 | |
Tim Rice | 200a5c0 | 2002-02-26 22:12:34 -0800 | [diff] [blame] | 1668 | AC_CHECK_TYPES(sig_atomic_t,,,[#include <signal.h>]) |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 1669 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1670 | AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [ |
| 1671 | AC_TRY_COMPILE( |
| 1672 | [ |
| 1673 | #include <sys/types.h> |
| 1674 | ], |
| 1675 | [ size_t foo; foo = 1235; ], |
| 1676 | [ ac_cv_have_size_t="yes" ], |
| 1677 | [ ac_cv_have_size_t="no" ] |
| 1678 | ) |
| 1679 | ]) |
| 1680 | if test "x$ac_cv_have_size_t" = "xyes" ; then |
| 1681 | AC_DEFINE(HAVE_SIZE_T) |
| 1682 | fi |
Damien Miller | 9505851 | 1999-12-29 10:36:45 +1100 | [diff] [blame] | 1683 | |
Damien Miller | 615f939 | 2000-05-17 22:53:33 +1000 | [diff] [blame] | 1684 | AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [ |
| 1685 | AC_TRY_COMPILE( |
| 1686 | [ |
| 1687 | #include <sys/types.h> |
| 1688 | ], |
| 1689 | [ ssize_t foo; foo = 1235; ], |
| 1690 | [ ac_cv_have_ssize_t="yes" ], |
| 1691 | [ ac_cv_have_ssize_t="no" ] |
| 1692 | ) |
| 1693 | ]) |
| 1694 | if test "x$ac_cv_have_ssize_t" = "xyes" ; then |
| 1695 | AC_DEFINE(HAVE_SSIZE_T) |
| 1696 | fi |
| 1697 | |
Ben Lindstrom | 0d5af60 | 2001-01-09 00:50:29 +0000 | [diff] [blame] | 1698 | AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [ |
| 1699 | AC_TRY_COMPILE( |
| 1700 | [ |
| 1701 | #include <time.h> |
| 1702 | ], |
| 1703 | [ clock_t foo; foo = 1235; ], |
| 1704 | [ ac_cv_have_clock_t="yes" ], |
| 1705 | [ ac_cv_have_clock_t="no" ] |
| 1706 | ) |
| 1707 | ]) |
| 1708 | if test "x$ac_cv_have_clock_t" = "xyes" ; then |
| 1709 | AC_DEFINE(HAVE_CLOCK_T) |
| 1710 | fi |
| 1711 | |
Damien Miller | b54b40e | 2000-06-23 08:23:34 +1000 | [diff] [blame] | 1712 | AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [ |
| 1713 | AC_TRY_COMPILE( |
| 1714 | [ |
| 1715 | #include <sys/types.h> |
| 1716 | #include <sys/socket.h> |
| 1717 | ], |
| 1718 | [ sa_family_t foo; foo = 1235; ], |
| 1719 | [ ac_cv_have_sa_family_t="yes" ], |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 1720 | [ AC_TRY_COMPILE( |
| 1721 | [ |
| 1722 | #include <sys/types.h> |
| 1723 | #include <sys/socket.h> |
| 1724 | #include <netinet/in.h> |
| 1725 | ], |
| 1726 | [ sa_family_t foo; foo = 1235; ], |
| 1727 | [ ac_cv_have_sa_family_t="yes" ], |
| 1728 | |
Damien Miller | b54b40e | 2000-06-23 08:23:34 +1000 | [diff] [blame] | 1729 | [ ac_cv_have_sa_family_t="no" ] |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 1730 | )] |
Damien Miller | b54b40e | 2000-06-23 08:23:34 +1000 | [diff] [blame] | 1731 | ) |
| 1732 | ]) |
| 1733 | if test "x$ac_cv_have_sa_family_t" = "xyes" ; then |
| 1734 | AC_DEFINE(HAVE_SA_FAMILY_T) |
| 1735 | fi |
| 1736 | |
Damien Miller | 0f91b4e | 2000-06-18 15:43:25 +1000 | [diff] [blame] | 1737 | AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [ |
| 1738 | AC_TRY_COMPILE( |
| 1739 | [ |
| 1740 | #include <sys/types.h> |
| 1741 | ], |
| 1742 | [ pid_t foo; foo = 1235; ], |
| 1743 | [ ac_cv_have_pid_t="yes" ], |
| 1744 | [ ac_cv_have_pid_t="no" ] |
| 1745 | ) |
| 1746 | ]) |
| 1747 | if test "x$ac_cv_have_pid_t" = "xyes" ; then |
| 1748 | AC_DEFINE(HAVE_PID_T) |
| 1749 | fi |
| 1750 | |
| 1751 | AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [ |
| 1752 | AC_TRY_COMPILE( |
| 1753 | [ |
| 1754 | #include <sys/types.h> |
| 1755 | ], |
| 1756 | [ mode_t foo; foo = 1235; ], |
| 1757 | [ ac_cv_have_mode_t="yes" ], |
| 1758 | [ ac_cv_have_mode_t="no" ] |
| 1759 | ) |
| 1760 | ]) |
| 1761 | if test "x$ac_cv_have_mode_t" = "xyes" ; then |
| 1762 | AC_DEFINE(HAVE_MODE_T) |
| 1763 | fi |
| 1764 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1765 | |
| 1766 | AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [ |
| 1767 | AC_TRY_COMPILE( |
| 1768 | [ |
Damien Miller | 8117111 | 2000-04-23 11:14:01 +1000 | [diff] [blame] | 1769 | #include <sys/types.h> |
| 1770 | #include <sys/socket.h> |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1771 | ], |
| 1772 | [ struct sockaddr_storage s; ], |
| 1773 | [ ac_cv_have_struct_sockaddr_storage="yes" ], |
| 1774 | [ ac_cv_have_struct_sockaddr_storage="no" ] |
| 1775 | ) |
| 1776 | ]) |
| 1777 | if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then |
| 1778 | AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE) |
| 1779 | fi |
Damien Miller | 34132e5 | 2000-01-14 15:45:46 +1100 | [diff] [blame] | 1780 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1781 | AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [ |
| 1782 | AC_TRY_COMPILE( |
| 1783 | [ |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1784 | #include <sys/types.h> |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1785 | #include <netinet/in.h> |
| 1786 | ], |
| 1787 | [ struct sockaddr_in6 s; s.sin6_family = 0; ], |
| 1788 | [ ac_cv_have_struct_sockaddr_in6="yes" ], |
| 1789 | [ ac_cv_have_struct_sockaddr_in6="no" ] |
| 1790 | ) |
| 1791 | ]) |
| 1792 | if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then |
| 1793 | AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6) |
| 1794 | fi |
Damien Miller | 34132e5 | 2000-01-14 15:45:46 +1100 | [diff] [blame] | 1795 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1796 | AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [ |
| 1797 | AC_TRY_COMPILE( |
| 1798 | [ |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 1799 | #include <sys/types.h> |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1800 | #include <netinet/in.h> |
| 1801 | ], |
| 1802 | [ struct in6_addr s; s.s6_addr[0] = 0; ], |
| 1803 | [ ac_cv_have_struct_in6_addr="yes" ], |
| 1804 | [ ac_cv_have_struct_in6_addr="no" ] |
| 1805 | ) |
| 1806 | ]) |
| 1807 | if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then |
| 1808 | AC_DEFINE(HAVE_STRUCT_IN6_ADDR) |
| 1809 | fi |
Damien Miller | 34132e5 | 2000-01-14 15:45:46 +1100 | [diff] [blame] | 1810 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1811 | AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [ |
| 1812 | AC_TRY_COMPILE( |
| 1813 | [ |
Damien Miller | 8117111 | 2000-04-23 11:14:01 +1000 | [diff] [blame] | 1814 | #include <sys/types.h> |
| 1815 | #include <sys/socket.h> |
| 1816 | #include <netdb.h> |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1817 | ], |
| 1818 | [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ], |
| 1819 | [ ac_cv_have_struct_addrinfo="yes" ], |
| 1820 | [ ac_cv_have_struct_addrinfo="no" ] |
| 1821 | ) |
| 1822 | ]) |
| 1823 | if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then |
| 1824 | AC_DEFINE(HAVE_STRUCT_ADDRINFO) |
| 1825 | fi |
| 1826 | |
Ben Lindstrom | 42202bc | 2001-01-15 02:34:37 +0000 | [diff] [blame] | 1827 | AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [ |
| 1828 | AC_TRY_COMPILE( |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1829 | [ #include <sys/time.h> ], |
| 1830 | [ struct timeval tv; tv.tv_sec = 1;], |
Ben Lindstrom | 42202bc | 2001-01-15 02:34:37 +0000 | [diff] [blame] | 1831 | [ ac_cv_have_struct_timeval="yes" ], |
| 1832 | [ ac_cv_have_struct_timeval="no" ] |
| 1833 | ) |
| 1834 | ]) |
| 1835 | if test "x$ac_cv_have_struct_timeval" = "xyes" ; then |
| 1836 | AC_DEFINE(HAVE_STRUCT_TIMEVAL) |
| 1837 | have_struct_timeval=1 |
| 1838 | fi |
| 1839 | |
Tim Rice | 4e4dc56 | 2003-03-18 10:21:40 -0800 | [diff] [blame] | 1840 | AC_CHECK_TYPES(struct timespec) |
| 1841 | |
Ben Lindstrom | 5bd6eb7 | 2003-03-21 00:34:34 +0000 | [diff] [blame] | 1842 | # We need int64_t or else certian parts of the compile will fail. |
Ben Lindstrom | 3ad650a | 2001-01-03 06:02:51 +0000 | [diff] [blame] | 1843 | if test "x$ac_cv_have_int64_t" = "xno" -a \ |
| 1844 | "x$ac_cv_sizeof_long_int" != "x8" -a \ |
| 1845 | "x$ac_cv_sizeof_long_long_int" = "x0" ; then |
Ben Lindstrom | 5bd6eb7 | 2003-03-21 00:34:34 +0000 | [diff] [blame] | 1846 | echo "OpenSSH requires int64_t support. Contact your vendor or install" |
| 1847 | echo "an alternative compiler (I.E., GCC) before continuing." |
| 1848 | echo "" |
| 1849 | exit 1; |
Tim Rice | bee3f22 | 2001-03-11 17:32:12 -0800 | [diff] [blame] | 1850 | else |
| 1851 | dnl test snprintf (broken on SCO w/gcc) |
| 1852 | AC_TRY_RUN( |
| 1853 | [ |
| 1854 | #include <stdio.h> |
| 1855 | #include <string.h> |
| 1856 | #ifdef HAVE_SNPRINTF |
| 1857 | main() |
| 1858 | { |
| 1859 | char buf[50]; |
| 1860 | char expected_out[50]; |
| 1861 | int mazsize = 50 ; |
| 1862 | #if (SIZEOF_LONG_INT == 8) |
| 1863 | long int num = 0x7fffffffffffffff; |
| 1864 | #else |
Kevin Steves | 6482ec8 | 2001-07-15 02:09:28 +0000 | [diff] [blame] | 1865 | long long num = 0x7fffffffffffffffll; |
Tim Rice | bee3f22 | 2001-03-11 17:32:12 -0800 | [diff] [blame] | 1866 | #endif |
| 1867 | strcpy(expected_out, "9223372036854775807"); |
| 1868 | snprintf(buf, mazsize, "%lld", num); |
| 1869 | if(strcmp(buf, expected_out) != 0) |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 1870 | exit(1); |
Tim Rice | bee3f22 | 2001-03-11 17:32:12 -0800 | [diff] [blame] | 1871 | exit(0); |
| 1872 | } |
| 1873 | #else |
| 1874 | main() { exit(0); } |
| 1875 | #endif |
| 1876 | ], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ] |
| 1877 | ) |
Ben Lindstrom | 3ad650a | 2001-01-03 06:02:51 +0000 | [diff] [blame] | 1878 | fi |
| 1879 | |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 1880 | dnl Checks for structure members |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1881 | OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP) |
| 1882 | OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX) |
| 1883 | OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX) |
| 1884 | OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP) |
| 1885 | OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP) |
Damien Miller | ad1bc5f | 2000-05-20 14:53:09 +1000 | [diff] [blame] | 1886 | OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX) |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1887 | OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP) |
| 1888 | OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP) |
Damien Miller | 8e81ed3 | 2000-07-01 13:17:42 +1000 | [diff] [blame] | 1889 | OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmpx.h, HAVE_ID_IN_UTMPX) |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1890 | OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP) |
| 1891 | OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX) |
| 1892 | OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP) |
| 1893 | OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX) |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 1894 | OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP) |
| 1895 | OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP) |
| 1896 | OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX) |
| 1897 | OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX) |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 1898 | |
| 1899 | AC_CHECK_MEMBERS([struct stat.st_blksize]) |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 1900 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1901 | AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage], |
| 1902 | ac_cv_have_ss_family_in_struct_ss, [ |
| 1903 | AC_TRY_COMPILE( |
| 1904 | [ |
Damien Miller | 8117111 | 2000-04-23 11:14:01 +1000 | [diff] [blame] | 1905 | #include <sys/types.h> |
| 1906 | #include <sys/socket.h> |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1907 | ], |
| 1908 | [ struct sockaddr_storage s; s.ss_family = 1; ], |
| 1909 | [ ac_cv_have_ss_family_in_struct_ss="yes" ], |
| 1910 | [ ac_cv_have_ss_family_in_struct_ss="no" ], |
| 1911 | ) |
| 1912 | ]) |
| 1913 | if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then |
| 1914 | AC_DEFINE(HAVE_SS_FAMILY_IN_SS) |
| 1915 | fi |
| 1916 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1917 | AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage], |
| 1918 | ac_cv_have___ss_family_in_struct_ss, [ |
| 1919 | AC_TRY_COMPILE( |
| 1920 | [ |
Damien Miller | 8117111 | 2000-04-23 11:14:01 +1000 | [diff] [blame] | 1921 | #include <sys/types.h> |
| 1922 | #include <sys/socket.h> |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1923 | ], |
| 1924 | [ struct sockaddr_storage s; s.__ss_family = 1; ], |
| 1925 | [ ac_cv_have___ss_family_in_struct_ss="yes" ], |
| 1926 | [ ac_cv_have___ss_family_in_struct_ss="no" ] |
| 1927 | ) |
| 1928 | ]) |
| 1929 | if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then |
| 1930 | AC_DEFINE(HAVE___SS_FAMILY_IN_SS) |
| 1931 | fi |
Damien Miller | bf1c9b2 | 1999-12-09 10:16:54 +1100 | [diff] [blame] | 1932 | |
Damien Miller | ad833b3 | 2000-08-23 10:46:23 +1000 | [diff] [blame] | 1933 | AC_CACHE_CHECK([for pw_class field in struct passwd], |
| 1934 | ac_cv_have_pw_class_in_struct_passwd, [ |
| 1935 | AC_TRY_COMPILE( |
| 1936 | [ |
Damien Miller | ad833b3 | 2000-08-23 10:46:23 +1000 | [diff] [blame] | 1937 | #include <pwd.h> |
| 1938 | ], |
Kevin Steves | 48b7cc0 | 2000-10-07 13:24:00 +0000 | [diff] [blame] | 1939 | [ struct passwd p; p.pw_class = 0; ], |
Damien Miller | ad833b3 | 2000-08-23 10:46:23 +1000 | [diff] [blame] | 1940 | [ ac_cv_have_pw_class_in_struct_passwd="yes" ], |
| 1941 | [ ac_cv_have_pw_class_in_struct_passwd="no" ] |
| 1942 | ) |
| 1943 | ]) |
| 1944 | if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then |
| 1945 | AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD) |
| 1946 | fi |
| 1947 | |
Kevin Steves | 8245695 | 2001-06-22 21:14:18 +0000 | [diff] [blame] | 1948 | AC_CACHE_CHECK([for pw_expire field in struct passwd], |
| 1949 | ac_cv_have_pw_expire_in_struct_passwd, [ |
| 1950 | AC_TRY_COMPILE( |
| 1951 | [ |
| 1952 | #include <pwd.h> |
| 1953 | ], |
| 1954 | [ struct passwd p; p.pw_expire = 0; ], |
| 1955 | [ ac_cv_have_pw_expire_in_struct_passwd="yes" ], |
| 1956 | [ ac_cv_have_pw_expire_in_struct_passwd="no" ] |
| 1957 | ) |
| 1958 | ]) |
| 1959 | if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then |
| 1960 | AC_DEFINE(HAVE_PW_EXPIRE_IN_PASSWD) |
| 1961 | fi |
| 1962 | |
| 1963 | AC_CACHE_CHECK([for pw_change field in struct passwd], |
| 1964 | ac_cv_have_pw_change_in_struct_passwd, [ |
| 1965 | AC_TRY_COMPILE( |
| 1966 | [ |
| 1967 | #include <pwd.h> |
| 1968 | ], |
| 1969 | [ struct passwd p; p.pw_change = 0; ], |
| 1970 | [ ac_cv_have_pw_change_in_struct_passwd="yes" ], |
| 1971 | [ ac_cv_have_pw_change_in_struct_passwd="no" ] |
| 1972 | ) |
| 1973 | ]) |
| 1974 | if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then |
| 1975 | AC_DEFINE(HAVE_PW_CHANGE_IN_PASSWD) |
| 1976 | fi |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 1977 | |
Tim Rice | 28bbb0c | 2002-05-27 17:37:32 -0700 | [diff] [blame] | 1978 | dnl make sure we're using the real structure members and not defines |
Kevin Steves | 939c9db | 2002-03-22 17:23:25 +0000 | [diff] [blame] | 1979 | AC_CACHE_CHECK([for msg_accrights field in struct msghdr], |
| 1980 | ac_cv_have_accrights_in_msghdr, [ |
Tim Rice | 28bbb0c | 2002-05-27 17:37:32 -0700 | [diff] [blame] | 1981 | AC_TRY_RUN( |
Kevin Steves | 939c9db | 2002-03-22 17:23:25 +0000 | [diff] [blame] | 1982 | [ |
Tim Rice | ae49fe6 | 2002-04-12 10:26:21 -0700 | [diff] [blame] | 1983 | #include <sys/types.h> |
Kevin Steves | 939c9db | 2002-03-22 17:23:25 +0000 | [diff] [blame] | 1984 | #include <sys/socket.h> |
| 1985 | #include <sys/uio.h> |
Tim Rice | 28bbb0c | 2002-05-27 17:37:32 -0700 | [diff] [blame] | 1986 | int main() { |
| 1987 | #ifdef msg_accrights |
| 1988 | exit(1); |
| 1989 | #endif |
| 1990 | struct msghdr m; |
| 1991 | m.msg_accrights = 0; |
| 1992 | exit(0); |
| 1993 | } |
Kevin Steves | 939c9db | 2002-03-22 17:23:25 +0000 | [diff] [blame] | 1994 | ], |
Kevin Steves | 939c9db | 2002-03-22 17:23:25 +0000 | [diff] [blame] | 1995 | [ ac_cv_have_accrights_in_msghdr="yes" ], |
| 1996 | [ ac_cv_have_accrights_in_msghdr="no" ] |
| 1997 | ) |
| 1998 | ]) |
| 1999 | if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then |
| 2000 | AC_DEFINE(HAVE_ACCRIGHTS_IN_MSGHDR) |
| 2001 | fi |
| 2002 | |
Kevin Steves | a44e035 | 2002-04-07 16:18:03 +0000 | [diff] [blame] | 2003 | AC_CACHE_CHECK([for msg_control field in struct msghdr], |
| 2004 | ac_cv_have_control_in_msghdr, [ |
Tim Rice | 28bbb0c | 2002-05-27 17:37:32 -0700 | [diff] [blame] | 2005 | AC_TRY_RUN( |
Kevin Steves | a44e035 | 2002-04-07 16:18:03 +0000 | [diff] [blame] | 2006 | [ |
Tim Rice | ae49fe6 | 2002-04-12 10:26:21 -0700 | [diff] [blame] | 2007 | #include <sys/types.h> |
Kevin Steves | a44e035 | 2002-04-07 16:18:03 +0000 | [diff] [blame] | 2008 | #include <sys/socket.h> |
| 2009 | #include <sys/uio.h> |
Tim Rice | 28bbb0c | 2002-05-27 17:37:32 -0700 | [diff] [blame] | 2010 | int main() { |
| 2011 | #ifdef msg_control |
| 2012 | exit(1); |
| 2013 | #endif |
| 2014 | struct msghdr m; |
| 2015 | m.msg_control = 0; |
| 2016 | exit(0); |
| 2017 | } |
Kevin Steves | a44e035 | 2002-04-07 16:18:03 +0000 | [diff] [blame] | 2018 | ], |
Kevin Steves | a44e035 | 2002-04-07 16:18:03 +0000 | [diff] [blame] | 2019 | [ ac_cv_have_control_in_msghdr="yes" ], |
| 2020 | [ ac_cv_have_control_in_msghdr="no" ] |
| 2021 | ) |
| 2022 | ]) |
| 2023 | if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then |
| 2024 | AC_DEFINE(HAVE_CONTROL_IN_MSGHDR) |
| 2025 | fi |
| 2026 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 2027 | AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [ |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2028 | AC_TRY_LINK([], |
| 2029 | [ extern char *__progname; printf("%s", __progname); ], |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 2030 | [ ac_cv_libc_defines___progname="yes" ], |
| 2031 | [ ac_cv_libc_defines___progname="no" ] |
| 2032 | ) |
| 2033 | ]) |
| 2034 | if test "x$ac_cv_libc_defines___progname" = "xyes" ; then |
| 2035 | AC_DEFINE(HAVE___PROGNAME) |
| 2036 | fi |
| 2037 | |
Kevin Steves | 4846f4a | 2002-03-22 18:19:53 +0000 | [diff] [blame] | 2038 | AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNCTION__, [ |
| 2039 | AC_TRY_LINK([ |
| 2040 | #include <stdio.h> |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2041 | ], |
| 2042 | [ printf("%s", __FUNCTION__); ], |
Kevin Steves | 4846f4a | 2002-03-22 18:19:53 +0000 | [diff] [blame] | 2043 | [ ac_cv_cc_implements___FUNCTION__="yes" ], |
| 2044 | [ ac_cv_cc_implements___FUNCTION__="no" ] |
| 2045 | ) |
| 2046 | ]) |
| 2047 | if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then |
| 2048 | AC_DEFINE(HAVE___FUNCTION__) |
| 2049 | fi |
| 2050 | |
| 2051 | AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__, [ |
| 2052 | AC_TRY_LINK([ |
| 2053 | #include <stdio.h> |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2054 | ], |
| 2055 | [ printf("%s", __func__); ], |
Kevin Steves | 4846f4a | 2002-03-22 18:19:53 +0000 | [diff] [blame] | 2056 | [ ac_cv_cc_implements___func__="yes" ], |
| 2057 | [ ac_cv_cc_implements___func__="no" ] |
| 2058 | ) |
| 2059 | ]) |
| 2060 | if test "x$ac_cv_cc_implements___func__" = "xyes" ; then |
| 2061 | AC_DEFINE(HAVE___func__) |
| 2062 | fi |
| 2063 | |
Damien Miller | 4f8e669 | 2001-07-14 13:22:53 +1000 | [diff] [blame] | 2064 | AC_CACHE_CHECK([whether getopt has optreset support], |
| 2065 | ac_cv_have_getopt_optreset, [ |
| 2066 | AC_TRY_LINK( |
| 2067 | [ |
| 2068 | #include <getopt.h> |
| 2069 | ], |
| 2070 | [ extern int optreset; optreset = 0; ], |
| 2071 | [ ac_cv_have_getopt_optreset="yes" ], |
| 2072 | [ ac_cv_have_getopt_optreset="no" ] |
| 2073 | ) |
| 2074 | ]) |
| 2075 | if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then |
| 2076 | AC_DEFINE(HAVE_GETOPT_OPTRESET) |
| 2077 | fi |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 2078 | |
Damien Miller | ecbb26d | 2000-07-15 14:59:14 +1000 | [diff] [blame] | 2079 | AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [ |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2080 | AC_TRY_LINK([], |
| 2081 | [ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);], |
Damien Miller | ecbb26d | 2000-07-15 14:59:14 +1000 | [diff] [blame] | 2082 | [ ac_cv_libc_defines_sys_errlist="yes" ], |
| 2083 | [ ac_cv_libc_defines_sys_errlist="no" ] |
| 2084 | ) |
| 2085 | ]) |
| 2086 | if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then |
| 2087 | AC_DEFINE(HAVE_SYS_ERRLIST) |
| 2088 | fi |
| 2089 | |
| 2090 | |
Damien Miller | 11fa2cc | 2000-08-16 10:35:58 +1000 | [diff] [blame] | 2091 | AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [ |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2092 | AC_TRY_LINK([], |
| 2093 | [ extern int sys_nerr; printf("%i", sys_nerr);], |
Damien Miller | 11fa2cc | 2000-08-16 10:35:58 +1000 | [diff] [blame] | 2094 | [ ac_cv_libc_defines_sys_nerr="yes" ], |
| 2095 | [ ac_cv_libc_defines_sys_nerr="no" ] |
| 2096 | ) |
| 2097 | ]) |
| 2098 | if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then |
| 2099 | AC_DEFINE(HAVE_SYS_NERR) |
| 2100 | fi |
| 2101 | |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2102 | SCARD_MSG="no" |
Ben Lindstrom | a42694f | 2002-04-05 16:11:45 +0000 | [diff] [blame] | 2103 | # Check whether user wants sectok support |
| 2104 | AC_ARG_WITH(sectok, |
| 2105 | [ --with-sectok Enable smartcard support using libsectok], |
Damien Miller | 85de580 | 2001-09-18 14:01:11 +1000 | [diff] [blame] | 2106 | [ |
| 2107 | if test "x$withval" != "xno" ; then |
| 2108 | if test "x$withval" != "xyes" ; then |
| 2109 | CPPFLAGS="$CPPFLAGS -I${withval}" |
| 2110 | LDFLAGS="$LDFLAGS -L${withval}" |
| 2111 | if test ! -z "$need_dash_r" ; then |
| 2112 | LDFLAGS="$LDFLAGS -R${withval}" |
| 2113 | fi |
| 2114 | if test ! -z "$blibpath" ; then |
| 2115 | blibpath="$blibpath:${withval}" |
| 2116 | fi |
| 2117 | fi |
| 2118 | AC_CHECK_HEADERS(sectok.h) |
| 2119 | if test "$ac_cv_header_sectok_h" != yes; then |
| 2120 | AC_MSG_ERROR(Can't find sectok.h) |
| 2121 | fi |
| 2122 | AC_CHECK_LIB(sectok, sectok_open) |
| 2123 | if test "$ac_cv_lib_sectok_sectok_open" != yes; then |
| 2124 | AC_MSG_ERROR(Can't find libsectok) |
| 2125 | fi |
| 2126 | AC_DEFINE(SMARTCARD) |
Ben Lindstrom | a42694f | 2002-04-05 16:11:45 +0000 | [diff] [blame] | 2127 | AC_DEFINE(USE_SECTOK) |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2128 | SCARD_MSG="yes, using sectok" |
Ben Lindstrom | a42694f | 2002-04-05 16:11:45 +0000 | [diff] [blame] | 2129 | fi |
| 2130 | ] |
| 2131 | ) |
| 2132 | |
| 2133 | # Check whether user wants OpenSC support |
| 2134 | AC_ARG_WITH(opensc, |
Damien Miller | f6195f2 | 2002-04-23 22:48:46 +1000 | [diff] [blame] | 2135 | AC_HELP_STRING([--with-opensc=PFX], |
| 2136 | [Enable smartcard support using OpenSC]), |
| 2137 | opensc_config_prefix="$withval", opensc_config_prefix="") |
| 2138 | if test x$opensc_config_prefix != x ; then |
| 2139 | OPENSC_CONFIG=$opensc_config_prefix/bin/opensc-config |
| 2140 | AC_PATH_PROG(OPENSC_CONFIG, opensc-config, no) |
| 2141 | if test "$OPENSC_CONFIG" != "no"; then |
| 2142 | LIBOPENSC_CFLAGS=`$OPENSC_CONFIG --cflags` |
| 2143 | LIBOPENSC_LIBS=`$OPENSC_CONFIG --libs` |
| 2144 | CPPFLAGS="$CPPFLAGS $LIBOPENSC_CFLAGS" |
| 2145 | LDFLAGS="$LDFLAGS $LIBOPENSC_LIBS" |
| 2146 | AC_DEFINE(SMARTCARD) |
| 2147 | AC_DEFINE(USE_OPENSC) |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2148 | SCARD_MSG="yes, using OpenSC" |
Damien Miller | f6195f2 | 2002-04-23 22:48:46 +1000 | [diff] [blame] | 2149 | fi |
| 2150 | fi |
Damien Miller | 85de580 | 2001-09-18 14:01:11 +1000 | [diff] [blame] | 2151 | |
Darren Tucker | 5f88d34 | 2003-10-15 16:57:57 +1000 | [diff] [blame] | 2152 | # Check libraries needed by DNS fingerprint support |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2153 | AC_SEARCH_LIBS(getrrsetbyname, resolv, |
Darren Tucker | 5f88d34 | 2003-10-15 16:57:57 +1000 | [diff] [blame] | 2154 | [AC_DEFINE(HAVE_GETRRSETBYNAME)], |
Damien Miller | 7abe09b | 2003-05-15 10:53:49 +1000 | [diff] [blame] | 2155 | [ |
Darren Tucker | 5f88d34 | 2003-10-15 16:57:57 +1000 | [diff] [blame] | 2156 | # Needed by our getrrsetbyname() |
| 2157 | AC_SEARCH_LIBS(res_query, resolv) |
| 2158 | AC_SEARCH_LIBS(dn_expand, resolv) |
| 2159 | AC_CHECK_FUNCS(_getshort _getlong) |
| 2160 | AC_CHECK_MEMBER(HEADER.ad, |
| 2161 | [AC_DEFINE(HAVE_HEADER_AD)],, |
| 2162 | [#include <arpa/nameser.h>]) |
| 2163 | ]) |
Damien Miller | 7abe09b | 2003-05-15 10:53:49 +1000 | [diff] [blame] | 2164 | |
Damien Miller | fd4c9ee | 2002-04-13 11:04:40 +1000 | [diff] [blame] | 2165 | # Check whether user wants Kerberos 5 support |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2166 | KRB5_MSG="no" |
Damien Miller | fd4c9ee | 2002-04-13 11:04:40 +1000 | [diff] [blame] | 2167 | AC_ARG_WITH(kerberos5, |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2168 | [ --with-kerberos5=PATH Enable Kerberos 5 support], |
Darren Tucker | 1d3ca58 | 2004-01-22 12:05:34 +1100 | [diff] [blame] | 2169 | [ if test "x$withval" != "xno" ; then |
| 2170 | if test "x$withval" = "xyes" ; then |
| 2171 | KRB5ROOT="/usr/local" |
| 2172 | else |
| 2173 | KRB5ROOT=${withval} |
| 2174 | fi |
| 2175 | |
| 2176 | AC_DEFINE(KRB5) |
| 2177 | KRB5_MSG="yes" |
| 2178 | |
| 2179 | AC_MSG_CHECKING(for krb5-config) |
| 2180 | if test -x $KRB5ROOT/bin/krb5-config ; then |
| 2181 | KRB5CONF=$KRB5ROOT/bin/krb5-config |
| 2182 | AC_MSG_RESULT($KRB5CONF) |
| 2183 | |
| 2184 | AC_MSG_CHECKING(for gssapi support) |
| 2185 | if $KRB5CONF | grep gssapi >/dev/null ; then |
| 2186 | AC_MSG_RESULT(yes) |
Darren Tucker | 0d27ed1 | 2004-02-24 10:37:33 +1100 | [diff] [blame] | 2187 | AC_DEFINE(GSSAPI) |
| 2188 | k5confopts=gssapi |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2189 | else |
Darren Tucker | 1d3ca58 | 2004-01-22 12:05:34 +1100 | [diff] [blame] | 2190 | AC_MSG_RESULT(no) |
Darren Tucker | 0d27ed1 | 2004-02-24 10:37:33 +1100 | [diff] [blame] | 2191 | k5confopts="" |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2192 | fi |
Darren Tucker | 0d27ed1 | 2004-02-24 10:37:33 +1100 | [diff] [blame] | 2193 | K5CFLAGS="`$KRB5CONF --cflags $k5confopts`" |
| 2194 | K5LIBS="`$KRB5CONF --libs $k5confopts`" |
Darren Tucker | 1d3ca58 | 2004-01-22 12:05:34 +1100 | [diff] [blame] | 2195 | CPPFLAGS="$CPPFLAGS $K5CFLAGS" |
Darren Tucker | 1d3ca58 | 2004-01-22 12:05:34 +1100 | [diff] [blame] | 2196 | AC_MSG_CHECKING(whether we are using Heimdal) |
| 2197 | AC_TRY_COMPILE([ #include <krb5.h> ], |
| 2198 | [ char *tmp = heimdal_version; ], |
| 2199 | [ AC_MSG_RESULT(yes) |
| 2200 | AC_DEFINE(HEIMDAL) ], |
| 2201 | AC_MSG_RESULT(no) |
| 2202 | ) |
| 2203 | else |
| 2204 | AC_MSG_RESULT(no) |
Damien Miller | fd4c9ee | 2002-04-13 11:04:40 +1000 | [diff] [blame] | 2205 | CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include" |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2206 | LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib" |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2207 | AC_MSG_CHECKING(whether we are using Heimdal) |
| 2208 | AC_TRY_COMPILE([ #include <krb5.h> ], |
| 2209 | [ char *tmp = heimdal_version; ], |
| 2210 | [ AC_MSG_RESULT(yes) |
| 2211 | AC_DEFINE(HEIMDAL) |
Damien Miller | 5561e0b | 2004-04-20 20:28:55 +1000 | [diff] [blame] | 2212 | K5LIBS="-lkrb5 -ldes" |
| 2213 | K5LIBS="$K5LIBS -lcom_err -lasn1" |
| 2214 | AC_CHECK_LIB(roken, net_write, |
| 2215 | [K5LIBS="$K5LIBS -lroken"]) |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2216 | ], |
| 2217 | [ AC_MSG_RESULT(no) |
| 2218 | K5LIBS="-lkrb5 -lk5crypto -lcom_err" |
| 2219 | ] |
| 2220 | ) |
Damien Miller | 200d0a7 | 2003-06-30 19:21:36 +1000 | [diff] [blame] | 2221 | AC_SEARCH_LIBS(dn_expand, resolv) |
Damien Miller | fd4c9ee | 2002-04-13 11:04:40 +1000 | [diff] [blame] | 2222 | |
Darren Tucker | 49aaf4a | 2003-08-26 11:58:16 +1000 | [diff] [blame] | 2223 | AC_CHECK_LIB(gssapi,gss_init_sec_context, |
| 2224 | [ AC_DEFINE(GSSAPI) |
| 2225 | K5LIBS="-lgssapi $K5LIBS" ], |
| 2226 | [ AC_CHECK_LIB(gssapi_krb5,gss_init_sec_context, |
| 2227 | [ AC_DEFINE(GSSAPI) |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2228 | K5LIBS="-lgssapi_krb5 $K5LIBS" ], |
Darren Tucker | 49aaf4a | 2003-08-26 11:58:16 +1000 | [diff] [blame] | 2229 | AC_MSG_WARN([Cannot find any suitable gss-api library - build may fail]), |
| 2230 | $K5LIBS) |
| 2231 | ], |
| 2232 | $K5LIBS) |
| 2233 | |
| 2234 | AC_CHECK_HEADER(gssapi.h, , |
| 2235 | [ unset ac_cv_header_gssapi_h |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2236 | CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi" |
Darren Tucker | 49aaf4a | 2003-08-26 11:58:16 +1000 | [diff] [blame] | 2237 | AC_CHECK_HEADERS(gssapi.h, , |
| 2238 | AC_MSG_WARN([Cannot find any suitable gss-api header - build may fail]) |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2239 | ) |
Darren Tucker | 49aaf4a | 2003-08-26 11:58:16 +1000 | [diff] [blame] | 2240 | ] |
| 2241 | ) |
| 2242 | |
| 2243 | oldCPP="$CPPFLAGS" |
| 2244 | CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi" |
| 2245 | AC_CHECK_HEADER(gssapi_krb5.h, , |
| 2246 | [ CPPFLAGS="$oldCPP" ]) |
| 2247 | |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2248 | fi |
Darren Tucker | 1d3ca58 | 2004-01-22 12:05:34 +1100 | [diff] [blame] | 2249 | if test ! -z "$need_dash_r" ; then |
| 2250 | LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib" |
| 2251 | fi |
| 2252 | if test ! -z "$blibpath" ; then |
| 2253 | blibpath="$blibpath:${KRB5ROOT}/lib" |
| 2254 | fi |
Darren Tucker | 0d27ed1 | 2004-02-24 10:37:33 +1100 | [diff] [blame] | 2255 | fi |
| 2256 | |
| 2257 | AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h) |
| 2258 | AC_CHECK_HEADERS(gssapi_krb5.h gssapi/gssapi_krb5.h) |
| 2259 | AC_CHECK_HEADERS(gssapi_generic.h gssapi/gssapi_generic.h) |
| 2260 | |
| 2261 | LIBS="$LIBS $K5LIBS" |
| 2262 | AC_SEARCH_LIBS(k_hasafs, kafs, AC_DEFINE(USE_AFS)) |
Ben Lindstrom | a8104b5 | 2004-04-07 04:16:11 +0000 | [diff] [blame] | 2263 | AC_SEARCH_LIBS(krb5_init_ets, $K5LIBS, AC_DEFINE(KRB5_INIT_ETS)) |
Darren Tucker | 0d27ed1 | 2004-02-24 10:37:33 +1100 | [diff] [blame] | 2264 | ] |
Damien Miller | fd4c9ee | 2002-04-13 11:04:40 +1000 | [diff] [blame] | 2265 | ) |
Damien Miller | c79bc0d | 2001-03-28 13:03:42 +1000 | [diff] [blame] | 2266 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 2267 | # Looking for programs, paths and files |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 2268 | |
Damien Miller | f58c672 | 2002-05-13 13:15:42 +1000 | [diff] [blame] | 2269 | PRIVSEP_PATH=/var/empty |
| 2270 | AC_ARG_WITH(privsep-path, |
Tim Rice | cbb9066 | 2002-07-08 19:17:10 -0700 | [diff] [blame] | 2271 | [ --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)], |
Damien Miller | f58c672 | 2002-05-13 13:15:42 +1000 | [diff] [blame] | 2272 | [ |
| 2273 | if test "x$withval" != "$no" ; then |
| 2274 | PRIVSEP_PATH=$withval |
| 2275 | fi |
| 2276 | ] |
| 2277 | ) |
| 2278 | AC_SUBST(PRIVSEP_PATH) |
| 2279 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 2280 | AC_ARG_WITH(xauth, |
| 2281 | [ --with-xauth=PATH Specify path to xauth program ], |
| 2282 | [ |
Ben Lindstrom | 76020ba | 2000-10-25 16:55:00 +0000 | [diff] [blame] | 2283 | if test "x$withval" != "xno" ; then |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 2284 | xauth_path=$withval |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 2285 | fi |
| 2286 | ], |
| 2287 | [ |
Tim Rice | e22be3b | 2002-07-17 19:20:07 -0700 | [diff] [blame] | 2288 | TestPath="$PATH" |
| 2289 | TestPath="${TestPath}${PATH_SEPARATOR}/usr/X/bin" |
| 2290 | TestPath="${TestPath}${PATH_SEPARATOR}/usr/bin/X11" |
| 2291 | TestPath="${TestPath}${PATH_SEPARATOR}/usr/X11R6/bin" |
| 2292 | TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin" |
| 2293 | AC_PATH_PROG(xauth_path, xauth, , $TestPath) |
Damien Miller | edb8292 | 2000-06-20 13:25:52 +1000 | [diff] [blame] | 2294 | if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 2295 | xauth_path="/usr/openwin/bin/xauth" |
| 2296 | fi |
| 2297 | ] |
| 2298 | ) |
| 2299 | |
Damien Miller | 7d90127 | 2003-01-13 16:55:22 +1100 | [diff] [blame] | 2300 | STRIP_OPT=-s |
| 2301 | AC_ARG_ENABLE(strip, |
| 2302 | [ --disable-strip Disable calling strip(1) on install], |
| 2303 | [ |
| 2304 | if test "x$enableval" = "xno" ; then |
| 2305 | STRIP_OPT= |
| 2306 | fi |
| 2307 | ] |
| 2308 | ) |
| 2309 | AC_SUBST(STRIP_OPT) |
| 2310 | |
Damien Miller | a19cf47 | 2000-11-29 13:28:50 +1100 | [diff] [blame] | 2311 | if test -z "$xauth_path" ; then |
| 2312 | XAUTH_PATH="undefined" |
| 2313 | AC_SUBST(XAUTH_PATH) |
| 2314 | else |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 2315 | AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path") |
Damien Miller | a19cf47 | 2000-11-29 13:28:50 +1100 | [diff] [blame] | 2316 | XAUTH_PATH=$xauth_path |
| 2317 | AC_SUBST(XAUTH_PATH) |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 2318 | fi |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 2319 | |
| 2320 | # Check for mail directory (last resort if we cannot get it from headers) |
| 2321 | if test ! -z "$MAIL" ; then |
| 2322 | maildir=`dirname $MAIL` |
| 2323 | AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir") |
| 2324 | fi |
| 2325 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 2326 | if test -z "$no_dev_ptmx" ; then |
Kevin Steves | 0ea1d9d | 2002-04-25 18:17:04 +0000 | [diff] [blame] | 2327 | if test "x$disable_ptmx_check" != "xyes" ; then |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2328 | AC_CHECK_FILE("/dev/ptmx", |
Kevin Steves | 0ea1d9d | 2002-04-25 18:17:04 +0000 | [diff] [blame] | 2329 | [ |
| 2330 | AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX) |
| 2331 | have_dev_ptmx=1 |
| 2332 | ] |
| 2333 | ) |
| 2334 | fi |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 2335 | fi |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2336 | AC_CHECK_FILE("/dev/ptc", |
Damien Miller | 204ad07 | 2000-03-02 23:56:12 +1100 | [diff] [blame] | 2337 | [ |
| 2338 | AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC) |
| 2339 | have_dev_ptc=1 |
| 2340 | ] |
| 2341 | ) |
| 2342 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 2343 | # Options from here on. Some of these are preset by platform above |
Ben Lindstrom | 9841b0a | 2001-06-09 02:26:58 +0000 | [diff] [blame] | 2344 | AC_ARG_WITH(mantype, |
Damien Miller | 897741e | 2001-04-16 10:41:46 +1000 | [diff] [blame] | 2345 | [ --with-mantype=man|cat|doc Set man page type], |
Damien Miller | 670a4b8 | 2000-01-22 13:53:11 +1100 | [diff] [blame] | 2346 | [ |
Damien Miller | 897741e | 2001-04-16 10:41:46 +1000 | [diff] [blame] | 2347 | case "$withval" in |
| 2348 | man|cat|doc) |
| 2349 | MANTYPE=$withval |
| 2350 | ;; |
| 2351 | *) |
| 2352 | AC_MSG_ERROR(invalid man type: $withval) |
| 2353 | ;; |
| 2354 | esac |
Damien Miller | 670a4b8 | 2000-01-22 13:53:11 +1100 | [diff] [blame] | 2355 | ] |
| 2356 | ) |
Ben Lindstrom | bc70992 | 2001-04-18 18:04:21 +0000 | [diff] [blame] | 2357 | if test -z "$MANTYPE"; then |
Tim Rice | e22be3b | 2002-07-17 19:20:07 -0700 | [diff] [blame] | 2358 | TestPath="/usr/bin${PATH_SEPARATOR}/usr/ucb" |
| 2359 | AC_PATH_PROGS(NROFF, nroff awf, /bin/false, $TestPath) |
Ben Lindstrom | bc70992 | 2001-04-18 18:04:21 +0000 | [diff] [blame] | 2360 | if ${NROFF} -mdoc ${srcdir}/ssh.1 >/dev/null 2>&1; then |
| 2361 | MANTYPE=doc |
| 2362 | elif ${NROFF} -man ${srcdir}/ssh.1 >/dev/null 2>&1; then |
| 2363 | MANTYPE=man |
| 2364 | else |
| 2365 | MANTYPE=cat |
| 2366 | fi |
| 2367 | fi |
Damien Miller | 670a4b8 | 2000-01-22 13:53:11 +1100 | [diff] [blame] | 2368 | AC_SUBST(MANTYPE) |
Ben Lindstrom | bc70992 | 2001-04-18 18:04:21 +0000 | [diff] [blame] | 2369 | if test "$MANTYPE" = "doc"; then |
| 2370 | mansubdir=man; |
| 2371 | else |
| 2372 | mansubdir=$MANTYPE; |
| 2373 | fi |
| 2374 | AC_SUBST(mansubdir) |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 2375 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 2376 | # Check whether to enable MD5 passwords |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2377 | MD5_MSG="no" |
Damien Miller | f7c0f82 | 1999-11-22 22:31:49 +1100 | [diff] [blame] | 2378 | AC_ARG_WITH(md5-passwords, |
Damien Miller | dd1c7ba | 1999-11-19 15:53:20 +1100 | [diff] [blame] | 2379 | [ --with-md5-passwords Enable use of MD5 passwords], |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 2380 | [ |
Damien Miller | b85dcad | 2000-03-11 11:37:00 +1100 | [diff] [blame] | 2381 | if test "x$withval" != "xno" ; then |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 2382 | AC_DEFINE(HAVE_MD5_PASSWORDS) |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2383 | MD5_MSG="yes" |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 2384 | fi |
| 2385 | ] |
Damien Miller | dd1c7ba | 1999-11-19 15:53:20 +1100 | [diff] [blame] | 2386 | ) |
| 2387 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 2388 | # Whether to disable shadow password support |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 2389 | AC_ARG_WITH(shadow, |
| 2390 | [ --without-shadow Disable shadow password support], |
| 2391 | [ |
| 2392 | if test "x$withval" = "xno" ; then |
| 2393 | AC_DEFINE(DISABLE_SHADOW) |
Damien Miller | 1f335fb | 2000-06-26 11:31:33 +1000 | [diff] [blame] | 2394 | disable_shadow=yes |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 2395 | fi |
| 2396 | ] |
| 2397 | ) |
| 2398 | |
Damien Miller | 1f335fb | 2000-06-26 11:31:33 +1000 | [diff] [blame] | 2399 | if test -z "$disable_shadow" ; then |
| 2400 | AC_MSG_CHECKING([if the systems has expire shadow information]) |
| 2401 | AC_TRY_COMPILE( |
| 2402 | [ |
| 2403 | #include <sys/types.h> |
| 2404 | #include <shadow.h> |
| 2405 | struct spwd sp; |
| 2406 | ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ], |
| 2407 | [ sp_expire_available=yes ], [] |
| 2408 | ) |
| 2409 | |
| 2410 | if test "x$sp_expire_available" = "xyes" ; then |
| 2411 | AC_MSG_RESULT(yes) |
| 2412 | AC_DEFINE(HAS_SHADOW_EXPIRE) |
| 2413 | else |
| 2414 | AC_MSG_RESULT(no) |
| 2415 | fi |
| 2416 | fi |
| 2417 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 2418 | # Use ip address instead of hostname in $DISPLAY |
Damien Miller | 9a94734 | 2000-08-30 10:03:33 +1100 | [diff] [blame] | 2419 | if test ! -z "$IPADDR_IN_DISPLAY" ; then |
| 2420 | DISPLAY_HACK_MSG="yes" |
| 2421 | AC_DEFINE(IPADDR_IN_DISPLAY) |
| 2422 | else |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2423 | DISPLAY_HACK_MSG="no" |
Damien Miller | 9a94734 | 2000-08-30 10:03:33 +1100 | [diff] [blame] | 2424 | AC_ARG_WITH(ipaddr-display, |
| 2425 | [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY], |
| 2426 | [ |
| 2427 | if test "x$withval" != "xno" ; then |
| 2428 | AC_DEFINE(IPADDR_IN_DISPLAY) |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2429 | DISPLAY_HACK_MSG="yes" |
Damien Miller | 9a94734 | 2000-08-30 10:03:33 +1100 | [diff] [blame] | 2430 | fi |
| 2431 | ] |
| 2432 | ) |
| 2433 | fi |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 2434 | |
Darren Tucker | e1a790d | 2003-09-16 11:52:19 +1000 | [diff] [blame] | 2435 | # check for /etc/default/login and use it if present. |
Tim Rice | 7ff4e6d | 2003-09-22 19:50:14 -0700 | [diff] [blame] | 2436 | AC_ARG_ENABLE(etc-default-login, |
| 2437 | [ --disable-etc-default-login Disable using PATH from /etc/default/login [no]],, |
| 2438 | [ |
Darren Tucker | e1a790d | 2003-09-16 11:52:19 +1000 | [diff] [blame] | 2439 | AC_CHECK_FILE("/etc/default/login", [ external_path_file=/etc/default/login ]) |
| 2440 | |
| 2441 | if test "x$external_path_file" = "x/etc/default/login"; then |
| 2442 | AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN) |
| 2443 | fi |
Tim Rice | 7ff4e6d | 2003-09-22 19:50:14 -0700 | [diff] [blame] | 2444 | ]) |
Darren Tucker | e1a790d | 2003-09-16 11:52:19 +1000 | [diff] [blame] | 2445 | |
Tim Rice | 43a1c13 | 2002-04-17 21:19:14 -0700 | [diff] [blame] | 2446 | dnl BSD systems use /etc/login.conf so --with-default-path= has no effect |
| 2447 | if test $ac_cv_func_login_getcapbool = "yes" -a \ |
| 2448 | $ac_cv_header_login_cap_h = "yes" ; then |
Darren Tucker | e1a790d | 2003-09-16 11:52:19 +1000 | [diff] [blame] | 2449 | external_path_file=/etc/login.conf |
Tim Rice | 43a1c13 | 2002-04-17 21:19:14 -0700 | [diff] [blame] | 2450 | fi |
Darren Tucker | e1a790d | 2003-09-16 11:52:19 +1000 | [diff] [blame] | 2451 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 2452 | # Whether to mess with the default path |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2453 | SERVER_PATH_MSG="(default)" |
Damien Miller | e7f626c | 1999-12-31 09:49:44 +1100 | [diff] [blame] | 2454 | AC_ARG_WITH(default-path, |
Damien Miller | f71d2a5 | 2002-05-13 15:14:08 +1000 | [diff] [blame] | 2455 | [ --with-default-path= Specify default \$PATH environment for server], |
Damien Miller | 5a3e683 | 1999-12-27 09:48:56 +1100 | [diff] [blame] | 2456 | [ |
Darren Tucker | e1a790d | 2003-09-16 11:52:19 +1000 | [diff] [blame] | 2457 | if test "x$external_path_file" = "x/etc/login.conf" ; then |
Tim Rice | 43a1c13 | 2002-04-17 21:19:14 -0700 | [diff] [blame] | 2458 | AC_MSG_WARN([ |
| 2459 | --with-default-path=PATH has no effect on this system. |
| 2460 | Edit /etc/login.conf instead.]) |
| 2461 | elif test "x$withval" != "xno" ; then |
Tim Rice | b925b4b | 2003-09-15 22:40:49 -0700 | [diff] [blame] | 2462 | if test ! -z "$external_path_file" ; then |
Darren Tucker | e1a790d | 2003-09-16 11:52:19 +1000 | [diff] [blame] | 2463 | AC_MSG_WARN([ |
| 2464 | --with-default-path=PATH will only be used if PATH is not defined in |
| 2465 | $external_path_file .]) |
| 2466 | fi |
Tim Rice | 59ea0a0 | 2001-03-10 13:50:45 -0800 | [diff] [blame] | 2467 | user_path="$withval" |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2468 | SERVER_PATH_MSG="$withval" |
Damien Miller | 5a3e683 | 1999-12-27 09:48:56 +1100 | [diff] [blame] | 2469 | fi |
Tim Rice | 59ea0a0 | 2001-03-10 13:50:45 -0800 | [diff] [blame] | 2470 | ], |
Darren Tucker | e1a790d | 2003-09-16 11:52:19 +1000 | [diff] [blame] | 2471 | [ if test "x$external_path_file" = "x/etc/login.conf" ; then |
| 2472 | AC_MSG_WARN([Make sure the path to scp is in /etc/login.conf]) |
Tim Rice | 43a1c13 | 2002-04-17 21:19:14 -0700 | [diff] [blame] | 2473 | else |
Tim Rice | b925b4b | 2003-09-15 22:40:49 -0700 | [diff] [blame] | 2474 | if test ! -z "$external_path_file" ; then |
Darren Tucker | e1a790d | 2003-09-16 11:52:19 +1000 | [diff] [blame] | 2475 | AC_MSG_WARN([ |
| 2476 | If PATH is defined in $external_path_file, ensure the path to scp is included, |
| 2477 | otherwise scp will not work.]) |
| 2478 | fi |
| 2479 | AC_TRY_RUN( |
| 2480 | [ |
Tim Rice | 59ea0a0 | 2001-03-10 13:50:45 -0800 | [diff] [blame] | 2481 | /* find out what STDPATH is */ |
| 2482 | #include <stdio.h> |
Tim Rice | 59ea0a0 | 2001-03-10 13:50:45 -0800 | [diff] [blame] | 2483 | #ifdef HAVE_PATHS_H |
| 2484 | # include <paths.h> |
| 2485 | #endif |
| 2486 | #ifndef _PATH_STDPATH |
Tim Rice | 1c9e688 | 2002-11-22 13:29:01 -0800 | [diff] [blame] | 2487 | # ifdef _PATH_USERPATH /* Irix */ |
| 2488 | # define _PATH_STDPATH _PATH_USERPATH |
| 2489 | # else |
| 2490 | # define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin" |
| 2491 | # endif |
Tim Rice | 59ea0a0 | 2001-03-10 13:50:45 -0800 | [diff] [blame] | 2492 | #endif |
| 2493 | #include <sys/types.h> |
| 2494 | #include <sys/stat.h> |
| 2495 | #include <fcntl.h> |
| 2496 | #define DATA "conftest.stdpath" |
| 2497 | |
| 2498 | main() |
| 2499 | { |
| 2500 | FILE *fd; |
| 2501 | int rc; |
| 2502 | |
| 2503 | fd = fopen(DATA,"w"); |
| 2504 | if(fd == NULL) |
| 2505 | exit(1); |
| 2506 | |
| 2507 | if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0) |
| 2508 | exit(1); |
| 2509 | |
| 2510 | exit(0); |
| 2511 | } |
| 2512 | ], [ user_path=`cat conftest.stdpath` ], |
| 2513 | [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ], |
| 2514 | [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ] |
| 2515 | ) |
| 2516 | # make sure $bindir is in USER_PATH so scp will work |
| 2517 | t_bindir=`eval echo ${bindir}` |
| 2518 | case $t_bindir in |
| 2519 | NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$prefix~"` ;; |
| 2520 | esac |
| 2521 | case $t_bindir in |
| 2522 | NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$ac_default_prefix~"` ;; |
| 2523 | esac |
| 2524 | echo $user_path | grep ":$t_bindir" > /dev/null 2>&1 |
| 2525 | if test $? -ne 0 ; then |
| 2526 | echo $user_path | grep "^$t_bindir" > /dev/null 2>&1 |
| 2527 | if test $? -ne 0 ; then |
| 2528 | user_path=$user_path:$t_bindir |
| 2529 | AC_MSG_RESULT(Adding $t_bindir to USER_PATH so scp will work) |
| 2530 | fi |
| 2531 | fi |
Tim Rice | 43a1c13 | 2002-04-17 21:19:14 -0700 | [diff] [blame] | 2532 | fi ] |
Damien Miller | 5a3e683 | 1999-12-27 09:48:56 +1100 | [diff] [blame] | 2533 | ) |
Darren Tucker | e1a790d | 2003-09-16 11:52:19 +1000 | [diff] [blame] | 2534 | if test "x$external_path_file" != "x/etc/login.conf" ; then |
Tim Rice | 43a1c13 | 2002-04-17 21:19:14 -0700 | [diff] [blame] | 2535 | AC_DEFINE_UNQUOTED(USER_PATH, "$user_path") |
| 2536 | AC_SUBST(user_path) |
| 2537 | fi |
Damien Miller | 5a3e683 | 1999-12-27 09:48:56 +1100 | [diff] [blame] | 2538 | |
Damien Miller | a18bbd3 | 2002-05-13 10:48:57 +1000 | [diff] [blame] | 2539 | # Set superuser path separately to user path |
Damien Miller | a18bbd3 | 2002-05-13 10:48:57 +1000 | [diff] [blame] | 2540 | AC_ARG_WITH(superuser-path, |
| 2541 | [ --with-superuser-path= Specify different path for super-user], |
| 2542 | [ |
| 2543 | if test "x$withval" != "xno" ; then |
| 2544 | AC_DEFINE_UNQUOTED(SUPERUSER_PATH, "$withval") |
| 2545 | superuser_path=$withval |
| 2546 | fi |
| 2547 | ] |
| 2548 | ) |
| 2549 | |
| 2550 | |
Damien Miller | 61e50f1 | 2000-05-08 20:49:37 +1000 | [diff] [blame] | 2551 | AC_MSG_CHECKING([if we need to convert IPv4 in IPv6-mapped addresses]) |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2552 | IPV4_IN6_HACK_MSG="no" |
Damien Miller | 7bcb089 | 2000-03-11 20:45:40 +1100 | [diff] [blame] | 2553 | AC_ARG_WITH(4in6, |
| 2554 | [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses], |
| 2555 | [ |
| 2556 | if test "x$withval" != "xno" ; then |
| 2557 | AC_MSG_RESULT(yes) |
| 2558 | AC_DEFINE(IPV4_IN_IPV6) |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2559 | IPV4_IN6_HACK_MSG="yes" |
Damien Miller | 7bcb089 | 2000-03-11 20:45:40 +1100 | [diff] [blame] | 2560 | else |
| 2561 | AC_MSG_RESULT(no) |
| 2562 | fi |
| 2563 | ],[ |
| 2564 | if test "x$inet6_default_4in6" = "xyes"; then |
| 2565 | AC_MSG_RESULT([yes (default)]) |
| 2566 | AC_DEFINE(IPV4_IN_IPV6) |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2567 | IPV4_IN6_HACK_MSG="yes" |
Damien Miller | 7bcb089 | 2000-03-11 20:45:40 +1100 | [diff] [blame] | 2568 | else |
| 2569 | AC_MSG_RESULT([no (default)]) |
| 2570 | fi |
| 2571 | ] |
| 2572 | ) |
| 2573 | |
Damien Miller | 60396b0 | 2001-02-18 17:01:00 +1100 | [diff] [blame] | 2574 | # Whether to enable BSD auth support |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 2575 | BSD_AUTH_MSG=no |
Damien Miller | 60396b0 | 2001-02-18 17:01:00 +1100 | [diff] [blame] | 2576 | AC_ARG_WITH(bsd-auth, |
| 2577 | [ --with-bsd-auth Enable BSD auth support], |
| 2578 | [ |
| 2579 | if test "x$withval" != "xno" ; then |
| 2580 | AC_DEFINE(BSD_AUTH) |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 2581 | BSD_AUTH_MSG=yes |
Damien Miller | 60396b0 | 2001-02-18 17:01:00 +1100 | [diff] [blame] | 2582 | fi |
| 2583 | ] |
| 2584 | ) |
| 2585 | |
Damien Miller | a22ba01 | 2000-03-02 23:09:20 +1100 | [diff] [blame] | 2586 | # Where to place sshd.pid |
Damien Miller | b13c73e | 2000-01-17 22:02:17 +1100 | [diff] [blame] | 2587 | piddir=/var/run |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 2588 | # make sure the directory exists |
| 2589 | if test ! -d $piddir ; then |
| 2590 | piddir=`eval echo ${sysconfdir}` |
| 2591 | case $piddir in |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2592 | NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;; |
Damien Miller | 78315eb | 2000-09-29 23:01:36 +1100 | [diff] [blame] | 2593 | esac |
| 2594 | fi |
| 2595 | |
Tim Rice | 88f2ab5 | 2002-03-17 12:17:34 -0800 | [diff] [blame] | 2596 | AC_ARG_WITH(pid-dir, |
| 2597 | [ --with-pid-dir=PATH Specify location of ssh.pid file], |
| 2598 | [ |
| 2599 | if test "x$withval" != "xno" ; then |
| 2600 | piddir=$withval |
| 2601 | if test ! -d $piddir ; then |
| 2602 | AC_MSG_WARN([** no $piddir directory on this system **]) |
| 2603 | fi |
| 2604 | fi |
| 2605 | ] |
| 2606 | ) |
| 2607 | |
Ben Lindstrom | 226cfa0 | 2001-01-22 05:34:40 +0000 | [diff] [blame] | 2608 | AC_DEFINE_UNQUOTED(_PATH_SSH_PIDDIR, "$piddir") |
Damien Miller | b13c73e | 2000-01-17 22:02:17 +1100 | [diff] [blame] | 2609 | AC_SUBST(piddir) |
Damien Miller | 5eed6a2 | 2000-01-16 12:05:18 +1100 | [diff] [blame] | 2610 | |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2611 | dnl allow user to disable some login recording features |
| 2612 | AC_ARG_ENABLE(lastlog, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 2613 | [ --disable-lastlog disable use of lastlog even if detected [no]], |
Darren Tucker | a3020db | 2003-06-28 12:54:33 +1000 | [diff] [blame] | 2614 | [ |
| 2615 | if test "x$enableval" = "xno" ; then |
| 2616 | AC_DEFINE(DISABLE_LASTLOG) |
| 2617 | fi |
| 2618 | ] |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2619 | ) |
| 2620 | AC_ARG_ENABLE(utmp, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 2621 | [ --disable-utmp disable use of utmp even if detected [no]], |
Darren Tucker | a3020db | 2003-06-28 12:54:33 +1000 | [diff] [blame] | 2622 | [ |
| 2623 | if test "x$enableval" = "xno" ; then |
| 2624 | AC_DEFINE(DISABLE_UTMP) |
| 2625 | fi |
| 2626 | ] |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2627 | ) |
| 2628 | AC_ARG_ENABLE(utmpx, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 2629 | [ --disable-utmpx disable use of utmpx even if detected [no]], |
Darren Tucker | a3020db | 2003-06-28 12:54:33 +1000 | [diff] [blame] | 2630 | [ |
| 2631 | if test "x$enableval" = "xno" ; then |
| 2632 | AC_DEFINE(DISABLE_UTMPX) |
| 2633 | fi |
| 2634 | ] |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2635 | ) |
| 2636 | AC_ARG_ENABLE(wtmp, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 2637 | [ --disable-wtmp disable use of wtmp even if detected [no]], |
Darren Tucker | a3020db | 2003-06-28 12:54:33 +1000 | [diff] [blame] | 2638 | [ |
| 2639 | if test "x$enableval" = "xno" ; then |
| 2640 | AC_DEFINE(DISABLE_WTMP) |
| 2641 | fi |
| 2642 | ] |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2643 | ) |
| 2644 | AC_ARG_ENABLE(wtmpx, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 2645 | [ --disable-wtmpx disable use of wtmpx even if detected [no]], |
Darren Tucker | a3020db | 2003-06-28 12:54:33 +1000 | [diff] [blame] | 2646 | [ |
| 2647 | if test "x$enableval" = "xno" ; then |
| 2648 | AC_DEFINE(DISABLE_WTMPX) |
| 2649 | fi |
| 2650 | ] |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2651 | ) |
| 2652 | AC_ARG_ENABLE(libutil, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 2653 | [ --disable-libutil disable use of libutil (login() etc.) [no]], |
Darren Tucker | a3020db | 2003-06-28 12:54:33 +1000 | [diff] [blame] | 2654 | [ |
| 2655 | if test "x$enableval" = "xno" ; then |
| 2656 | AC_DEFINE(DISABLE_LOGIN) |
| 2657 | fi |
| 2658 | ] |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2659 | ) |
| 2660 | AC_ARG_ENABLE(pututline, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 2661 | [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]], |
Darren Tucker | a3020db | 2003-06-28 12:54:33 +1000 | [diff] [blame] | 2662 | [ |
| 2663 | if test "x$enableval" = "xno" ; then |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2664 | AC_DEFINE(DISABLE_PUTUTLINE) |
Darren Tucker | a3020db | 2003-06-28 12:54:33 +1000 | [diff] [blame] | 2665 | fi |
| 2666 | ] |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2667 | ) |
| 2668 | AC_ARG_ENABLE(pututxline, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 2669 | [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]], |
Darren Tucker | a3020db | 2003-06-28 12:54:33 +1000 | [diff] [blame] | 2670 | [ |
| 2671 | if test "x$enableval" = "xno" ; then |
| 2672 | AC_DEFINE(DISABLE_PUTUTXLINE) |
| 2673 | fi |
| 2674 | ] |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2675 | ) |
| 2676 | AC_ARG_WITH(lastlog, |
andre | 43ca7e2 | 2000-06-19 08:23:46 +0000 | [diff] [blame] | 2677 | [ --with-lastlog=FILE|DIR specify lastlog location [common locations]], |
Damien Miller | 709528a | 2001-01-31 09:57:55 +1100 | [diff] [blame] | 2678 | [ |
| 2679 | if test "x$withval" = "xno" ; then |
| 2680 | AC_DEFINE(DISABLE_LASTLOG) |
| 2681 | else |
| 2682 | conf_lastlog_location=$withval |
| 2683 | fi |
| 2684 | ] |
| 2685 | ) |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2686 | |
| 2687 | dnl lastlog, [uw]tmpx? detection |
| 2688 | dnl NOTE: set the paths in the platform section to avoid the |
| 2689 | dnl need for command-line parameters |
| 2690 | dnl lastlog and [uw]tmp are subject to a file search if all else fails |
| 2691 | |
| 2692 | dnl lastlog detection |
| 2693 | dnl NOTE: the code itself will detect if lastlog is a directory |
| 2694 | AC_MSG_CHECKING([if your system defines LASTLOG_FILE]) |
| 2695 | AC_TRY_COMPILE([ |
| 2696 | #include <sys/types.h> |
| 2697 | #include <utmp.h> |
| 2698 | #ifdef HAVE_LASTLOG_H |
| 2699 | # include <lastlog.h> |
| 2700 | #endif |
Damien Miller | 2994e08 | 2000-06-04 15:51:47 +1000 | [diff] [blame] | 2701 | #ifdef HAVE_PATHS_H |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2702 | # include <paths.h> |
| 2703 | #endif |
Ben Lindstrom | 19d7b8d | 2001-08-16 00:09:49 +0000 | [diff] [blame] | 2704 | #ifdef HAVE_LOGIN_H |
| 2705 | # include <login.h> |
| 2706 | #endif |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2707 | ], |
| 2708 | [ char *lastlog = LASTLOG_FILE; ], |
| 2709 | [ AC_MSG_RESULT(yes) ], |
Damien Miller | 2994e08 | 2000-06-04 15:51:47 +1000 | [diff] [blame] | 2710 | [ |
| 2711 | AC_MSG_RESULT(no) |
| 2712 | AC_MSG_CHECKING([if your system defines _PATH_LASTLOG]) |
| 2713 | AC_TRY_COMPILE([ |
| 2714 | #include <sys/types.h> |
| 2715 | #include <utmp.h> |
| 2716 | #ifdef HAVE_LASTLOG_H |
| 2717 | # include <lastlog.h> |
| 2718 | #endif |
| 2719 | #ifdef HAVE_PATHS_H |
| 2720 | # include <paths.h> |
| 2721 | #endif |
| 2722 | ], |
| 2723 | [ char *lastlog = _PATH_LASTLOG; ], |
| 2724 | [ AC_MSG_RESULT(yes) ], |
| 2725 | [ |
andre | e441aa3 | 2000-06-12 22:34:38 +0000 | [diff] [blame] | 2726 | AC_MSG_RESULT(no) |
Damien Miller | 2994e08 | 2000-06-04 15:51:47 +1000 | [diff] [blame] | 2727 | system_lastlog_path=no |
| 2728 | ]) |
| 2729 | ] |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2730 | ) |
Damien Miller | 2994e08 | 2000-06-04 15:51:47 +1000 | [diff] [blame] | 2731 | |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2732 | if test -z "$conf_lastlog_location"; then |
| 2733 | if test x"$system_lastlog_path" = x"no" ; then |
| 2734 | for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do |
Damien Miller | edb8292 | 2000-06-20 13:25:52 +1000 | [diff] [blame] | 2735 | if (test -d "$f" || test -f "$f") ; then |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2736 | conf_lastlog_location=$f |
| 2737 | fi |
| 2738 | done |
| 2739 | if test -z "$conf_lastlog_location"; then |
andre | 45cad51 | 2000-06-12 23:27:31 +0000 | [diff] [blame] | 2740 | AC_MSG_WARN([** Cannot find lastlog **]) |
| 2741 | dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2742 | fi |
| 2743 | fi |
| 2744 | fi |
| 2745 | |
| 2746 | if test -n "$conf_lastlog_location"; then |
| 2747 | AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location") |
| 2748 | fi |
| 2749 | |
| 2750 | dnl utmp detection |
| 2751 | AC_MSG_CHECKING([if your system defines UTMP_FILE]) |
| 2752 | AC_TRY_COMPILE([ |
| 2753 | #include <sys/types.h> |
| 2754 | #include <utmp.h> |
Damien Miller | 2994e08 | 2000-06-04 15:51:47 +1000 | [diff] [blame] | 2755 | #ifdef HAVE_PATHS_H |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2756 | # include <paths.h> |
| 2757 | #endif |
| 2758 | ], |
| 2759 | [ char *utmp = UTMP_FILE; ], |
| 2760 | [ AC_MSG_RESULT(yes) ], |
| 2761 | [ AC_MSG_RESULT(no) |
| 2762 | system_utmp_path=no ] |
| 2763 | ) |
| 2764 | if test -z "$conf_utmp_location"; then |
| 2765 | if test x"$system_utmp_path" = x"no" ; then |
| 2766 | for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do |
| 2767 | if test -f $f ; then |
| 2768 | conf_utmp_location=$f |
| 2769 | fi |
| 2770 | done |
| 2771 | if test -z "$conf_utmp_location"; then |
| 2772 | AC_DEFINE(DISABLE_UTMP) |
| 2773 | fi |
| 2774 | fi |
| 2775 | fi |
| 2776 | if test -n "$conf_utmp_location"; then |
| 2777 | AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location") |
| 2778 | fi |
| 2779 | |
| 2780 | dnl wtmp detection |
| 2781 | AC_MSG_CHECKING([if your system defines WTMP_FILE]) |
| 2782 | AC_TRY_COMPILE([ |
| 2783 | #include <sys/types.h> |
| 2784 | #include <utmp.h> |
Damien Miller | 2994e08 | 2000-06-04 15:51:47 +1000 | [diff] [blame] | 2785 | #ifdef HAVE_PATHS_H |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2786 | # include <paths.h> |
| 2787 | #endif |
| 2788 | ], |
| 2789 | [ char *wtmp = WTMP_FILE; ], |
| 2790 | [ AC_MSG_RESULT(yes) ], |
| 2791 | [ AC_MSG_RESULT(no) |
| 2792 | system_wtmp_path=no ] |
| 2793 | ) |
| 2794 | if test -z "$conf_wtmp_location"; then |
| 2795 | if test x"$system_wtmp_path" = x"no" ; then |
| 2796 | for f in /usr/adm/wtmp /var/log/wtmp; do |
| 2797 | if test -f $f ; then |
| 2798 | conf_wtmp_location=$f |
| 2799 | fi |
| 2800 | done |
| 2801 | if test -z "$conf_wtmp_location"; then |
| 2802 | AC_DEFINE(DISABLE_WTMP) |
| 2803 | fi |
| 2804 | fi |
| 2805 | fi |
| 2806 | if test -n "$conf_wtmp_location"; then |
| 2807 | AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location") |
| 2808 | fi |
| 2809 | |
| 2810 | |
| 2811 | dnl utmpx detection - I don't know any system so perverse as to require |
| 2812 | dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out |
| 2813 | dnl there, though. |
| 2814 | AC_MSG_CHECKING([if your system defines UTMPX_FILE]) |
| 2815 | AC_TRY_COMPILE([ |
| 2816 | #include <sys/types.h> |
| 2817 | #include <utmp.h> |
| 2818 | #ifdef HAVE_UTMPX_H |
| 2819 | #include <utmpx.h> |
| 2820 | #endif |
Damien Miller | 2994e08 | 2000-06-04 15:51:47 +1000 | [diff] [blame] | 2821 | #ifdef HAVE_PATHS_H |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2822 | # include <paths.h> |
| 2823 | #endif |
| 2824 | ], |
| 2825 | [ char *utmpx = UTMPX_FILE; ], |
| 2826 | [ AC_MSG_RESULT(yes) ], |
| 2827 | [ AC_MSG_RESULT(no) |
| 2828 | system_utmpx_path=no ] |
| 2829 | ) |
| 2830 | if test -z "$conf_utmpx_location"; then |
| 2831 | if test x"$system_utmpx_path" = x"no" ; then |
| 2832 | AC_DEFINE(DISABLE_UTMPX) |
| 2833 | fi |
| 2834 | else |
| 2835 | AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location") |
| 2836 | fi |
| 2837 | |
| 2838 | dnl wtmpx detection |
| 2839 | AC_MSG_CHECKING([if your system defines WTMPX_FILE]) |
| 2840 | AC_TRY_COMPILE([ |
| 2841 | #include <sys/types.h> |
| 2842 | #include <utmp.h> |
| 2843 | #ifdef HAVE_UTMPX_H |
| 2844 | #include <utmpx.h> |
| 2845 | #endif |
Damien Miller | 2994e08 | 2000-06-04 15:51:47 +1000 | [diff] [blame] | 2846 | #ifdef HAVE_PATHS_H |
andre | 2ff7b5d | 2000-06-03 14:57:40 +0000 | [diff] [blame] | 2847 | # include <paths.h> |
| 2848 | #endif |
| 2849 | ], |
| 2850 | [ char *wtmpx = WTMPX_FILE; ], |
| 2851 | [ AC_MSG_RESULT(yes) ], |
| 2852 | [ AC_MSG_RESULT(no) |
| 2853 | system_wtmpx_path=no ] |
| 2854 | ) |
| 2855 | if test -z "$conf_wtmpx_location"; then |
| 2856 | if test x"$system_wtmpx_path" = x"no" ; then |
| 2857 | AC_DEFINE(DISABLE_WTMPX) |
| 2858 | fi |
| 2859 | else |
| 2860 | AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location") |
| 2861 | fi |
| 2862 | |
Damien Miller | 4018c19 | 2000-04-30 09:30:44 +1000 | [diff] [blame] | 2863 | |
Damien Miller | 29ea30d | 2000-03-17 10:54:15 +1100 | [diff] [blame] | 2864 | if test ! -z "$blibpath" ; then |
Damien Miller | eab4bae | 2003-04-29 23:22:40 +1000 | [diff] [blame] | 2865 | LDFLAGS="$LDFLAGS $blibflags$blibpath" |
| 2866 | AC_MSG_WARN([Please check and edit blibpath in LDFLAGS in Makefile]) |
Damien Miller | 29ea30d | 2000-03-17 10:54:15 +1100 | [diff] [blame] | 2867 | fi |
| 2868 | |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 2869 | dnl remove pam and dl because they are in $LIBPAM |
| 2870 | if test "$PAM_MSG" = yes ; then |
Tim Rice | 7d2d1f1 | 2002-02-26 22:05:11 -0800 | [diff] [blame] | 2871 | LIBS=`echo $LIBS | sed 's/-lpam //'` |
| 2872 | fi |
| 2873 | if test "$ac_cv_lib_pam_pam_set_item" = yes ; then |
| 2874 | LIBS=`echo $LIBS | sed 's/-ldl //'` |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 2875 | fi |
| 2876 | |
Damien Miller | bac2d8a | 2000-09-05 16:13:06 +1100 | [diff] [blame] | 2877 | AC_EXEEXT |
Tim Rice | 13aae5e | 2001-10-21 17:53:58 -0700 | [diff] [blame] | 2878 | AC_CONFIG_FILES([Makefile openbsd-compat/Makefile scard/Makefile ssh_prng_cmds]) |
| 2879 | AC_OUTPUT |
Damien Miller | 0437b33 | 2000-05-02 09:56:41 +1000 | [diff] [blame] | 2880 | |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 2881 | # Print summary of options |
| 2882 | |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 2883 | # Someone please show me a better way :) |
| 2884 | A=`eval echo ${prefix}` ; A=`eval echo ${A}` |
| 2885 | B=`eval echo ${bindir}` ; B=`eval echo ${B}` |
| 2886 | C=`eval echo ${sbindir}` ; C=`eval echo ${C}` |
| 2887 | D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}` |
Kevin Steves | e0f4914 | 2000-10-14 17:51:48 +0000 | [diff] [blame] | 2888 | E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}` |
Ben Lindstrom | bc70992 | 2001-04-18 18:04:21 +0000 | [diff] [blame] | 2889 | F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}` |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 2890 | G=`eval echo ${piddir}` ; G=`eval echo ${G}` |
Damien Miller | f58c672 | 2002-05-13 13:15:42 +1000 | [diff] [blame] | 2891 | H=`eval echo ${PRIVSEP_PATH}` ; H=`eval echo ${H}` |
| 2892 | I=`eval echo ${user_path}` ; I=`eval echo ${I}` |
| 2893 | J=`eval echo ${superuser_path}` ; J=`eval echo ${J}` |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 2894 | |
| 2895 | echo "" |
Kevin Steves | 393d2f7 | 2001-04-08 22:50:43 +0000 | [diff] [blame] | 2896 | echo "OpenSSH has been configured with the following options:" |
Damien Miller | f58c672 | 2002-05-13 13:15:42 +1000 | [diff] [blame] | 2897 | echo " User binaries: $B" |
| 2898 | echo " System binaries: $C" |
| 2899 | echo " Configuration files: $D" |
| 2900 | echo " Askpass program: $E" |
| 2901 | echo " Manual pages: $F" |
| 2902 | echo " PID file: $G" |
| 2903 | echo " Privilege separation chroot path: $H" |
Darren Tucker | e1a790d | 2003-09-16 11:52:19 +1000 | [diff] [blame] | 2904 | if test "x$external_path_file" = "x/etc/login.conf" ; then |
| 2905 | echo " At runtime, sshd will use the path defined in $external_path_file" |
| 2906 | echo " Make sure the path to scp is present, otherwise scp will not work" |
Tim Rice | 43a1c13 | 2002-04-17 21:19:14 -0700 | [diff] [blame] | 2907 | else |
Damien Miller | f58c672 | 2002-05-13 13:15:42 +1000 | [diff] [blame] | 2908 | echo " sshd default user PATH: $I" |
Tim Rice | b925b4b | 2003-09-15 22:40:49 -0700 | [diff] [blame] | 2909 | if test ! -z "$external_path_file"; then |
Darren Tucker | e1a790d | 2003-09-16 11:52:19 +1000 | [diff] [blame] | 2910 | echo " (If PATH is set in $external_path_file it will be used instead. If" |
| 2911 | echo " used, ensure the path to scp is present, otherwise scp will not work.)" |
| 2912 | fi |
Tim Rice | 43a1c13 | 2002-04-17 21:19:14 -0700 | [diff] [blame] | 2913 | fi |
Damien Miller | a18bbd3 | 2002-05-13 10:48:57 +1000 | [diff] [blame] | 2914 | if test ! -z "$superuser_path" ; then |
Damien Miller | f58c672 | 2002-05-13 13:15:42 +1000 | [diff] [blame] | 2915 | echo " sshd superuser user PATH: $J" |
Damien Miller | a18bbd3 | 2002-05-13 10:48:57 +1000 | [diff] [blame] | 2916 | fi |
Damien Miller | f58c672 | 2002-05-13 13:15:42 +1000 | [diff] [blame] | 2917 | echo " Manpage format: $MANTYPE" |
Damien Miller | 7abe09b | 2003-05-15 10:53:49 +1000 | [diff] [blame] | 2918 | echo " PAM support: $PAM_MSG" |
Damien Miller | f58c672 | 2002-05-13 13:15:42 +1000 | [diff] [blame] | 2919 | echo " KerberosV support: $KRB5_MSG" |
| 2920 | echo " Smartcard support: $SCARD_MSG" |
Damien Miller | f58c672 | 2002-05-13 13:15:42 +1000 | [diff] [blame] | 2921 | echo " S/KEY support: $SKEY_MSG" |
| 2922 | echo " TCP Wrappers support: $TCPW_MSG" |
| 2923 | echo " MD5 password support: $MD5_MSG" |
Damien Miller | 903e115 | 2002-05-13 14:41:31 +1000 | [diff] [blame] | 2924 | echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG" |
Damien Miller | f58c672 | 2002-05-13 13:15:42 +1000 | [diff] [blame] | 2925 | echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG" |
| 2926 | echo " BSD Auth support: $BSD_AUTH_MSG" |
| 2927 | echo " Random number source: $RAND_MSG" |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 2928 | if test ! -z "$USE_RAND_HELPER" ; then |
Damien Miller | f58c672 | 2002-05-13 13:15:42 +1000 | [diff] [blame] | 2929 | echo " ssh-rand-helper collects from: $RAND_HELPER_MSG" |
Damien Miller | 60396b0 | 2001-02-18 17:01:00 +1100 | [diff] [blame] | 2930 | fi |
| 2931 | |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 2932 | echo "" |
| 2933 | |
Ben Lindstrom | 28bfc0d | 2000-12-18 19:58:57 +0000 | [diff] [blame] | 2934 | echo " Host: ${host}" |
| 2935 | echo " Compiler: ${CC}" |
| 2936 | echo " Compiler flags: ${CFLAGS}" |
| 2937 | echo "Preprocessor flags: ${CPPFLAGS}" |
| 2938 | echo " Linker flags: ${LDFLAGS}" |
Tim Rice | 4cec93f | 2002-02-26 08:40:48 -0800 | [diff] [blame] | 2939 | echo " Libraries: ${LIBWRAP} ${LIBPAM} ${LIBS}" |
Damien Miller | 7b22d65 | 2000-06-18 14:07:04 +1000 | [diff] [blame] | 2940 | |
| 2941 | echo "" |
| 2942 | |
Damien Miller | 82cf0ce | 2000-12-20 13:34:48 +1100 | [diff] [blame] | 2943 | if test "x$PAM_MSG" = "xyes" ; then |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 2944 | echo "PAM is enabled. You may need to install a PAM control file " |
| 2945 | echo "for sshd, otherwise password authentication may fail. " |
Damien Miller | a8e06ce | 2003-11-21 23:48:55 +1100 | [diff] [blame] | 2946 | echo "Example PAM control files can be found in the contrib/ " |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 2947 | echo "subdirectory" |
Damien Miller | 6f9c337 | 2000-10-25 10:06:04 +1100 | [diff] [blame] | 2948 | echo "" |
| 2949 | fi |
Ben Lindstrom | 3ad650a | 2001-01-03 06:02:51 +0000 | [diff] [blame] | 2950 | |
Damien Miller | 6c21c51 | 2002-01-22 21:57:53 +1100 | [diff] [blame] | 2951 | if test ! -z "$RAND_HELPER_CMDHASH" ; then |
| 2952 | echo "WARNING: you are using the builtin random number collection " |
| 2953 | echo "service. Please read WARNING.RNG and request that your OS " |
| 2954 | echo "vendor includes kernel-based random number collection in " |
| 2955 | echo "future versions of your OS." |
Ben Lindstrom | 3ad650a | 2001-01-03 06:02:51 +0000 | [diff] [blame] | 2956 | echo "" |
| 2957 | fi |
Damien Miller | 60396b0 | 2001-02-18 17:01:00 +1100 | [diff] [blame] | 2958 | |