]> err.no Git - varnish/commitdiff
Trust autoconf to dtrt wrt libraries.
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 20 Sep 2006 08:37:35 +0000 (08:37 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 20 Sep 2006 08:37:35 +0000 (08:37 +0000)
Prefer libthr to libpthread if it's available (i.e. on FreeBSD 6 and newer)

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1098 d4fa192b-c00b-0410-8231-f00ffab90ce4

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

index da69bcb2aca268299704d7ff8d27bfebff5d94b0..685ba275aa863868806438766c110cd395b47540 100644 (file)
@@ -62,17 +62,4 @@ varnishd_LDFLAGS = -export-dynamic
 varnishd_LDADD = \
        $(top_builddir)/lib/libcompat/libcompat.a \
        $(top_builddir)/lib/libvarnish/libvarnish.la \
-       $(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
+       $(top_builddir)/lib/libvcl/libvcl.la
index 660a4613e16a55b0195ee878813b70d3c4993230..e123a354f9ddc1914da45949a2fa0e197817a413 100644 (file)
@@ -14,7 +14,3 @@ varnishncsa_LDADD = \
        $(top_builddir)/lib/libcompat/libcompat.a \
        $(top_builddir)/lib/libvarnish/libvarnish.la \
        $(top_builddir)/lib/libvarnishapi/libvarnishapi.la
-
-if NEED_LIBRT
-varnishncsa_LDADD += -lrt
-endif
index 97cd6461fe55dd3064349a67938334e5b68720ac..6b4a6ebad582de060df53969641e71de58af1318 100644 (file)
@@ -13,9 +13,5 @@ varnishstat_CFLAGS = -include config.h
 varnishstat_LDADD = \
        $(top_builddir)/lib/libcompat/libcompat.a \
        $(top_builddir)/lib/libvarnish/libvarnish.la \
-       $(top_builddir)/lib/libvarnishapi/libvarnishapi.la  \
+       $(top_builddir)/lib/libvarnishapi/libvarnishapi.la \
        -lcurses
-
-if NEED_LIBRT
-varnishstat_LDADD += -lrt
-endif
index feaaa6f90bc5f8714172ec8b97cf1898f90b2562..dbd80f145b5550632536c0ad644e6d030ebd3a52 100644 (file)
@@ -35,6 +35,10 @@ AC_PROG_LIBTOOL
 AC_PROG_MAKE_SET
 
 # Checks for libraries.
+AC_CHECK_LIB(rt, clock_gettime)
+AC_CHECK_LIB(dl, dlopen)
+#AC_SEARCH_LIBS(initscr, [curses ncurses])
+AC_SEARCH_LIBS(pthread_create, [thr pthread c_r])
 
 # Checks for header files.
 AC_HEADER_STDC
@@ -75,21 +79,6 @@ AC_CHECK_FUNCS([strlcat strlcpy])
 AC_CHECK_FUNCS([strndup])
 AC_CHECK_FUNCS([vis strvis strvisx])
 
-# On some systems, clock_gettime is in librt rather than libc
-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
-       AC_CHECK_LIB(md, MD5Init, need_libmd=yes)
-fi
-AM_CONDITIONAL(NEED_LIBMD, test x$need_libmd = xyes)
-
 # Check which mechanism to use for the acceptor
 AC_CHECK_FUNCS([kqueue])
 AC_CHECK_FUNCS([epoll_ctl])