summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2004-01-22 12:05:34 +1100
committerDarren Tucker <dtucker@zip.com.au>2004-01-22 12:05:34 +1100
commit1d3ca58705157ffd764515021434343aba1e8037 (patch)
treebcd1228fdfe3580c4e5d90e8645d88be4225d02e
parentf4da3bb6cadcb26fd6edd19887b5187c13724255 (diff)
- (dtucker) [configure.ac] Use krb5-config where available for Kerberos/
GSSAPI detection, libs and includes. ok djm@
-rw-r--r--ChangeLog6
-rw-r--r--configure.ac71
2 files changed, 55 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index dff32c6cb..df415f0ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
120040122
2 - (dtucker) [configure.ac] Use krb5-config where available for Kerberos/
3 GSSAPI detection, libs and includes. ok djm@
4
120040121 520040121
2 - (djm) OpenBSD CVS Sync 6 - (djm) OpenBSD CVS Sync
3 - djm@cvs.openbsd.org 2004/01/13 09:25:05 7 - djm@cvs.openbsd.org 2004/01/13 09:25:05
@@ -1701,4 +1705,4 @@
1701 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. 1705 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
1702 Report from murple@murple.net, diagnosis from dtucker@zip.com.au 1706 Report from murple@murple.net, diagnosis from dtucker@zip.com.au
1703 1707
1704$Id: ChangeLog,v 1.3177 2004/01/21 06:07:16 djm Exp $ 1708$Id: ChangeLog,v 1.3178 2004/01/22 01:05:34 dtucker Exp $
diff --git a/configure.ac b/configure.ac
index 10025cbc8..5b094ba6c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.184 2004/01/08 13:19:25 dtucker Exp $ 1# $Id: configure.ac,v 1.185 2004/01/22 01:05:35 dtucker Exp $
2 2
3AC_INIT 3AC_INIT
4AC_CONFIG_SRCDIR([ssh.c]) 4AC_CONFIG_SRCDIR([ssh.c])
@@ -2020,39 +2020,58 @@ AC_SEARCH_LIBS(getrrsetbyname, resolv,
2020KRB5_MSG="no" 2020KRB5_MSG="no"
2021AC_ARG_WITH(kerberos5, 2021AC_ARG_WITH(kerberos5,
2022 [ --with-kerberos5=PATH Enable Kerberos 5 support], 2022 [ --with-kerberos5=PATH Enable Kerberos 5 support],
2023 [ 2023 [ if test "x$withval" != "xno" ; then
2024 if test "x$withval" != "xno" ; then 2024 if test "x$withval" = "xyes" ; then
2025 if test "x$withval" = "xyes" ; then 2025 KRB5ROOT="/usr/local"
2026 KRB5ROOT="/usr/local" 2026 else
2027 KRB5ROOT=${withval}
2028 fi
2029
2030 AC_DEFINE(KRB5)
2031 KRB5_MSG="yes"
2032
2033 AC_MSG_CHECKING(for krb5-config)
2034 if test -x $KRB5ROOT/bin/krb5-config ; then
2035 KRB5CONF=$KRB5ROOT/bin/krb5-config
2036 AC_MSG_RESULT($KRB5CONF)
2037
2038 AC_MSG_CHECKING(for gssapi support)
2039 if $KRB5CONF | grep gssapi >/dev/null ; then
2040 AC_MSG_RESULT(yes)
2041 K5CFLAGS="`$KRB5CONF --cflags gssapi`"
2042 dnl m4 quadragraphs: "sed 's/-l[^- ]*//g'"
2043 K5LDFLAGS="`$KRB5CONF --libs gssapi | sed 's/-l@<:@^- @:>@*//g'`"
2044 K5LIBS="`$KRB5CONF --libs gssapi | sed 's/-L@<:@^- @:>@*//g'`"
2027 else 2045 else
2028 KRB5ROOT=${withval} 2046 AC_MSG_RESULT(no)
2047 K5CFLAGS="`$KRB5CONF --cflags`"
2048 K5LDFLAGS="`$KRB5CONF --libs | sed 's/-l@<:@^- @:>@*//g'`"
2049 K5LIBS="`$KRB5CONF --libs | sed 's/-L@<:@^- @:>@*//g'`"
2029 fi 2050 fi
2051 CPPFLAGS="$CPPFLAGS $K5CFLAGS"
2052 LDFLAGS="$LDFLAGS $K5LDFLAGS"
2053 AC_MSG_CHECKING(whether we are using Heimdal)
2054 AC_TRY_COMPILE([ #include <krb5.h> ],
2055 [ char *tmp = heimdal_version; ],
2056 [ AC_MSG_RESULT(yes)
2057 AC_DEFINE(HEIMDAL) ],
2058 AC_MSG_RESULT(no)
2059 )
2060 else
2061 AC_MSG_RESULT(no)
2030 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include" 2062 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
2031 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib" 2063 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
2032 AC_DEFINE(KRB5)
2033 KRB5_MSG="yes"
2034 AC_MSG_CHECKING(whether we are using Heimdal) 2064 AC_MSG_CHECKING(whether we are using Heimdal)
2035 AC_TRY_COMPILE([ #include <krb5.h> ], 2065 AC_TRY_COMPILE([ #include <krb5.h> ],
2036 [ char *tmp = heimdal_version; ], 2066 [ char *tmp = heimdal_version; ],
2037 [ AC_MSG_RESULT(yes) 2067 [ AC_MSG_RESULT(yes)
2038 AC_DEFINE(HEIMDAL) 2068 AC_DEFINE(HEIMDAL)
2039 K5LIBS="-lkrb5 -ldes -lcom_err -lasn1 -lroken" 2069 K5LIBS="-lkrb5 -ldes -lcom_err -lasn1 -lroken"
2040 AC_SEARCH_LIBS(k_hasafs, kafs,
2041 [ AC_DEFINE(AFS)
2042 K5LIBS="-lkafs $K5LIBS"
2043 ]
2044 )
2045 ], 2070 ],
2046 [ AC_MSG_RESULT(no) 2071 [ AC_MSG_RESULT(no)
2047 K5LIBS="-lkrb5 -lk5crypto -lcom_err" 2072 K5LIBS="-lkrb5 -lk5crypto -lcom_err"
2048 ] 2073 ]
2049 ) 2074 )
2050 if test ! -z "$need_dash_r" ; then
2051 LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib"
2052 fi
2053 if test ! -z "$blibpath" ; then
2054 blibpath="$blibpath:${KRB5ROOT}/lib"
2055 fi
2056 AC_SEARCH_LIBS(dn_expand, resolv) 2075 AC_SEARCH_LIBS(dn_expand, resolv)
2057 2076
2058 AC_CHECK_LIB(gssapi,gss_init_sec_context, 2077 AC_CHECK_LIB(gssapi,gss_init_sec_context,
@@ -2080,9 +2099,19 @@ AC_ARG_WITH(kerberos5,
2080 AC_CHECK_HEADER(gssapi_krb5.h, , 2099 AC_CHECK_HEADER(gssapi_krb5.h, ,
2081 [ CPPFLAGS="$oldCPP" ]) 2100 [ CPPFLAGS="$oldCPP" ])
2082 2101
2083 KRB5=yes
2084 fi 2102 fi
2085 ] 2103 if test ! -z "$need_dash_r" ; then
2104 LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib"
2105 fi
2106 if test ! -z "$blibpath" ; then
2107 blibpath="$blibpath:${KRB5ROOT}/lib"
2108 fi
2109 fi ]
2110 AC_SEARCH_LIBS(k_hasafs, kafs,
2111 [ AC_DEFINE(AFS)
2112 K5LIBS="-lkafs $K5LIBS"
2113 ]
2114 )
2086) 2115)
2087LIBS="$LIBS $K5LIBS" 2116LIBS="$LIBS $K5LIBS"
2088 2117