Message-ID: <478F78DA.6090401@inria.fr>
Date: Thu, 17 Jan 2008 16:48:42 +0100
From: Guillaume Rousse <Guillaume.Rousse@inria.fr>
User-Agent: Thunderbird 2.0.0.9 (X11/20080114)
MIME-Version: 1.0
To: autofs@linux.kernel.org
Subject: linking issues with ldap
X-Enigmail-Version: 0.95.3
Content-Type: multipart/mixed; boundary="------------060107030305090105040908"

This is a multi-part message in MIME format.
--------------060107030305090105040908
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hello list.

Latest release (5.0.3) attempt to link against libldap_r, and fails on
mandriva because of unresolved pthread symbols. However, according to
ldap maintainer, libldap_r is supposed to be a private library. Hence
autofs should use -lldap, not -lldap_r. Attached patch fix this.
-- 
Guillaume Rousse
Moyens Informatiques - INRIA Futurs
Tel: 01 69 35 69 62

--------------060107030305090105040908
Content-Type: text/x-patch;
 name="autofs-5.0.3-ldap-linking.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="autofs-5.0.3-ldap-linking.patch"

diff -p -up autofs-5.0.3/aclocal.m4.pthread autofs-5.0.3/aclocal.m4
--- autofs-5.0.3/aclocal.m4.pthread	2008-01-15 14:30:04.000000000 +0000
+++ autofs-5.0.3/aclocal.m4	2008-01-15 14:30:30.000000000 +0000
@@ -250,7 +250,7 @@ AC_DEFUN([AF_CHECK_FUNC_LDAP_CREATE_PAGE
 
 # save current ldflags
 af_check_ldap_create_page_control_save_ldflags="$LDFLAGS"
-LDFLAGS="$LDFLAGS -lldap_r"
+LDFLAGS="$LDFLAGS -lldap"
 
 AC_TRY_LINK(
   [ #include <ldap.h> ],
@@ -283,7 +283,7 @@ AC_DEFUN([AF_CHECK_FUNC_LDAP_PARSE_PAGE_
 
 # save current ldflags
 af_check_ldap_parse_page_control_save_ldflags="$LDFLAGS"
-LDFLAGS="$LDFLAGS -lldap_r"
+LDFLAGS="$LDFLAGS -lldap"
 
 AC_TRY_LINK(
   [ #include <ldap.h> ],

--------------060107030305090105040908--

