0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-27 11:18:51 +02:00

configure: Use PKG_CHECK_MODULES; fix jemalloc related.

construct: Add missing MALLOC_LDFLAGS.
This commit is contained in:
Jason Volk 2020-05-08 14:20:19 -07:00
parent 1c11e6b2c1
commit dc713f711a
2 changed files with 11 additions and 5 deletions

View file

@ -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"
])

View file

@ -38,6 +38,7 @@ construct_LDFLAGS = \
@BOOST_LDFLAGS@ \
@SSL_LDFLAGS@ \
@CRYPTO_LDFLAGS@ \
@MALLOC_LDFLAGS@ \
###
construct_LDADD = \