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