build system: use AC_SEARCH_LIBS rather than assuming -ldl is needed.
authorDiego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com>
Fri, 27 Aug 2010 14:44:45 +0000 (16:44 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 31 Aug 2010 23:44:07 +0000 (16:44 -0700)
On a number of operating systems, such as the *BSD, the dlopen() function
is present in the standard C library, not in a separate libdl library.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
configure.ac

index a415f3f..bc2bb3a 100644 (file)
@@ -23,9 +23,7 @@ PKG_CHECK_MODULES(LIBPCRE, libpcre)
 PKG_CHECK_MODULES([LIBCURL], [libcurl])
 PKG_CHECK_MODULES([XML], [libxml-2.0])
 
-# explicitly link DSOs
-LIBS="$LIBS -ldl"
-
+AC_SEARCH_LIBS([dlopen], [dl])
 
 dnl Checks for header files.
 #AC_CHECK_HEADERS([fcntl.h stddef.h stdlib.h string.h unistd.h])