summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2012-08-16 13:59:12 +0300
committerMatt Turner <[email protected]>2012-08-24 11:08:19 -0700
commit57c57df7b4579b60a84062df2e64f84dd84558b5 (patch)
tree496c51c3366fe21d4711f288f4392d41c798ae7f /configure.ac
parentdf4dccc7a9691555e05c8945048603621340b5d7 (diff)
mesa/dlopen: use HAVE_DLOPEN instead of _GNU_SOURCE
Patches changes mesa to use 'HAVE_DLOPEN' defined by configure and Android.mk instead of _GNU_SOURCE for detecting dlopen capability. This makes dlopen to work also on Android where _GNU_SOURCE is not defined. [mattst88] v2: HAVE_DLOPEN is sufficient for including dlfcn.h, remove mingw/blrts checks around dlfcn.h inclusion. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Tapani Pälli <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac5
1 files changed, 3 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index ad20c87c505..9bf4e1e1f63 100644
--- a/configure.ac
+++ b/configure.ac
@@ -499,8 +499,9 @@ MESA_PIC_FLAGS
dnl Check to see if dlopen is in default libraries (like Solaris, which
dnl has it in libc), or if libdl is needed to get it.
-AC_CHECK_FUNC([dlopen], [],
- [AC_CHECK_LIB([dl], [dlopen], [DLOPEN_LIBS="-ldl"])])
+AC_CHECK_FUNC([dlopen], [DEFINES="$DEFINES -DHAVE_DLOPEN"],
+ [AC_CHECK_LIB([dl], [dlopen],
+ [DEFINES="$DEFINES -DHAVE_DLOPEN"; DLOPEN_LIBS="-ldl"])])
AC_SUBST([DLOPEN_LIBS])
dnl See if posix_memalign is available