diff options
-rw-r--r-- | configure.ac | 11 |
1 files 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 |