Only build pdb_ldap if both ldap libs and headers are found
authorJelmer Vernooij <jelmer@samba.org>
Thu, 20 Mar 2003 17:45:23 +0000 (17:45 +0000)
committerJelmer Vernooij <jelmer@samba.org>
Thu, 20 Mar 2003 17:45:23 +0000 (17:45 +0000)
(This used to be commit 228110e83fce91c811c82f6f836d313b6b79ff87)

source3/configure.in

index 958771368e53a6ec7c6644fc8b27ce3c19556631..b6fabe60859b0df94b7f0c1b2d7df099c7914648 100644 (file)
@@ -472,7 +472,7 @@ AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/i
 AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h)
 AC_CHECK_HEADERS(sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h)
 AC_CHECK_HEADERS(sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h)
-AC_CHECK_HEADERS(security/pam_modules.h security/_pam_macros.h ldap.h lber.h dlfcn.h)
+AC_CHECK_HEADERS(security/pam_modules.h security/_pam_macros.h dlfcn.h)
 AC_CHECK_HEADERS(sys/syslog.h syslog.h)
 
 # In valgrind 1.0.x, it's just valgrind.h.  In 1.9.x+ there's a
@@ -2247,7 +2247,7 @@ if test x"$with_ldap_support" = x"yes"; then
   if test x$have_ldap != xyes; then
   AC_CHECK_LIB(ldap, ldap_domain2hostlist, [LIBS="$LIBS -lldap";
        AC_DEFINE(HAVE_LDAP,1,[Whether ldap is available])])
-     default_modules="$default_modules pdb_ldap"
+       AC_CHECK_HEADERS([ldap.h lber.h], [default_modules="$default_modules pdb_ldap"])
 
        ########################################################
        # If we have LDAP, does it's rebind procedure take 2 or 3 arguments?