From 62f36072ff81bb7f53498a9a9f6c204530ffcd0b Mon Sep 17 00:00:00 2001 From: Frederic Marchal Date: Wed, 6 Nov 2013 08:12:29 +0100 Subject: [PATCH] Check that every required ldap header file is available LDAP support is only enabled if every required header file is detected on the target system. --- configure.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 61f1dd4..4352d5f 100644 --- a/configure.in +++ b/configure.in @@ -106,8 +106,10 @@ AC_ARG_WITH([ldap], AS_HELP_STRING([--with-ldap],[Compile with LDAP support]), [],[with_ldap=check]) if ( test "x$with_ldap" != "xno" ) ; then - AC_CHECK_HEADERS(ldap.h) - AC_CHECK_LIB(ldap, ldap_init,LIBS="-lldap ${LIBS}"; HAVE_LDAP="yes", HAVE_LDAP="") + AC_CHECK_HEADERS([ldap_cdefs.h] [ldap_features.h] [ldap.h],,break) + if ( test "x$ac_cv_header_ldap_h" = "xyes" ) ; then + AC_CHECK_LIB(ldap, ldap_init,LIBS="-lldap ${LIBS}"; HAVE_LDAP="yes", HAVE_LDAP="") + fi else AC_MSG_NOTICE([Not building with LDAP support as requested on the configuration command line]) fi -- 2.47.3