From 123fcba7125c3b94ad35c3d7dfe31c715a79a470 Mon Sep 17 00:00:00 2001 From: Igor Pashev <pashev.igor@gmail.com> Date: Tue, 19 Aug 2014 16:23:35 +0400 Subject: [PATCH] Do not blindly add libdl to extra libraries On some systems dlopen() is available without libdl (illumos, solaris). Sometimes libdl.so cannot be loaded by runtime linker, see https://ghc.haskell.org/trac/ghc/ticket/8713 Closes #8 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index c10bf89..f519d19 100644 --- a/configure.ac +++ b/configure.ac @@ -186,7 +186,7 @@ else fi # Avoid adding dl if absent or unneeded -AC_CHECK_LIB(dl, dlopen, [EXTRA_LIBS="$EXTRA_LIBS dl"]) +AC_SEARCH_LIBS([dlopen], [dl], [EXTRA_LIBS="$EXTRA_LIBS $ac_lib"]) # -{l,}pthread goo AC_CANONICAL_TARGET -- GitLab