r774 - in trunk/varnish-cache: . bin/varnishd

des at projects.linpro.no des at projects.linpro.no
Tue Aug 8 16:00:28 CEST 2006


Author: des
Date: 2006-08-08 16:00:28 +0200 (Tue, 08 Aug 2006)
New Revision: 774

Modified:
   trunk/varnish-cache/bin/varnishd/Makefile.am
   trunk/varnish-cache/configure.ac
Log:
Autodetect the need to link against libdl for dlopen().

Modified: trunk/varnish-cache/bin/varnishd/Makefile.am
===================================================================
--- trunk/varnish-cache/bin/varnishd/Makefile.am	2006-08-08 12:57:53 UTC (rev 773)
+++ trunk/varnish-cache/bin/varnishd/Makefile.am	2006-08-08 14:00:28 UTC (rev 774)
@@ -52,7 +52,7 @@
 
 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 @@
 	$(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

Modified: trunk/varnish-cache/configure.ac
===================================================================
--- trunk/varnish-cache/configure.ac	2006-08-08 12:57:53 UTC (rev 773)
+++ trunk/varnish-cache/configure.ac	2006-08-08 14:00:28 UTC (rev 774)
@@ -77,6 +77,10 @@
 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




More information about the varnish-commit mailing list