Configure libkdb_ldap directory at top level
authorKen Raeburn <raeburn@mit.edu>
Thu, 31 May 2007 22:16:10 +0000 (22:16 +0000)
committerKen Raeburn <raeburn@mit.edu>
Thu, 31 May 2007 22:16:10 +0000 (22:16 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19566 dc483132-0cff-0310-8789-dd5450dbe970

src/configure.in
src/plugins/kdb/ldap/libkdb_ldap/Makefile.in
src/plugins/kdb/ldap/libkdb_ldap/configure.in [deleted file]

index 88b25675f296d4eab208a17041d89a8469638d8a..0240e8cbcc61617c490849c1899506bef36817e5 100644 (file)
@@ -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)
index 7aa0f3b2de3bb5a25df2d11f8427bd1303fa6c10..a0a69ef235cace24c7d8ce4dad4efafb17f7f8ef 100644 (file)
@@ -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 (file)
index 61271a8..0000000
+++ /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