From eba2825286207da73fdf2e63b26a6907c11387f9 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 18 May 2014 19:38:33 +0900 Subject: [PATCH] Handle the case where jemalloc is available without linking extra library --- configure.ac | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index cf783f59..0cbbf7eb 100644 --- a/configure.ac +++ b/configure.ac @@ -275,8 +275,9 @@ if test "x${request_jemalloc}" != "xno"; then LIBS_OLD=$LIBS AC_SEARCH_LIBS([malloc_stats_print], [jemalloc], [have_jemalloc=yes]) LIBS=$LIBS_OLD - if test "x${have_jemalloc}" = "xyes"; then - JEMALLOC_LIBS="-ljemalloc" + if test "x${have_jemalloc}" = "xyes" && + test "x${ac_cv_search_malloc_stats_print}" != "xnone required"; then + JEMALLOC_LIBS=${ac_cv_search_malloc_stats_print} AC_SUBST([JEMALLOC_LIBS]) fi fi