allow --with-krb5 to override the location of the kerberos libs on
authorAndrew Tridgell <tridge@samba.org>
Fri, 20 Sep 2002 09:34:35 +0000 (09:34 +0000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 20 Sep 2002 09:34:35 +0000 (09:34 +0000)
redhat
(This used to be commit 56b194e83538bcb6006a5ab1e00cdb493dd9ad7f)

source3/configure.in

index d53886bc65dcc78d41c54159f36087f861848dea..7ae8ac90d38b52565884db9eb0f286ead941ffce 100644 (file)
@@ -1958,20 +1958,9 @@ AC_MSG_RESULT($with_ads_support)
 
 if test x"$with_ads_support" = x"yes"; then
 
-  #################################################
-  # see if this box has the RedHat location for kerberos
-  AC_MSG_CHECKING(for /usr/kerberos)
-  if test -d /usr/kerberos; then
-    LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
-    CFLAGS="$CFLAGS -I/usr/kerberos/include"
-    CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
-    AC_MSG_RESULT(yes)
-  else
-    AC_MSG_RESULT(no)
-  fi
-
   #################################################
   # check for location of Kerberos 5 install
+FOUND_KRB5=0
   AC_MSG_CHECKING(for kerberos 5 install path)
   AC_ARG_WITH(krb5,
   [  --with-krb5=base-dir    Locate Kerberos 5 support (default=/usr)],
@@ -1985,11 +1974,28 @@ if test x"$with_ads_support" = x"yes"; then
       CFLAGS="$CFLAGS -I$withval/include"
       CPPFLAGS="$CPPFLAGS -I$withval/include"
       LDFLAGS="$LDFLAGS -L$withval/lib"
+    FOUND_KRB5=1
       ;;
     esac ],
     AC_MSG_RESULT(no)
   )
 
+
+if [ $FOUND_KRB5 = 0 ]; then
+#################################################
+# see if this box has the RedHat location for kerberos
+AC_MSG_CHECKING(for /usr/kerberos)
+if test -d /usr/kerberos; then
+    LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
+    CFLAGS="$CFLAGS -I/usr/kerberos/include"
+    CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
+    AC_MSG_RESULT(yes)
+else
+    AC_MSG_RESULT(no)
+fi
+fi
+
+
   # now check for krb5.h. Some systems have the libraries without the headers!
   # note that this check is done here to allow for different kerberos
   # include paths