It seems like passing --without-krb4 doesn't really turn kerberos off,
it just makes the default directory into 'no'.  Wrapping the kerberos
check in an 

if test "$KRB4" != "no"; then
[check here]
fi

fixes it.

The patch is quite big because of intendation changes, but is
attached.  Against 1.11.1p1.

-- 
Tollef Fog Heen
Unix _IS_ user friendly... It's just selective about who its friends are.
diff -urN cvs-1.11.1p1/configure.in cvs-1.11.1p1.new/configure.in
--- cvs-1.11.1p1/configure.in   Fri Apr 27 22:00:47 2001
+++ cvs-1.11.1p1.new/configure.in       Mon Mar  4 00:24:28 2002
@@ -197,67 +197,68 @@
 AC_SUBST(KRB4)])dnl
 WITH_KRB4
 
-krb_h=
-AC_MSG_CHECKING([for krb.h])
-if test "$cross_compiling" != yes && test -r $KRB4/include/krb.h; then
-   hold_cflags=$CFLAGS
-   CFLAGS="$CFLAGS -I$KRB4/include"
-   AC_TRY_LINK([#include <krb.h>],[int i;],
-          [krb_h=yes krb_incdir=$KRB4/include],
-          [CFLAGS=$hold_cflags
-           AC_TRY_LINK([#include <krb.h>],[int i;],
-             [krb_h=yes krb_incdir=])])
-   CFLAGS=$hold_cflags
-else
-   AC_TRY_LINK([#include <krb.h>],[int i;],
-             [krb_h=yes krb_incdir=])
-fi
-if test -z "$krb_h"; then
-  AC_TRY_LINK([#include <krb.h>],[int i;],
-    [krb_h=yes krb_incdir=],
-    [if test "$cross_compiling" != yes && test -r $KRB4/include/kerberosIV/krb.h; then
-       hold_cflags=$CFLAGS
-       CFLAGS="$CFLAGS -I$KRB4/include/kerberosIV"
-       AC_TRY_LINK([#include <krb.h>],[int i;],
-        [krb_h=yes krb_incdir=$KRB4/include/kerberosIV])
-       CFLAGS=$hold_cflags
-     fi])
-fi
-AC_MSG_RESULT($krb_h)
-
-includeopt=
-AC_SUBST(includeopt)
-if test -n "$krb_h"; then
-  krb_lib=
-  if test "$cross_compiling" != yes && test -r $KRB4/lib/libkrb.a; then
-       hold_ldflags=$LDFLAGS
-       LDFLAGS="-L${KRB4}/lib $LDFLAGS"
-       AC_CHECK_LIB(krb,printf,[krb_lib=yes krb_libdir=${KRB4}/lib],
-           [LDFLAGS=$hold_ldflags
-            # Using open here instead of printf so we don't
-            # get confused by the cached value for printf from above.
-            AC_CHECK_LIB(krb,open,[krb_lib=yes krb_libdir=])])
-       LDFLAGS=$hold_ldflags
+if test "$KRB4" != "no"; then
+  krb_h=
+    AC_MSG_CHECKING([for krb.h])
+  if test "$cross_compiling" != yes && test -r $KRB4/include/krb.h; then
+     hold_cflags=$CFLAGS
+     CFLAGS="$CFLAGS -I$KRB4/include"
+     AC_TRY_LINK([#include <krb.h>],[int i;],
+            [krb_h=yes krb_incdir=$KRB4/include],
+            [CFLAGS=$hold_cflags
+             AC_TRY_LINK([#include <krb.h>],[int i;],
+               [krb_h=yes krb_incdir=])])
+     CFLAGS=$hold_cflags
   else
-       AC_CHECK_LIB(krb,printf,[krb_lib=yes krb_libdir=])
+     AC_TRY_LINK([#include <krb.h>],[int i;],
+               [krb_h=yes krb_incdir=])
   fi
-  if test -n "$krb_lib"; then
-    AC_DEFINE(HAVE_KERBEROS)
-    test -n "${krb_libdir}" && LIBS="${LIBS} -L${krb_libdir}"
-    LIBS="${LIBS} -lkrb"
-    # Put -L${krb_libdir} in LDFLAGS temporarily so that it appears before
-    # -ldes in the command line.  Don't do it permanently so that we honor
-    # the user's setting for LDFLAGS
-    hold_ldflags=$LDFLAGS
-    test -n "${krb_libdir}" && LDFLAGS="$LDFLAGS -L${krb_libdir}"
-    AC_CHECK_LIB(des,printf,[LIBS="${LIBS} -ldes"])
-    LDFLAGS=$hold_ldflags
-    if test -n "$krb_incdir"; then
-      includeopt="${includeopt} -I$krb_incdir"
+  if test -z "$krb_h"; then
+    AC_TRY_LINK([#include <krb.h>],[int i;],
+      [krb_h=yes krb_incdir=],
+      [if test "$cross_compiling" != yes && test -r $KRB4/include/kerberosIV/krb.h; 
+then
+         hold_cflags=$CFLAGS
+         CFLAGS="$CFLAGS -I$KRB4/include/kerberosIV"
+         AC_TRY_LINK([#include <krb.h>],[int i;],
+        [krb_h=yes krb_incdir=$KRB4/include/kerberosIV])
+         CFLAGS=$hold_cflags
+       fi])
+  fi
+  AC_MSG_RESULT($krb_h)
+  includeopt=
+  AC_SUBST(includeopt)
+  if test -n "$krb_h"; then
+    krb_lib=
+    if test "$cross_compiling" != yes && test -r $KRB4/lib/libkrb.a; then
+         hold_ldflags=$LDFLAGS
+         LDFLAGS="-L${KRB4}/lib $LDFLAGS"
+         AC_CHECK_LIB(krb,printf,[krb_lib=yes krb_libdir=${KRB4}/lib],
+             [LDFLAGS=$hold_ldflags
+              # Using open here instead of printf so we don't
+              # get confused by the cached value for printf from above.
+              AC_CHECK_LIB(krb,open,[krb_lib=yes krb_libdir=])])
+         LDFLAGS=$hold_ldflags
+    else
+         AC_CHECK_LIB(krb,printf,[krb_lib=yes krb_libdir=])
+    fi
+    if test -n "$krb_lib"; then
+      AC_DEFINE(HAVE_KERBEROS)
+      test -n "${krb_libdir}" && LIBS="${LIBS} -L${krb_libdir}"
+      LIBS="${LIBS} -lkrb"
+      # Put -L${krb_libdir} in LDFLAGS temporarily so that it appears before
+      # -ldes in the command line.  Don't do it permanently so that we honor
+      # the user's setting for LDFLAGS
+      hold_ldflags=$LDFLAGS
+      test -n "${krb_libdir}" && LDFLAGS="$LDFLAGS -L${krb_libdir}"
+      AC_CHECK_LIB(des,printf,[LIBS="${LIBS} -ldes"])
+      LDFLAGS=$hold_ldflags
+      if test -n "$krb_incdir"; then
+        includeopt="${includeopt} -I$krb_incdir"
+      fi
     fi
   fi
+  AC_CHECK_FUNCS(krb_get_err_text)
 fi
-AC_CHECK_FUNCS(krb_get_err_text)
 
 ACX_WITH_GSSAPI
 

Reply via email to