]> err.no Git - varnish/commitdiff
Autodetect the need to link against libdl for dlopen().
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 8 Aug 2006 14:00:28 +0000 (14:00 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 8 Aug 2006 14:00:28 +0000 (14:00 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@774 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/Makefile.am
varnish-cache/configure.ac

index 0c72bd88cd1119d320df4ee865821b66f3388aed..72e82c7f2f8d37f08d3f3da03d358fc0570d9226 100644 (file)
@@ -52,7 +52,7 @@ noinst_HEADERS = \
 
 varnishd_CFLAGS = -include config.h
 
-varnishd_LDFLAGS = -export-dynamic 
+varnishd_LDFLAGS = -export-dynamic
 
 varnishd_LDADD = \
        $(top_builddir)/lib/libcompat/libcompat.a \
@@ -60,9 +60,14 @@ varnishd_LDADD = \
        $(top_builddir)/lib/libvcl/libvcl.la \
        -lpthread
 
+if NEED_LIBDL
+varnishd_LDADD += -ldl
+endif
+
 if NEED_LIBMD
 varnishd_LDADD += -lmd
 endif
+
 if NEED_LIBRT
 varnishd_LDADD += -lrt
 endif
index e5833bddc02093a450eed670c71a56665803c6b2..172c37d27ded1bda250e979005ed57504b7336e7 100644 (file)
@@ -77,6 +77,10 @@ AC_CHECK_FUNCS([vis strvis strvisx])
 AC_CHECK_LIB(rt, clock_gettime, need_librt=yes)
 AM_CONDITIONAL(NEED_LIBRT, test x$need_librt = xyes)
 
+# Check if dlopen() requires libdl
+AC_CHECK_LIB(dl, dlopen, need_libdl=yes)
+AM_CONDITIONAL(NEED_LIBDL, test x$need_libdl = xyes)
+
 # Check for the presence of RSA's MD5 implementation (libmd on *BSD)
 AC_CHECK_HEADERS([md5.h])
 if test x$ac_cv_header_md5_h = xyes ; then