aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Williams <peterw@src.gnome.org>2000-08-31 03:46:06 +0800
committerPeter Williams <peterw@src.gnome.org>2000-08-31 03:46:06 +0800
commita52e0a601e801dd3d365e84b352da809b3bcab60 (patch)
tree7d1565bd0ae71e600d472a08b4faf3f43760118a
parentb76a505040fdd679748c314ebdd5dbe78f3f56a8 (diff)
downloadgsoc2013-evolution-a52e0a601e801dd3d365e84b352da809b3bcab60.tar
gsoc2013-evolution-a52e0a601e801dd3d365e84b352da809b3bcab60.tar.gz
gsoc2013-evolution-a52e0a601e801dd3d365e84b352da809b3bcab60.tar.bz2
gsoc2013-evolution-a52e0a601e801dd3d365e84b352da809b3bcab60.tar.lz
gsoc2013-evolution-a52e0a601e801dd3d365e84b352da809b3bcab60.tar.xz
gsoc2013-evolution-a52e0a601e801dd3d365e84b352da809b3bcab60.tar.zst
gsoc2013-evolution-a52e0a601e801dd3d365e84b352da809b3bcab60.zip
Robustify the kerberos checks
svn path=/trunk/; revision=5118
-rw-r--r--ChangeLog4
-rw-r--r--configure.in65
2 files changed, 52 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index e9a2dbdcd7..78be3d3a7a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2000-08-30 Peter Williams <peterw@helixcode.com>
+
+ * configure.in: Robustify the kerberos checks.
+
2000-08-29 Dan Winship <danw@helixcode.com>
* configure.in, acconfig.h: decruft
diff --git a/configure.in b/configure.in
index 1b5a2e8ceb..a163f4da98 100644
--- a/configure.in
+++ b/configure.in
@@ -386,26 +386,57 @@ dnl Kerberos
dnl ********
AC_ARG_WITH(krb5, [ --with-krb5=PREFIX Location of Kerberos 5 libs/includes])
AC_ARG_WITH(krb4, [ --with-krb4=PREFIX Location of Kerberos 4 libs/includes])
-AC_MSG_CHECKING(for Kerberos 5)
-AC_MSG_RESULT(${with_krb5:=no})
-if test x$with_krb5 != xno; then
- KRB5_CFLAGS="-I$with_krb5/include/krb5"
- KRB5_LDFLAGS="-L$with_krb5/lib -lkrb5 -lk5crypto -lcom_err"
- AC_DEFINE(HAVE_KRB5)
+if test x${with_krb5:=no} != xno; then
+ CFLAGS_save="$CFLAGS"
+ LDFLAGS_save="$LDFLAGS"
+ CFLAGS="-I$with_krb5/include/krb5"
+ LDFLAGS="-L$with_krb5/lib"
+ AC_CHECK_LIB(krb5, krb5_init_context,
+ [
+ AC_DEFINE(HAVE_KRB5)
+ KRB5_CFLAGS="$CFLAGS"
+ KRB5_LDFLAGS="$LDFLAGS -lkrb5 -lk5crypto -lcom_err"
+ ],[
+ AC_MSG_WARN([A sample Kerberos 5 program could not be compiled with the
+Kerberos found in $with_krb5. Please verify that the prefix is correct.])
+ with_krb5=no
+ ], [-lk5crypto -lcom_err])
+ CFLAGS="$CFLAGS_save"
+ LDFLAGS="$LIBS_save"
+else
+ AC_MSG_CHECKING(for Kerberos 5)
+ AC_MSG_RESULT($with_krb5)
fi
-AC_MSG_CHECKING(for Kerberos 4)
-AC_MSG_RESULT(${with_krb4:=no})
-if test x$with_krb4 != xno; then
- KRB4_CFLAGS="-I$with_krb4/include -I$with_krb4/include/kerberosIV $KRB5_CFLAGS"
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -L$with_krb4/lib"
+
+if test x${with_krb4:=no} != xno; then
+ CFLAGS_save="$CFLAGS"
+ LDFLAGS_save="$LDFLAGS"
+ CFLAGS="-I$with_krb4/include"
+ LDFLAGS="-L$with_krb4/lib"
AC_CHECK_LIB(krb, krb_mk_req,
- [KRB4_LDFLAGS="-L$with_krb4/lib -lkrb -ldes"],
- [KRB4_LDFLAGS="-L$with_krb4/lib -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"],
- -ldes)
- LDFLAGS="$save_LDFLAGS"
- AC_DEFINE(HAVE_KRB4)
+ [
+ AC_DEFINE(HAVE_KRB4)
+ KRB4_CFLAGS="$CFLAGS"
+ KRB4_LDFLAGS="$LDFLAGS -lkrb -ldes"
+ ],[
+ AC_CHECK_LIB(krb4, krb_mk_req,
+ [
+ AC_DEFINE(HAVE_KRB4)
+ KRB4_CFLAGS="$CFLAGS"
+ KRB4_LDFLAGS="$LDFLAGS -lkrb4 -ldes425 $KRB5_LDFLAGS"
+ ],[
+ AC_MSG_WARN([A sample Kerberos 4 program could not be compiled with the
+Kerberos found in $with_krb4. Please verify that the prefix is correct.])
+ with_krb4=no
+ ],[-ldes425 $KRB5_LDFLAGS])
+ ], [-ldes])
+ CFLAGS="$CFLAGS_save"
+ LDFLAGS="$LIBS_save"
+else
+ AC_MSG_CHECKING(for Kerberos 4)
+ AC_MSG_RESULT(${with_krb4})
fi
+
AC_SUBST(KRB5_CFLAGS)
AC_SUBST(KRB5_LDFLAGS)
AC_SUBST(KRB4_CFLAGS)