From fec16a3bfba178ac786656845ad19954643ce88c Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Mon, 25 Nov 2019 11:54:51 +0100 Subject: [PATCH] configure: default to single-threaded on macosx --- src/configure.ac | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/configure.ac b/src/configure.ac index 09bbb880..3fbf649b 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -208,13 +208,20 @@ if test X$withFam != Xno ; then fi # Enable use of threads in the indexing pipeline. -# This is disabled by default as we usually care little about indexing -# absolute performance (more about impact on usability and total -# resources used). -AC_ARG_ENABLE(idxthreads, - AC_HELP_STRING([--disable-idxthreads], - [Disable multithread indexing.]), +# Disabled by default on OS X as this actually hurts performance. +# Also disabled on Windows (which does not use configure, see autoconfig-win.h) +case ${host_os} in + darwin*) + AC_ARG_ENABLE(idxthreads, + [--enable-idxthreads Enable multithread indexing.], + idxthreadsEnabled=$enableval, idxthreadsEnabled=no) + ;; + *) + AC_ARG_ENABLE(idxthreads, + [--disable-idxthreads Disable multithread indexing.], idxthreadsEnabled=$enableval, idxthreadsEnabled=yes) + ;; +esac AM_CONDITIONAL(NOTHREADS, [test X$idxthreadsEnabled = Xno]) if test X$idxthreadsEnabled = Xyes ; then AC_DEFINE(IDX_THREADS, 1, [Use multiple threads for indexing])