From 46059cc63259f7a3d408fc1e52e8da9d37dc49ff Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 15 Nov 2008 04:08:14 -0800 Subject: Makefile: introduce NO_PTHREADS This introduces make variable NO_PTHREADS for platforms that lack the support for pthreads library or people who do not want to use it for whatever reason. When defined, it makes the multi-threaded index preloading into a no-op, and also disables threaded delta searching by pack-objects. Signed-off-by: Junio C Hamano Signed-off-by: Mike Ralphson Tested-by: Johannes Sixt (AIX 4.3.x) Signed-off-by: Junio C Hamano --- configure.ac | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 42567420e0..8821b5080a 100644 --- a/configure.ac +++ b/configure.ac @@ -490,6 +490,8 @@ AC_SUBST(NO_MKDTEMP) # Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link. # Enable it on Windows. By default, symrefs are still used. # +# Define NO_PTHREADS if we do not have pthreads +# # Define PTHREAD_LIBS to the linker flag used for Pthread support. AC_LANG_CONFTEST([AC_LANG_PROGRAM( [[#include ]], @@ -502,9 +504,12 @@ else ${CC} -lpthread conftest.c -o conftest.o > /dev/null 2>&1 if test $? -eq 0;then PTHREAD_LIBS="-lpthread" + else + NO_PTHREADS=UnfortunatelyYes fi fi AC_SUBST(PTHREAD_LIBS) +AC_SUBST(NO_PTHREADS) ## Site configuration (override autodetection) ## --with-PACKAGE[=ARG] and --without-PACKAGE -- cgit v1.2.3