From f5926d4c2c12affd9b7e140e38777deae83751e2 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 27 Nov 2013 09:45:52 +0100 Subject: build system: check if jemalloc is present (if requested) --- configure.ac | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 7417c571..8ffa44db 100644 --- a/configure.ac +++ b/configure.ac @@ -391,8 +391,15 @@ AC_ARG_ENABLE(jemalloc, ) AM_CONDITIONAL(ENABLE_JEMALLOC, test x$enable_jemalloc = xyes) if test "$enable_jemalloc" = "yes"; then - AC_DEFINE(HAVE_JEMALLOC, 1, [jemalloc support is integrated.]) - RT_LIBS="$RT_LIBS -ljemalloc" + AC_CHECK_LIB( + [jemalloc], + [malloc_stats_print], + [RT_LIBS="$RT_LIBS -ljemalloc" + AC_DEFINE(HAVE_JEMALLOC, 1, [jemalloc support is integrated.]) + ], + [AC_MSG_FAILURE([jemalloc library is missing])], + [] + ) fi -- cgit v1.2.3