s3-kerberos: Fix Bug #6929: build with recent heimdal.
authorGünther Deschner <gd@samba.org>
Fri, 27 Nov 2009 00:06:36 +0000 (01:06 +0100)
committerGünther Deschner <gd@samba.org>
Fri, 27 Nov 2009 00:40:35 +0000 (01:40 +0100)
Heimdal changed the KRB5_DEPRECATED define (which now may not take an identifier
for activation) in new releases (like 1.3.1).

Guenther

source3/configure.in
source3/libsmb/clikrb5.c

index 29016c5d8640c5e647cd5974857d0489f1c86f5b..693fe6a061df7efc245d8f4bca1c583afdc64555 100644 (file)
@@ -3362,6 +3362,25 @@ if test x"$with_ads_support" != x"no"; then
                EXTRA_ALL_TARGETS="$EXTRA_ALL_TARGETS $WINBIND_KRB5_LOCATOR"
        fi
   fi
+
+  # check for new heimdal KRB5_DEPRECATED handling
+
+  AC_CACHE_CHECK([for KRB5_DEPRECATED define taking an identifier],
+                samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER,[
+    AC_TRY_COMPILE(
+      [#define KRB5_DEPRECATED 1
+      #include <krb5.h>],
+      [void main(void) {}],
+      samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER=yes,
+      samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER=no)])
+
+  if test x"$samba_cv_HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER" = x"yes"; then
+    AC_DEFINE(KRB5_DEPRECATED, 1,
+              [Whether to use deprecated krb5 interfaces])
+  else
+    AC_DEFINE(KRB5_DEPRECATED,,
+              [Whether to use deprecated krb5 interfaces])
+  fi
 fi
 
 # Now we have determined whether we really want ADS support
index 3da64d60c2f3704cbe029298da82363ea5f2fc7b..3dc8c64ba9fa5ab8863f51d38c0bbeb4174a7a56 100644 (file)
@@ -21,7 +21,7 @@
 */
 
 #define KRB5_PRIVATE    1       /* this file uses PRIVATE interfaces! */
-#define KRB5_DEPRECATED 1       /* this file uses DEPRECATED interfaces! */
+/* this file uses DEPRECATED interfaces! */
 
 #include "includes.h"