Commit f11e73c8 authored by Vincent Lefèvre's avatar Vincent Lefèvre
Browse files

Autoconf / AX_PTHREAD related update and cleanup.

* m4/ax_pthread.m4: update to AX_PTHREAD 31, fixing a change
  from AX_PTHREAD 29, which has eventually been regarded as
  a bug (workaround in r14481).
* configure.ac: removed the now unneeded AC_CANONICAL_TARGET;
  updated the corresponding comment.

[From SVN r14578 (trunk)]
parent 93ad99f6
......@@ -34,10 +34,16 @@ dnl some other macros (e.g. AX_PTHREAD 29, committed on 2021-02-19) and
dnl must be called quite early in order to avoid the following warning:
dnl warning: AC_ARG_PROGRAM was called before AC_CANONICAL_TARGET
dnl (we don't use AC_ARG_PROGRAM explicitly, but again, it is invoked by
dnl another macro, apparently AM_INIT_AUTOMAKE).
dnl So we need to call AC_CANONICAL_TARGET here, even if we don't use it.
dnl another macro, apparently AM_INIT_AUTOMAKE). This has eventually been
dnl fixed in AX_PTHREAD 31.
dnl Due to this bug in AX_PTHREAD 29, AC_CANONICAL_HOST was moved here and
dnl AC_CANONICAL_TARGET was added in r14481. However, it is unlikely that
dnl we need AC_CANONICAL_TARGET in the future; see the comments at
dnl https://github.com/autoconf-archive/autoconf-archive/commit/2567e0ce0f3a11b535c6b527386197fb49ff172b
dnl (introducing AX_PTHREAD 29). Thus it is probably better to avoid it,
dnl as it could cause confusion. But let's keep AC_CANONICAL_HOST here,
dnl since this may be a better place than later.
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
dnl Older Automake versions than 1.13 may still be supported, but no longer
dnl tested, and many things have changed in 1.13. Moreover the INSTALL file
......
......@@ -87,11 +87,11 @@
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 30
#serial 31
AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
AC_DEFUN([AX_PTHREAD], [
AC_REQUIRE([AC_CANONICAL_TARGET])
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_PROG_SED])
AC_LANG_PUSH([C])
......@@ -158,7 +158,7 @@ ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --
# --thread-safe: KAI C++
# pthread-config: use pthread-config program (for GNU Pth library)
case $target_os in
case $host_os in
freebsd*)
......@@ -248,7 +248,7 @@ AS_IF([test "x$ax_pthread_clang" = "xyes"],
# definitions is, on some systems, a strong hint that pthreads support is
# correctly enabled
case $target_os in
case $host_os in
darwin* | hpux* | linux* | osf* | solaris*)
ax_pthread_check_macro="_REENTRANT"
;;
......@@ -450,7 +450,7 @@ if test "x$ax_pthread_ok" = "xyes"; then
AC_CACHE_CHECK([whether more special flags are required for pthreads],
[ax_cv_PTHREAD_SPECIAL_FLAGS],
[ax_cv_PTHREAD_SPECIAL_FLAGS=no
case $target_os in
case $host_os in
solaris*)
ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
;;
......@@ -480,7 +480,7 @@ if test "x$ax_pthread_ok" = "xyes"; then
# More AIX lossage: compile with *_r variant
if test "x$GCC" != "xyes"; then
case $target_os in
case $host_os in
aix*)
AS_CASE(["x/$CC"],
[x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment