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 <sitsofe@yahoo.com>
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"