# backtrace() does not work with static builds.
-AS_IF([test "x$enable_static" = "xyes"],
+AS_IF([test "x$enable_shared" = "xyes"],
[AC_DEFINE([AX_ENABLE_BACKTRACE],[1],[Support for backtrace().])])
+AM_CONDITIONAL([SHARED_ENABLED],[test "x$enable_shared" = "xyes"])
PANDORA_ENABLE_DTRACE
HAVE_GCC_ATOMICS
echo " * LIB Flags: $LIB"
echo " * Assertions enabled: $ax_enable_assert"
echo " * Debug enabled: $ax_enable_debug"
+echo " * Shared: $enable_shared"
echo " * Warnings as failure: $ac_cv_warnings_as_errors"
echo " * SASL support: $ax_sasl_option"
echo " * make -j: $enable_jobserver"
LIBMEMCACHED_1_0_TEST_PATH= libmemcached-1.0/t
+if SHARED_ENABLED
# Test linking with C application
libmemcached_1_0_t_c_test_SOURCES= libmemcached-1.0/t/c_test.c
libmemcached_1_0_t_c_test_LDADD= libmemcached/libmemcached.la
check_PROGRAMS+= libmemcached-1.0/t/c_test
noinst_PROGRAMS+= libmemcached-1.0/t/c_test
-# Test linking with C++ application
-libmemcached_1_0_t_cc_test_SOURCES= libmemcached-1.0/t/cc_test.cc
-libmemcached_1_0_t_cc_test_LDADD= libmemcached/libmemcached.la
-libmemcached_1_0_t_cc_test_DEPENDENCIES= libmemcached/libmemcached.la
-check_PROGRAMS+= libmemcached-1.0/t/cc_test
-noinst_PROGRAMS+= libmemcached-1.0/t/cc_test
-
# Test linking with C application/SASL include
libmemcached_1_0_t_c_sasl_test_SOURCES= libmemcached-1.0/t/c_sasl_test.c
libmemcached_1_0_t_c_sasl_test_LDADD= libmemcached/libmemcached.la
libmemcached_1_0_t_c_sasl_test_DEPENDENCIES= libmemcached/libmemcached.la
check_PROGRAMS+= libmemcached-1.0/t/c_sasl_test
noinst_PROGRAMS+= libmemcached-1.0/t/c_sasl_test
+else
+endif
+
+# Test linking with C++ application
+libmemcached_1_0_t_cc_test_SOURCES= libmemcached-1.0/t/cc_test.cc
+libmemcached_1_0_t_cc_test_LDADD= libmemcached/libmemcached.la
+libmemcached_1_0_t_cc_test_DEPENDENCIES= libmemcached/libmemcached.la
+check_PROGRAMS+= libmemcached-1.0/t/cc_test
+noinst_PROGRAMS+= libmemcached-1.0/t/cc_test
#include <libmemcached/common.h>
+#ifdef AX_ENABLE_BACKTRACE
+
#ifdef HAVE_EXECINFO_H
-# include <execinfo.h>
+# include <execinfo.h>
#endif
#ifdef HAVE_GCC_ABI_DEMANGLE
-# include <cxxabi.h>
+# include <cxxabi.h>
#endif
#ifdef HAVE_DLFCN_H
-# include <dlfcn.h>
+# include <dlfcn.h>
#endif
#ifdef HAVE_GCC_ABI_DEMANGLE
-# define USE_DEMANGLE 1
+# define USE_DEMANGLE 1
#else
-# define USE_DEMANGLE 0
+# define USE_DEMANGLE 0
#endif
const int MAX_DEPTH= 50;
}
}
#endif // HAVE_EXECINFO_H
+
+#else // AX_ENABLE_BACKTRACE
+void custom_backtrace(void)
+{
}
+#endif // AX_ENABLE_BACKTRACE