summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-05-31 15:37:18 -0600
committerJens Axboe <axboe@kernel.dk>2019-05-31 15:37:18 -0600
commit971341ad741db8d2ae57d8f9b368d75f6c02c1a9 (patch)
tree862f3cdacf43aaf7ecdd54a548fa97cb479e34e1 /configure
parent31ce8438e868e133e2b15a6bc7f288dda2cc4b2f (diff)
parent01fe773df4bc4a35450ce3ef50c8075b3bf55cd0 (diff)
downloadfio-971341ad741db8d2ae57d8f9b368d75f6c02c1a9.tar.gz
fio-971341ad741db8d2ae57d8f9b368d75f6c02c1a9.tar.bz2
Merge branch 'wip-tcmalloc' of https://github.com/dillaman/fio
* 'wip-tcmalloc' of https://github.com/dillaman/fio: configure: attempt to link against tcmalloc by default if available
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure b/configure
index 383175ae..a0692d58 100755
--- a/configure
+++ b/configure
@@ -207,6 +207,8 @@ for opt do
;;
--enable-libiscsi) libiscsi="yes"
;;
+ --disable-tcmalloc) disable_tcmalloc="yes"
+ ;;
--help)
show_help="yes"
;;
@@ -243,6 +245,7 @@ if test "$show_help" = "yes" ; then
echo "--disable-native Don't build for native host"
echo "--with-ime= Install path for DDN's Infinite Memory Engine"
echo "--enable-libiscsi Enable iscsi support"
+ echo "--disable-tcmalloc Disable tcmalloc support"
exit $exit_val
fi
@@ -2695,6 +2698,19 @@ if test "$libiscsi" = "yes" ; then
echo "LIBISCSI_CFLAGS=$libiscsi_cflags" >> $config_host_mak
echo "LIBISCSI_LIBS=$libiscsi_libs" >> $config_host_mak
fi
+cat > $TMPC << EOF
+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"
+fi
+print_config "TCMalloc support" "$tcmalloc"
echo "LIBS+=$LIBS" >> $config_host_mak
echo "GFIO_LIBS+=$GFIO_LIBS" >> $config_host_mak