From 7bc51bf8476e4546efaf28b90399e8a0280ac71f Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Sat, 1 Oct 2011 00:41:04 +0300 Subject: Use AC_SEARCH_LIBS for libdl ... instead of just substituting -ldl into LDFLAGS. The GNU linker's command line arguments are positional and this makes sure -ldl appears in right place. Fixes build problem on Ubuntu 11.10. diff --git a/configure.in b/configure.in index d17fc25..43d737f 100644 --- a/configure.in +++ b/configure.in @@ -83,11 +83,10 @@ AC_CHECK_FUNC(regcomp,AC_DEFINE(USE_REGEXP)) AC_CHECK_FUNC(lrand48,,AC_DEFINE(USE_RANDOM)) # Dynamic modules -dl_ldflags= +AC_SEARCH_LIBS(dlopen,[dl],[ + AC_DEFINE(HAVE_LIBDL) + dl_ldflags="-rdynamic"]) AC_SUBST(dl_ldflags) -AC_CHECK_LIB(dl,dlopen, - AC_DEFINE(HAVE_LIBDL) - AC_SUBST(dl_ldflags,"-rdynamic -ldl")) # Checks for header files. AC_CHECK_HEADERS([stdlib.h unistd.h]) -- cgit v0.10.2