diff --git a/configure.ac b/configure.ac index 6110c26c7..c714f558d 100644 --- a/configure.ac +++ b/configure.ac @@ -1941,20 +1941,25 @@ dnl dnl RB_CHK_SYSHEADER(jemalloc/jemalloc.h, [JEMALLOC_H]) -AC_CHECK_LIB(jemalloc, malloc, +PKG_CHECK_MODULES(JEMALLOC, [jemalloc], [ have_jemalloc="yes" ], [ - have_jemalloc="no" + AC_CHECK_LIB(jemalloc, malloc, + [ + have_jemalloc="yes" + ], [ + have_jemalloc="no" + ]) ]) -AC_MSG_CHECKING(whether to enable use of any found jemalloc) +AC_MSG_CHECKING(whether to disable use of any found jemalloc) AC_ARG_ENABLE(jemalloc, AC_HELP_STRING([--disable-jemalloc], [Disable jemalloc as third-party dynamic memory manager.]), [ - AC_MSG_RESULT([no]) + AC_MSG_RESULT([yes]) enable_jemalloc="no" ], [ - AC_MSG_RESULT([yes]) + AC_MSG_RESULT([no]) enable_jemalloc="yes" ]) diff --git a/construct/Makefile.am b/construct/Makefile.am index ba9361465..1158c9d60 100644 --- a/construct/Makefile.am +++ b/construct/Makefile.am @@ -38,6 +38,7 @@ construct_LDFLAGS = \ @BOOST_LDFLAGS@ \ @SSL_LDFLAGS@ \ @CRYPTO_LDFLAGS@ \ + @MALLOC_LDFLAGS@ \ ### construct_LDADD = \