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