aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'gnulib/m4/threadlib.m4')
-rw-r--r--gnulib/m4/threadlib.m423
1 files changed, 12 insertions, 11 deletions
diff --git a/gnulib/m4/threadlib.m4 b/gnulib/m4/threadlib.m4
index 3a8655e93..51caf576b 100644
--- a/gnulib/m4/threadlib.m4
+++ b/gnulib/m4/threadlib.m4
@@ -1,4 +1,4 @@
-# threadlib.m4 serial 1 (gettext-0.18)
+# threadlib.m4 serial 2 (gettext-0.18)
dnl Copyright (C) 2005-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -104,7 +104,8 @@ AC_DEFUN([gl_THREADLIB_BODY],
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
# it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
- AC_CHECK_HEADER(pthread.h, gl_have_pthread_h=yes, gl_have_pthread_h=no)
+ AC_CHECK_HEADER([pthread.h],
+ [gl_have_pthread_h=yes], [gl_have_pthread_h=no])
if test "$gl_have_pthread_h" = yes; then
# Other possible tests:
# -lpthreads (FSU threads, PCthreads)
@@ -122,7 +123,7 @@ AC_DEFUN([gl_THREADLIB_BODY],
if test -n "$gl_have_pthread"; then
# The program links fine without libpthread. But it may actually
# need to link with libpthread in order to create multiple threads.
- AC_CHECK_LIB(pthread, pthread_kill,
+ AC_CHECK_LIB([pthread], [pthread_kill],
[LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
# On Solaris and HP-UX, most pthread functions exist also in libc.
# Therefore pthread_in_use() needs to actually try to create a
@@ -136,13 +137,13 @@ AC_DEFUN([gl_THREADLIB_BODY],
])
else
# Some library is needed. Try libpthread and libc_r.
- AC_CHECK_LIB(pthread, pthread_kill,
+ AC_CHECK_LIB([pthread], [pthread_kill],
[gl_have_pthread=yes
LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread])
if test -z "$gl_have_pthread"; then
# For FreeBSD 4.
- AC_CHECK_LIB(c_r, pthread_kill,
+ AC_CHECK_LIB([c_r], [pthread_kill],
[gl_have_pthread=yes
LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r])
@@ -192,11 +193,11 @@ AC_DEFUN([gl_THREADLIB_BODY],
fi
if test "$gl_use_threads" = pth; then
gl_save_CPPFLAGS="$CPPFLAGS"
- AC_LIB_LINKFLAGS(pth)
+ AC_LIB_LINKFLAGS([pth])
gl_have_pth=
gl_save_LIBS="$LIBS"
LIBS="$LIBS -lpth"
- AC_TRY_LINK([#include <pth.h>], [pth_self();], gl_have_pth=yes)
+ AC_TRY_LINK([#include <pth.h>], [pth_self();], [gl_have_pth=yes])
LIBS="$gl_save_LIBS"
if test -n "$gl_have_pth"; then
gl_threads_api=pth
@@ -234,10 +235,10 @@ AC_DEFUN([gl_THREADLIB_BODY],
fi
AC_MSG_CHECKING([for multithread API to use])
AC_MSG_RESULT([$gl_threads_api])
- AC_SUBST(LIBTHREAD)
- AC_SUBST(LTLIBTHREAD)
- AC_SUBST(LIBMULTITHREAD)
- AC_SUBST(LTLIBMULTITHREAD)
+ AC_SUBST([LIBTHREAD])
+ AC_SUBST([LTLIBTHREAD])
+ AC_SUBST([LIBMULTITHREAD])
+ AC_SUBST([LTLIBMULTITHREAD])
])
AC_DEFUN([gl_THREADLIB],