1 autofs-5.0.4 - fix ldap detection
3 From: Guillaume Rousse <Guillaume.Rousse@inria.fr>
5 The test for LDAP library wrongly use LDFLAGS to add -lldap to the gcc
6 call. However, when strict linker ordering is in effect, it doesn't work
7 correctly. As described in autoconf documentation, additional libs
8 should be added through LIBS variable instead.
11 aclocal.m4 | 20 ++++++++++----------
12 configure | 20 ++++++++++----------
13 2 files changed, 20 insertions(+), 20 deletions(-)
16 diff --git a/aclocal.m4 b/aclocal.m4
17 index bb0ab21..ab11112 100644
20 @@ -246,9 +246,9 @@ dnl --------------------------------------------------------------------------
21 AC_DEFUN([AF_CHECK_FUNC_LDAP_CREATE_PAGE_CONTROL],
22 [AC_MSG_CHECKING(for ldap_create_page_control in -lldap)
24 -# save current ldflags
25 -af_check_ldap_create_page_control_save_ldflags="$LDFLAGS"
26 -LDFLAGS="$LDFLAGS -lldap"
28 +af_check_ldap_create_page_control_save_libs="$LIBS"
32 [ #include <ldap.h> ],
33 @@ -267,8 +267,8 @@ if test "$af_have_ldap_create_page_control" = "yes"; then
34 [Define to 1 if you have the `ldap_create_page_control' function.])
38 -LDFLAGS="$af_check_ldap_create_page_control_save_ldflags"
40 +LIBS="$af_check_ldap_create_page_control_save_libs"
43 dnl --------------------------------------------------------------------------
44 @@ -279,9 +279,9 @@ dnl --------------------------------------------------------------------------
45 AC_DEFUN([AF_CHECK_FUNC_LDAP_PARSE_PAGE_CONTROL],
46 [AC_MSG_CHECKING(for ldap_parse_page_control in -lldap)
48 -# save current ldflags
49 -af_check_ldap_parse_page_control_save_ldflags="$LDFLAGS"
50 -LDFLAGS="$LDFLAGS -lldap"
52 +af_check_ldap_parse_page_control_save_libs="$LIBS"
56 [ #include <ldap.h> ],
57 @@ -300,7 +300,7 @@ if test "$af_have_ldap_create_page_control" = "yes"; then
58 [Define to 1 if you have the `ldap_parse_page_control' function.])
62 -LDFLAGS="$af_check_ldap_parse_page_control_save_ldflags"
64 +LIBS="$af_check_ldap_parse_page_control_save_libs"
67 diff --git a/configure b/configure
68 index ed17660..afa692c 100755
71 @@ -4608,9 +4608,9 @@ _ACEOF
72 { echo "$as_me:$LINENO: checking for ldap_create_page_control in -lldap" >&5
73 echo $ECHO_N "checking for ldap_create_page_control in -lldap... $ECHO_C" >&6; }
75 -# save current ldflags
76 -af_check_ldap_create_page_control_save_ldflags="$LDFLAGS"
77 -LDFLAGS="$LDFLAGS -lldap"
79 +af_check_ldap_create_page_control_save_libs="$LIBS"
82 cat >conftest.$ac_ext <<_ACEOF
84 @@ -4672,15 +4672,15 @@ _ACEOF
89 -LDFLAGS="$af_check_ldap_create_page_control_save_ldflags"
91 +LIBS="$af_check_ldap_create_page_control_save_libs"
93 { echo "$as_me:$LINENO: checking for ldap_parse_page_control in -lldap" >&5
94 echo $ECHO_N "checking for ldap_parse_page_control in -lldap... $ECHO_C" >&6; }
96 -# save current ldflags
97 -af_check_ldap_parse_page_control_save_ldflags="$LDFLAGS"
98 -LDFLAGS="$LDFLAGS -lldap"
100 +af_check_ldap_parse_page_control_save_libs="$LIBS"
103 cat >conftest.$ac_ext <<_ACEOF
105 @@ -4742,8 +4742,8 @@ _ACEOF
110 -LDFLAGS="$af_check_ldap_parse_page_control_save_ldflags"
112 +LIBS="$af_check_ldap_parse_page_control_save_libs"