Skip to content

Commit 8b75d31

Browse files
committed
Merge branch 'ds/uintmax-config'
* ds/uintmax-config: autoconf: Enable threaded delta search when pthreads are supported
2 parents 094f75b + d937c37 commit 8b75d31

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

config.mak.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,5 @@ NO_DEFLATE_BOUND=@NO_DEFLATE_BOUND@
5252
FREAD_READS_DIRECTORIES=@FREAD_READS_DIRECTORIES@
5353
SNPRINTF_RETURNS_BOGUS=@SNPRINTF_RETURNS_BOGUS@
5454
NO_PTHREADS=@NO_PTHREADS@
55+
THREADED_DELTA_SEARCH=@THREADED_DELTA_SEARCH@
5556
PTHREAD_LIBS=@PTHREAD_LIBS@

configure.ac

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,24 +492,28 @@ AC_SUBST(NO_MKDTEMP)
492492
#
493493
# Define NO_PTHREADS if we do not have pthreads
494494
#
495-
# Define PTHREAD_LIBS to the linker flag used for Pthread support.
495+
# Define PTHREAD_LIBS to the linker flag used for Pthread support and define
496+
# THREADED_DELTA_SEARCH if Pthreads are available.
496497
AC_LANG_CONFTEST([AC_LANG_PROGRAM(
497498
[[#include <pthread.h>]],
498499
[[pthread_mutex_t test_mutex;]]
499500
)])
500501
${CC} -pthread conftest.c -o conftest.o > /dev/null 2>&1
501502
if test $? -eq 0;then
502503
PTHREAD_LIBS="-pthread"
504+
THREADED_DELTA_SEARCH=YesPlease
503505
else
504506
${CC} -lpthread conftest.c -o conftest.o > /dev/null 2>&1
505507
if test $? -eq 0;then
506508
PTHREAD_LIBS="-lpthread"
509+
THREADED_DELTA_SEARCH=YesPlease
507510
else
508511
NO_PTHREADS=UnfortunatelyYes
509512
fi
510513
fi
511514
AC_SUBST(PTHREAD_LIBS)
512515
AC_SUBST(NO_PTHREADS)
516+
AC_SUBST(THREADED_DELTA_SEARCH)
513517

514518
## Site configuration (override autodetection)
515519
## --with-PACKAGE[=ARG] and --without-PACKAGE

0 commit comments

Comments
 (0)