diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-10-11 13:31:00 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:15:25 -0500 |
commit | 51994b35f14d3103fc4543a1bd4cfb3429fd5b5c (patch) | |
tree | a32a469a5b8e1d2a0c61f43cf12b1d8196e0b1f7 | |
parent | 06ea7f144ac092a659532e790e92fcd10ef3eeaa (diff) | |
download | samba-51994b35f14d3103fc4543a1bd4cfb3429fd5b5c.tar.gz samba-51994b35f14d3103fc4543a1bd4cfb3429fd5b5c.tar.bz2 samba-51994b35f14d3103fc4543a1bd4cfb3429fd5b5c.zip |
r19244: fix the build on systems with broken krb5
we need to make sure
HAVE_GSSAPI
HAVE_KRB5_H
HAVE_GSSAPI_H
HAVE_GSSAPI_GSSAPI_GENERIC_H
HAVE_GSSAPI_GSSAPI_H
are not in config.h
this adds 2 new macros to libreplace
AC_REMOVE_DEFINE(), AC_REMOVE_INCLUDE()
metze
(This used to be commit eb1f0b49cf0e84385a62f9dfcb2167fea2e8fd8b)
-rw-r--r-- | source3/configure.in | 16 | ||||
-rw-r--r-- | source3/lib/replace/libreplace_macros.m4 | 18 |
2 files changed, 29 insertions, 5 deletions
diff --git a/source3/configure.in b/source3/configure.in index 5e019c0015..9bc71058fc 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -3400,6 +3400,7 @@ fi use_ads=no if test x"$with_ads_support" != x"no"; then use_ads=yes + have_gssapi=no ac_save_LIBS=$LIBS # now check for gssapi headers. This is also done here to allow for @@ -3417,8 +3418,7 @@ if test x"$with_ads_support" != x"no"; then AC_CHECK_LIB_EXT(roken, KRB5_LIBS, roken_getaddrinfo_hostspec) # Heimdal checks. On static Heimdal gssapi must be linked before krb5. - AC_CHECK_LIB_EXT(gssapi, KRB5_LIBS, gss_display_status,[],[], - AC_DEFINE(HAVE_GSSAPI,1,[Whether GSSAPI is available])) + AC_CHECK_LIB_EXT(gssapi, KRB5_LIBS, gss_display_status,[],[],have_gssapi=yes) ######################################################## # now see if we can find the krb5 libs in standard paths @@ -3428,8 +3428,7 @@ if test x"$with_ads_support" != x"no"; then ######################################################## # now see if we can find the gssapi libs in standard paths - AC_CHECK_LIB_EXT(gssapi_krb5, KRB5_LIBS,gss_display_status,[],[], - AC_DEFINE(HAVE_GSSAPI,1,[Whether GSSAPI is available])) + AC_CHECK_LIB_EXT(gssapi_krb5, KRB5_LIBS,gss_display_status,[],[],have_gssapi=yes) AC_CHECK_FUNC_EXT(krb5_set_real_time, $KRB5_LIBS) AC_CHECK_FUNC_EXT(krb5_set_default_in_tkt_etypes, $KRB5_LIBS) @@ -3841,14 +3840,21 @@ if test x"$with_ads_support" != x"no"; then fi if test x"$use_ads" = x"yes"; then - AC_DEFINE(HAVE_KRB5,1,[Whether to have KRB5 support]) AC_DEFINE(WITH_ADS,1,[Whether to include Active Directory support]) + AC_DEFINE(HAVE_KRB5,1,[Whether to have KRB5 support]) + if test x"$have_gssapi" = x"yes"; then + AC_DEFINE(HAVE_GSSAPI,1,[Whether GSSAPI is available]) + fi else if test x"$with_ads_support" = x"yes"; then AC_MSG_ERROR(krb5 libs don't have all features required for Active Directory support) else AC_MSG_WARN(krb5 libs don't have all features required for Active Directory support) fi + AC_REMOVE_DEFINE(HAVE_KRB5_H) + AC_REMOVE_DEFINE(HAVE_GSSAPI_H) + AC_REMOVE_DEFINE(HAVE_GSSAPI_GSSAPI_GENERIC_H) + AC_REMOVE_DEFINE(HAVE_GSSAPI_GSSAPI_H) KRB5_LIBS="" with_ads_support=no fi diff --git a/source3/lib/replace/libreplace_macros.m4 b/source3/lib/replace/libreplace_macros.m4 index 4a645ef81f..0669c10c2a 100644 --- a/source3/lib/replace/libreplace_macros.m4 +++ b/source3/lib/replace/libreplace_macros.m4 @@ -264,6 +264,24 @@ define(AC_ADD_INCLUDE, EOF ]) +dnl remove an #include +dnl AC_REMOVE_INCLUDE(VARIABLE) +define(AC_REMOVE_INCLUDE, +[ +grep -v '[#include] $1' confdefs.h >confdefs.h.tmp +cat confdefs.h.tmp > confdefs.h +rm confdefs.h.tmp +]) + +dnl remove an #define +dnl AC_REMOVE_DEFINE(VARIABLE) +define(AC_REMOVE_DEFINE, +[ +grep -v '[#define] $1 ' confdefs.h |grep -v '[#define] $1[$]'>confdefs.h.tmp +cat confdefs.h.tmp > confdefs.h +rm confdefs.h.tmp +]) + dnl AS_HELP_STRING is not available in autoconf 2.57, and AC_HELP_STRING is deprecated dnl in autoconf 2.59, so define AS_HELP_STRING to be AC_HELP_STRING unless it is already dnl defined. |