]> granicus.if.org Git - sudo/commitdiff
Check for heimdal even if we found krb5-config and define HAVE_HEIMDAL.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 4 Apr 2003 17:45:24 +0000 (17:45 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 4 Apr 2003 17:45:24 +0000 (17:45 +0000)
config.h.in
configure
configure.in

index cbcc2200d0a358b2d1a5207586e44757eaa63180..de4468905701f8a874a488bff9d218abedc44fa5 100644 (file)
    passwords) */
 #undef HAVE_GETSPWUID
 
+/* Define if your Kerberos is Heimdal. */
+#undef HAVE_HEIMDAL
+
 /* Define to 1 if you have the `initgroups' function. */
 #undef HAVE_INITGROUPS
 
index 417b6faece503ecc15b61fc439378b4c38b6a91e..dba1015ae6a379171498d426d057d800ae28e0dd 100755 (executable)
--- a/configure
+++ b/configure
@@ -13363,6 +13363,52 @@ _ACEOF
        AUTH_OBJS="${AUTH_OBJS} kerb5.o"
        CPPFLAGS="$CPPFLAGS `krb5-config --cflags`"
        SUDO_LIBS="$SUDO_LIBS `krb5-config --libs`"
+                               echo "$as_me:$LINENO: checking whether we are using Heimdal" >&5
+echo $ECHO_N "checking whether we are using Heimdal... $ECHO_C" >&6
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <krb5.h>
+int
+main ()
+{
+const char *tmp = heimdal_version;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+               echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_HEIMDAL 1
+_ACEOF
+
+
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
     fi
 fi
 if test -n "$with_kerb5" -a -z "$KRB5CONFIG"; then
@@ -13457,6 +13503,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
 
            echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_HEIMDAL 1
+_ACEOF
+
            SUDO_LIBS="${SUDO_LIBS} -lkrb5 -ldes -lcom_err -lasn1"
            echo "$as_me:$LINENO: checking for main in -lroken" >&5
 echo $ECHO_N "checking for main in -lroken... $ECHO_C" >&6
index 098a0823b93cf194705972af588e09f359fdd3a8..6521bfbd0a5fbd5c058d3694f1c9629026260b82 100644 (file)
@@ -1779,6 +1779,16 @@ if test "$with_kerb5" = "yes"; then
        AUTH_OBJS="${AUTH_OBJS} kerb5.o"
        CPPFLAGS="$CPPFLAGS `krb5-config --cflags`"
        SUDO_LIBS="$SUDO_LIBS `krb5-config --libs`"
+       dnl
+       dnl Try to determine whether we have Heimdal or MIT Kerberos
+       dnl
+       AC_MSG_CHECKING(whether we are using Heimdal)
+       AC_TRY_COMPILE([#include <krb5.h>], [const char *tmp = heimdal_version;],
+           [
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_HEIMDAL, 1, [Define if your Kerberos is Heimdal.])
+           ]
+       )
     fi
 fi
 if test -n "$with_kerb5" -a -z "$KRB5CONFIG"; then
@@ -1810,6 +1820,7 @@ if test -n "$with_kerb5" -a -z "$KRB5CONFIG"; then
     AC_TRY_COMPILE([#include <krb5.h>], [const char *tmp = heimdal_version;],
        [
            AC_MSG_RESULT(yes)
+           AC_DEFINE(HAVE_HEIMDAL, 1, [Define if your Kerberos is Heimdal.])
            SUDO_LIBS="${SUDO_LIBS} -lkrb5 -ldes -lcom_err -lasn1"
            AC_CHECK_LIB(roken, main, [SUDO_LIBS="${SUDO_LIBS} -lroken"])
        ], [