Mesa (master): configure.ac: Use LIBS rather than LDFLAGS to add -ldl to dladdr check

Jon TURNEY jturney at kemper.freedesktop.org
Sat Aug 9 10:19:05 UTC 2014


Module: Mesa
Branch: master
Commit: a2e1dc0cce3f5c4b94123a5fd4de42ecc988ab14
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a2e1dc0cce3f5c4b94123a5fd4de42ecc988ab14

Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date:   Fri Aug  8 20:13:18 2014 +0100

configure.ac: Use LIBS rather than LDFLAGS to add -ldl to dladdr check

ec8ebff "Check for dladdr()" erroneously uses LDFLAGS rather than LIBS to add
-ldl to the dladdr check.

Replace the workaround in 39a4cc4 of explicitly checking in libdl, with a more
correct approach of using LIBS.

Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>
Tested-by: Pali Rohár <pali.rohar at gmail.com>
Cc: "10.2" <mesa-stable at lists.freedesktop.org>

---

 configure.ac |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 818536c..e8dd502 100644
--- a/configure.ac
+++ b/configure.ac
@@ -535,9 +535,10 @@ AC_CHECK_FUNC([dlopen], [DEFINES="$DEFINES -DHAVE_DLOPEN"],
 AC_SUBST([DLOPEN_LIBS])
 
 dnl Check if that library also has dladdr
-AC_CHECK_FUNC([dladdr], [DEFINES="$DEFINES -DHAVE_DLADDR"],
-    [AC_CHECK_LIB([dl], [dladdr],
-       [DEFINES="$DEFINES -DHAVE_DLADDR"])])
+save_LIBS="$LIBS"
+LIBS="$LIBS $DLOPEN_LIBS"
+AC_CHECK_FUNCS([dladdr])
+LIBS="$save_LIBS"
 
 case "$host_os" in
 darwin*|mingw*)




More information about the mesa-commit mailing list