Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 1 | AC_INIT(ssh.c) |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 2 | |
| 3 | AC_CONFIG_HEADER(config.h) |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 4 | AC_CANONICAL_HOST |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 5 | |
| 6 | dnl Checks for programs. |
| 7 | AC_PROG_CC |
Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 8 | AC_PROG_CPP |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 9 | AC_PROG_RANLIB |
Damien Miller | d8087f6 | 1999-11-25 12:31:26 +1100 | [diff] [blame] | 10 | AC_PROG_INSTALL |
Damien Miller | c7b38ce | 1999-11-09 10:28:04 +1100 | [diff] [blame] | 11 | AC_CHECK_PROG(AR, ar, ar) |
Damien Miller | e79334a | 1999-12-29 10:03:37 +1100 | [diff] [blame] | 12 | AC_PATH_PROG(PERL, perl) |
| 13 | AC_SUBST(PERL) |
Damien Miller | 2e1b082 | 1999-12-25 10:11:29 +1100 | [diff] [blame] | 14 | |
Damien Miller | 2e1b082 | 1999-12-25 10:11:29 +1100 | [diff] [blame] | 15 | AC_ARG_WITH(rsh, |
| 16 | [ --with-rsh=PATH Specify path to remote shell program ], |
| 17 | [ |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 18 | if test "x$withval" != "$xno" ; then |
| 19 | AC_DEFINE_UNQUOTED(RSH_PATH, "$withval") |
| 20 | fi |
Damien Miller | 2e1b082 | 1999-12-25 10:11:29 +1100 | [diff] [blame] | 21 | ], |
| 22 | [ |
| 23 | AC_PATH_PROG(rsh_path, rsh) |
| 24 | ] |
| 25 | ) |
| 26 | |
Damien Miller | 5eed6a2 | 2000-01-16 12:05:18 +1100 | [diff] [blame] | 27 | AC_ARG_WITH(xauth, |
| 28 | [ --with-xauth=PATH Specify path to xauth program ], |
Damien Miller | b29ea91 | 2000-01-15 14:12:03 +1100 | [diff] [blame] | 29 | [ |
| 30 | if test "x$withval" != "$xno" ; then |
| 31 | AC_DEFINE_UNQUOTED(XAUTH_PATH, "$withval") |
| 32 | fi |
| 33 | ], |
| 34 | [ |
| 35 | AC_PATH_PROG(xauth_path, xauth) |
| 36 | if test ! -z "$xauth_path" -a -x "/usr/openwin/bin/xauth" ; then |
| 37 | xauth_path="/usr/openwin/bin/xauth" |
| 38 | fi |
| 39 | ] |
| 40 | ) |
| 41 | |
Damien Miller | 2e1b082 | 1999-12-25 10:11:29 +1100 | [diff] [blame] | 42 | if test ! -z "$xauth_path" ; then |
| 43 | AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path") |
| 44 | fi |
| 45 | if test ! -z "$rsh_path" ; then |
| 46 | AC_DEFINE_UNQUOTED(RSH_PATH, "$rsh_path") |
| 47 | fi |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 48 | |
Damien Miller | 3b9d5e9 | 1999-12-15 09:34:31 +1100 | [diff] [blame] | 49 | dnl Checks for compiler characteristics |
Damien Miller | c7b38ce | 1999-11-09 10:28:04 +1100 | [diff] [blame] | 50 | if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall"; fi |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 51 | |
Damien Miller | 3b9d5e9 | 1999-12-15 09:34:31 +1100 | [diff] [blame] | 52 | AC_C_INLINE |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 53 | |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 54 | dnl Check for some target-specific stuff |
| 55 | case "$host" in |
Damien Miller | 75b1d10 | 2000-01-07 14:01:41 +1100 | [diff] [blame] | 56 | *-*-aix*) |
| 57 | AFS_LIBS="-lld" |
Damien Miller | eca71f8 | 2000-01-20 22:38:27 +1100 | [diff] [blame^] | 58 | AC_DEFINE(BROKEN_GETADDRINFO) |
Damien Miller | 75b1d10 | 2000-01-07 14:01:41 +1100 | [diff] [blame] | 59 | ;; |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 60 | *-*-hpux10*) |
| 61 | if test -z "$GCC"; then |
| 62 | CFLAGS="$CFLAGS -Aa" |
| 63 | fi |
| 64 | CFLAGS="$CFLAGS -D_HPUX_SOURCE" |
| 65 | AC_DEFINE(IPADDR_IN_DISPLAY) |
Damien Miller | 2e1b082 | 1999-12-25 10:11:29 +1100 | [diff] [blame] | 66 | AC_DEFINE(USE_UTMPX) |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 67 | AC_MSG_CHECKING(for HPUX trusted system password database) |
| 68 | if test -f /tcb/files/auth/system/default; then |
| 69 | AC_MSG_RESULT(yes) |
| 70 | AC_DEFINE(HAVE_HPUX_TRUSTED_SYSTEM_PW) |
| 71 | LIBS="$LIBS -lsec" |
Damien Miller | 105b7f0 | 2000-01-07 08:45:55 +1100 | [diff] [blame] | 72 | AC_MSG_WARN([This configuration is untested]) |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 73 | else |
| 74 | AC_MSG_RESULT(no) |
| 75 | AC_DEFINE(DISABLE_SHADOW) |
| 76 | fi |
| 77 | ;; |
Damien Miller | beb4ba5 | 1999-12-28 15:09:35 +1100 | [diff] [blame] | 78 | *-*-irix5*) |
Damien Miller | 1808f38 | 2000-01-06 12:03:12 +1100 | [diff] [blame] | 79 | no_libsocket=1 |
| 80 | no_libnsl=1 |
| 81 | ;; |
| 82 | *-*-irix6*) |
| 83 | AC_MSG_WARN([*** Irix 6.x is not tested *** ]) |
Damien Miller | beb4ba5 | 1999-12-28 15:09:35 +1100 | [diff] [blame] | 84 | no_libsocket=1 |
| 85 | no_libnsl=1 |
| 86 | ;; |
Damien Miller | b29ea91 | 2000-01-15 14:12:03 +1100 | [diff] [blame] | 87 | *-*-linux*) |
| 88 | no_dev_ptmx=1 |
| 89 | ;; |
Damien Miller | 75b1d10 | 2000-01-07 14:01:41 +1100 | [diff] [blame] | 90 | *-*-solaris*) |
| 91 | AC_DEFINE(USE_UTMPX) |
| 92 | ;; |
| 93 | *-*-sysv*) |
| 94 | LIBS="$LIBS -lgen -lsocket" |
| 95 | ;; |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 96 | esac |
| 97 | |
Damien Miller | c7b38ce | 1999-11-09 10:28:04 +1100 | [diff] [blame] | 98 | dnl Check for OpenSSL/SSLeay directories. |
| 99 | AC_MSG_CHECKING([for OpenSSL/SSLeay directory]) |
Damien Miller | 6640995 | 2000-01-17 21:40:06 +1100 | [diff] [blame] | 100 | for ssldir in $prefix /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local $prefix /usr/pkg ; do |
Damien Miller | a82feb3 | 1999-11-11 11:04:17 +1100 | [diff] [blame] | 101 | if test -f "$ssldir/include/openssl/crypto.h"; then |
| 102 | AC_DEFINE(HAVE_OPENSSL) |
| 103 | GOT_SSL="yes" |
| 104 | break |
| 105 | fi |
| 106 | if test -f "$ssldir/include/ssl/crypto.h"; then |
| 107 | AC_DEFINE(HAVE_SSL) |
| 108 | GOT_SSL="yes" |
| 109 | break |
| 110 | fi |
Damien Miller | c7b38ce | 1999-11-09 10:28:04 +1100 | [diff] [blame] | 111 | done |
Damien Miller | a82feb3 | 1999-11-11 11:04:17 +1100 | [diff] [blame] | 112 | if test -z "$GOT_SSL" ; then |
| 113 | AC_MSG_ERROR([Could not find SSLeay / OpenSSL libraries, please install]) |
| 114 | fi |
Damien Miller | c7b38ce | 1999-11-09 10:28:04 +1100 | [diff] [blame] | 115 | AC_SUBST(ssldir) |
| 116 | AC_DEFINE_UNQUOTED(ssldir, "$ssldir") |
| 117 | if test "$ssldir" != "/usr"; then |
| 118 | CFLAGS="$CFLAGS -I$ssldir/include" |
Damien Miller | 84093e9 | 1999-12-15 09:06:28 +1100 | [diff] [blame] | 119 | LDFLAGS="$LDFLAGS -L$ssldir/lib" |
Damien Miller | c7b38ce | 1999-11-09 10:28:04 +1100 | [diff] [blame] | 120 | fi |
Damien Miller | a82feb3 | 1999-11-11 11:04:17 +1100 | [diff] [blame] | 121 | AC_MSG_RESULT($ssldir) |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 122 | |
Damien Miller | c7b38ce | 1999-11-09 10:28:04 +1100 | [diff] [blame] | 123 | dnl Check for RSAref library. |
| 124 | AC_MSG_CHECKING([for RSAref library]) |
| 125 | saved_LIBS="$LIBS" |
| 126 | LIBS="$saved_LIBS -lRSAglue -lrsaref" |
| 127 | AC_TRY_LINK([], [], |
Damien Miller | d00d161 | 1999-12-29 10:17:09 +1100 | [diff] [blame] | 128 | [AC_MSG_RESULT(yes); |
| 129 | AC_DEFINE(RSAREF)], |
Damien Miller | c7b38ce | 1999-11-09 10:28:04 +1100 | [diff] [blame] | 130 | [AC_MSG_RESULT(no)]; LIBS="$saved_LIBS") |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 131 | |
Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 132 | dnl Checks for libraries. |
| 133 | AC_CHECK_LIB(crypto, CRYPTO_lock, ,AC_MSG_ERROR([*** libcrypto missing - please install first ***])) |
| 134 | AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***])) |
| 135 | AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil") |
Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 136 | |
Damien Miller | beb4ba5 | 1999-12-28 15:09:35 +1100 | [diff] [blame] | 137 | if test -z "$no_libsocket" ; then |
| 138 | AC_CHECK_LIB(nsl, yp_match, , ) |
| 139 | fi |
| 140 | if test -z "$no_libnsl" ; then |
| 141 | AC_CHECK_LIB(socket, main, , ) |
Damien Miller | 32b3cf2 | 1999-12-26 10:21:48 +1100 | [diff] [blame] | 142 | fi |
Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 143 | |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 144 | dnl Checks for header files. |
Damien Miller | eaf9994 | 2000-01-19 13:45:07 +1100 | [diff] [blame] | 145 | AC_CHECK_HEADERS(bstring.h endian.h lastlog.h login.h maillock.h netdb.h netgroup.h paths.h poll.h pty.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/select.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h util.h utmp.h utmpx.h) |
Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 146 | |
Damien Miller | cedfecc | 1999-11-15 14:36:53 +1100 | [diff] [blame] | 147 | dnl Checks for library functions. |
Damien Miller | 834171e | 2000-01-17 09:59:41 +1100 | [diff] [blame] | 148 | AC_CHECK_FUNCS(arc4random bindresvport_af freeaddrinfo gai_strerror getaddrinfo getpagesize getnameinfo innetgr md5_crypt mkdtemp openpty rresvport_af setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy updwtmpx vsnprintf _getpty) |
Damien Miller | cedfecc | 1999-11-15 14:36:53 +1100 | [diff] [blame] | 149 | |
Damien Miller | 04f8014 | 1999-11-19 15:32:34 +1100 | [diff] [blame] | 150 | AC_CHECK_FUNC(login, |
| 151 | [AC_DEFINE(HAVE_LOGIN)], |
| 152 | [AC_CHECK_LIB(bsd, login, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_LOGIN)])] |
| 153 | ) |
| 154 | |
| 155 | AC_CHECK_FUNC(daemon, |
| 156 | [AC_DEFINE(HAVE_DAEMON)], |
| 157 | [AC_CHECK_LIB(bsd, daemon, [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])] |
| 158 | ) |
| 159 | |
Damien Miller | c6398ef | 1999-11-20 12:18:40 +1100 | [diff] [blame] | 160 | dnl Checks for data types |
Damien Miller | e0f4574 | 2000-01-18 09:12:06 +1100 | [diff] [blame] | 161 | AC_CHECK_SIZEOF(char, 1) |
Damien Miller | c6398ef | 1999-11-20 12:18:40 +1100 | [diff] [blame] | 162 | AC_CHECK_SIZEOF(short int, 2) |
| 163 | AC_CHECK_SIZEOF(int, 4) |
| 164 | AC_CHECK_SIZEOF(long int, 4) |
| 165 | AC_CHECK_SIZEOF(long long int, 8) |
| 166 | |
| 167 | dnl More checks for data types |
Damien Miller | 859cec0 | 1999-11-22 14:27:24 +1100 | [diff] [blame] | 168 | AC_MSG_CHECKING([for intXX_t types]) |
Damien Miller | c6398ef | 1999-11-20 12:18:40 +1100 | [diff] [blame] | 169 | AC_TRY_COMPILE( |
| 170 | [#include <sys/types.h>], |
| 171 | [int16_t a; int32_t b; a = 1235; b = 1235;], |
| 172 | [ |
| 173 | AC_DEFINE(HAVE_INTXX_T) |
| 174 | AC_MSG_RESULT(yes) |
Damien Miller | b29ea91 | 2000-01-15 14:12:03 +1100 | [diff] [blame] | 175 | have_intxx_t=1 |
Damien Miller | c6398ef | 1999-11-20 12:18:40 +1100 | [diff] [blame] | 176 | ], |
| 177 | [AC_MSG_RESULT(no)] |
| 178 | ) |
| 179 | |
Damien Miller | 859cec0 | 1999-11-22 14:27:24 +1100 | [diff] [blame] | 180 | AC_MSG_CHECKING([for u_intXX_t types]) |
Damien Miller | c6398ef | 1999-11-20 12:18:40 +1100 | [diff] [blame] | 181 | AC_TRY_COMPILE( |
| 182 | [#include <sys/types.h>], |
| 183 | [u_int16_t c; u_int32_t d; c = 1235; d = 1235;], |
| 184 | [ |
| 185 | AC_DEFINE(HAVE_U_INTXX_T) |
| 186 | AC_MSG_RESULT(yes) |
Damien Miller | b29ea91 | 2000-01-15 14:12:03 +1100 | [diff] [blame] | 187 | have_u_intxx_t=1 |
Damien Miller | c6398ef | 1999-11-20 12:18:40 +1100 | [diff] [blame] | 188 | ], |
| 189 | [AC_MSG_RESULT(no)] |
| 190 | ) |
| 191 | |
Damien Miller | eaf9994 | 2000-01-19 13:45:07 +1100 | [diff] [blame] | 192 | if test -z "$have_u_intxx_t" -o -z "$have_intxx_t" -a \ |
Damien Miller | b29ea91 | 2000-01-15 14:12:03 +1100 | [diff] [blame] | 193 | "x$ac_cv_header_sys_bitypes_h" = "xyes" |
| 194 | then |
| 195 | AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h]) |
| 196 | AC_TRY_COMPILE( |
| 197 | [#include <sys/bitypes.h>], |
| 198 | [ |
| 199 | u_int16_t c; u_int32_t d; |
| 200 | int16_t e; int32_t f; |
| 201 | c = 1235; d = 1235; |
| 202 | e = 1235; f = 1235; |
| 203 | ], |
| 204 | [ |
| 205 | AC_DEFINE(HAVE_U_INTXX_T) |
| 206 | AC_DEFINE(HAVE_INTXX_T) |
| 207 | AC_MSG_RESULT(yes) |
| 208 | ], |
| 209 | [AC_MSG_RESULT(no)] |
| 210 | ) |
| 211 | fi |
| 212 | |
Damien Miller | 34132e5 | 2000-01-14 15:45:46 +1100 | [diff] [blame] | 213 | AC_MSG_CHECKING([for uintXX_t types]) |
Damien Miller | c6398ef | 1999-11-20 12:18:40 +1100 | [diff] [blame] | 214 | AC_TRY_COMPILE( |
| 215 | [#include <sys/types.h>], |
| 216 | [uint16_t c; uint32_t d; c = 1235; d = 1235;], |
| 217 | [ |
| 218 | AC_DEFINE(HAVE_UINTXX_T) |
| 219 | AC_MSG_RESULT(yes) |
| 220 | ], |
| 221 | [AC_MSG_RESULT(no)] |
| 222 | ) |
| 223 | |
Damien Miller | 34132e5 | 2000-01-14 15:45:46 +1100 | [diff] [blame] | 224 | AC_MSG_CHECKING([for socklen_t]) |
Damien Miller | 74d0d4a | 1999-12-29 02:24:35 +1100 | [diff] [blame] | 225 | AC_TRY_COMPILE( |
Damien Miller | f3e8be8 | 1999-12-31 08:59:04 +1100 | [diff] [blame] | 226 | [ |
| 227 | #include <sys/types.h> |
| 228 | #include <sys/socket.h> |
| 229 | ], |
Damien Miller | 74d0d4a | 1999-12-29 02:24:35 +1100 | [diff] [blame] | 230 | [socklen_t foo; foo = 1235;], |
| 231 | [ |
| 232 | AC_DEFINE(HAVE_SOCKLEN_T) |
| 233 | AC_MSG_RESULT(yes) |
| 234 | ], |
| 235 | [AC_MSG_RESULT(no)] |
| 236 | ) |
| 237 | |
Damien Miller | 34132e5 | 2000-01-14 15:45:46 +1100 | [diff] [blame] | 238 | AC_MSG_CHECKING([for size_t]) |
Damien Miller | 9505851 | 1999-12-29 10:36:45 +1100 | [diff] [blame] | 239 | AC_TRY_COMPILE( |
| 240 | [#include <sys/types.h>], |
Damien Miller | 9505851 | 1999-12-29 10:36:45 +1100 | [diff] [blame] | 241 | [size_t foo; foo = 1235;], |
| 242 | [ |
| 243 | AC_DEFINE(HAVE_SIZE_T) |
| 244 | AC_MSG_RESULT(yes) |
| 245 | ], |
| 246 | [AC_MSG_RESULT(no)] |
| 247 | ) |
| 248 | |
Damien Miller | 34132e5 | 2000-01-14 15:45:46 +1100 | [diff] [blame] | 249 | AC_MSG_CHECKING([for struct sockaddr_storage]) |
| 250 | AC_TRY_COMPILE( |
Damien Miller | 6640995 | 2000-01-17 21:40:06 +1100 | [diff] [blame] | 251 | [ |
| 252 | #include <sys/types.h> |
| 253 | #include <sys/socket.h> |
| 254 | ], |
Damien Miller | 34132e5 | 2000-01-14 15:45:46 +1100 | [diff] [blame] | 255 | [struct sockaddr_storage s;], |
| 256 | [ |
| 257 | AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE) |
| 258 | AC_MSG_RESULT(yes) |
| 259 | ], |
| 260 | [AC_MSG_RESULT(no)] |
| 261 | ) |
| 262 | |
| 263 | AC_MSG_CHECKING([for struct sockaddr_in6]) |
| 264 | AC_TRY_COMPILE( |
| 265 | [#include <netinet/in.h>], |
| 266 | [struct sockaddr_in6 s; s.sin6_family = 0;], |
| 267 | [ |
| 268 | AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6) |
| 269 | AC_MSG_RESULT(yes) |
| 270 | ], |
| 271 | [AC_MSG_RESULT(no)] |
| 272 | ) |
| 273 | |
| 274 | AC_MSG_CHECKING([for struct in6_addr]) |
| 275 | AC_TRY_COMPILE( |
| 276 | [#include <netinet/in.h>], |
| 277 | [struct in6_addr s; s.s6_addr[0] = 0;], |
| 278 | [ |
| 279 | AC_DEFINE(HAVE_STRUCT_IN6_ADDR) |
| 280 | AC_MSG_RESULT(yes) |
| 281 | ], |
| 282 | [AC_MSG_RESULT(no)] |
| 283 | ) |
| 284 | |
| 285 | AC_MSG_CHECKING([for struct addrinfo]) |
| 286 | AC_TRY_COMPILE( |
| 287 | [ |
Damien Miller | 6640995 | 2000-01-17 21:40:06 +1100 | [diff] [blame] | 288 | #include <sys/types.h> |
Damien Miller | 34132e5 | 2000-01-14 15:45:46 +1100 | [diff] [blame] | 289 | #include <sys/socket.h> |
| 290 | #include <netdb.h> |
| 291 | ], |
| 292 | [struct addrinfo s; s.ai_flags = AI_PASSIVE;], |
| 293 | [ |
| 294 | AC_DEFINE(HAVE_STRUCT_ADDRINFO) |
| 295 | AC_MSG_RESULT(yes) |
| 296 | ], |
| 297 | [AC_MSG_RESULT(no)] |
| 298 | ) |
| 299 | |
Damien Miller | beb4ba5 | 1999-12-28 15:09:35 +1100 | [diff] [blame] | 300 | AC_ARG_WITH(pam, |
| 301 | [ --without-pam Disable PAM support ], |
Damien Miller | 859cec0 | 1999-11-22 14:27:24 +1100 | [diff] [blame] | 302 | [ |
Damien Miller | beb4ba5 | 1999-12-28 15:09:35 +1100 | [diff] [blame] | 303 | if test "x$withval" = "xno" ; then |
| 304 | no_pam=1 |
| 305 | AC_DEFINE(DISABLE_PAM) |
| 306 | fi |
Damien Miller | 859cec0 | 1999-11-22 14:27:24 +1100 | [diff] [blame] | 307 | ] |
Damien Miller | beb4ba5 | 1999-12-28 15:09:35 +1100 | [diff] [blame] | 308 | ) |
| 309 | |
| 310 | if test -z "$no_pam" -a "x$ac_cv_header_security_pam_appl_h" = "xyes" ; then |
| 311 | AC_CHECK_LIB(dl, dlopen, , ) |
| 312 | LIBS="$LIBS -lpam" |
| 313 | dnl Check PAM strerror arguments |
| 314 | AC_MSG_CHECKING([whether pam_strerror takes only one argument]) |
| 315 | AC_TRY_COMPILE( |
| 316 | [ |
| 317 | #include <stdlib.h> |
| 318 | #include <security/pam_appl.h> |
| 319 | ], |
| 320 | [(void)pam_strerror((pam_handle_t *)NULL, -1);], |
| 321 | [AC_MSG_RESULT(no)], |
| 322 | [ |
| 323 | AC_DEFINE(HAVE_OLD_PAM) |
| 324 | AC_MSG_RESULT(yes) |
| 325 | ] |
| 326 | ) |
| 327 | fi |
Damien Miller | 859cec0 | 1999-11-22 14:27:24 +1100 | [diff] [blame] | 328 | |
Damien Miller | 98ac007 | 1999-11-25 13:19:55 +1100 | [diff] [blame] | 329 | AC_MSG_CHECKING([whether to build GNOME ssh-askpass]) |
| 330 | dnl Check whether user wants GNOME ssh-askpass |
| 331 | AC_ARG_WITH(gnome-askpass, |
| 332 | [ --with-gnome-askpass Build the GNOME passphrase requester (default=no)], |
Damien Miller | cedfecc | 1999-11-15 14:36:53 +1100 | [diff] [blame] | 333 | [ |
| 334 | if test x$withval = xno ; then |
Damien Miller | 98ac007 | 1999-11-25 13:19:55 +1100 | [diff] [blame] | 335 | GNOME_ASKPASS=""; |
Damien Miller | cedfecc | 1999-11-15 14:36:53 +1100 | [diff] [blame] | 336 | else |
Damien Miller | 98ac007 | 1999-11-25 13:19:55 +1100 | [diff] [blame] | 337 | GNOME_ASKPASS="gnome-ssh-askpass"; |
Damien Miller | cedfecc | 1999-11-15 14:36:53 +1100 | [diff] [blame] | 338 | fi |
Damien Miller | 98ac007 | 1999-11-25 13:19:55 +1100 | [diff] [blame] | 339 | ]) |
| 340 | AC_SUBST(GNOME_ASKPASS) |
| 341 | |
| 342 | if test -z "$GNOME_ASKPASS" ; then |
Damien Miller | cedfecc | 1999-11-15 14:36:53 +1100 | [diff] [blame] | 343 | AC_MSG_RESULT(no) |
Damien Miller | 98ac007 | 1999-11-25 13:19:55 +1100 | [diff] [blame] | 344 | else |
| 345 | AC_MSG_RESULT(yes) |
Damien Miller | cedfecc | 1999-11-15 14:36:53 +1100 | [diff] [blame] | 346 | fi |
Damien Miller | e0d444c | 1999-11-09 14:23:45 +1100 | [diff] [blame] | 347 | |
Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 348 | dnl Check for user-specified random device |
| 349 | AC_ARG_WITH(random, |
Damien Miller | cedfecc | 1999-11-15 14:36:53 +1100 | [diff] [blame] | 350 | [ --with-random=FILE read randomness from FILE (default=/dev/urandom)], |
Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 351 | [ |
| 352 | RANDOM_POOL="$withval"; |
Damien Miller | 0a6e668 | 1999-11-15 09:56:06 +1100 | [diff] [blame] | 353 | AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL") |
Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 354 | ], |
| 355 | [ |
| 356 | dnl Check for random device |
| 357 | AC_CHECK_FILE("/dev/urandom", |
| 358 | [ |
| 359 | RANDOM_POOL="/dev/urandom"; |
Damien Miller | a82feb3 | 1999-11-11 11:04:17 +1100 | [diff] [blame] | 360 | AC_SUBST(RANDOM_POOL) |
| 361 | AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL") |
Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 362 | ] |
| 363 | ) |
| 364 | ] |
| 365 | ) |
| 366 | |
| 367 | dnl Check for EGD pool file |
| 368 | AC_ARG_WITH(egd-pool, |
Damien Miller | cedfecc | 1999-11-15 14:36:53 +1100 | [diff] [blame] | 369 | [ --with-egd-pool=FILE read randomness from EGD pool FILE (default none)], |
Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 370 | [ |
| 371 | RANDOM_POOL="$withval"; |
| 372 | AC_DEFINE(HAVE_EGD) |
Damien Miller | a82feb3 | 1999-11-11 11:04:17 +1100 | [diff] [blame] | 373 | AC_SUBST(RANDOM_POOL) |
| 374 | AC_DEFINE_UNQUOTED(RANDOM_POOL, "$RANDOM_POOL") |
Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 375 | ] |
| 376 | ) |
| 377 | |
Damien Miller | cedfecc | 1999-11-15 14:36:53 +1100 | [diff] [blame] | 378 | dnl Make sure we have random number support |
Damien Miller | ab18c41 | 1999-11-11 10:40:23 +1100 | [diff] [blame] | 379 | if test -z "$RANDOM_POOL" -a -z "$EGD_POOL"; then |
| 380 | AC_MSG_ERROR([No random device found, and no EGD random pool specified]) |
| 381 | fi |
| 382 | |
Damien Miller | 3f90587 | 1999-11-15 17:10:57 +1100 | [diff] [blame] | 383 | AC_MSG_CHECKING([whether utmp.h has ut_host field]) |
| 384 | AC_EGREP_HEADER(ut_host, utmp.h, |
| 385 | [AC_DEFINE(HAVE_HOST_IN_UTMP) AC_MSG_RESULT(yes); ], |
| 386 | [AC_MSG_RESULT(no)] |
| 387 | ) |
Damien Miller | bf1c9b2 | 1999-12-09 10:16:54 +1100 | [diff] [blame] | 388 | AC_MSG_CHECKING([whether utmpx.h has ut_host field]) |
| 389 | AC_EGREP_HEADER(ut_host, utmpx.h, |
| 390 | [AC_DEFINE(HAVE_HOST_IN_UTMPX) AC_MSG_RESULT(yes); ], |
| 391 | [AC_MSG_RESULT(no)] |
| 392 | ) |
Damien Miller | 2e1b082 | 1999-12-25 10:11:29 +1100 | [diff] [blame] | 393 | AC_MSG_CHECKING([whether utmpx.h has syslen field]) |
| 394 | AC_EGREP_HEADER(syslen, utmpx.h, |
| 395 | [AC_DEFINE(HAVE_SYSLEN_IN_UTMPX) AC_MSG_RESULT(yes); ], |
| 396 | [AC_MSG_RESULT(no)] |
| 397 | ) |
Damien Miller | 4ff2b9b | 1999-12-28 10:41:12 +1100 | [diff] [blame] | 398 | AC_MSG_CHECKING([whether utmp.h has ut_pid field]) |
| 399 | AC_EGREP_HEADER(ut_pid, utmp.h, |
| 400 | [AC_DEFINE(HAVE_PID_IN_UTMP) AC_MSG_RESULT(yes); ], |
| 401 | [AC_MSG_RESULT(no)] |
| 402 | ) |
| 403 | AC_MSG_CHECKING([whether utmp.h has ut_type field]) |
| 404 | AC_EGREP_HEADER(ut_type, utmp.h, |
| 405 | [AC_DEFINE(HAVE_TYPE_IN_UTMP) AC_MSG_RESULT(yes); ], |
| 406 | [AC_MSG_RESULT(no)] |
| 407 | ) |
| 408 | AC_MSG_CHECKING([whether utmp.h has ut_tv field]) |
| 409 | AC_EGREP_HEADER(ut_tv, utmp.h, |
| 410 | [AC_DEFINE(HAVE_TV_IN_UTMP) AC_MSG_RESULT(yes); ], |
| 411 | [AC_MSG_RESULT(no)] |
| 412 | ) |
Damien Miller | 9550a76 | 1999-12-29 02:32:22 +1100 | [diff] [blame] | 413 | AC_MSG_CHECKING([whether utmp.h has ut_id field]) |
| 414 | AC_EGREP_HEADER(ut_id, utmp.h, |
| 415 | [AC_DEFINE(HAVE_ID_IN_UTMP) AC_MSG_RESULT(yes); ], |
| 416 | [AC_MSG_RESULT(no)] |
| 417 | ) |
Damien Miller | 3131d8b | 1999-12-31 09:42:24 +1100 | [diff] [blame] | 418 | AC_MSG_CHECKING([whether utmp.h has ut_addr field]) |
| 419 | AC_EGREP_HEADER(ut_addr, utmp.h, |
| 420 | [AC_DEFINE(HAVE_ADDR_IN_UTMP) AC_MSG_RESULT(yes); ], |
| 421 | [AC_MSG_RESULT(no)] |
| 422 | ) |
| 423 | AC_MSG_CHECKING([whether utmpx.h has ut_addr field]) |
| 424 | AC_EGREP_HEADER(ut_addr, utmpx.h, |
Damien Miller | 34132e5 | 2000-01-14 15:45:46 +1100 | [diff] [blame] | 425 | [AC_DEFINE(HAVE_ADDR_IN_UTMPX) AC_MSG_RESULT(yes); ], |
| 426 | [AC_MSG_RESULT(no)] |
| 427 | ) |
| 428 | AC_MSG_CHECKING([whether utmp.h has ut_addr_v6 field]) |
| 429 | AC_EGREP_HEADER(ut_addr_v6, utmp.h, |
| 430 | [AC_DEFINE(HAVE_ADDR_V6_IN_UTMP) AC_MSG_RESULT(yes); ], |
| 431 | [AC_MSG_RESULT(no)] |
| 432 | ) |
| 433 | AC_MSG_CHECKING([whether utmpx.h has ut_addr_v6 field]) |
| 434 | AC_EGREP_HEADER(ut_addr_v6, utmpx.h, |
| 435 | [AC_DEFINE(HAVE_ADDR_V6_IN_UTMPX) AC_MSG_RESULT(yes); ], |
| 436 | [AC_MSG_RESULT(no)] |
| 437 | ) |
| 438 | |
| 439 | AC_MSG_CHECKING([whether struct sockaddr_storage has ss_family field]) |
| 440 | AC_TRY_COMPILE( |
Damien Miller | 6640995 | 2000-01-17 21:40:06 +1100 | [diff] [blame] | 441 | [ |
| 442 | #include <sys/types.h> |
| 443 | #include <sys/socket.h> |
| 444 | ], |
Damien Miller | 34132e5 | 2000-01-14 15:45:46 +1100 | [diff] [blame] | 445 | [struct sockaddr_storage s; s.ss_family = 1;], |
| 446 | [ |
| 447 | AC_DEFINE(HAVE_SS_FAMILY_IN_SS) |
| 448 | AC_MSG_RESULT(yes) |
| 449 | ], |
| 450 | [AC_MSG_RESULT(no)] |
| 451 | ) |
| 452 | AC_MSG_CHECKING([whether struct sockaddr_storage has __ss_family field]) |
| 453 | AC_TRY_COMPILE( |
Damien Miller | 6640995 | 2000-01-17 21:40:06 +1100 | [diff] [blame] | 454 | [ |
| 455 | #include <sys/types.h> |
| 456 | #include <sys/socket.h> |
| 457 | ], |
Damien Miller | 34132e5 | 2000-01-14 15:45:46 +1100 | [diff] [blame] | 458 | [struct sockaddr_storage s; s.__ss_family = 1;], |
| 459 | [ |
| 460 | AC_DEFINE(HAVE___SS_FAMILY_IN_SS) |
| 461 | AC_MSG_RESULT(yes) |
| 462 | ], |
Damien Miller | 3131d8b | 1999-12-31 09:42:24 +1100 | [diff] [blame] | 463 | [AC_MSG_RESULT(no)] |
| 464 | ) |
Damien Miller | bf1c9b2 | 1999-12-09 10:16:54 +1100 | [diff] [blame] | 465 | |
Damien Miller | 3f90587 | 1999-11-15 17:10:57 +1100 | [diff] [blame] | 466 | dnl Look for lastlog location |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 467 | AC_ARG_WITH(lastlog, |
Damien Miller | 5a3e683 | 1999-12-27 09:48:56 +1100 | [diff] [blame] | 468 | [ --with-lastlog=FILE Location of lastlog file], |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 469 | [ |
| 470 | if test "x$withval" = "xno" ; then |
| 471 | AC_DEFINE(DISABLE_LASTLOG) |
| 472 | else |
| 473 | AC_DEFINE_UNQUOTED(LASTLOG_LOCATION, "$withval") |
| 474 | fi |
| 475 | ], |
| 476 | [ |
| 477 | AC_MSG_CHECKING([location of lastlog file]) |
| 478 | for lastlog in /var/log/lastlog /var/adm/lastlog /etc/security/lastlog ; do |
| 479 | if test -f $lastlog ; then |
| 480 | gotlastlog="file" |
| 481 | break |
| 482 | fi |
| 483 | if test -d $lastlog ; then |
| 484 | gotlastlog="dir" |
| 485 | break |
| 486 | fi |
| 487 | done |
| 488 | if test -z "$gotlastlog" ; then |
Damien Miller | beb4ba5 | 1999-12-28 15:09:35 +1100 | [diff] [blame] | 489 | AC_MSG_RESULT(not found) |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 490 | nolastlog=1 |
| 491 | else |
| 492 | if test "x$gotlastlog" = "xdir" ; then |
Damien Miller | beb4ba5 | 1999-12-28 15:09:35 +1100 | [diff] [blame] | 493 | AC_MSG_RESULT(${lastlog}/) |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 494 | AC_DEFINE(LASTLOG_IS_DIR) |
Damien Miller | beb4ba5 | 1999-12-28 15:09:35 +1100 | [diff] [blame] | 495 | else |
| 496 | AC_MSG_RESULT($lastlog) |
| 497 | AC_DEFINE_UNQUOTED(LASTLOG_LOCATION, "$lastlog") |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 498 | fi |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 499 | fi |
| 500 | ] |
| 501 | ) |
| 502 | |
| 503 | if test ! -z "$nolastlog" ; then |
| 504 | AC_MSG_WARN([*** Disabling lastlog support *** ]) |
| 505 | AC_DEFINE(DISABLE_LASTLOG) |
| 506 | fi |
Damien Miller | 3f90587 | 1999-11-15 17:10:57 +1100 | [diff] [blame] | 507 | |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 508 | dnl Compile with dante SOCKS library |
| 509 | AC_ARG_WITH(dante, |
| 510 | [ --with-dante=DIR Use Dante SOCKS lib (default is system library path)], |
| 511 | [ |
| 512 | AC_DEFINE(HAVE_DANTE) |
| 513 | if test "x$withval" != "xno" ; then |
| 514 | if test -n $withval ; then |
| 515 | LIBS="$LIBS -L$withval" |
| 516 | fi |
| 517 | LIBS="$LIBS -lsocks" |
| 518 | fi |
| 519 | ] |
| 520 | ) |
| 521 | |
Damien Miller | 62a52ef | 2000-01-16 23:03:56 +1100 | [diff] [blame] | 522 | if test -z "$no_dev_ptmx" ; then |
Damien Miller | b29ea91 | 2000-01-15 14:12:03 +1100 | [diff] [blame] | 523 | AC_CHECK_FILE("/dev/ptmx", AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)) |
| 524 | fi |
Damien Miller | 037a0dc | 1999-12-07 15:38:31 +1100 | [diff] [blame] | 525 | AC_CHECK_FILE("/dev/ptc", AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)) |
| 526 | |
Damien Miller | 3f90587 | 1999-11-15 17:10:57 +1100 | [diff] [blame] | 527 | AC_MSG_CHECKING([whether libc defines __progname]) |
| 528 | AC_TRY_LINK([], |
Damien Miller | 04f8014 | 1999-11-19 15:32:34 +1100 | [diff] [blame] | 529 | [extern char *__progname; printf("%s", __progname);], |
Damien Miller | 3f90587 | 1999-11-15 17:10:57 +1100 | [diff] [blame] | 530 | [ |
| 531 | AC_DEFINE(HAVE___PROGNAME) |
| 532 | AC_MSG_RESULT(yes) |
| 533 | ], |
| 534 | [ |
| 535 | AC_MSG_RESULT(no) |
| 536 | ] |
| 537 | ) |
| 538 | |
Damien Miller | 8029775 | 1999-11-19 13:03:25 +1100 | [diff] [blame] | 539 | dnl Check whether user wants Kerberos support |
| 540 | AC_ARG_WITH(kerberos4, |
Damien Miller | 105b7f0 | 2000-01-07 08:45:55 +1100 | [diff] [blame] | 541 | [ --with-kerberos4=PATH Enable Kerberos 4 support], |
Damien Miller | 8029775 | 1999-11-19 13:03:25 +1100 | [diff] [blame] | 542 | [ |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 543 | if test "x$withval" != "$xno" ; then |
Damien Miller | 105b7f0 | 2000-01-07 08:45:55 +1100 | [diff] [blame] | 544 | |
| 545 | if test "x$withval" != "$xyes" ; then |
| 546 | CFLAGS="$CFLAGS -I${withval}/include" |
| 547 | LDFLAGS="$LDFLAGS -L${withval}/lib" |
| 548 | else |
| 549 | if test -d /usr/include/kerberosIV ; then |
| 550 | CFLAGS="$CFLAGS -I/usr/include/kerberosIV" |
| 551 | fi |
| 552 | fi |
| 553 | |
| 554 | AC_CHECK_HEADERS(krb.h) |
| 555 | AC_CHECK_LIB(krb, main) |
| 556 | if test "$ac_cv_header_krb_h" != yes; then |
| 557 | AC_MSG_WARN([Cannot find krb.h, build may fail]) |
| 558 | fi |
| 559 | if test "$ac_cv_lib_krb_main" != yes; then |
| 560 | AC_MSG_WARN([Cannot find libkrb, build may fail]) |
| 561 | fi |
| 562 | |
| 563 | LIBS="$LIBS -lkrb -ldes" |
| 564 | AC_CHECK_LIB(resolv, dn_expand, , ) |
| 565 | KRB4=yes |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 566 | AC_DEFINE(KRB4) |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 567 | fi |
Damien Miller | 8029775 | 1999-11-19 13:03:25 +1100 | [diff] [blame] | 568 | ] |
| 569 | ) |
| 570 | |
| 571 | dnl Check whether user wants AFS support |
Damien Miller | c6398ef | 1999-11-20 12:18:40 +1100 | [diff] [blame] | 572 | AC_ARG_WITH(afs, |
Damien Miller | 105b7f0 | 2000-01-07 08:45:55 +1100 | [diff] [blame] | 573 | [ --with-afs=PATH Enable AFS support], |
Damien Miller | 8029775 | 1999-11-19 13:03:25 +1100 | [diff] [blame] | 574 | [ |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 575 | if test "x$withval" != "$xno" ; then |
Damien Miller | 105b7f0 | 2000-01-07 08:45:55 +1100 | [diff] [blame] | 576 | |
| 577 | if test "x$withval" != "$xyes" ; then |
| 578 | CFLAGS="$CFLAGS -I${withval}/include" |
| 579 | LFLAGS="$LFLAGS -L${withval}/lib" |
| 580 | fi |
| 581 | |
| 582 | if test -z "$KRB4" ; then |
| 583 | AC_MSG_WARN([AFS requires Kerberos IV support, build may fail]) |
| 584 | fi |
| 585 | |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 586 | LIBS="$LIBS -lkafs" |
Damien Miller | 105b7f0 | 2000-01-07 08:45:55 +1100 | [diff] [blame] | 587 | if test ! -z "$AFS_LIBS" ; then |
| 588 | LIBS="$LIBS $AFS_LIBS" |
| 589 | fi |
| 590 | AC_DEFINE(AFS) |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 591 | fi |
Damien Miller | 8029775 | 1999-11-19 13:03:25 +1100 | [diff] [blame] | 592 | ] |
| 593 | ) |
| 594 | |
| 595 | dnl Check whether user wants S/Key support |
| 596 | AC_ARG_WITH(skey, |
| 597 | [ --with-skey Enable S/Key support], |
| 598 | [ |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 599 | if test "x$withval" != "$xno" ; then |
| 600 | AC_DEFINE(SKEY) |
| 601 | LIBS="$LIBS -lskey" |
| 602 | fi |
Damien Miller | 8029775 | 1999-11-19 13:03:25 +1100 | [diff] [blame] | 603 | ] |
| 604 | ) |
| 605 | |
| 606 | dnl Check whether user wants TCP wrappers support |
Damien Miller | f7c0f82 | 1999-11-22 22:31:49 +1100 | [diff] [blame] | 607 | AC_ARG_WITH(tcp-wrappers, |
Damien Miller | 8029775 | 1999-11-19 13:03:25 +1100 | [diff] [blame] | 608 | [ --with-tcp-wrappers Enable tcpwrappers support], |
| 609 | [ |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 610 | if test "x$withval" != "$xno" ; then |
| 611 | AC_DEFINE(LIBWRAP) |
Damien Miller | 105b7f0 | 2000-01-07 08:45:55 +1100 | [diff] [blame] | 612 | LIBS="$LIBS -lwrap" |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 613 | fi |
Damien Miller | 8029775 | 1999-11-19 13:03:25 +1100 | [diff] [blame] | 614 | ] |
| 615 | ) |
| 616 | |
Damien Miller | dd1c7ba | 1999-11-19 15:53:20 +1100 | [diff] [blame] | 617 | dnl Check whether to enable MD5 passwords |
Damien Miller | f7c0f82 | 1999-11-22 22:31:49 +1100 | [diff] [blame] | 618 | AC_ARG_WITH(md5-passwords, |
Damien Miller | dd1c7ba | 1999-11-19 15:53:20 +1100 | [diff] [blame] | 619 | [ --with-md5-passwords Enable use of MD5 passwords], |
Damien Miller | 8bdeee2 | 1999-12-30 15:50:54 +1100 | [diff] [blame] | 620 | [ |
| 621 | if test "x$withval" != "$xno" ; then |
| 622 | AC_DEFINE(HAVE_MD5_PASSWORDS) |
| 623 | fi |
| 624 | ] |
Damien Miller | dd1c7ba | 1999-11-19 15:53:20 +1100 | [diff] [blame] | 625 | ) |
| 626 | |
Damien Miller | 368cf64 | 1999-12-21 09:51:36 +1100 | [diff] [blame] | 627 | dnl Check whether to enable utmpx support |
| 628 | AC_ARG_WITH(utmpx, |
| 629 | [ --with-utmpx Enable utmpx support], |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 630 | [ |
| 631 | if test "x$withval" != "xno" ; then |
| 632 | AC_DEFINE(USE_UTMPX) |
| 633 | fi |
| 634 | ] |
Damien Miller | 368cf64 | 1999-12-21 09:51:36 +1100 | [diff] [blame] | 635 | ) |
| 636 | |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 637 | dnl Whether to disable shadow password support |
| 638 | AC_ARG_WITH(shadow, |
| 639 | [ --without-shadow Disable shadow password support], |
| 640 | [ |
| 641 | if test "x$withval" = "xno" ; then |
| 642 | AC_DEFINE(DISABLE_SHADOW) |
| 643 | fi |
| 644 | ] |
| 645 | ) |
| 646 | |
| 647 | dnl Use ip address instead of hostname in $DISPLAY |
| 648 | AC_ARG_WITH(ipaddr-display, |
| 649 | [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY], |
| 650 | [ |
Damien Miller | 6640995 | 2000-01-17 21:40:06 +1100 | [diff] [blame] | 651 | if test "x$withval" = "xno" ; then |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 652 | AC_DEFINE(IPADDR_IN_DISPLAY) |
| 653 | fi |
| 654 | ] |
| 655 | ) |
| 656 | |
Damien Miller | e7f626c | 1999-12-31 09:49:44 +1100 | [diff] [blame] | 657 | AC_ARG_WITH(default-path, |
Damien Miller | 5a3e683 | 1999-12-27 09:48:56 +1100 | [diff] [blame] | 658 | [ --with-default-path=PATH Specify default \$PATH environment for server], |
| 659 | [ |
| 660 | if test "x$withval" != "xno" ; then |
Damien Miller | 9550a76 | 1999-12-29 02:32:22 +1100 | [diff] [blame] | 661 | AC_DEFINE_UNQUOTED(USER_PATH, "$withval") |
Damien Miller | 5a3e683 | 1999-12-27 09:48:56 +1100 | [diff] [blame] | 662 | fi |
| 663 | ] |
| 664 | ) |
| 665 | |
Damien Miller | 7d80e34 | 2000-01-19 14:36:49 +1100 | [diff] [blame] | 666 | AC_ARG_WITH(ipv4-default, |
| 667 | [ --with-ipv4-default Use IPv4 by connections unless '-6' specified], |
| 668 | [ |
| 669 | if test "x$withval" != "xno" ; then |
| 670 | AC_DEFINE(IPV4_DEFAULT) |
| 671 | fi |
| 672 | ] |
| 673 | ) |
| 674 | |
Damien Miller | b13c73e | 2000-01-17 22:02:17 +1100 | [diff] [blame] | 675 | piddir=/var/run |
Damien Miller | 5eed6a2 | 2000-01-16 12:05:18 +1100 | [diff] [blame] | 676 | AC_ARG_WITH(pid-dir, |
| 677 | [ --with-pid-dir=PATH Specify location of ssh.pid file], |
| 678 | [ |
| 679 | if test "x$withval" != "xno" ; then |
Damien Miller | b13c73e | 2000-01-17 22:02:17 +1100 | [diff] [blame] | 680 | piddir=$withval |
Damien Miller | 5eed6a2 | 2000-01-16 12:05:18 +1100 | [diff] [blame] | 681 | fi |
| 682 | ] |
| 683 | ) |
Damien Miller | dbd250f | 2000-01-18 08:57:14 +1100 | [diff] [blame] | 684 | AC_DEFINE_UNQUOTED(PIDDIR, "$piddir") |
Damien Miller | b13c73e | 2000-01-17 22:02:17 +1100 | [diff] [blame] | 685 | AC_SUBST(piddir) |
Damien Miller | 5eed6a2 | 2000-01-16 12:05:18 +1100 | [diff] [blame] | 686 | |
Damien Miller | 76112de | 1999-12-21 11:18:08 +1100 | [diff] [blame] | 687 | dnl Check for mail directory (last resort if we cannot get it from headers) |
| 688 | if test ! -z "$MAIL" ; then |
| 689 | maildir=`dirname $MAIL` |
| 690 | AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir") |
| 691 | fi |
Damien Miller | c6b3bbe | 1999-12-13 08:27:33 +1100 | [diff] [blame] | 692 | |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 693 | AC_OUTPUT(Makefile) |