Merge branch 'ds/uintmax-config'
authorJunio C Hamano <gitster@pobox.com>
Sun, 18 Jan 2009 07:08:53 +0000 (23:08 -0800)
committerJunio C Hamano <gitster@pobox.com>
Sun, 18 Jan 2009 07:08:53 +0000 (23:08 -0800)
* ds/uintmax-config:
autoconf: Enable threaded delta search when pthreads are supported

1  2 
configure.ac
diff --combined configure.ac
index 0a5fc8c6f6f91099c3c5df10f08240e547126e0a,cee06d768373991c94d0cf17e4a79b76c67e087f..5198c83f655b0e48c57aab38726676455157fa0f
@@@ -127,7 -127,7 +127,7 @@@ els
        SAVE_LDFLAGS="${LDFLAGS}"
        LDFLAGS="${SAVE_LDFLAGS} -Wl,-rpath,/"
        AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [ld_wl_rpath=yes], [ld_wl_rpath=no])
 -      LDFLAGS="${SAVE_LD_FLAGS}"
 +      LDFLAGS="${SAVE_LDFLAGS}"
     ])
     if test "$ld_wl_rpath" = "yes"; then
        AC_SUBST(CC_LD_DYNPATH, [-Wl,-rpath,])
           SAVE_LDFLAGS="${LDFLAGS}"
           LDFLAGS="${SAVE_LDFLAGS} -rpath /"
           AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [ld_rpath=yes], [ld_rpath=no])
 -         LDFLAGS="${SAVE_LD_FLAGS}"
 +         LDFLAGS="${SAVE_LDFLAGS}"
        ])
        if test "$ld_rpath" = "yes"; then
           AC_SUBST(CC_LD_DYNPATH, [-rpath])
@@@ -492,7 -492,8 +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;]]
  ${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