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)
committerKarolin Seeger <kseeger@samba.org>
Wed, 13 Jan 2010 13:01:02 +0000 (14:01 +0100)
Heimdal changed the KRB5_DEPRECATED define (which now may not take an identifier
for activation) in new releases (like 1.3.1).

Guenther
(cherry picked from commit 1a8f8382740e352a83133b8c49aaedd4716210cd)
(cherry picked from commit a6572bb03fcd323ce03b22ccd713181235f3b0e6)

source/configure.in
source/libsmb/clikrb5.c

index 1092d00b17d1aebdb3e0f928e9762823e8746c51..6594e7cca465979f3b00144a3421735e3f46610c 100644 (file)
@@ -3550,6 +3550,25 @@ if test x"$with_ads_support" != x"no"; then
        WINBIND_KRB5_LOCATOR="bin/winbind_krb5_locator.$SHLIBEXT"
        EXTRA_ALL_TARGETS="$EXTRA_ALL_TARGETS $WINBIND_KRB5_LOCATOR"
   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 231938790b918ce3707000037cdeae99faefaa6e..666ca08633969aeee7174a5dec359b321bca210c 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"