diff options
author | Jens Rehsack <sno@netbsd.org> | 2020-03-02 17:07:49 +0100 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2021-02-19 11:48:42 +0100 |
commit | 2567e0ce0f3a11b535c6b527386197fb49ff172b (patch) | |
tree | 9e93c03dce81dcc1e6d0c613fc7f2627e6ad333e /m4/ax_pthread.m4 | |
parent | f4a537b8408bd3b374c34e423a5b72dfb39bda47 (diff) | |
download | autoconf-archive-2567e0ce0f3a11b535c6b527386197fb49ff172b.tar.gz |
AX_PTHREAD: target > host
Even if cross-compiling is not the most used use-case, it's much more
important where we build for then where we run configure stage on (see
autoconf-manual "18.6.3 Hosts and Cross-Compilation").
Signed-off-by: Jens Rehsack <sno@netbsd.org>
Diffstat (limited to 'm4/ax_pthread.m4')
-rw-r--r-- | m4/ax_pthread.m4 | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/m4/ax_pthread.m4 b/m4/ax_pthread.m4 index defefad..bcc76bd 100644 --- a/m4/ax_pthread.m4 +++ b/m4/ax_pthread.m4 @@ -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 28 +#serial 29 AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) AC_DEFUN([AX_PTHREAD], [ -AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([AC_CANONICAL_TARGET]) 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 $host_os in +case $target_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 $host_os in +case $target_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 $host_os in + case $target_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 $host_os in + case $target_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], |