configure: default to single-threaded on macosx

This commit is contained in:
Jean-Francois Dockes 2019-11-25 11:54:51 +01:00
parent 22ce3d271d
commit fec16a3bfb

View File

@ -208,13 +208,20 @@ if test X$withFam != Xno ; then
fi fi
# Enable use of threads in the indexing pipeline. # Enable use of threads in the indexing pipeline.
# This is disabled by default as we usually care little about indexing # Disabled by default on OS X as this actually hurts performance.
# absolute performance (more about impact on usability and total # Also disabled on Windows (which does not use configure, see autoconfig-win.h)
# resources used). case ${host_os} in
AC_ARG_ENABLE(idxthreads, darwin*)
AC_HELP_STRING([--disable-idxthreads], AC_ARG_ENABLE(idxthreads,
[Disable multithread indexing.]), [--enable-idxthreads Enable multithread indexing.],
idxthreadsEnabled=$enableval, idxthreadsEnabled=no)
;;
*)
AC_ARG_ENABLE(idxthreads,
[--disable-idxthreads Disable multithread indexing.],
idxthreadsEnabled=$enableval, idxthreadsEnabled=yes) idxthreadsEnabled=$enableval, idxthreadsEnabled=yes)
;;
esac
AM_CONDITIONAL(NOTHREADS, [test X$idxthreadsEnabled = Xno]) AM_CONDITIONAL(NOTHREADS, [test X$idxthreadsEnabled = Xno])
if test X$idxthreadsEnabled = Xyes ; then if test X$idxthreadsEnabled = Xyes ; then
AC_DEFINE(IDX_THREADS, 1, [Use multiple threads for indexing]) AC_DEFINE(IDX_THREADS, 1, [Use multiple threads for indexing])