From 3e55336bc669bc5f93b8ff904aab58f9f63c0981 Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Thu, 29 Nov 2012 05:09:59 -0500 Subject: [PATCH] Fix for dlopen call. --- configure.ac | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index da6067c7..5c584132 100644 --- a/configure.ac +++ b/configure.ac @@ -218,12 +218,13 @@ AC_CHECK_LIB([rt],[clock_gettime], AC_DEFINE([HAVE_CLOCK_GETTIME],[1],[Have clock_gettime])], [AC_DEFINE([HAVE_CLOCK_GETTIME],[0],[Have clock_gettime])]) -# Check for the ability to call dlopen +# Check for the ability to call dlopen (used in libhostile) AS_IF([test "x$enable_shared" = xyes], - [AC_CHECK_LIB([dl],[dlopen], - [AC_SUBST([DL_LIB],[-ldl]) - AC_DEFINE([HAVE_LIBDL],[1],[Have dlopen])])], - [AC_DEFINE([HAVE_LIBDL],[0],[Have dlopen])]) + [AX_CHECK_LIBRARY([DL],[dlfcn.h],[dl], + [AC_DEFINE([HAVE_LIBDL],[1],[Have dlopen]) + AC_CHECK_LIB([dl],[dlopen],[AC_DEFINE([HAVE_DLOPEN],[1],[Have dlopen])]) + AC_CHECK_LIB([dl],[dladdr],[AC_DEFINE([HAVE_DLADDR],[1],[Have dladdr])])]) + ]) AC_CHECK_HEADERS([atomic.h]) AS_IF([test "x$ac_cv_header_atomic_h" = "xyes"], -- 2.30.2