summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-06-05 12:10:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:17:39 -0500
commit2c499fe5aa04fffa4a58696d9f5d1df35f2fc384 (patch)
treeb5b06acf46fbf29e033a55b87a11b4beb8ab7a64
parent1723f67291c6265e9cc264002ac4976caaac72d7 (diff)
downloadsamba-2c499fe5aa04fffa4a58696d9f5d1df35f2fc384.tar.gz
samba-2c499fe5aa04fffa4a58696d9f5d1df35f2fc384.tar.bz2
samba-2c499fe5aa04fffa4a58696d9f5d1df35f2fc384.zip
r7303: autodetect the libkdc and our kdc support
btw: I use this for configuring heimdal >>> CONFIG="CFLAGS=\"-g -O -Wall -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -Wdeclaration-after-statement\" \ CC=gcc-4.0 \ ./configure -C --prefix=$HOME/prefix/heimdal-test \ --sysconfdir=/etc \ --enable-shared=no \ --with-ldb=$HOME/prefix/ldb \ --without-openldap \ --without-openssl $@" echo $CONFIG eval $CONFIG >>> maybe you also want to use --disable-berkeley-db metze (This used to be commit 2aec140e00770df78ba31ef91109634ce0aa3d8a)
-rw-r--r--source4/auth/kerberos/config.m435
-rw-r--r--source4/configure.in2
-rw-r--r--source4/kdc/config.m45
-rw-r--r--source4/kdc/config.mk2
-rw-r--r--source4/smbd/config.m41
5 files changed, 35 insertions, 10 deletions
diff --git a/source4/auth/kerberos/config.m4 b/source4/auth/kerberos/config.m4
index 0c24828907..d88fc78554 100644
--- a/source4/auth/kerberos/config.m4
+++ b/source4/auth/kerberos/config.m4
@@ -176,8 +176,6 @@ if test x$with_krb5_support != x"no"; then
with_krb5_support="no"
fi
- AC_CHECK_HEADERS(kdc.h)
-
CFLAGS=$ac_save_CFLAGS
CPPFLAGS=$ac_save_CPPFLAGS
LDFLAGS=$ac_save_LDFLAGS
@@ -204,9 +202,6 @@ if test x"$with_krb5_support" != x"no"; then
AC_CHECK_LIB_EXT(com_err, KRB5_LIBS, _et_list)
AC_CHECK_LIB_EXT(k5crypto, KRB5_LIBS, krb5_encrypt_data)
- AC_CHECK_LIB_EXT(kdc, KRB5_LIBS, krb5_kdc_default_config)
- AC_CHECK_LIB_EXT(hdb, KRB5_LIBS, hdb_generate_key_set_password)
-
# Heimdal checks.
# But only if we didn't have a krb5-config to tell us this already
if test x"$FOUND_KRB5_VIA_CONFIG" != x"yes"; then
@@ -499,6 +494,33 @@ if test x"$with_krb5_support" != x"no"; then
with_krb5_support=no
fi
+ # checks if we have access to a libkdc
+ # and can use it for our builtin kdc server_service
+ KDC_CFLAGS=""
+ KDC_CPPFLAGS=""
+ KDC_DLFLAGS=""
+ KDC_LIBS=""
+ AC_CHECK_HEADERS(kdc.h)
+ AC_CHECK_LIB_EXT(kdc, KDC_LIBS, krb5_kdc_default_config)
+ AC_CHECK_LIB_EXT(hdb, KDC_LIBS, hdb_generate_key_set_password)
+
+ AC_MSG_CHECKING(whether libkdc is used)
+ if test x"$ac_cv_header_kdc_h" = x"yes"; then
+ if test x"$ac_cv_lib_ext_kdc_krb5_kdc_default_config" = x"yes"; then
+ if test x"$ac_cv_lib_ext_hdb_hdb_generate_key_set_password" = x"yes"; then
+ SMB_EXT_LIB_ENABLE(KDC,YES)
+ AC_MSG_RESULT(yes)
+ echo "KDC_LIBS: ${KDC_LIBS}"
+ else
+ AC_MSG_RESULT(no)
+ fi
+ else
+ AC_MSG_RESULT(no)
+ fi
+ else
+ AC_MSG_RESULT(no)
+ fi
+
CFLAGS=$ac_save_CFLAGS
CPPFLAGS=$ac_save_CPPFLAGS
LDFLAGS=$ac_save_LDFLAGS
@@ -513,5 +535,4 @@ if test x"$with_krb5_support" != x"no"; then
fi
SMB_EXT_LIB(KRB5,[${KRB5_LIBS}],[${KRB5_CFLAGS}],[${KRB5_CPPFLAGS}],[${KRB5_LDFLAGS}])
-
-
+SMB_EXT_LIB(KDC,[${KDC_LIBS}],[${KDC_CFLAGS}],[${KDC_CPPFLAGS}],[${KDC_LDFLAGS}])
diff --git a/source4/configure.in b/source4/configure.in
index 6f24af3a7f..a2a85c2885 100644
--- a/source4/configure.in
+++ b/source4/configure.in
@@ -31,7 +31,7 @@ sinclude(ntvfs/posix/config.m4)
sinclude(lib/socket_wrapper/config.m4)
sinclude(web_server/config.m4)
sinclude(auth/config.m4)
-sinclude(smbd/config.m4)
+sinclude(kdc/config.m4)
ALLLIBS_LIBS="$LIBS"
ALLLIBS_CFLAGS="$CFLAGS"
diff --git a/source4/kdc/config.m4 b/source4/kdc/config.m4
new file mode 100644
index 0000000000..1408a858f4
--- /dev/null
+++ b/source4/kdc/config.m4
@@ -0,0 +1,5 @@
+SMB_MODULE_DEFAULT(server_service_kdc, NOT)
+
+if test t$SMB_EXT_LIB_ENABLE_KDC = tYES; then
+ SMB_MODULE_DEFAULT(server_service_kdc, STATIC)
+fi
diff --git a/source4/kdc/config.mk b/source4/kdc/config.mk
index 220b7e633c..a7558e52a6 100644
--- a/source4/kdc/config.mk
+++ b/source4/kdc/config.mk
@@ -7,6 +7,6 @@ INIT_OBJ_FILES = \
kdc/kdc.o \
kdc/hdb-ldb.o
REQUIRED_SUBSYSTEMS = \
- SOCKET
+ LDB EXT_LIB_KRB5 EXT_LIB_KDC
# End SUBSYSTEM KDC
#######################
diff --git a/source4/smbd/config.m4 b/source4/smbd/config.m4
deleted file mode 100644
index 371fb8e66f..0000000000
--- a/source4/smbd/config.m4
+++ /dev/null
@@ -1 +0,0 @@
-SMB_MODULE_DEFAULT(server_service_kdc, NOT)