m4_include([libhashkit/include.m4])
LT_PREREQ([2.2])
-LT_INIT
+LT_INIT([dlopen])
LT_LANG([C++])
LT_LIB_M
+AC_SUBST([lt_cv_dlopen_libs])
+
+
AC_PROG_CC_C99
AS_IF([test "x${ac_cv_prog_cc_c99}" == "xno"],[AC_MSG_ERROR([No c99 compatible compiler found])])
[AC_DEFINE([HAVE_CLOCK_GETTIME],[0],[Have clock_gettime])])
-# Check for the ability to call dlopen (used in libhostile)
-AX_DLOPEN
-
AC_CHECK_HEADERS([atomic.h])
AS_IF([test "x$ac_cv_header_atomic_h" = "xyes"],
[AC_CHECK_FUNCS([atomic_add_64])
libmemcached/options.cc: libmemcached/csl/parser.h
libmemcached_libmemcached_la_LDFLAGS+= -version-info ${MEMCACHED_LIBRARY_VERSION}
-libmemcached_libmemcached_la_LIBADD+= @DL_LIB@
+libmemcached_libmemcached_la_LIBADD+= @lt_cv_dlopen_libs@
if HAVE_SASL
libmemcached_libmemcached_la_CFLAGS+= @PTHREAD_CFLAGS@
libmemcached_libmemcached_la_CXXFLAGS+= @PTHREAD_CFLAGS@
libmemcached_libmemcached_la_LIBADD+= @PTHREAD_LIBS@
-libmemcached_libmemcached_la_LIBADD+= @LIBSASL_LIB@
+libmemcached_libmemcached_la_LIBADD+= @SASL_LIB@
endif
if HAVE_DTRACE
# We are either building in tree, or with
libtest_libtest_la_SOURCES+= libtest/memcached.cc
+if HAVE_LIBDRIZZLE
libtest_libtest_la_LDFLAGS+= @LIBDRIZZLE_LDFLAGS@
libtest_libtest_la_LIBADD+= @LIBDRIZZLE_LIB@
+endif
libtest_libtest_la_SOURCES+= libtest/gearmand.cc
libtest_backtrace_LDADD=
libtest_backtrace_SOURCES+= libtest/backtrace_test.cc
libtest_backtrace_SOURCES+= libmemcached/backtrace.cc
-libtest_backtrace_LDADD+= @DL_LIB@
+libtest_backtrace_LDADD+= @lt_cv_dlopen_libs@
noinst_PROGRAMS+= libtest/backtrace
test-backtrace: libtest/backtrace
@libtest/backtrace
AS_IF([test "$]AS_TR_SH([ax_cv_have_]$1)[" = "yes"],
[AC_DEFINE([HAVE_]$1, [1], [Define to 1 if ]$1[ is found])
- AC_SUBST($1[_CPPFLAGS])
- AC_SUBST($1[_LDFLAGS])
- AC_SUBST($1[_LIB],[-l]$3)
ifelse([$4], , :, [$4])],
[ifelse([$5], , :, [$5])])
])
+++ /dev/null
-#serial 2
-
-AC_DEFUN([AX_DLOPEN],
- [AS_IF([test "x$enable_shared" = xyes],
- [AX_CHECK_LIBRARY([DL],[dlfcn.h],[dl],
- [AC_DEFINE([HAVE_LIBDL],[1],[Have dlopen])
- AC_CHECK_LIB([dl],[dlopen],[AC_DEFINE([HAVE_DLOPEN],[1],[Have dlopen])])
- AC_CHECK_LIB([dl],[dladdr],[AC_DEFINE([HAVE_DLADDR],[1],[Have dladdr])])])])
- ])
-
# Cycle should always run first
tests_cycle_CFLAGS= $(AM_CFLAGS) $(NO_CONVERSION) $(NO_STRICT_ALIASING)
tests_cycle_CXXFLAGS= $(AM_CXXFLAGS)
-tests_cycle_CXXFLAGS+= ${PTHREAD_CFLAGS}
+tests_cycle_CXXFLAGS+= @PTHREAD_CFLAGS@
tests_cycle_SOURCES= tests/cycle.cc
tests_cycle_LDADD= $(TESTS_LDADDS)
-tests_cycle_LDADD+= ${PTHREAD_LIBS}
+tests_cycle_LDADD+= @PTHREAD_LIBS@
check_PROGRAMS+= tests/cycle
noinst_PROGRAMS+= tests/cycle