summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-11-27 09:45:52 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2013-11-27 09:45:52 +0100
commitf5926d4c2c12affd9b7e140e38777deae83751e2 (patch)
tree877bf24ae8b177146e8185e128eb2f5053d9c859
parentd36bfeb82a1be1820b61e7d57474b5f069273472 (diff)
downloadrsyslog-f5926d4c2c12affd9b7e140e38777deae83751e2.tar.gz
rsyslog-f5926d4c2c12affd9b7e140e38777deae83751e2.tar.bz2
rsyslog-f5926d4c2c12affd9b7e140e38777deae83751e2.zip
build system: check if jemalloc is present (if requested)
-rw-r--r--configure.ac11
1 files changed, 9 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 7417c571..8ffa44db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -391,8 +391,15 @@ AC_ARG_ENABLE(jemalloc,
)
AM_CONDITIONAL(ENABLE_JEMALLOC, test x$enable_jemalloc = xyes)
if test "$enable_jemalloc" = "yes"; then
- AC_DEFINE(HAVE_JEMALLOC, 1, [jemalloc support is integrated.])
- RT_LIBS="$RT_LIBS -ljemalloc"
+ AC_CHECK_LIB(
+ [jemalloc],
+ [malloc_stats_print],
+ [RT_LIBS="$RT_LIBS -ljemalloc"
+ AC_DEFINE(HAVE_JEMALLOC, 1, [jemalloc support is integrated.])
+ ],
+ [AC_MSG_FAILURE([jemalloc library is missing])],
+ []
+ )
fi