From e2c0a3e43b294715aad29528d975472071face40 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 15 May 2015 22:38:51 +0900 Subject: [PATCH] Retry finding jemalloc lib by je_malloc_stats_print Fixes GH-233 --- configure.ac | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index ba9749c7..675adeb4 100644 --- a/configure.ac +++ b/configure.ac @@ -362,9 +362,23 @@ if test "x${request_jemalloc}" != "xno"; then AC_SEARCH_LIBS([malloc_stats_print], [jemalloc], [have_jemalloc=yes], [], [$PTHREAD_LDFLAGS]) LIBS=$LIBS_OLD + + if test "x${have_jemalloc}" = "xyes"; then + jemalloc_libs=${ac_cv_search_malloc_stats_print} + else + # On Darwin, malloc_stats_print is je_malloc_stats_print + AC_SEARCH_LIBS([je_malloc_stats_print], [jemalloc], [have_jemalloc=yes], [], + [$PTHREAD_LDFLAGS]) + LIBS=$LIBS_OLD + + if test "x${have_jemalloc}" = "xyes"; then + jemalloc_libs=${ac_cv_search_je_malloc_stats_print} + fi + fi + 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} + test "x${jemalloc_libs}" != "xnone required"; then + JEMALLOC_LIBS=${jemalloc_libs} AC_SUBST([JEMALLOC_LIBS]) fi fi