Code

Merge branch 'ds/uintmax-config' (early part)
authorJunio C Hamano <gitster@pobox.com>
Thu, 13 Nov 2008 06:27:33 +0000 (22:27 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 13 Nov 2008 06:27:33 +0000 (22:27 -0800)
* 'ds/uintmax-config' (early part):
  Add autoconf tests for pthreads
  Make Pthread link flags configurable
  Add Makefile check for FreeBSD 4.9-SECURITY
  Build: add NO_UINTMAX_T to support ancient systems

Conflicts:
Makefile

1  2 
Makefile
configure.ac

diff --cc Makefile
index 920cb4207844648f9a7ae7e74be8b426543ea7e4,02f68e05f5f78def774b02ab6af843bc48a9f0c9..35adafa011bdc8b3728bea942d86fba96a90fe6a
+++ b/Makefile
@@@ -690,6 -693,13 +691,11 @@@ ifeq ($(uname_S),FreeBSD
        BASIC_LDFLAGS += -L/usr/local/lib
        DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease
        THREADED_DELTA_SEARCH = YesPlease
 -      COMPAT_CFLAGS += -Icompat/regex
 -      COMPAT_OBJS += compat/regex/regex.o
+       ifeq ($(shell expr "$(uname_R)" : '4\.'),2)
+               PTHREAD_LIBS = -pthread
+               NO_UINTMAX_T = YesPlease
+               NO_STRTOUMAX = YesPlease
+       endif
  endif
  ifeq ($(uname_S),OpenBSD)
        NO_STRCASESTR = YesPlease
diff --cc configure.ac
index ef544e877879a21e5507ab7767984f3d8c66b3d7,3f058a087b109fad3b60e6073bdfacad4a16b6f5..42567420e0b6ab01bc0a905b61c3fd7939f800f9
@@@ -446,8 -436,16 +446,16 @@@ GIT_CHECK_FUNC(strlcpy
  [NO_STRLCPY=YesPlease])
  AC_SUBST(NO_STRLCPY)
  #
+ # Define NO_UINTMAX_T if your platform does not have uintmax_t
+ AC_CHECK_TYPE(uintmax_t,
+ [NO_UINTMAX_T=],
+ [NO_UINTMAX_T=YesPlease],[
+ #include <inttypes.h>
+ ])
+ AC_SUBST(NO_UINTMAX_T)
+ #
  # Define NO_STRTOUMAX if you don't have strtoumax in the C library.
 -AC_CHECK_FUNC(strtoumax,
 +GIT_CHECK_FUNC(strtoumax,
  [NO_STRTOUMAX=],
  [NO_STRTOUMAX=YesPlease])
  AC_SUBST(NO_STRTOUMAX)