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