From: Guillaume Rousse <Guillaume.Rousse@inria.fr>
To: "autofs@linux.kernel.org" <autofs@linux.kernel.org>
Subject: [patch] more robust test for ldap library
Date: Fri, 05 Dec 2008 19:05:15 +0100 [thread overview]
Message-ID: <49396D5B.7040405@inria.fr> (raw)
[-- Attachment #1: Type: text/plain, Size: 376 bytes --]
Hello.
The test for LDAP library wrongly use LDFLAGS to add -lldap to the gcc
call. However, when strict linker ordering is in effect, it doesn't work
correctly. As described in autoconf documentation, additional libs
should be added through LIBS variable instead. The following patch fixes it.
--
Guillaume Rousse
Moyens Informatiques - INRIA Futurs
Tel: 01 69 35 69 62
[-- Attachment #2: autofs-5.0.3-fix-ldap-detection.patch --]
[-- Type: text/plain, Size: 1583 bytes --]
diff -Naur --exclude '*~' autofs-5.0.3/aclocal.m4 autofs-5.0.3-fix-ldap-detection/aclocal.m4
--- autofs-5.0.3/aclocal.m4 2008-07-02 13:26:00.000000000 +0200
+++ autofs-5.0.3-fix-ldap-detection/aclocal.m4 2008-07-02 13:28:04.000000000 +0200
@@ -230,9 +230,9 @@
AC_DEFUN([AF_CHECK_FUNC_LDAP_CREATE_PAGE_CONTROL],
[AC_MSG_CHECKING(for ldap_create_page_control in -lldap)
-# save current ldflags
-af_check_ldap_create_page_control_save_ldflags="$LDFLAGS"
-LDFLAGS="$LDFLAGS -lldap"
+# save current libs
+af_check_ldap_create_page_control_save_libs="$LIBS"
+LIBS="$LIBS -lldap"
AC_TRY_LINK(
[ #include <ldap.h> ],
@@ -251,8 +251,8 @@
[Define to 1 if you have the `ldap_create_page_control' function.])
fi
-# restore ldflags
-LDFLAGS="$af_check_ldap_create_page_control_save_ldflags"
+# restore libs
+LIBS="$af_check_ldap_create_page_control_save_libs"
])
dnl --------------------------------------------------------------------------
@@ -263,9 +263,9 @@
AC_DEFUN([AF_CHECK_FUNC_LDAP_PARSE_PAGE_CONTROL],
[AC_MSG_CHECKING(for ldap_parse_page_control in -lldap)
-# save current ldflags
-af_check_ldap_parse_page_control_save_ldflags="$LDFLAGS"
-LDFLAGS="$LDFLAGS -lldap"
+# save current libs
+af_check_ldap_parse_page_control_save_libs="$LIBS"
+LIBS="$LIBS -lldap"
AC_TRY_LINK(
[ #include <ldap.h> ],
@@ -284,7 +284,7 @@
[Define to 1 if you have the `ldap_parse_page_control' function.])
fi
-# restore ldflags
-LDFLAGS="$af_check_ldap_parse_page_control_save_ldflags"
+# restore libs
+LIBS="$af_check_ldap_parse_page_control_save_libs"
])
[-- Attachment #3: Type: text/plain, Size: 140 bytes --]
_______________________________________________
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs
next reply other threads:[~2008-12-05 18:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-05 18:05 Guillaume Rousse [this message]
2008-12-09 6:14 ` [patch] more robust test for ldap library Ian Kent
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49396D5B.7040405@inria.fr \
--to=guillaume.rousse@inria.fr \
--cc=autofs@linux.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.