summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDavid M. Syzdek <david.syzdek@acsalaska.net>2008-11-03 09:14:28 -0900
committerJunio C Hamano <gitster@pobox.com>2008-12-02 22:48:58 -0800
commitd937c374ccb987356c1412986c8fb106b8aaef75 (patch)
tree3349fb57055f75035883cfff3b2f56a568687282 /configure.ac
parent757c7f60a78004fc3d0ea62f44320d54ef430c10 (diff)
downloadgit-d937c374ccb987356c1412986c8fb106b8aaef75.tar.gz
autoconf: Enable threaded delta search when pthreads are supported
Automatically set THREADED_DELTA_SEARCH when autoconf test detects support for pthreads on the platform. This will change the default for some platforms that did not enable threaded delta search previously. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 8821b5080a..cee06d7683 100644
--- a/configure.ac
+++ b/configure.ac
@@ -492,7 +492,8 @@ AC_SUBST(NO_MKDTEMP)
#
# Define NO_PTHREADS if we do not have pthreads
#
-# Define PTHREAD_LIBS to the linker flag used for Pthread support.
+# Define PTHREAD_LIBS to the linker flag used for Pthread support and define
+# THREADED_DELTA_SEARCH if Pthreads are available.
AC_LANG_CONFTEST([AC_LANG_PROGRAM(
[[#include <pthread.h>]],
[[pthread_mutex_t test_mutex;]]
@@ -500,16 +501,19 @@ AC_LANG_CONFTEST([AC_LANG_PROGRAM(
${CC} -pthread conftest.c -o conftest.o > /dev/null 2>&1
if test $? -eq 0;then
PTHREAD_LIBS="-pthread"
+ THREADED_DELTA_SEARCH=YesPlease
else
${CC} -lpthread conftest.c -o conftest.o > /dev/null 2>&1
if test $? -eq 0;then
PTHREAD_LIBS="-lpthread"
+ THREADED_DELTA_SEARCH=YesPlease
else
NO_PTHREADS=UnfortunatelyYes
fi
fi
AC_SUBST(PTHREAD_LIBS)
AC_SUBST(NO_PTHREADS)
+AC_SUBST(THREADED_DELTA_SEARCH)
## Site configuration (override autodetection)
## --with-PACKAGE[=ARG] and --without-PACKAGE