]> git.pld-linux.org Git - packages/autofs.git/blob - autofs-5.0.4-fix-ldap-detection.patch
- import latest patchset.
[packages/autofs.git] / autofs-5.0.4-fix-ldap-detection.patch
1 autofs-5.0.4 - fix ldap detection
2
3 From: Guillaume Rousse <Guillaume.Rousse@inria.fr>
4
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.
9 ---
10
11  aclocal.m4 |   20 ++++++++++----------
12  configure  |   20 ++++++++++----------
13  2 files changed, 20 insertions(+), 20 deletions(-)
14
15
16 diff --git a/aclocal.m4 b/aclocal.m4
17 index bb0ab21..ab11112 100644
18 --- a/aclocal.m4
19 +++ b/aclocal.m4
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)
23  
24 -# save current ldflags
25 -af_check_ldap_create_page_control_save_ldflags="$LDFLAGS"
26 -LDFLAGS="$LDFLAGS -lldap"
27 +# save current libs
28 +af_check_ldap_create_page_control_save_libs="$LIBS"
29 +LIBS="$LIBS -lldap"
30  
31  AC_TRY_LINK(
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.])
35  fi
36  
37 -# restore ldflags
38 -LDFLAGS="$af_check_ldap_create_page_control_save_ldflags"
39 +# restore libs
40 +LIBS="$af_check_ldap_create_page_control_save_libs"
41  ])
42  
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)
47  
48 -# save current ldflags
49 -af_check_ldap_parse_page_control_save_ldflags="$LDFLAGS"
50 -LDFLAGS="$LDFLAGS -lldap"
51 +# save current libs
52 +af_check_ldap_parse_page_control_save_libs="$LIBS"
53 +LIBS="$LIBS -lldap"
54  
55  AC_TRY_LINK(
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.])
59  fi
60  
61 -# restore ldflags
62 -LDFLAGS="$af_check_ldap_parse_page_control_save_ldflags"
63 +# restore libs
64 +LIBS="$af_check_ldap_parse_page_control_save_libs"
65  ])
66  
67 diff --git a/configure b/configure
68 index ed17660..afa692c 100755
69 --- a/configure
70 +++ b/configure
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; }
74  
75 -# save current ldflags
76 -af_check_ldap_create_page_control_save_ldflags="$LDFLAGS"
77 -LDFLAGS="$LDFLAGS -lldap"
78 +# save current libs
79 +af_check_ldap_create_page_control_save_libs="$LIBS"
80 +LIBS="$LIBS -lldap"
81  
82  cat >conftest.$ac_ext <<_ACEOF
83  /* confdefs.h.  */
84 @@ -4672,15 +4672,15 @@ _ACEOF
85  
86  fi
87  
88 -# restore ldflags
89 -LDFLAGS="$af_check_ldap_create_page_control_save_ldflags"
90 +# restore libs
91 +LIBS="$af_check_ldap_create_page_control_save_libs"
92  
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; }
95  
96 -# save current ldflags
97 -af_check_ldap_parse_page_control_save_ldflags="$LDFLAGS"
98 -LDFLAGS="$LDFLAGS -lldap"
99 +# save current libs
100 +af_check_ldap_parse_page_control_save_libs="$LIBS"
101 +LIBS="$LIBS -lldap"
102  
103  cat >conftest.$ac_ext <<_ACEOF
104  /* confdefs.h.  */
105 @@ -4742,8 +4742,8 @@ _ACEOF
106  
107  fi
108  
109 -# restore ldflags
110 -LDFLAGS="$af_check_ldap_parse_page_control_save_ldflags"
111 +# restore libs
112 +LIBS="$af_check_ldap_parse_page_control_save_libs"
113  
114  fi
115  
This page took 0.037648 seconds and 3 git commands to generate.