Handle the case where jemalloc is available without linking extra library

This commit is contained in:
Tatsuhiro Tsujikawa 2014-05-18 19:38:33 +09:00
parent a4a06947a5
commit eba2825286
1 changed files with 3 additions and 2 deletions

View File

@ -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