From ab6e47140c06f23b6c6660659e360676621331d8 Mon Sep 17 00:00:00 2001 From: Sitsofe Wheeler Date: Sun, 26 Jul 2020 03:23:27 +0100 Subject: [PATCH] configure: check for Debian/Ubuntu tcmalloc_minimal Debian derived distros have a libtcmalloc-minimal4 package that only has a versioned libtcmalloc_minimal.so.4 inside, so try explicitly searching for it when looking for tcmalloc. Signed-off-by: Sitsofe Wheeler --- configure | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 25216c63..f44a5baa 100755 --- a/configure +++ b/configure @@ -3006,11 +3006,16 @@ int main(int argc, char **argv) return 0; } EOF -if test "$disable_tcmalloc" != "yes" && compile_prog "" "-ltcmalloc" "tcmalloc"; then - LIBS="-ltcmalloc $LIBS" - tcmalloc="yes" -else - tcmalloc="no" +if test "$disable_tcmalloc" != "yes"; then + if compile_prog "" "-ltcmalloc" "tcmalloc"; then + tcmalloc="yes" + LIBS="-ltcmalloc $LIBS" + elif compile_prog "" "-l:libtcmalloc_minimal.so.4" "tcmalloc_minimal4"; then + tcmalloc="yes" + LIBS="-l:libtcmalloc_minimal.so.4 $LIBS" + else + tcmalloc="no" + fi fi print_config "TCMalloc support" "$tcmalloc" -- 2.25.1