summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-12-23 21:48:32 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:07:37 -0500
commit3ad2bf2fa17805d0655e646591bab72d98a71c5e (patch)
tree18411c7d4a3baf9cd1fa6bfcdc5e8c9d5aed595d
parent4d6a13debb2ffd41d1fb6b0298bba5d3dea9c5e9 (diff)
downloadsamba-3ad2bf2fa17805d0655e646591bab72d98a71c5e.tar.gz
samba-3ad2bf2fa17805d0655e646591bab72d98a71c5e.tar.bz2
samba-3ad2bf2fa17805d0655e646591bab72d98a71c5e.zip
r4349: Start to fix the long-standing pain that --with-krb5 would be ignored if krb5-config was in the path.
I'll merge this to Samba3, before trying to merge all of the Samba3 changes to Samba4. Andrew Bartlett (This used to be commit 906ba7cb8af02d44c868805e0b108b966f3221af)
-rw-r--r--source4/libads/config.m428
1 files changed, 25 insertions, 3 deletions
diff --git a/source4/libads/config.m4 b/source4/libads/config.m4
index d9488f1401..a696c54e02 100644
--- a/source4/libads/config.m4
+++ b/source4/libads/config.m4
@@ -130,8 +130,8 @@ if test x$with_krb5_support != x"no"; then
#################################################
# check for krb5-config from recent MIT and Heimdal kerberos 5
- AC_PATH_PROG(KRB5_CONFIG, krb5-config)
- AC_MSG_CHECKING(for working krb5-config)
+ AC_PATH_PROG(KRB5_CONFIG, $krb5_withval/krb5-config)
+ AC_MSG_CHECKING(for working $krb5_withval/krb5-config)
if test -x "$KRB5_CONFIG"; then
ac_save_CFLAGS=$CFLAGS
CFLAGS="";export CFLAGS
@@ -145,7 +145,29 @@ if test x$with_krb5_support != x"no"; then
FOUND_KRB5=yes
AC_MSG_RESULT(yes)
else
- AC_MSG_RESULT(no. Fallback to previous krb5 detection strategy)
+ AC_MSG_RESULT(no. Fallback to finding krb5-config in path)
+ fi
+
+ if test x$FOUND_KRB5 != x"yes"; then
+ #################################################
+ # check for krb5-config from recent MIT and Heimdal kerberos 5
+ AC_PATH_PROG(KRB5_CONFIG, krb5-config)
+ AC_MSG_CHECKING(for working krb5-config)
+ if test -x "$KRB5_CONFIG"; then
+ ac_save_CFLAGS=$CFLAGS
+ CFLAGS="";export CFLAGS
+ ac_save_LDFLAGS=$LDFLAGS
+ LDFLAGS="";export LDFLAGS
+ KRB5_LIBS="`$KRB5_CONFIG --libs gssapi`"
+ KRB5_CFLAGS="`$KRB5_CONFIG --cflags | sed s/@INCLUDE_des@//`"
+ KRB5_CPPFLAGS="`$KRB5_CONFIG --cflags | sed s/@INCLUDE_des@//`"
+ CFLAGS=$ac_save_CFLAGS;export CFLAGS
+ LDFLAGS=$ac_save_LDFLAGS;export LDFLAGS
+ FOUND_KRB5=yes
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no. Fallback to previous krb5 detection strategy)
+ fi
fi
if test x$FOUND_KRB5 != x"yes"; then