Commit 50450261 authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

Trust autoconf to dtrt wrt libraries.

Prefer libthr to libpthread if it's available (i.e. on FreeBSD 6 and newer)

git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1098 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent d998fc4b
......@@ -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
......@@ -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
......@@ -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
......@@ -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])
......
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