From: Frederic Marchal Date: Wed, 6 Nov 2013 07:12:29 +0000 (+0100) Subject: Check that every required ldap header file is available X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=62f36072ff81bb7f53498a9a9f6c204530ffcd0b;p=thirdparty%2Fsarg.git 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. --- 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