Fix: disable liblttng-ust-dl if dlinfo is not available in C library
[lttng-ust.git] / configure.ac
index 6e90e72c6d3e762b39702bc8350be3d637cdc971..1b3796579404afc3b54037ef30d8a07b0f029feb 100644 (file)
@@ -123,6 +123,16 @@ AM_CONDITIONAL([LTTNG_UST_BUILD_WITH_LIBC_DL], [test "x$have_libc_dl" = "xyes"])
 
 AC_CHECK_LIB([pthread], [pthread_create])
 
+# Check for dlfcn.h
+AC_CHECK_HEADER([dlfcn.h])
+AS_IF([test "x${ac_cv_header_dlfcn_h}" = "xyes"],
+       [AC_CHECK_DECLS([RTLD_DI_LINKMAP],,,
+               [#define _GNU_SOURCE /* Required on Linux to get GNU extensions */
+               #include <dlfcn.h>])
+       ],
+       [ac_cv_have_decl_RTLD_DI_LINKMAP="no"])
+AM_CONDITIONAL([HAVE_DLINFO], [test "x${ac_cv_have_decl_RTLD_DI_LINKMAP}" = "xyes"])
+
 # Checks for header files.
 #AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h sys/socket.h sys/time.h unistd.h])
 
This page took 0.024166 seconds and 4 git commands to generate.