# # # patch "ChangeLog" # from [d2e6c1948545a44a70d3951b54eeb1b7864d3c5c] # to [66996a59b7bfd4f4298dbb20c998ac56d19fa5e4] # # patch "m4/ac_compile_check_sizeof.m4" # from [4f82456b721d3d734aef7da37c0583ea7b7176d1] # to [14defb2b492671d163c5742d0cbc8377afc7658a] # # patch "m4/acx_pthread.m4" # from [2e921519f069d411f78902de4661ecee630a4c6d] # to [61b47bb8c2a95bcd5d0aef96860ecb4b8b2ec35b] # ============================================================ --- ChangeLog d2e6c1948545a44a70d3951b54eeb1b7864d3c5c +++ ChangeLog 66996a59b7bfd4f4298dbb20c998ac56d19fa5e4 @@ -1,3 +1,8 @@ +2006-06-04 Richard Levitte + + * m4/ac_compile_check_sizeof.m4, m4/acx_pthread.m4: Updates + contributed by Peter Simons . + 2006-06-03 Graydon Hoare * *.{cc,hh}: Update editor mode lines. ============================================================ --- m4/ac_compile_check_sizeof.m4 4f82456b721d3d734aef7da37c0583ea7b7176d1 +++ m4/ac_compile_check_sizeof.m4 14defb2b492671d163c5742d0cbc8377afc7658a @@ -16,8 +16,8 @@ dnl dnl switch (0) case 0: case 0:; dnl -dnl Thus, the AC_TRY_COMPILE will fail if the currently tried size -dnl does not match. +dnl Thus, the AC_TRY_COMPILE will fail if the currently tried size does +dnl not match. dnl dnl Here is an example skeleton configure.in script, demonstrating the dnl macro's usage: @@ -46,9 +46,11 @@ dnl AC_COMPILE_CHECK_SIZEOF(ptrdiff_t, $headers) dnl AC_COMPILE_CHECK_SIZEOF(off_t, $headers) dnl +dnl @category Misc dnl @author Kaveh Ghazi -dnl @version $Id: ac_compile_check_sizeof.m4,v 1.1 2003/06/18 16:48:00 jas Exp $ -dnl +dnl @version 2000-07-19 +dnl @license GPLWithACException + AC_DEFUN([AC_COMPILE_CHECK_SIZEOF], [changequote(<<, >>)dnl dnl The name to #define. ============================================================ --- m4/acx_pthread.m4 2e921519f069d411f78902de4661ecee630a4c6d +++ m4/acx_pthread.m4 61b47bb8c2a95bcd5d0aef96860ecb4b8b2ec35b @@ -1,5 +1,7 @@ dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) dnl +dnl @summary figure out how to build C programs using POSIX threads +dnl dnl This macro figures out how to build C programs using POSIX threads. dnl It sets the PTHREAD_LIBS output variable to the threads library and dnl linker flags, and the PTHREAD_CFLAGS output variable to any special @@ -41,7 +43,7 @@ dnl dnl @category InstalledPackages dnl @author Steven G. Johnson -dnl @version 2005-01-14 +dnl @version 2006-05-29 dnl @license GPLWithACException AC_DEFUN([ACX_PTHREAD], [ @@ -100,6 +102,7 @@ # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) +# ... -mt is also the pthreads flag for HP/aCC # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) @@ -109,13 +112,13 @@ # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthread or + # tests will erroneously succeed. (We need to link with -pthreads/-mt/ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: - acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" + acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" ;; esac @@ -189,7 +192,7 @@ AC_MSG_CHECKING([for joinable pthread attribute]) attr_name=unknown for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - AC_TRY_LINK([#include ], [int attr=$attr;], + AC_TRY_LINK([#include ], [int attr=$attr; return attr;], [attr_name=$attr; break]) done AC_MSG_RESULT($attr_name) @@ -213,8 +216,12 @@ LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" - # More AIX lossage: must compile with cc_r - AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC}) + # More AIX lossage: must compile with xlc_r or cc_r + if test x"$GCC" != xyes; then + AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC}) + else + PTHREAD_CC=$CC + fi else PTHREAD_CC="$CC" fi