hello andrew,

On Tue, Nov 12, 2002 at 08:22:25PM -0500, [EMAIL PROTECTED] wrote:
> 
> Date: Wed Nov 13 01:22:25 2002
> Author:       abartlet
> 
> Update of /data/cvs/samba/source
> In directory dp.samba.org:/tmp/cvs-serv8858
> 
> Modified Files:
>       configure.in 
> Log Message:
> - Add some more warning flags for --enable-developer.
> - patch from SUSE for hiemdal headers in /usr/include/heimdal

looking for "/usr/include/heimdal" but then including
"/usr/heimdal/include" does not make too much sense :)

anyway, in earlier suse-versions we had the libs under /usr/lib/heimdal,
so maybe it is better to either have two checks for the includes and for
the libs or someone writes a nice aclocal-macro that automagically finds
mit or heimdal.

so if heimdal-support should be really added (although it is not working
completly yet in my setup) you need at least the gssapi.h in a different 
location and mit's -lgssapi_krb5 is -lgssapi in heimdal.

attached diff should do this part.

there is still much more to do, esp. in Makefile.in because
krb5_set_real_time of luke howards patch is in kerberos_verify.c.

i'm still trying to improve this and hopefully i can send you a larger
diff soon.

thanks,
guenther
-- 
Guenther Deschner                          [EMAIL PROTECTED]
SuSE Linux AG                                        GnuPG: 8EE11688
Berliner Str. 27                      phone:  +49 (0) 30 / 430944778
D-13507 Berlin                           fax:  +49 (0) 30 / 43732804
--- source/include/config.h.in  2002-10-21 21:38:13.000000000 +0200
+++ source/include/config.h.in  2002-10-21 22:10:19.000000000 +0200
@@ -244,9 +244,15 @@
 /* Define to 1 if you have the <grp.h> header file. */
 #undef HAVE_GRP_H
 
+/* Whether HEIMDAL is available */
+#undef HAVE_HEIMDAL
+
 /* Whether GSSAPI is available */
 #undef HAVE_GSSAPI
 
+/* Define to 1 if you have the <gssapi.h> header file.  */
+#undef HAVE_GSSAPI_H
+
 /* Define to 1 if you have the <gssapi/gssapi_generic.h> header file. */
 #undef HAVE_GSSAPI_GSSAPI_GENERIC_H
 
--- source/configure.in 2002-11-14 00:35:00.000000000 +0100
+++ source/configure.in 2002-11-14 01:25:04.000000000 +0100
@@ -1950,7 +1950,7 @@
 AC_MSG_CHECKING([whether to use Active Directory])
 
 AC_ARG_WITH(ads,
-[   --with-ads  Active Directory support (default yes)],
+[  --with-ads              Active Directory support (default yes)],
 [ case "$withval" in
     no)
        with_ads_support=no
@@ -1966,6 +1966,29 @@
 FOUND_KRB5=no
 if test x"$with_ads_support" = x"yes"; then
 
+#################################################
+# check for kerberos 5 implementation
+AC_MSG_CHECKING(for kerberos 5 implementation)
+AC_ARG_WITH(krb5impl,
+[  --with-krb5impl={heimdal,mit}    Choose Kerberos 5 implementation (default=mit)],
+[ case "$withval" in
+  heimdal)
+    AC_DEFINE(HAVE_HEIMDAL,1,[Whether HEIMDAL is available])
+    AC_MSG_RESULT($withval)
+    KRB5IMPL="heimdal"
+    ;;
+  mit)
+    AC_MSG_RESULT($withval)
+    KRB5IMPL="mit"
+    ;;
+  *)
+    AC_MSG_WARN(--with-krb5impl called without argument - will use default)
+    KRB5IMPL="mit"
+    ;;
+  esac ],
+  AC_MSG_RESULT(no)
+)
+
   #################################################
   # check for location of Kerberos 5 install
   AC_MSG_CHECKING(for kerberos 5 install path)
@@ -1993,8 +2016,9 @@
 # see if this box has the SuSE location for the heimdal kerberos implementation
 AC_MSG_CHECKING(for /usr/include/heimdal)
 if test -d /usr/include/heimdal; then
-    CFLAGS="$CFLAGS -I/usr/heimdal/include"
-    CPPFLAGS="$CPPFLAGS -I/usr/heimdal/include"
+    CFLAGS="$CFLAGS -I/usr/include/heimdal"
+    CPPFLAGS="$CPPFLAGS -I/usr/include/heimdal"
+    FOUND_KRB5=yes
     AC_MSG_RESULT(yes)
 else
     AC_MSG_RESULT(no)
@@ -2003,6 +2027,7 @@
 
 
 if test x$FOUND_KRB5 = x"no"; then
+if test x$KRB5IMPL = x"mit"; then
 #################################################
 # see if this box has the RedHat location for kerberos
 AC_MSG_CHECKING(for /usr/kerberos)
@@ -2015,6 +2040,7 @@
     AC_MSG_RESULT(no)
 fi
 fi
+fi
 
 
   # now check for krb5.h. Some systems have the libraries without the headers!
@@ -2023,8 +2049,8 @@
   AC_CHECK_HEADERS(krb5.h)
 
   # now check for gssapi headers.  This is also done here to allow for
-  # different kerberos include paths
-  AC_CHECK_HEADERS(gssapi/gssapi_generic.h gssapi/gssapi.h)
+  # different kerberos include paths (Heimdal included)
+  AC_CHECK_HEADERS(gssapi.h gssapi/gssapi_generic.h gssapi/gssapi.h)
 
   ##################################################################
   # we might need the k5crypto and com_err libraries on some systems
@@ -2039,8 +2065,13 @@
 
   ########################################################
   # now see if we can find the gssapi libs in standard paths
-  AC_CHECK_LIB(gssapi_krb5, gss_display_status, [LIBS="$LIBS -lgssapi_krb5";
-       AC_DEFINE(HAVE_GSSAPI,1,[Whether GSSAPI is available])])
+  if test x$KRB5IMPL = x"heimdal"; then
+     AC_CHECK_LIB(gssapi, gss_display_status, [LIBS="$LIBS -lgssapi";
+       AC_DEFINE(HAVE_GSSAPI,1,[Whether Heimdal GSSAPI is available])])
+  else
+     AC_CHECK_LIB(gssapi_krb5, gss_display_status, [LIBS="$LIBS -lgssapi_krb5";
+       AC_DEFINE(HAVE_GSSAPI,1,[Whether MIT GSSAPI is available])])
+  fi
 fi
 
 ########################################################
@@ -2050,7 +2081,7 @@
 AC_MSG_CHECKING([whether to use LDAP])
 
 AC_ARG_WITH(ldap,
-[   --with-ldap  LDAP support (default yes)],
+[  --with-ldap             LDAP support (default yes)],
 [ case "$withval" in
     no)
        with_ldap_support=no

Attachment: msg02126/pgp00000.pgp
Description: PGP signature

Reply via email to