svn commit: samba r4349 - in branches/SAMBA_4_0/source/libads: .

abartlet at samba.org abartlet at samba.org
Thu Dec 23 21:48:32 GMT 2004


Author: abartlet
Date: 2004-12-23 21:48:32 +0000 (Thu, 23 Dec 2004)
New Revision: 4349

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4349

Log:
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

Modified:
   branches/SAMBA_4_0/source/libads/config.m4


Changeset:
Modified: branches/SAMBA_4_0/source/libads/config.m4
===================================================================
--- branches/SAMBA_4_0/source/libads/config.m4	2004-12-23 18:45:36 UTC (rev 4348)
+++ branches/SAMBA_4_0/source/libads/config.m4	2004-12-23 21:48:32 UTC (rev 4349)
@@ -130,8 +130,8 @@
 
 	#################################################
 	# 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,8 +145,30 @@
 		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
 		#################################################



More information about the samba-cvs mailing list