summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 757c7f6)
raw | patch | inline | side by side (parent: 757c7f6)
author | David M. Syzdek <david.syzdek@acsalaska.net> | |
Mon, 3 Nov 2008 18:14:28 +0000 (09:14 -0900) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 3 Dec 2008 06:48:58 +0000 (22:48 -0800) |
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>
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>
config.mak.in | patch | blob | history | |
configure.ac | patch | blob | history |
diff --git a/config.mak.in b/config.mak.in
index 14dfb21fa59efb7482ea0727845c8198cc996271..55b25c3d2653d6228765a72ea3ba2aaa7c97f7df 100644 (file)
--- a/config.mak.in
+++ b/config.mak.in
FREAD_READS_DIRECTORIES=@FREAD_READS_DIRECTORIES@
SNPRINTF_RETURNS_BOGUS=@SNPRINTF_RETURNS_BOGUS@
NO_PTHREADS=@NO_PTHREADS@
+THREADED_DELTA_SEARCH=@THREADED_DELTA_SEARCH@
PTHREAD_LIBS=@PTHREAD_LIBS@
diff --git a/configure.ac b/configure.ac
index 8821b5080af2eb3ec8cabd3ae40ee20e10c80f2e..cee06d768373991c94d0cf17e4a79b76c67e087f 100644 (file)
--- a/configure.ac
+++ b/configure.ac
#
# 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;]]
${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