Fix for dlopen call.
authorBrian Aker <brian@tangent.org>
Thu, 29 Nov 2012 10:09:59 +0000 (05:09 -0500)
committerBrian Aker <brian@tangent.org>
Thu, 29 Nov 2012 10:09:59 +0000 (05:09 -0500)
configure.ac

index da6067c7e2dc6be091c1b52e2d1271e0db7193ad..5c584132aac290c24bf4b2eedcc69982ea5b50e2 100644 (file)
@@ -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"],