summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in16
1 files changed, 11 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