From: Jon TURNEY Date: Fri, 8 Aug 2014 19:13:18 +0000 (+0100) Subject: configure.ac: Use LIBS rather than LDFLAGS to add -ldl to dladdr check X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a2e1dc0cce3f5c4b94123a5fd4de42ecc988ab14;p=mesa.git 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 Reviewed-by: Emil Velikov Tested-by: Pali Rohár Cc: "10.2" --- diff --git a/configure.ac b/configure.ac index 818536c04a2..e8dd502977c 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*)