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 396fc974a..a3ff2b545 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)
@@ -693,6 +697,7 @@ mips-sony-bsd|mips-sony-newsos4)
693 after setsid()]) 697 after setsid()])
694 AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd 698 AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd
695 in case the name is longer than 8 chars]) 699 in case the name is longer than 8 chars])
700 AC_DEFINE(BROKEN_TCGETATTR_ICANON, 1, [tcgetattr with ICANON may hang])
696 external_path_file=/etc/default/login 701 external_path_file=/etc/default/login
697 # hardwire lastlog location (can't detect it on some versions) 702 # hardwire lastlog location (can't detect it on some versions)
698 conf_lastlog_location="/var/adm/lastlog" 703 conf_lastlog_location="/var/adm/lastlog"
@@ -1004,6 +1009,7 @@ AC_ARG_WITH(zlib,
1004 fi ] 1009 fi ]
1005) 1010)
1006 1011
1012AC_CHECK_HEADER([zlib.h], ,AC_MSG_ERROR([*** zlib.h missing - please install first or check config.log ***]))
1007AC_CHECK_LIB(z, deflate, , 1013AC_CHECK_LIB(z, deflate, ,
1008 [ 1014 [
1009 saved_CPPFLAGS="$CPPFLAGS" 1015 saved_CPPFLAGS="$CPPFLAGS"
@@ -1024,7 +1030,6 @@ AC_CHECK_LIB(z, deflate, ,
1024 ) 1030 )
1025 ] 1031 ]
1026) 1032)
1027AC_CHECK_HEADER([zlib.h], ,AC_MSG_ERROR([*** zlib.h missing - please install first or check config.log ***]))
1028 1033
1029AC_ARG_WITH(zlib-version-check, 1034AC_ARG_WITH(zlib-version-check,
1030 [ --without-zlib-version-check Disable zlib version check], 1035 [ --without-zlib-version-check Disable zlib version check],
@@ -1917,6 +1922,8 @@ AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL, 1,
1917 LDFLAGS="-L/usr/local/ssl/lib ${saved_LDFLAGS}" 1922 LDFLAGS="-L/usr/local/ssl/lib ${saved_LDFLAGS}"
1918 fi 1923 fi
1919 CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}" 1924 CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}"
1925 AC_CHECK_HEADER([openssl/opensslv.h], ,
1926 AC_MSG_ERROR([*** OpenSSL headers missing - please install first or check config.log ***]))
1920 AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL), 1927 AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL),
1921 [ 1928 [
1922 AC_MSG_ERROR([*** Can't find recent OpenSSL libcrypto (see config.log for details) ***]) 1929 AC_MSG_ERROR([*** Can't find recent OpenSSL libcrypto (see config.log for details) ***])
@@ -2101,6 +2108,23 @@ int main(void) { exit(EVP_aes_192_cbc() == NULL || EVP_aes_256_cbc() == NULL);}
2101 ] 2108 ]
2102) 2109)
2103 2110
2111AC_MSG_CHECKING([if EVP_DigestUpdate returns an int])
2112AC_LINK_IFELSE(
2113 [AC_LANG_SOURCE([[
2114#include <string.h>
2115#include <openssl/evp.h>
2116int main(void) { if(EVP_DigestUpdate(NULL, NULL,0)) exit(0); }
2117 ]])],
2118 [
2119 AC_MSG_RESULT(yes)
2120 ],
2121 [
2122 AC_MSG_RESULT(no)
2123 AC_DEFINE(OPENSSL_EVP_DIGESTUPDATE_VOID, 1,
2124 [Define if EVP_DigestUpdate returns void])
2125 ]
2126)
2127
2104# Some systems want crypt() from libcrypt, *not* the version in OpenSSL, 2128# Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
2105# because the system crypt() is more featureful. 2129# because the system crypt() is more featureful.
2106if test "x$check_for_libcrypt_before" = "x1"; then 2130if test "x$check_for_libcrypt_before" = "x1"; then
@@ -2719,7 +2743,7 @@ AC_CHECK_TYPES([fsblkcnt_t, fsfilcnt_t],,,[
2719#endif 2743#endif
2720]) 2744])
2721 2745
2722AC_CHECK_TYPES(in_addr_t,,, 2746AC_CHECK_TYPES([in_addr_t, in_port_t],,,
2723[#include <sys/types.h> 2747[#include <sys/types.h>
2724#include <netinet/in.h>]) 2748#include <netinet/in.h>])
2725 2749
@@ -3089,15 +3113,41 @@ if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
3089 file descriptor passing]) 3113 file descriptor passing])
3090fi 3114fi
3091 3115
3092AC_MSG_CHECKING(if f_fsid has val members) 3116AC_MSG_CHECKING(if struct statvfs.f_fsid is integral type)
3093AC_TRY_COMPILE([ 3117AC_TRY_COMPILE([
3094#include <sys/types.h> 3118#include <sys/types.h>
3119#include <sys/stat.h>
3120#ifdef HAVE_SYS_TIME_H
3121# include <sys/time.h>
3122#endif
3123#ifdef HAVE_SYS_MOUNT_H
3124#include <sys/mount.h>
3125#endif
3126#ifdef HAVE_SYS_STATVFS_H
3127#include <sys/statvfs.h>
3128#endif
3129], [struct statvfs s; s.f_fsid = 0;],
3130[ AC_MSG_RESULT(yes) ],
3131[ AC_MSG_RESULT(no)
3132
3133 AC_MSG_CHECKING(if fsid_t has member val)
3134 AC_TRY_COMPILE([
3135#include <sys/types.h>
3095#include <sys/statvfs.h>], 3136#include <sys/statvfs.h>],
3096[struct fsid_t t; t.val[0] = 0;], 3137 [fsid_t t; t.val[0] = 0;],
3097 [ AC_MSG_RESULT(yes) 3138 [ AC_MSG_RESULT(yes)
3098 AC_DEFINE(FSID_HAS_VAL, 1, f_fsid has members) ], 3139 AC_DEFINE(FSID_HAS_VAL, 1, fsid_t has member val) ],
3099 [ AC_MSG_RESULT(no) ] 3140 [ AC_MSG_RESULT(no) ])
3100) 3141
3142 AC_MSG_CHECKING(if f_fsid has member __val)
3143 AC_TRY_COMPILE([
3144#include <sys/types.h>
3145#include <sys/statvfs.h>],
3146 [fsid_t t; t.__val[0] = 0;],
3147 [ AC_MSG_RESULT(yes)
3148 AC_DEFINE(FSID_HAS___VAL, 1, fsid_t has member __val) ],
3149 [ AC_MSG_RESULT(no) ])
3150])
3101 3151
3102AC_CACHE_CHECK([for msg_control field in struct msghdr], 3152AC_CACHE_CHECK([for msg_control field in struct msghdr],
3103 ac_cv_have_control_in_msghdr, [ 3153 ac_cv_have_control_in_msghdr, [
@@ -3299,12 +3349,30 @@ AC_SEARCH_LIBS(getrrsetbyname, resolv,
3299 AC_SEARCH_LIBS(res_query, resolv) 3349 AC_SEARCH_LIBS(res_query, resolv)
3300 AC_SEARCH_LIBS(dn_expand, resolv) 3350 AC_SEARCH_LIBS(dn_expand, resolv)
3301 AC_MSG_CHECKING(if res_query will link) 3351 AC_MSG_CHECKING(if res_query will link)
3302 AC_TRY_LINK_FUNC(res_query, AC_MSG_RESULT(yes), 3352 AC_LINK_IFELSE([
3353#include "confdefs.h"
3354#include <sys/types.h>
3355#include <netinet/in.h>
3356#include <arpa/nameser.h>
3357#include <netdb.h>
3358#include <resolv.h>
3359int main()
3360{
3361 res_query (0, 0, 0, 0, 0);
3362 return 0;
3363}
3364 ],
3365 AC_MSG_RESULT(yes),
3303 [AC_MSG_RESULT(no) 3366 [AC_MSG_RESULT(no)
3304 saved_LIBS="$LIBS" 3367 saved_LIBS="$LIBS"
3305 LIBS="$LIBS -lresolv" 3368 LIBS="$LIBS -lresolv"
3306 AC_MSG_CHECKING(for res_query in -lresolv) 3369 AC_MSG_CHECKING(for res_query in -lresolv)
3307 AC_LINK_IFELSE([ 3370 AC_LINK_IFELSE([
3371#include "confdefs.h"
3372#include <sys/types.h>
3373#include <netinet/in.h>
3374#include <arpa/nameser.h>
3375#include <netdb.h>
3308#include <resolv.h> 3376#include <resolv.h>
3309int main() 3377int main()
3310{ 3378{
@@ -3312,8 +3380,7 @@ int main()
3312 return 0; 3380 return 0;
3313} 3381}
3314 ], 3382 ],
3315 [LIBS="$LIBS -lresolv" 3383 [AC_MSG_RESULT(yes)],
3316 AC_MSG_RESULT(yes)],
3317 [LIBS="$saved_LIBS" 3384 [LIBS="$saved_LIBS"
3318 AC_MSG_RESULT(no)]) 3385 AC_MSG_RESULT(no)])
3319 ]) 3386 ])
@@ -3382,10 +3449,10 @@ AC_ARG_WITH(kerberos5,
3382 AC_DEFINE(KRB5, 1, [Define if you want Kerberos 5 support]) 3449 AC_DEFINE(KRB5, 1, [Define if you want Kerberos 5 support])
3383 KRB5_MSG="yes" 3450 KRB5_MSG="yes"
3384 3451
3385 AC_MSG_CHECKING(for krb5-config) 3452 AC_PATH_PROG([KRB5CONF],[krb5-config],
3386 if test -x $KRB5ROOT/bin/krb5-config ; then 3453 [$KRB5ROOT/bin/krb5-config],
3387 KRB5CONF=$KRB5ROOT/bin/krb5-config 3454 [$KRB5ROOT/bin:$PATH])
3388 AC_MSG_RESULT($KRB5CONF) 3455 if test -x $KRB5CONF ; then
3389 3456
3390 AC_MSG_CHECKING(for gssapi support) 3457 AC_MSG_CHECKING(for gssapi support)
3391 if $KRB5CONF | grep gssapi >/dev/null ; then 3458 if $KRB5CONF | grep gssapi >/dev/null ; then
@@ -3411,7 +3478,6 @@ AC_ARG_WITH(kerberos5,
3411 AC_MSG_RESULT(no) 3478 AC_MSG_RESULT(no)
3412 ) 3479 )
3413 else 3480 else
3414 AC_MSG_RESULT(no)
3415 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include" 3481 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
3416 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib" 3482 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
3417 AC_MSG_CHECKING(whether we are using Heimdal) 3483 AC_MSG_CHECKING(whether we are using Heimdal)