diff options
-rw-r--r-- | source3/acconfig.h | 2 | ||||
-rw-r--r-- | source3/configure.in | 114 | ||||
-rw-r--r-- | source3/include/config.h.in | 3 | ||||
-rw-r--r-- | source3/include/includes.h | 4 |
4 files changed, 74 insertions, 49 deletions
diff --git a/source3/acconfig.h b/source3/acconfig.h index 40a3a7cee1..21c6e33076 100644 --- a/source3/acconfig.h +++ b/source3/acconfig.h @@ -228,3 +228,5 @@ #undef LINUX_BROKEN_SENDFILE_API #undef WITH_SENDFILE #undef FREEBSD_SENDFILE_API +#undef WITH_ADS + diff --git a/source3/configure.in b/source3/configure.in index 0e4e910f0c..fe697e4209 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -1936,63 +1936,85 @@ AC_ARG_WITH(dfs, AC_MSG_RESULT(no) ) - ################################################# -# see if this box has the RedHat location for kerberos -AC_MSG_CHECKING(for /usr/kerberos) -if test -d /usr/kerberos; then +# active directory support + +with_ads_support=yes +AC_MSG_CHECKING([whether to use Active Directory]) + +AC_ARG_WITH(ads, +[ --with-ads Active Directory support (default yes)], +[ case "$withval" in + no) + with_ads_support=no + ;; + esac ]) + +if test x"$with_ads_support" = x"yes"; then + AC_DEFINE(WITH_ADS) +fi + +AC_MSG_RESULT($with_ads_support) + +if test x"$with_ads_support" = x"yes"; then + + ################################################# + # see if this box has the RedHat location for kerberos + AC_MSG_CHECKING(for /usr/kerberos) + if test -d /usr/kerberos; then LDFLAGS="$LDFLAGS -L/usr/kerberos/lib" CFLAGS="$CFLAGS -I/usr/kerberos/include" CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include" AC_MSG_RESULT(yes) -else + else AC_MSG_RESULT(no) -fi + fi -################################################# -# check for location of Kerberos 5 install -AC_MSG_CHECKING(for kerberos 5 install path) -AC_ARG_WITH(krb5, -[ --with-krb5=base-dir Locate Kerberos 5 support (default=/usr)], -[ case "$withval" in - no) + ################################################# + # check for location of Kerberos 5 install + AC_MSG_CHECKING(for kerberos 5 install path) + AC_ARG_WITH(krb5, + [ --with-krb5=base-dir Locate Kerberos 5 support (default=/usr)], + [ case "$withval" in + no) + AC_MSG_RESULT(no) + ;; + *) + AC_MSG_RESULT(yes) + LIBS="$LIBS -lkrb5" + CFLAGS="$CFLAGS -I$withval/include" + CPPFLAGS="$CPPFLAGS -I$withval/include" + LDFLAGS="$LDFLAGS -L$withval/lib" + ;; + esac ], AC_MSG_RESULT(no) - ;; - *) - AC_MSG_RESULT(yes) - LIBS="$LIBS -lkrb5" - CFLAGS="$CFLAGS -I$withval/include" - CPPFLAGS="$CPPFLAGS -I$withval/include" - LDFLAGS="$LDFLAGS -L$withval/lib" - ;; - esac ], - AC_MSG_RESULT(no) -) - -# now check for krb5.h. Some systems have the libraries without the headers! -# note that this check is done here to allow for different kerberos -# include paths -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) - -################################################################## -# we might need the k5crypto and com_err libraries on some systems -AC_CHECK_LIB(com_err, _et_list, [LIBS="$LIBS -lcom_err"]) -AC_CHECK_LIB(k5crypto, krb5_encrypt_data, [LIBS="$LIBS -lk5crypto"]) - -######################################################## -# now see if we can find the krb5 libs in standard paths -# or as specified above -AC_CHECK_LIB(krb5, krb5_mk_req_extended, [LIBS="$LIBS -lkrb5"; + ) + + # now check for krb5.h. Some systems have the libraries without the headers! + # note that this check is done here to allow for different kerberos + # include paths + 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) + + ################################################################## + # we might need the k5crypto and com_err libraries on some systems + AC_CHECK_LIB(com_err, _et_list, [LIBS="$LIBS -lcom_err"]) + AC_CHECK_LIB(k5crypto, krb5_encrypt_data, [LIBS="$LIBS -lk5crypto"]) + + ######################################################## + # now see if we can find the krb5 libs in standard paths + # or as specified above + AC_CHECK_LIB(krb5, krb5_mk_req_extended, [LIBS="$LIBS -lkrb5"; AC_DEFINE(HAVE_KRB5)]) -######################################################## -# now see if we can find the gssapi libs in standard paths -AC_CHECK_LIB(gssapi_krb5, gss_display_status, [LIBS="$LIBS -lgssapi_krb5"; + ######################################################## + # 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)]) +fi ################################################################## # we might need the lber lib on some systems. To avoid link errors diff --git a/source3/include/config.h.in b/source3/include/config.h.in index 9fbde2bf37..8e744e43f7 100644 --- a/source3/include/config.h.in +++ b/source3/include/config.h.in @@ -1,4 +1,4 @@ -/* include/config.h.in. Generated automatically from configure.in by autoheader. */ +/* include/config.h.in. Generated automatically from configure.in by autoheader 2.13. */ /* Define if on AIX 3. System headers sometimes define this. @@ -294,6 +294,7 @@ #undef LINUX_BROKEN_SENDFILE_API #undef WITH_SENDFILE #undef FREEBSD_SENDFILE_API +#undef WITH_ADS /* The number of bytes in a int. */ #undef SIZEOF_INT diff --git a/source3/include/includes.h b/source3/include/includes.h index eaa0d25239..bdf5bbcef3 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -420,8 +420,8 @@ #include <gssapi/gssapi_generic.h> #endif -/* we support ADS if we have krb5 and ldap libs */ -#if defined(HAVE_KRB5) && defined(HAVE_LDAP) +/* we support ADS if we want it and have krb5 and ldap libs */ +#if defined(WITH_ADS) && defined(HAVE_KRB5) && defined(HAVE_LDAP) #define HAVE_ADS #endif |