diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2005-07-03 18:23:16 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2005-07-03 18:23:16 +0000 |
commit | 1d3505994cbf22da08b342001a3411279fc32249 (patch) | |
tree | 107eba6f411ad22c369324ad36ec2c91d4b41873 | |
parent | 2167dd645e64107eee8af5072a02953f9eb0ffd5 (diff) | |
download | fetchmail-1d3505994cbf22da08b342001a3411279fc32249.tar.gz fetchmail-1d3505994cbf22da08b342001a3411279fc32249.tar.bz2 fetchmail-1d3505994cbf22da08b342001a3411279fc32249.zip |
Nalin Dahyabhai's patch to use the krb5-config script, if present.
Sent by Miloslav Trmac.
svn path=/trunk/; revision=4072
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | configure.ac | 28 | ||||
-rw-r--r-- | kerberos.h | 21 |
3 files changed, 43 insertions, 8 deletions
@@ -83,6 +83,8 @@ fetchmail 6.3.0 (not yet released officially): * Nalin Dahyabhai's fix for sink.c/transact.c to reserve sufficient space for \r\n trailers in snprintf calls. Sent by Miloslav Trmac, possibly fixing Red Hat bug #114470. (Matthias Andree). +* Nalin Dahyabhai's patch to use the krb5-config script, if present. + Sent by Miloslav Trmac. (Matthias Andree) fetchmail-6.2.5 (Wed Oct 15 18:39:22 EDT 2003), 23079 lines: diff --git a/configure.ac b/configure.ac index d98bebe6..06110c4e 100644 --- a/configure.ac +++ b/configure.ac @@ -411,6 +411,17 @@ then AC_DEFINE(KERBEROS_V5,1,Define if you have Kerberos V5) CEFLAGS="$CEFLAGS -I/usr/include/kerberosV" LIBS="$LIBS -lasn1 -lkrb5 -lcom_err -lkafs" +elif krb5-config 2> /dev/null >/dev/null ; then + krb5_prefix=`krb5-config --prefix krb5` + AC_MSG_RESULT([krb5-config points to kerberosV under $krb5_prefix]) + if test -f ${krb5_prefix}/include/et/com_err.h && \ + ! test -f ${krb5_prefix}/include/com_err.h ; then + CEFLAGS="$CEFLAGS -I${krb5_prefix}/include/et" + fi + unset krb5_prefix + CEFLAGS="$CEFLAGS `krb5-config --cflags krb5`" + LIBS="$LIBS `krb5-config --libs krb5`" + AC_DEFINE(KERBEROS_V5) else if test "$with_kerberos5" != "yes" then @@ -486,6 +497,23 @@ then AC_DEFINE(KERBEROS_V4,1,Define if you have Kerberos V4) CEFLAGS="$CEFLAGS -I/usr/include/kerberosIV" LIBS="$LIBS -lkrb -ldes" +elif krb4-config 2> /dev/null >/dev/null ; then + krb4_prefix=`krb4-config --prefix` + AC_MSG_RESULT([krb4-config points to kerberosIV under $krb4_prefix]) + unset krb4_prefix + CEFLAGS="$CEFLAGS `krb4-config --cflags`" + LIBS="$LIBS `krb4-config --libs`" + AC_DEFINE(KERBEROS_V4) +elif krb5-config 2> /dev/null >/dev/null ; then + krb4_prefix=`krb5-config --prefix krb4` + AC_MSG_RESULT([krb5-config points to kerberosIV under $krb4_prefix]) + if test -f ${krb4_prefix}/include/kerberosIV/krb.h ; then + AC_DEFINE(KERBEROS_V4_V5,1,Define if you have Kerberos V4 headers under a kerberosIV directory) + fi + unset krb4_prefix + CEFLAGS="$CEFLAGS `krb5-config --cflags krb4`" + LIBS="$LIBS `krb5-config --libs krb4`" + AC_DEFINE(KERBEROS_V4) else #we need to detect when we're building under a kerberosV compatibility #layer, btw... @@ -15,14 +15,19 @@ #endif #ifdef KERBEROS_V4 -# if defined (__bsdi__) -# include <des.h> /* order of includes matters */ -# define krb_get_err_text(e) (krb_err_txt[e]) -# endif -# include <krb.h> -# if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) -# define krb_get_err_text(e) (krb_err_txt[e]) -# include <des.h> +# ifdef KERBEROS_V4_V5 +# include <kerberosIV/krb.h> +# include <kerberosIV/des.h> +# else +# if defined (__bsdi__) +# include <des.h> /* order of includes matters */ +# define krb_get_err_text(e) (krb_err_txt[e]) +# endif +# include <krb.h> +# if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) +# define krb_get_err_text(e) (krb_err_txt[e]) +# include <des.h> +# endif # endif #endif |