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