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

Attempt to detect the availability of RSA's MD5 implementation, and the

need to link against libmd to get it.
Attempt to detect the need for linking against librt to get clock_gettime().

git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@759 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 788bf84c
......@@ -58,5 +58,11 @@ varnishd_LDADD = \
$(top_builddir)/lib/libcompat/libcompat.a \
$(top_builddir)/lib/libvarnish/libvarnish.la \
$(top_builddir)/lib/libvcl/libvcl.la \
-lpthread \
-lmd
-lpthread
if NEED_LIBMD
varnishd_LDADD += -lmd
endif
if NEED_LIBRT
varnishd_LDADD += -lrt
endif
......@@ -13,6 +13,11 @@
#include <cache.h>
#if defined(HASH_CLASSIC_MD5) && !defined(HAVE_MD5)
/* MD5 is not available */
#undef HASH_CLASSIC_MD5
#endif
#ifdef HASH_CLASSIC_MD5
#include <md5.h>
#endif
......
......@@ -81,6 +81,16 @@ AC_CHECK_DECL([SO_ACCEPTFILER],
,
[sys/types.h, sys/socket.h])
# 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)
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)
AC_CONFIG_FILES([
Makefile
bin/Makefile
......
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