]> andersk Git - openssh.git/blobdiff - configure.ac
- (dtucker) [defines.h] Put CMSG_DATA, CMSG_FIRSTHDR with other CMSG* macros,
[openssh.git] / configure.ac
index c13a6a146d4cf4811114c55307d3f9bef16cf187..b37b5f68a6875355af643daf3c9b8ec8ae6e625a 100644 (file)
@@ -54,7 +54,6 @@ fi
 # Check for some target-specific stuff
 case "$host" in
 *-*-aix*)
-       AFS_LIBS="-lld"
        CPPFLAGS="$CPPFLAGS -I/usr/local/include"
        LDFLAGS="$LDFLAGS -L/usr/local/lib"
        AC_MSG_CHECKING([how to specify blibpath for linker ($LD)]) 
@@ -75,12 +74,27 @@ case "$host" in
                AC_MSG_RESULT($blibflags)
        fi
        LDFLAGS="$saved_LDFLAGS"
+       dnl Check for authenticate.  Might be in libs.a on older AIXes
        AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE)],
                [AC_CHECK_LIB(s,authenticate,
                        [ AC_DEFINE(WITH_AIXAUTHENTICATE)
                                LIBS="$LIBS -ls"
                        ])
                ])
+       dnl Check if loginfailed is declared and takes 4 arguments (AIX >= 5.2)
+       AC_CHECK_DECL(loginfailed,
+                [AC_MSG_CHECKING(if loginfailed takes 4 arguments)
+                 AC_TRY_COMPILE(
+                       [#include <usersec.h>],
+                       [(void)loginfailed("user","host","tty",0);],
+                       [AC_MSG_RESULT(yes)
+                        AC_DEFINE(AIX_LOGINFAILED_4ARG)],
+                       [AC_MSG_RESULT(no)]
+               )],
+               [],
+               [#include <usersec.h>]
+       )
+       AC_CHECK_FUNCS(setauthdb)
        AC_DEFINE(BROKEN_GETADDRINFO)
        AC_DEFINE(BROKEN_REALPATH)
        dnl AIX handles lastlog as part of its login message
@@ -438,14 +452,26 @@ AC_ARG_WITH(libs,
        ]       
 )
 
+AC_MSG_CHECKING(compiler and flags for sanity)
+AC_TRY_RUN([
+#include <stdio.h>
+int main(){exit(0);}
+       ],
+       [       AC_MSG_RESULT(yes) ],
+       [
+               AC_MSG_RESULT(no)
+               AC_MSG_ERROR([*** compiler cannot create working executables, check config.log ***])
+       ]
+)
+
 # Checks for header files.
 AC_CHECK_HEADERS(bstring.h crypt.h endian.h features.h floatingpoint.h \
        getopt.h glob.h ia.h lastlog.h libgen.h limits.h login.h \
        login_cap.h maillock.h netdb.h netgroup.h \
        netinet/in_systm.h paths.h pty.h readpassphrase.h \
        rpc/types.h security/pam_appl.h shadow.h stddef.h stdint.h \
-       strings.h sys/strtio.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h \
-       sys/mman.h sys/pstat.h sys/select.h sys/stat.h \
+       strings.h sys/strtio.h sys/audit.h sys/bitypes.h sys/bsdtty.h \
+       sys/cdefs.h sys/mman.h sys/pstat.h sys/select.h sys/stat.h \
        sys/stropts.h sys/sysmacros.h sys/time.h sys/timers.h \
        sys/un.h time.h tmpdir.h ttyent.h usersec.h \
        util.h utime.h utmp.h utmpx.h)
@@ -662,22 +688,23 @@ AC_CHECK_FUNCS(\
        arc4random __b64_ntop b64_ntop __b64_pton b64_pton basename \
        bcopy bindresvport_sa clock fchmod fchown freeaddrinfo futimes \
        gai_strerror getaddrinfo getcwd getgrouplist getnameinfo getopt \
-       getpeereid _getpty getrlimit getrusage getttyent glob inet_aton \
+       getpeereid _getpty getrlimit getttyent glob inet_aton \
        inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove \
        mkdtemp mmap ngetaddrinfo nsleep ogetaddrinfo openlog_r openpty \
        pstat readpassphrase realpath recvmsg rresvport_af sendmsg \
        setdtablesize setegid setenv seteuid setgroups setlogin setpcred \
        setproctitle setregid setresgid setresuid setreuid setrlimit \
        setsid setvbuf sigaction sigvec snprintf socketpair strerror \
-       strlcat strlcpy strmode strnvis sysconf tcgetpgrp truncate utimes \
-       vhangup vsnprintf waitpid \
+       strlcat strlcpy strmode strnvis sysconf tcgetpgrp tcsendbreak \
+       truncate utimes vhangup vsnprintf waitpid \
 )
 
 AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP))
 AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME))
 
-dnl Make sure strsep prototype is defined before defining HAVE_STRSEP
+dnl Make sure prototypes are defined for these before using them.
 AC_CHECK_DECL(strsep, [AC_CHECK_FUNCS(strsep)])
+AC_CHECK_DECL(getrusage, [AC_CHECK_FUNCS(getrusage)])
 
 dnl IRIX and Solaris 2.5.1 have dirname() in libgen
 AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[
@@ -1864,7 +1891,12 @@ AC_ARG_WITH(dns,
                        DNS_MSG="yes"
                        AC_DEFINE(DNS)
                        AC_SEARCH_LIBS(getrrsetbyname, resolv, 
-                               [AC_DEFINE(HAVE_GETRRSETBYNAME)])
+                               [AC_DEFINE(HAVE_GETRRSETBYNAME)],
+                               [
+                                       # Needed by our getrrsetbyname()
+                                       AC_SEARCH_LIBS(res_query, resolv)
+                                       AC_SEARCH_LIBS(dn_expand, resolv)
+                               ])
                fi
        ]
 )
@@ -1901,93 +1933,13 @@ AC_ARG_WITH(kerberos5,
                         if test ! -z "$blibpath" ; then
                                 blibpath="$blibpath:${KRB5ROOT}/lib"
                         fi
-                        AC_CHECK_LIB(resolv, dn_expand, , )
+                       AC_SEARCH_LIBS(dn_expand, resolv)
 
                         KRB5=yes
                 fi
         ]
 )
-# Check whether user wants Kerberos 4 support
-KRB4_MSG="no" 
-AC_ARG_WITH(kerberos4,
-       [  --with-kerberos4=PATH   Enable Kerberos 4 support],
-       [
-               if test "x$withval" != "xno" ; then
-                       if test "x$withval" != "xyes" ; then
-                               CPPFLAGS="$CPPFLAGS -I${withval}/include"
-                               LDFLAGS="$LDFLAGS -L${withval}/lib"
-                               if test ! -z "$need_dash_r" ; then
-                                       LDFLAGS="$LDFLAGS -R${withval}/lib"
-                               fi
-                               if test ! -z "$blibpath" ; then
-                                       blibpath="$blibpath:${withval}/lib"
-                               fi
-                       else
-                               if test -d /usr/include/kerberosIV ; then
-                                       CPPFLAGS="$CPPFLAGS -I/usr/include/kerberosIV"
-                               fi
-                       fi
-
-                       AC_CHECK_HEADERS(krb.h)
-                       if test "$ac_cv_header_krb_h" != yes; then
-                               AC_MSG_WARN([Cannot find krb.h, build may fail])
-                       fi
-                       AC_CHECK_LIB(krb, main)
-                       if test "$ac_cv_lib_krb_main" != yes; then
-                               AC_CHECK_LIB(krb4, main)
-                               if test "$ac_cv_lib_krb4_main" != yes; then
-                                       AC_MSG_WARN([Cannot find libkrb nor libkrb4, build may fail])
-                               else
-                                       KLIBS="-lkrb4"
-                               fi
-                       else
-                               KLIBS="-lkrb"
-                       fi
-                       AC_CHECK_LIB(des, des_cbc_encrypt)
-                       if test "$ac_cv_lib_des_des_cbc_encrypt" != yes; then
-                               AC_CHECK_LIB(des425, des_cbc_encrypt)
-                               if test "$ac_cv_lib_des425_des_cbc_encrypt" != yes; then
-                                       AC_MSG_WARN([Cannot find libdes nor libdes425, build may fail])
-                               else
-                                       KLIBS="-ldes425"
-                               fi
-                       else
-                               KLIBS="-ldes"
-                       fi
-                       AC_CHECK_LIB(resolv, dn_expand, , )
-                       KRB4=yes
-                       KRB4_MSG="yes" 
-                       AC_DEFINE(KRB4)
-               fi
-       ]
-)
-
-# Check whether user wants AFS support
-AFS_MSG="no" 
-AC_ARG_WITH(afs,
-       [  --with-afs=PATH         Enable AFS support],
-       [
-               if test "x$withval" != "xno" ; then
-
-                       if test "x$withval" != "xyes" ; then
-                               CPPFLAGS="$CPPFLAGS -I${withval}/include"
-                               LDFLAGS="$LDFLAGS -L${withval}/lib"
-                       fi
-
-                       if test -z "$KRB4" ; then
-                               AC_MSG_WARN([AFS requires Kerberos IV support, build may fail])
-                       fi
-
-                       LIBS="-lkafs $LIBS"
-                       if test ! -z "$AFS_LIBS" ; then
-                               LIBS="$LIBS $AFS_LIBS"
-                       fi
-                       AC_DEFINE(AFS)
-                       AFS_MSG="yes" 
-               fi
-       ]
-)
-LIBS="$LIBS $KLIBS $K5LIBS"
+LIBS="$LIBS $K5LIBS"
 
 # Looking for programs, paths and files
 
@@ -2314,35 +2266,67 @@ AC_SUBST(piddir)
 dnl allow user to disable some login recording features
 AC_ARG_ENABLE(lastlog,
        [  --disable-lastlog       disable use of lastlog even if detected [no]],
-       [ AC_DEFINE(DISABLE_LASTLOG) ]
+       [
+               if test "x$enableval" = "xno" ; then
+                       AC_DEFINE(DISABLE_LASTLOG)
+               fi
+       ]
 )
 AC_ARG_ENABLE(utmp,
        [  --disable-utmp          disable use of utmp even if detected [no]],
-       [ AC_DEFINE(DISABLE_UTMP) ]
+       [
+               if test "x$enableval" = "xno" ; then
+                       AC_DEFINE(DISABLE_UTMP)
+               fi
+       ]
 )
 AC_ARG_ENABLE(utmpx,
        [  --disable-utmpx         disable use of utmpx even if detected [no]],
-       [ AC_DEFINE(DISABLE_UTMPX) ]
+       [
+               if test "x$enableval" = "xno" ; then
+                       AC_DEFINE(DISABLE_UTMPX)
+               fi
+       ]
 )
 AC_ARG_ENABLE(wtmp,
        [  --disable-wtmp          disable use of wtmp even if detected [no]],
-       [ AC_DEFINE(DISABLE_WTMP) ]
+       [
+               if test "x$enableval" = "xno" ; then
+                       AC_DEFINE(DISABLE_WTMP)
+               fi
+       ]
 )
 AC_ARG_ENABLE(wtmpx,
        [  --disable-wtmpx         disable use of wtmpx even if detected [no]],
-       [ AC_DEFINE(DISABLE_WTMPX) ]
+       [
+               if test "x$enableval" = "xno" ; then
+                       AC_DEFINE(DISABLE_WTMPX)
+               fi
+       ]
 )
 AC_ARG_ENABLE(libutil,
        [  --disable-libutil       disable use of libutil (login() etc.) [no]],
-       [ AC_DEFINE(DISABLE_LOGIN) ]
+       [
+               if test "x$enableval" = "xno" ; then
+                       AC_DEFINE(DISABLE_LOGIN)
+               fi
+       ]
 )
 AC_ARG_ENABLE(pututline,
        [  --disable-pututline     disable use of pututline() etc. ([uw]tmp) [no]],
-       [ AC_DEFINE(DISABLE_PUTUTLINE) ]
+       [
+               if test "x$enableval" = "xno" ; then
+                       AC_DEFINE(DISABLE_PUTUTLINE) 
+               fi
+       ]
 )
 AC_ARG_ENABLE(pututxline,
        [  --disable-pututxline    disable use of pututxline() etc. ([uw]tmpx) [no]],
-       [ AC_DEFINE(DISABLE_PUTUTXLINE) ]
+       [
+               if test "x$enableval" = "xno" ; then
+                       AC_DEFINE(DISABLE_PUTUTXLINE)
+               fi
+       ]
 )
 AC_ARG_WITH(lastlog,
   [  --with-lastlog=FILE|DIR specify lastlog location [common locations]],
@@ -2583,10 +2567,8 @@ fi
 echo "                    Manpage format: $MANTYPE"
 echo "                       DNS support: $DNS_MSG"
 echo "                       PAM support: $PAM_MSG"
-echo "                KerberosIV support: $KRB4_MSG"
 echo "                 KerberosV support: $KRB5_MSG"
 echo "                 Smartcard support: $SCARD_MSG"
-echo "                       AFS support: $AFS_MSG"
 echo "                     S/KEY support: $SKEY_MSG"
 echo "              TCP Wrappers support: $TCPW_MSG"
 echo "              MD5 password support: $MD5_MSG"
This page took 0.12175 seconds and 4 git commands to generate.