ebd0cbd
From 47601e462c6606f7a711c093fb1b03580b01ee46 Mon Sep 17 00:00:00 2001
ebd0cbd
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
ebd0cbd
Date: Thu, 7 Jan 2016 10:23:24 +0100
ebd0cbd
Subject: [PATCH] Work around an AC_CHECK_LIB bug in Autoconf
ebd0cbd
MIME-Version: 1.0
ebd0cbd
Content-Type: text/plain; charset=UTF-8
ebd0cbd
Content-Transfer-Encoding: 8bit
ebd0cbd
ebd0cbd
AC_CHECK_LIB([ldap], [ldap_initialize], [], [...]) should not append -lldap to
ebd0cbd
LIBS variable because third AC_CHECK_LIB arugment is defined and
ebd0cbd
empty.
ebd0cbd
ebd0cbd
But broken autoconf-2.69-21.fc23 thinks empty is undefined and
ebd0cbd
defaults to implicit if-found action. That results into linking all
ebd0cbd
executables to ldap library and that is unnecessary.
ebd0cbd
ebd0cbd
Signed-off-by: Petr Písař <ppisar@redhat.com>
ebd0cbd
---
ebd0cbd
 configure.ac | 2 +-
ebd0cbd
 1 file changed, 1 insertion(+), 1 deletion(-)
ebd0cbd
ebd0cbd
diff --git a/configure.ac b/configure.ac
ebd0cbd
index bb33774..1994945 100644
ebd0cbd
--- a/configure.ac
ebd0cbd
+++ b/configure.ac
ebd0cbd
@@ -73,7 +73,7 @@ AC_ARG_ENABLE([ldapmail],
ebd0cbd
 )
ebd0cbd
 AS_IF([test "x$enable_ldapmail" != "xno"], [
ebd0cbd
     build_ldap="yes"
ebd0cbd
-    AC_CHECK_LIB([ldap], [ldap_initialize], [], [
ebd0cbd
+    AC_CHECK_LIB([ldap], [ldap_initialize], [:;], [
ebd0cbd
         build_ldap=no
ebd0cbd
         AS_IF([test "x$enable_ldapmail" = "xyes"], [
ebd0cbd
             AC_MSG_ERROR([LDAP support required but library not found.]);
ebd0cbd
-- 
ebd0cbd
2.5.0
ebd0cbd