Commit 1fd67e3e authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

Autodetect the need to link against libdl for dlopen().

git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@774 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 091745a2
......@@ -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
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment