summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac108
1 files changed, 87 insertions, 21 deletions
diff --git a/configure.ac b/configure.ac
index b33914dae..ea9f1bb56 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.415 2009/02/16 04:37:03 djm Exp $ 1# $Id: configure.ac,v 1.427 2009/09/11 04:56:08 dtucker Exp $
2# 2#
3# Copyright (c) 1999-2004 Damien Miller 3# Copyright (c) 1999-2004 Damien Miller
4# 4#
@@ -15,7 +15,7 @@
15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 16
17AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org) 17AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org)
18AC_REVISION($Revision: 1.415 $) 18AC_REVISION($Revision: 1.427 $)
19AC_CONFIG_SRCDIR([ssh.c]) 19AC_CONFIG_SRCDIR([ssh.c])
20 20
21AC_CONFIG_HEADER(config.h) 21AC_CONFIG_HEADER(config.h)
@@ -279,7 +279,6 @@ AC_CHECK_HEADERS( \
279 sys/cdefs.h \ 279 sys/cdefs.h \
280 sys/dir.h \ 280 sys/dir.h \
281 sys/mman.h \ 281 sys/mman.h \
282 sys/mount.h \
283 sys/ndir.h \ 282 sys/ndir.h \
284 sys/poll.h \ 283 sys/poll.h \
285 sys/prctl.h \ 284 sys/prctl.h \
@@ -326,6 +325,11 @@ AC_CHECK_HEADERS(login_cap.h, [], [], [
326#include <sys/types.h> 325#include <sys/types.h>
327]) 326])
328 327
328# older BSDs need sys/param.h before sys/mount.h
329AC_CHECK_HEADERS(sys/mount.h, [], [], [
330#include <sys/param.h>
331])
332
329# Messages for features tested for in target-specific section 333# Messages for features tested for in target-specific section
330SIA_MSG="no" 334SIA_MSG="no"
331SPC_MSG="no" 335SPC_MSG="no"
@@ -434,8 +438,6 @@ int main(void) { exit(0); }
434 AC_DEFINE(USE_PIPES, 1, [Use PIPES instead of a socketpair()]) 438 AC_DEFINE(USE_PIPES, 1, [Use PIPES instead of a socketpair()])
435 AC_DEFINE(DISABLE_SHADOW, 1, 439 AC_DEFINE(DISABLE_SHADOW, 1,
436 [Define if you want to disable shadow passwords]) 440 [Define if you want to disable shadow passwords])
437 AC_DEFINE(IP_TOS_IS_BROKEN, 1,
438 [Define if your system choked on IP TOS setting])
439 AC_DEFINE(NO_X11_UNIX_SOCKETS, 1, 441 AC_DEFINE(NO_X11_UNIX_SOCKETS, 1,
440 [Define if X11 doesn't support AF_UNIX sockets on that system]) 442 [Define if X11 doesn't support AF_UNIX sockets on that system])
441 AC_DEFINE(NO_IPPORT_RESERVED_CONCEPT, 1, 443 AC_DEFINE(NO_IPPORT_RESERVED_CONCEPT, 1,
@@ -444,9 +446,11 @@ int main(void) { exit(0); }
444 AC_DEFINE(DISABLE_FD_PASSING, 1, 446 AC_DEFINE(DISABLE_FD_PASSING, 1,
445 [Define if your platform needs to skip post auth 447 [Define if your platform needs to skip post auth
446 file descriptor passing]) 448 file descriptor passing])
449 AC_DEFINE(SSH_IOBUFSZ, 65536, [Windows is sensitive to read buffer size])
447 ;; 450 ;;
448*-*-dgux*) 451*-*-dgux*)
449 AC_DEFINE(IP_TOS_IS_BROKEN) 452 AC_DEFINE(IP_TOS_IS_BROKEN, 1,
453 [Define if your system choked on IP TOS setting])
450 AC_DEFINE(SETEUID_BREAKS_SETUID) 454 AC_DEFINE(SETEUID_BREAKS_SETUID)
451 AC_DEFINE(BROKEN_SETREUID) 455 AC_DEFINE(BROKEN_SETREUID)
452 AC_DEFINE(BROKEN_SETREGID) 456 AC_DEFINE(BROKEN_SETREGID)
@@ -668,6 +672,7 @@ mips-sony-bsd|mips-sony-newsos4)
668 after setsid()]) 672 after setsid()])
669 AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd 673 AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd
670 in case the name is longer than 8 chars]) 674 in case the name is longer than 8 chars])
675 AC_DEFINE(BROKEN_TCGETATTR_ICANON, 1, [tcgetattr with ICANON may hang])
671 external_path_file=/etc/default/login 676 external_path_file=/etc/default/login
672 # hardwire lastlog location (can't detect it on some versions) 677 # hardwire lastlog location (can't detect it on some versions)
673 conf_lastlog_location="/var/adm/lastlog" 678 conf_lastlog_location="/var/adm/lastlog"
@@ -979,6 +984,7 @@ AC_ARG_WITH(zlib,
979 fi ] 984 fi ]
980) 985)
981 986
987AC_CHECK_HEADER([zlib.h], ,AC_MSG_ERROR([*** zlib.h missing - please install first or check config.log ***]))
982AC_CHECK_LIB(z, deflate, , 988AC_CHECK_LIB(z, deflate, ,
983 [ 989 [
984 saved_CPPFLAGS="$CPPFLAGS" 990 saved_CPPFLAGS="$CPPFLAGS"
@@ -999,7 +1005,6 @@ AC_CHECK_LIB(z, deflate, ,
999 ) 1005 )
1000 ] 1006 ]
1001) 1007)
1002AC_CHECK_HEADER([zlib.h], ,AC_MSG_ERROR([*** zlib.h missing - please install first or check config.log ***]))
1003 1008
1004AC_ARG_WITH(zlib-version-check, 1009AC_ARG_WITH(zlib-version-check,
1005 [ --without-zlib-version-check Disable zlib version check], 1010 [ --without-zlib-version-check Disable zlib version check],
@@ -1892,6 +1897,8 @@ AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL, 1,
1892 LDFLAGS="-L/usr/local/ssl/lib ${saved_LDFLAGS}" 1897 LDFLAGS="-L/usr/local/ssl/lib ${saved_LDFLAGS}"
1893 fi 1898 fi
1894 CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}" 1899 CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}"
1900 AC_CHECK_HEADER([openssl/opensslv.h], ,
1901 AC_MSG_ERROR([*** OpenSSL headers missing - please install first or check config.log ***]))
1895 AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL), 1902 AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL),
1896 [ 1903 [
1897 AC_MSG_ERROR([*** Can't find recent OpenSSL libcrypto (see config.log for details) ***]) 1904 AC_MSG_ERROR([*** Can't find recent OpenSSL libcrypto (see config.log for details) ***])
@@ -2076,6 +2083,23 @@ int main(void) { exit(EVP_aes_192_cbc() == NULL || EVP_aes_256_cbc() == NULL);}
2076 ] 2083 ]
2077) 2084)
2078 2085
2086AC_MSG_CHECKING([if EVP_DigestUpdate returns an int])
2087AC_LINK_IFELSE(
2088 [AC_LANG_SOURCE([[
2089#include <string.h>
2090#include <openssl/evp.h>
2091int main(void) { if(EVP_DigestUpdate(NULL, NULL,0)) exit(0); }
2092 ]])],
2093 [
2094 AC_MSG_RESULT(yes)
2095 ],
2096 [
2097 AC_MSG_RESULT(no)
2098 AC_DEFINE(OPENSSL_EVP_DIGESTUPDATE_VOID, 1,
2099 [Define if EVP_DigestUpdate returns void])
2100 ]
2101)
2102
2079# Some systems want crypt() from libcrypt, *not* the version in OpenSSL, 2103# Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
2080# because the system crypt() is more featureful. 2104# because the system crypt() is more featureful.
2081if test "x$check_for_libcrypt_before" = "x1"; then 2105if test "x$check_for_libcrypt_before" = "x1"; then
@@ -2694,7 +2718,7 @@ AC_CHECK_TYPES([fsblkcnt_t, fsfilcnt_t],,,[
2694#endif 2718#endif
2695]) 2719])
2696 2720
2697AC_CHECK_TYPES(in_addr_t,,, 2721AC_CHECK_TYPES([in_addr_t, in_port_t],,,
2698[#include <sys/types.h> 2722[#include <sys/types.h>
2699#include <netinet/in.h>]) 2723#include <netinet/in.h>])
2700 2724
@@ -3064,15 +3088,41 @@ if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
3064 file descriptor passing]) 3088 file descriptor passing])
3065fi 3089fi
3066 3090
3067AC_MSG_CHECKING(if f_fsid has val members) 3091AC_MSG_CHECKING(if struct statvfs.f_fsid is integral type)
3068AC_TRY_COMPILE([ 3092AC_TRY_COMPILE([
3069#include <sys/types.h> 3093#include <sys/types.h>
3094#include <sys/stat.h>
3095#ifdef HAVE_SYS_TIME_H
3096# include <sys/time.h>
3097#endif
3098#ifdef HAVE_SYS_MOUNT_H
3099#include <sys/mount.h>
3100#endif
3101#ifdef HAVE_SYS_STATVFS_H
3102#include <sys/statvfs.h>
3103#endif
3104], [struct statvfs s; s.f_fsid = 0;],
3105[ AC_MSG_RESULT(yes) ],
3106[ AC_MSG_RESULT(no)
3107
3108 AC_MSG_CHECKING(if fsid_t has member val)
3109 AC_TRY_COMPILE([
3110#include <sys/types.h>
3070#include <sys/statvfs.h>], 3111#include <sys/statvfs.h>],
3071[struct fsid_t t; t.val[0] = 0;], 3112 [fsid_t t; t.val[0] = 0;],
3072 [ AC_MSG_RESULT(yes) 3113 [ AC_MSG_RESULT(yes)
3073 AC_DEFINE(FSID_HAS_VAL, 1, f_fsid has members) ], 3114 AC_DEFINE(FSID_HAS_VAL, 1, fsid_t has member val) ],
3074 [ AC_MSG_RESULT(no) ] 3115 [ AC_MSG_RESULT(no) ])
3075) 3116
3117 AC_MSG_CHECKING(if f_fsid has member __val)
3118 AC_TRY_COMPILE([
3119#include <sys/types.h>
3120#include <sys/statvfs.h>],
3121 [fsid_t t; t.__val[0] = 0;],
3122 [ AC_MSG_RESULT(yes)
3123 AC_DEFINE(FSID_HAS___VAL, 1, fsid_t has member __val) ],
3124 [ AC_MSG_RESULT(no) ])
3125])
3076 3126
3077AC_CACHE_CHECK([for msg_control field in struct msghdr], 3127AC_CACHE_CHECK([for msg_control field in struct msghdr],
3078 ac_cv_have_control_in_msghdr, [ 3128 ac_cv_have_control_in_msghdr, [
@@ -3274,12 +3324,30 @@ AC_SEARCH_LIBS(getrrsetbyname, resolv,
3274 AC_SEARCH_LIBS(res_query, resolv) 3324 AC_SEARCH_LIBS(res_query, resolv)
3275 AC_SEARCH_LIBS(dn_expand, resolv) 3325 AC_SEARCH_LIBS(dn_expand, resolv)
3276 AC_MSG_CHECKING(if res_query will link) 3326 AC_MSG_CHECKING(if res_query will link)
3277 AC_TRY_LINK_FUNC(res_query, AC_MSG_RESULT(yes), 3327 AC_LINK_IFELSE([
3328#include "confdefs.h"
3329#include <sys/types.h>
3330#include <netinet/in.h>
3331#include <arpa/nameser.h>
3332#include <netdb.h>
3333#include <resolv.h>
3334int main()
3335{
3336 res_query (0, 0, 0, 0, 0);
3337 return 0;
3338}
3339 ],
3340 AC_MSG_RESULT(yes),
3278 [AC_MSG_RESULT(no) 3341 [AC_MSG_RESULT(no)
3279 saved_LIBS="$LIBS" 3342 saved_LIBS="$LIBS"
3280 LIBS="$LIBS -lresolv" 3343 LIBS="$LIBS -lresolv"
3281 AC_MSG_CHECKING(for res_query in -lresolv) 3344 AC_MSG_CHECKING(for res_query in -lresolv)
3282 AC_LINK_IFELSE([ 3345 AC_LINK_IFELSE([
3346#include "confdefs.h"
3347#include <sys/types.h>
3348#include <netinet/in.h>
3349#include <arpa/nameser.h>
3350#include <netdb.h>
3283#include <resolv.h> 3351#include <resolv.h>
3284int main() 3352int main()
3285{ 3353{
@@ -3287,8 +3355,7 @@ int main()
3287 return 0; 3355 return 0;
3288} 3356}
3289 ], 3357 ],
3290 [LIBS="$LIBS -lresolv" 3358 [AC_MSG_RESULT(yes)],
3291 AC_MSG_RESULT(yes)],
3292 [LIBS="$saved_LIBS" 3359 [LIBS="$saved_LIBS"
3293 AC_MSG_RESULT(no)]) 3360 AC_MSG_RESULT(no)])
3294 ]) 3361 ])
@@ -3354,10 +3421,10 @@ AC_ARG_WITH(kerberos5,
3354 AC_DEFINE(KRB5, 1, [Define if you want Kerberos 5 support]) 3421 AC_DEFINE(KRB5, 1, [Define if you want Kerberos 5 support])
3355 KRB5_MSG="yes" 3422 KRB5_MSG="yes"
3356 3423
3357 AC_MSG_CHECKING(for krb5-config) 3424 AC_PATH_PROG([KRB5CONF],[krb5-config],
3358 if test -x $KRB5ROOT/bin/krb5-config ; then 3425 [$KRB5ROOT/bin/krb5-config],
3359 KRB5CONF=$KRB5ROOT/bin/krb5-config 3426 [$KRB5ROOT/bin:$PATH])
3360 AC_MSG_RESULT($KRB5CONF) 3427 if test -x $KRB5CONF ; then
3361 3428
3362 AC_MSG_CHECKING(for gssapi support) 3429 AC_MSG_CHECKING(for gssapi support)
3363 if $KRB5CONF | grep gssapi >/dev/null ; then 3430 if $KRB5CONF | grep gssapi >/dev/null ; then
@@ -3383,7 +3450,6 @@ AC_ARG_WITH(kerberos5,
3383 AC_MSG_RESULT(no) 3450 AC_MSG_RESULT(no)
3384 ) 3451 )
3385 else 3452 else
3386 AC_MSG_RESULT(no)
3387 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include" 3453 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
3388 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib" 3454 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
3389 AC_MSG_CHECKING(whether we are using Heimdal) 3455 AC_MSG_CHECKING(whether we are using Heimdal)