summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2014-08-08 18:31:07 +0100
committerCarl Worth <cworth@cworth.org>2014-08-11 14:26:18 -0700
commit56a455f5ba112ee6e073f9f5e660de0e2be0336a (patch)
treedb3df9d6de8acadf0c8a79618f576c3ff66e0853 /configure.ac
parent3e541f0ab8740efc662860f17a1263af28b30b2a (diff)
configure: check for dladdr via AC_CHECK_FUNC/AC_CHECK_LIB
Use both macros as in some cases using AC_CHECK_FUNCS alone may fail. Thus HAVE_DLADDR will not be defined, and as a result most of the code in megadriver_stub.c will not be compiled. Breaking the backwards compatibility between older libGL/xserver(s) and DRI megadrivers. Cc: Jon TURNEY <jon.turney@dronecode.org.uk> Cc: "10.2" <mesa-stable@lists.freedesktop.org> [Emil Velikov] Commit message. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com> (cherry picked from commit 39a4cc45a417bea3bb1cfbe20ea5045200f76c25) Also squashed together with: 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@dronecode.org.uk> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Pali Rohár <pali.rohar@gmail.com> Cc: "10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit a2e1dc0cce3f5c4b94123a5fd4de42ecc988ab14)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 3 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 2aaba6169cd..24c676643a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -494,10 +494,10 @@ AC_CHECK_FUNC([dlopen], [DEFINES="$DEFINES -DHAVE_DLOPEN"],
AC_SUBST([DLOPEN_LIBS])
dnl Check if that library also has dladdr
-save_LDFLAGS="$LDFLAGS"
-LDFLAGS="$LDFLAGS $DLOPEN_LIBS"
+save_LIBS="$LIBS"
+LIBS="$LIBS $DLOPEN_LIBS"
AC_CHECK_FUNCS([dladdr])
-LDFLAGS="$save_LDFLAGS"
+LIBS="$save_LIBS"
case "$host_os" in
darwin*|mingw*)