X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/13ff27b7030c4b7bbcea05806c7cb32eebc2f76f..53c337ed3293404b7a31f5c281b83d2f278615f3:/configure.ac?ds=sidebyside diff --git a/configure.ac b/configure.ac index edbf19cf..638b84d8 100644 --- a/configure.ac +++ b/configure.ac @@ -135,7 +135,12 @@ case "$host" in blibpath="/usr/lib:/lib" fi saved_LDFLAGS="$LDFLAGS" - for tryflags in -blibpath: -Wl,-blibpath: -Wl,-rpath, ;do + if test "$GCC" = "yes"; then + flags="-Wl,-blibpath: -Wl,-rpath, -blibpath:" + else + flags="-blibpath: -Wl,-blibpath: -Wl,-rpath," + fi + for tryflags in $flags ;do if (test -z "$blibflags"); then LDFLAGS="$saved_LDFLAGS $tryflags$blibpath" AC_TRY_LINK([], [], [blibflags=$tryflags]) @@ -175,6 +180,12 @@ case "$host" in [#include ] ) AC_CHECK_FUNCS(setauthdb) + AC_CHECK_DECL(F_CLOSEM, + AC_DEFINE(USE_FCNTL_CLOSEM, 1, [Use F_CLOSEM fcntl for closefrom]), + [], + [ #include + #include ] + ) check_for_aix_broken_getaddrinfo=1 AC_DEFINE(BROKEN_REALPATH, 1, [Define if you have a broken realpath.]) AC_DEFINE(SETEUID_BREAKS_SETUID, 1, @@ -190,6 +201,7 @@ case "$host" in supported by bsd-setproctitle.c]) AC_DEFINE(SSHPAM_CHAUTHTOK_NEEDS_RUID, 1, [AIX 5.2 and 5.3 (and presumably newer) require this]) + AC_DEFINE(PTY_ZEROREAD, 1, [read(1) can return 0 for a non-closed fd]) ;; *-*-cygwin*) check_for_libcrypt_later=1 @@ -231,6 +243,11 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) AC_DEFINE(BROKEN_SETREGID) AC_DEFINE_UNQUOTED(BIND_8_COMPAT, 1, [Define if your resolver libs need this for getrrsetbyname]) + AC_DEFINE(SSH_TUN_FREEBSD, 1, [Open tunnel devices the FreeBSD way]) + AC_DEFINE(SSH_TUN_COMPAT_AF, 1, + [Use tunnel device compatibility to OpenBSD]) + AC_DEFINE(SSH_TUN_PREPEND_AF, 1, + [Prepend the address family to IP tunnel traffic]) ;; *-*-hpux*) # first we define all of the options common to all HP-UX releases @@ -404,6 +421,8 @@ mips-sony-bsd|mips-sony-newsos4) AC_DEFINE(SSHD_ACQUIRES_CTTY, 1, [Define if sshd somehow reacquires a controlling TTY after setsid()]) + AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd + in case the name is longer than 8 chars]) external_path_file=/etc/default/login # hardwire lastlog location (can't detect it on some versions) conf_lastlog_location="/var/adm/lastlog" @@ -669,9 +688,11 @@ dnl Checks for header files. AC_CHECK_HEADERS( \ bstring.h \ crypt.h \ + crypto/sha2.h \ dirent.h \ endian.h \ features.h \ + fcntl.h \ floatingpoint.h \ getopt.h \ glob.h \ @@ -679,9 +700,9 @@ AC_CHECK_HEADERS( \ iaf.h \ limits.h \ login.h \ - login_cap.h \ maillock.h \ ndir.h \ + net/if_tun.h \ netdb.h \ netgroup.h \ pam/pam_appl.h \ @@ -690,6 +711,7 @@ AC_CHECK_HEADERS( \ readpassphrase.h \ rpc/types.h \ security/pam_appl.h \ + sha2.h \ shadow.h \ stddef.h \ stdint.h \ @@ -739,6 +761,11 @@ AC_CHECK_HEADERS(sys/ptms.h, [], [], [ #endif ]) +# login_cap.h requires sys/types.h on NetBSD +AC_CHECK_HEADERS(login_cap.h, [], [], [ +#include +]) + # Checks for libraries. AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match)) AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt)) @@ -923,7 +950,7 @@ AC_EGREP_CPP(FOUNDIT, # Check for g.gl_matchc glob() extension AC_MSG_CHECKING(for gl_matchc field in glob_t) -AC_TRY_COMPILE(FOUNDIT, +AC_TRY_COMPILE( [ #include ], [glob_t g; g.gl_matchc = 1;], [ @@ -1264,6 +1291,23 @@ AC_CHECK_DECL(tcsendbreak, AC_CHECK_DECLS(h_errno, , ,[#include ]) +AC_CHECK_DECLS(SHUT_RD, , , + [ +#include +#include + ]) + +AC_CHECK_DECLS(O_NONBLOCK, , , + [ +#include +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef HAVE_FCNTL_H +# include +#endif + ]) + AC_CHECK_FUNCS(setresuid, [ dnl Some platorms have setresuid that isn't implemented, test for this AC_MSG_CHECKING(if setresuid seems to work) @@ -1608,6 +1652,7 @@ main(void) AC_MSG_RESULT(no) AC_DEFINE(BROKEN_GETADDRINFO) ], + [ AC_MSG_RESULT(cross-compiling, assuming no) ] ) @@ -1853,7 +1898,7 @@ int main(void){ENGINE_load_builtin_engines();ENGINE_register_all_complete();} # Check for OpenSSL without EVP_aes_{192,256}_cbc AC_MSG_CHECKING([whether OpenSSL has crippled AES support]) -AC_COMPILE_IFELSE( +AC_LINK_IFELSE( [AC_LANG_SOURCE([[ #include #include @@ -2994,6 +3039,23 @@ int main() [#include ]) ]) +# Check whether user wants SELinux support +SELINUX_MSG="no" +LIBSELINUX="" +AC_ARG_WITH(selinux, + [ --with-selinux Enable SELinux support], + [ if test "x$withval" != "xno" ; then + AC_DEFINE(WITH_SELINUX,1,[Define if you want SELinux support.]) + SELINUX_MSG="yes" + AC_CHECK_HEADER([selinux/selinux.h], , + AC_MSG_ERROR(SELinux support requires selinux.h header)) + AC_CHECK_LIB(selinux, setexeccon, [ LIBSELINUX="-lselinux" ], + AC_MSG_ERROR(SELinux support requires libselinux library)) + AC_CHECK_FUNCS(getseuserbyname get_default_context_with_level) + fi ] +) +AC_SUBST(LIBSELINUX) + # Check whether user wants Kerberos 5 support KRB5_MSG="no" AC_ARG_WITH(kerberos5, @@ -3812,6 +3874,7 @@ fi echo " Manpage format: $MANTYPE" echo " PAM support: $PAM_MSG" echo " KerberosV support: $KRB5_MSG" +echo " SELinux support: $SELINUX_MSG" echo " Smartcard support: $SCARD_MSG" echo " S/KEY support: $SKEY_MSG" echo " TCP Wrappers support: $TCPW_MSG"