summaryrefslogtreecommitdiff
path: root/gnulib-m4/threadlib.m4
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-02 10:30:25 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-02 10:30:25 +0100
commit44a3eaeba04ef78835ca741592c376428ada5f71 (patch)
tree29cc935fd475678dcbe38972bfa77fdc68ffb10d /gnulib-m4/threadlib.m4
parent6b73edd95d603e27d55d4905134ac1327d426534 (diff)
New upstream version 0.9.8upstream/0.9.8
Diffstat (limited to 'gnulib-m4/threadlib.m4')
-rw-r--r--gnulib-m4/threadlib.m416
1 files changed, 11 insertions, 5 deletions
diff --git a/gnulib-m4/threadlib.m4 b/gnulib-m4/threadlib.m4
index b43534ea..9aa18e25 100644
--- a/gnulib-m4/threadlib.m4
+++ b/gnulib-m4/threadlib.m4
@@ -1,5 +1,5 @@
-# threadlib.m4 serial 11 (gettext-0.18.2)
-dnl Copyright (C) 2005-2016 Free Software Foundation, Inc.
+# threadlib.m4 serial 13
+dnl Copyright (C) 2005-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -66,7 +66,7 @@ changequote(,)dnl
dnl child process gets an endless segmentation fault inside execvp().
dnl Disable multithreading by default on Cygwin 1.5.x, because it has
dnl bugs that lead to endless loops or crashes. See
- dnl <http://cygwin.com/ml/cygwin/2009-08/msg00283.html>.
+ dnl <https://cygwin.com/ml/cygwin/2009-08/msg00283.html>.
osf*) gl_use_threads=no ;;
cygwin*)
case `uname -r` in
@@ -148,6 +148,10 @@ int main ()
[gl_cv_have_weak="guessing no"])
])
fi
+ dnl But when linking statically, weak symbols don't work.
+ case " $LDFLAGS " in
+ *" -static "*) gl_cv_have_weak=no ;;
+ esac
])
if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
# On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
@@ -165,7 +169,7 @@ int main ()
#
# If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
# needs -pthread for some reason. See:
- # http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00023.html
+ # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
save_LIBS=$LIBS
for gl_pthread in '' '-pthread'; do
LIBS="$LIBS $gl_pthread"
@@ -195,8 +199,10 @@ int main ()
# Therefore pthread_in_use() needs to actually try to create a
# thread: pthread_create from libc will fail, whereas
# pthread_create will actually create a thread.
+ # On Solaris 10 or newer, this test is no longer needed, because
+ # libc contains the fully functional pthread functions.
case "$host_os" in
- solaris* | hpux*)
+ solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*)
AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
[Define if the pthread_in_use() detection is hard.])
esac