From 73bbe4b2b50163861c7c46b6997d2f66593bbe3d Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Thu, 31 May 2007 22:16:10 +0000 Subject: [PATCH] Configure libkdb_ldap directory at top level git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19566 dc483132-0cff-0310-8789-dd5450dbe970 --- src/configure.in | 23 +++++++++--- src/plugins/kdb/ldap/libkdb_ldap/Makefile.in | 4 +-- src/plugins/kdb/ldap/libkdb_ldap/configure.in | 36 ------------------- 3 files changed, 20 insertions(+), 43 deletions(-) delete mode 100644 src/plugins/kdb/ldap/libkdb_ldap/configure.in diff --git a/src/configure.in b/src/configure.in index 88b25675f..0240e8cbc 100644 --- a/src/configure.in +++ b/src/configure.in @@ -946,17 +946,30 @@ dnl ldap_plugin_dir="" ldap_lib="" if test -n "$OPENLDAP_PLUGIN"; then - AC_CHECK_HEADERS(ldap.h lber.h) - if test $ac_cv_header_ldap_h = no || test $ac_cv_header_lber_h = no; then - AC_ERROR(OpenLDAP headers missing) - fi + AC_CHECK_HEADERS(ldap.h lber.h, :, [AC_MSG_ERROR($ac_header not found)]) + AC_CHECK_LIB(ldap, ldap_init, :, [AC_MSG_ERROR(libldap not found or missing ldap_init)]) old_LIBS="$LIBS" LIBS="$LIBS -lldap" AC_CHECK_FUNCS(ldap_initialize ldap_url_parse_nodn ldap_unbind_ext_s ldap_str2dn ldap_explode_dn) LIBS="$old_LIBS" - AC_CONFIG_SUBDIRS(plugins/kdb/ldap/libkdb_ldap) + + BER_OKAY=0 + AC_CHECK_LIB(ldap, ber_init, [BER_OKAY=1]) + if test "$BER_OKAY" = "1"; then + LDAP_LIBS='-lldap' + else + AC_CHECK_LIB(lber, ber_init, [BER_OKAY=1], [AC_MSG_WARN([libber not found])]) + if test "$BER_OKAY" = "1"; then + LDAP_LIBS='-lldap -llber' + else + AC_ERROR("BER library missing - cannot build LDAP database module") + fi + fi + AC_SUBST(LDAP_LIBS) + K5_GEN_MAKEFILE(plugins/kdb/ldap) K5_GEN_MAKEFILE(plugins/kdb/ldap/ldap_util) + K5_GEN_MAKEFILE(plugins/kdb/ldap/libkdb_ldap) ldap_plugin_dir=plugins/kdb/ldap fi AC_SUBST(ldap_plugin_dir) diff --git a/src/plugins/kdb/ldap/libkdb_ldap/Makefile.in b/src/plugins/kdb/ldap/libkdb_ldap/Makefile.in index 7aa0f3b2d..a0a69ef23 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/Makefile.in +++ b/src/plugins/kdb/ldap/libkdb_ldap/Makefile.in @@ -1,6 +1,6 @@ -thisconfigdir=. +thisconfigdir=../../../.. myfulldir=plugins/kdb/ldap/libkdb_ldap -mydir=. +mydir=plugins/kdb/ldap/libkdb_ldap BUILDTOP=$(REL)..$(S)..$(S)..$(S).. KRB5_RUN_ENV = @KRB5_RUN_ENV@ KRB5_CONFIG_SETUP = KRB5_CONFIG=$(SRCTOP)/config-files/krb5.conf ; export KRB5_CONFIG ; diff --git a/src/plugins/kdb/ldap/libkdb_ldap/configure.in b/src/plugins/kdb/ldap/libkdb_ldap/configure.in deleted file mode 100644 index 61271a8f4..000000000 --- a/src/plugins/kdb/ldap/libkdb_ldap/configure.in +++ /dev/null @@ -1,36 +0,0 @@ -K5_AC_INIT(configure.in) -CONFIG_RULES -AC_CHECK_HEADERS(unistd.h) -AC_TYPE_MODE_T -AC_TYPE_OFF_T - -AC_CHECK_FUNCS(srand48 srand srandom umask) - -LDAP_OKAY=1 -AC_CHECK_HEADERS([ldap.h], :, [LDAP_OKAY=0; AC_MSG_WARN([ldap.h not found])]) -AC_CHECK_HEADERS([lber.h], :, [LDAP_OKAY=0; AC_MSG_WARN([lber.h not found])]) -AC_CHECK_LIB(ldap, ldap_init, :, [LDAP_OKAY=0; AC_MSG_WARN([libldap not found])]) -if test "$LDAP_OKAY" = "0"; then - AC_ERROR("LDAP libraries missing - skipping LDAP database module") -fi -BER_OKAY=0 -AC_CHECK_LIB(ldap, ber_init, [BER_OKAY=1]) -if test "$BER_OKAY" = "1"; then - LDAP_LIBS='-lldap' -else - AC_CHECK_LIB(lber, ber_init, [BER_OKAY=1], [AC_MSG_WARN([libber not found])]) - if test "$BER_OKAY" = "1"; then - LDAP_LIBS='-lldap -llber' - else - AC_ERROR("BER library missing - skipping LDAP database module") - fi -fi -AC_SUBST(LDAP_LIBS) - -KRB5_RUN_FLAGS -dnl The following is for check... -KRB5_BUILD_PROGRAM -KRB5_BUILD_LIBOBJS -KRB5_BUILD_LIBRARY -dnl -V5_AC_OUTPUT_MAKEFILE -- 2.26.2