Blame m4/threadlib.m4

Packit Service f629e6
# threadlib.m4 serial 11 (gettext-0.18.2)
Packit Service f629e6
dnl Copyright (C) 2005-2014 Free Software Foundation, Inc.
Packit Service f629e6
dnl This file is free software; the Free Software Foundation
Packit Service f629e6
dnl gives unlimited permission to copy and/or distribute it,
Packit Service f629e6
dnl with or without modifications, as long as this notice is preserved.
Packit Service f629e6
Packit Service f629e6
dnl From Bruno Haible.
Packit Service f629e6
Packit Service f629e6
dnl gl_THREADLIB
Packit Service f629e6
dnl ------------
Packit Service f629e6
dnl Tests for a multithreading library to be used.
Packit Service f629e6
dnl If the configure.ac contains a definition of the gl_THREADLIB_DEFAULT_NO
Packit Service f629e6
dnl (it must be placed before the invocation of gl_THREADLIB_EARLY!), then the
Packit Service f629e6
dnl default is 'no', otherwise it is system dependent. In both cases, the user
Packit Service f629e6
dnl can change the choice through the options --enable-threads=choice or
Packit Service f629e6
dnl --disable-threads.
Packit Service f629e6
dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS,
Packit Service f629e6
dnl USE_PTH_THREADS, USE_WINDOWS_THREADS
Packit Service f629e6
dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use
Packit Service f629e6
dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with
Packit Service f629e6
dnl libtool).
Packit Service f629e6
dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for
Packit Service f629e6
dnl programs that really need multithread functionality. The difference
Packit Service f629e6
dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak
Packit Service f629e6
dnl symbols, typically LIBTHREAD is empty whereas LIBMULTITHREAD is not.
Packit Service f629e6
dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
Packit Service f629e6
dnl multithread-safe programs.
Packit Service f629e6
Packit Service f629e6
AC_DEFUN([gl_THREADLIB_EARLY],
Packit Service f629e6
[
Packit Service f629e6
  AC_REQUIRE([gl_THREADLIB_EARLY_BODY])
Packit Service f629e6
])
Packit Service f629e6
Packit Service f629e6
dnl The guts of gl_THREADLIB_EARLY. Needs to be expanded only once.
Packit Service f629e6
Packit Service f629e6
AC_DEFUN([gl_THREADLIB_EARLY_BODY],
Packit Service f629e6
[
Packit Service f629e6
  dnl Ordering constraints: This macro modifies CPPFLAGS in a way that
Packit Service f629e6
  dnl influences the result of the autoconf tests that test for *_unlocked
Packit Service f629e6
  dnl declarations, on AIX 5 at least. Therefore it must come early.
Packit Service f629e6
  AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl
Packit Service f629e6
  AC_BEFORE([$0], [gl_ARGP])dnl
Packit Service f629e6
Packit Service f629e6
  AC_REQUIRE([AC_CANONICAL_HOST])
Packit Service f629e6
  dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems.
Packit Service f629e6
  dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes
Packit Service f629e6
  dnl AC_GNU_SOURCE.
Packit Service f629e6
  m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
Packit Service f629e6
    [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
Packit Service f629e6
    [AC_REQUIRE([AC_GNU_SOURCE])])
Packit Service f629e6
  dnl Check for multithreading.
Packit Service f629e6
  m4_ifdef([gl_THREADLIB_DEFAULT_NO],
Packit Service f629e6
    [m4_divert_text([DEFAULTS], [gl_use_threads_default=no])],
Packit Service f629e6
    [m4_divert_text([DEFAULTS], [gl_use_threads_default=])])
Packit Service f629e6
  AC_ARG_ENABLE([threads],
Packit Service f629e6
AC_HELP_STRING([--enable-threads={posix|solaris|pth|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
Packit Service f629e6
AC_HELP_STRING([--disable-threads], [build without multithread safety])]),
Packit Service f629e6
    [gl_use_threads=$enableval],
Packit Service f629e6
    [if test -n "$gl_use_threads_default"; then
Packit Service f629e6
       gl_use_threads="$gl_use_threads_default"
Packit Service f629e6
     else
Packit Service f629e6
changequote(,)dnl
Packit Service f629e6
       case "$host_os" in
Packit Service f629e6
         dnl Disable multithreading by default on OSF/1, because it interferes
Packit Service f629e6
         dnl with fork()/exec(): When msgexec is linked with -lpthread, its
Packit Service f629e6
         dnl child process gets an endless segmentation fault inside execvp().
Packit Service f629e6
         dnl Disable multithreading by default on Cygwin 1.5.x, because it has
Packit Service f629e6
         dnl bugs that lead to endless loops or crashes. See
Packit Service f629e6
         dnl <http://cygwin.com/ml/cygwin/2009-08/msg00283.html>.
Packit Service f629e6
         osf*) gl_use_threads=no ;;
Packit Service f629e6
         cygwin*)
Packit Service f629e6
               case `uname -r` in
Packit Service f629e6
                 1.[0-5].*) gl_use_threads=no ;;
Packit Service f629e6
                 *)         gl_use_threads=yes ;;
Packit Service f629e6
               esac
Packit Service f629e6
               ;;
Packit Service f629e6
         *)    gl_use_threads=yes ;;
Packit Service f629e6
       esac
Packit Service f629e6
changequote([,])dnl
Packit Service f629e6
     fi
Packit Service f629e6
    ])
Packit Service f629e6
  if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
Packit Service f629e6
    # For using <pthread.h>:
Packit Service f629e6
    case "$host_os" in
Packit Service f629e6
      osf*)
Packit Service f629e6
        # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
Packit Service f629e6
        # groks <pthread.h>. cc also understands the flag -pthread, but
Packit Service f629e6
        # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
Packit Service f629e6
        # 2. putting a flag into CPPFLAGS that has an effect on the linker
Packit Service f629e6
        # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
Packit Service f629e6
        # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
Packit Service f629e6
        CPPFLAGS="$CPPFLAGS -D_REENTRANT"
Packit Service f629e6
        ;;
Packit Service f629e6
    esac
Packit Service f629e6
    # Some systems optimize for single-threaded programs by default, and
Packit Service f629e6
    # need special flags to disable these optimizations. For example, the
Packit Service f629e6
    # definition of 'errno' in <errno.h>.
Packit Service f629e6
    case "$host_os" in
Packit Service f629e6
      aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
Packit Service f629e6
      solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
Packit Service f629e6
    esac
Packit Service f629e6
  fi
Packit Service f629e6
])
Packit Service f629e6
Packit Service f629e6
dnl The guts of gl_THREADLIB. Needs to be expanded only once.
Packit Service f629e6
Packit Service f629e6
AC_DEFUN([gl_THREADLIB_BODY],
Packit Service f629e6
[
Packit Service f629e6
  AC_REQUIRE([gl_THREADLIB_EARLY_BODY])
Packit Service f629e6
  gl_threads_api=none
Packit Service f629e6
  LIBTHREAD=
Packit Service f629e6
  LTLIBTHREAD=
Packit Service f629e6
  LIBMULTITHREAD=
Packit Service f629e6
  LTLIBMULTITHREAD=
Packit Service f629e6
  if test "$gl_use_threads" != no; then
Packit Service f629e6
    dnl Check whether the compiler and linker support weak declarations.
Packit Service f629e6
    AC_CACHE_CHECK([whether imported symbols can be declared weak],
Packit Service f629e6
      [gl_cv_have_weak],
Packit Service f629e6
      [gl_cv_have_weak=no
Packit Service f629e6
       dnl First, test whether the compiler accepts it syntactically.
Packit Service f629e6
       AC_LINK_IFELSE(
Packit Service f629e6
         [AC_LANG_PROGRAM(
Packit Service f629e6
            [[extern void xyzzy ();
Packit Service f629e6
#pragma weak xyzzy]],
Packit Service f629e6
            [[xyzzy();]])],
Packit Service f629e6
         [gl_cv_have_weak=maybe])
Packit Service f629e6
       if test $gl_cv_have_weak = maybe; then
Packit Service f629e6
         dnl Second, test whether it actually works. On Cygwin 1.7.2, with
Packit Service f629e6
         dnl gcc 4.3, symbols declared weak always evaluate to the address 0.
Packit Service f629e6
         AC_RUN_IFELSE(
Packit Service f629e6
           [AC_LANG_SOURCE([[
Packit Service f629e6
#include <stdio.h>
Packit Service f629e6
#pragma weak fputs
Packit Service f629e6
int main ()
Packit Service f629e6
{
Packit Service f629e6
  return (fputs == NULL);
Packit Service f629e6
}]])],
Packit Service f629e6
           [gl_cv_have_weak=yes],
Packit Service f629e6
           [gl_cv_have_weak=no],
Packit Service f629e6
           [dnl When cross-compiling, assume that only ELF platforms support
Packit Service f629e6
            dnl weak symbols.
Packit Service f629e6
            AC_EGREP_CPP([Extensible Linking Format],
Packit Service f629e6
              [#ifdef __ELF__
Packit Service f629e6
               Extensible Linking Format
Packit Service f629e6
               #endif
Packit Service f629e6
              ],
Packit Service f629e6
              [gl_cv_have_weak="guessing yes"],
Packit Service f629e6
              [gl_cv_have_weak="guessing no"])
Packit Service f629e6
           ])
Packit Service f629e6
       fi
Packit Service f629e6
      ])
Packit Service f629e6
    if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
Packit Service f629e6
      # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
Packit Service f629e6
      # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
Packit Service f629e6
      AC_CHECK_HEADER([pthread.h],
Packit Service f629e6
        [gl_have_pthread_h=yes], [gl_have_pthread_h=no])
Packit Service f629e6
      if test "$gl_have_pthread_h" = yes; then
Packit Service f629e6
        # Other possible tests:
Packit Service f629e6
        #   -lpthreads (FSU threads, PCthreads)
Packit Service f629e6
        #   -lgthreads
Packit Service f629e6
        gl_have_pthread=
Packit Service f629e6
        # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
Packit Service f629e6
        # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
Packit Service f629e6
        # the second one only in libpthread, and lock.c needs it.
Packit Service f629e6
        #
Packit Service f629e6
        # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
Packit Service f629e6
        # needs -pthread for some reason.  See:
Packit Service f629e6
        # http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00023.html
Packit Service f629e6
        save_LIBS=$LIBS
Packit Service f629e6
        for gl_pthread in '' '-pthread'; do
Packit Service f629e6
          LIBS="$LIBS $gl_pthread"
Packit Service f629e6
          AC_LINK_IFELSE(
Packit Service f629e6
            [AC_LANG_PROGRAM(
Packit Service f629e6
               [[#include <pthread.h>
Packit Service f629e6
                 pthread_mutex_t m;
Packit Service f629e6
                 pthread_mutexattr_t ma;
Packit Service f629e6
               ]],
Packit Service f629e6
               [[pthread_mutex_lock (&m);
Packit Service f629e6
                 pthread_mutexattr_init (&ma);]])],
Packit Service f629e6
            [gl_have_pthread=yes
Packit Service f629e6
             LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread
Packit Service f629e6
             LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread])
Packit Service f629e6
          LIBS=$save_LIBS
Packit Service f629e6
          test -n "$gl_have_pthread" && break
Packit Service f629e6
        done
Packit Service f629e6
Packit Service f629e6
        # Test for libpthread by looking for pthread_kill. (Not pthread_self,
Packit Service f629e6
        # since it is defined as a macro on OSF/1.)
Packit Service f629e6
        if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then
Packit Service f629e6
          # The program links fine without libpthread. But it may actually
Packit Service f629e6
          # need to link with libpthread in order to create multiple threads.
Packit Service f629e6
          AC_CHECK_LIB([pthread], [pthread_kill],
Packit Service f629e6
            [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
Packit Service f629e6
             # On Solaris and HP-UX, most pthread functions exist also in libc.
Packit Service f629e6
             # Therefore pthread_in_use() needs to actually try to create a
Packit Service f629e6
             # thread: pthread_create from libc will fail, whereas
Packit Service f629e6
             # pthread_create will actually create a thread.
Packit Service f629e6
             case "$host_os" in
Packit Service f629e6
               solaris* | hpux*)
Packit Service f629e6
                 AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
Packit Service f629e6
                   [Define if the pthread_in_use() detection is hard.])
Packit Service f629e6
             esac
Packit Service f629e6
            ])
Packit Service f629e6
        elif test -z "$gl_have_pthread"; then
Packit Service f629e6
          # Some library is needed. Try libpthread and libc_r.
Packit Service f629e6
          AC_CHECK_LIB([pthread], [pthread_kill],
Packit Service f629e6
            [gl_have_pthread=yes
Packit Service f629e6
             LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
Packit Service f629e6
             LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread])
Packit Service f629e6
          if test -z "$gl_have_pthread"; then
Packit Service f629e6
            # For FreeBSD 4.
Packit Service f629e6
            AC_CHECK_LIB([c_r], [pthread_kill],
Packit Service f629e6
              [gl_have_pthread=yes
Packit Service f629e6
               LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
Packit Service f629e6
               LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r])
Packit Service f629e6
          fi
Packit Service f629e6
        fi
Packit Service f629e6
        if test -n "$gl_have_pthread"; then
Packit Service f629e6
          gl_threads_api=posix
Packit Service f629e6
          AC_DEFINE([USE_POSIX_THREADS], [1],
Packit Service f629e6
            [Define if the POSIX multithreading library can be used.])
Packit Service f629e6
          if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
Packit Service f629e6
            if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
Packit Service f629e6
              AC_DEFINE([USE_POSIX_THREADS_WEAK], [1],
Packit Service f629e6
                [Define if references to the POSIX multithreading library should be made weak.])
Packit Service f629e6
              LIBTHREAD=
Packit Service f629e6
              LTLIBTHREAD=
Packit Service f629e6
            fi
Packit Service f629e6
          fi
Packit Service f629e6
        fi
Packit Service f629e6
      fi
Packit Service f629e6
    fi
Packit Service f629e6
    if test -z "$gl_have_pthread"; then
Packit Service f629e6
      if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
Packit Service f629e6
        gl_have_solaristhread=
Packit Service f629e6
        gl_save_LIBS="$LIBS"
Packit Service f629e6
        LIBS="$LIBS -lthread"
Packit Service f629e6
        AC_LINK_IFELSE(
Packit Service f629e6
          [AC_LANG_PROGRAM(
Packit Service f629e6
             [[
Packit Service f629e6
#include <thread.h>
Packit Service f629e6
#include <synch.h>
Packit Service f629e6
             ]],
Packit Service f629e6
             [[thr_self();]])],
Packit Service f629e6
          [gl_have_solaristhread=yes])
Packit Service f629e6
        LIBS="$gl_save_LIBS"
Packit Service f629e6
        if test -n "$gl_have_solaristhread"; then
Packit Service f629e6
          gl_threads_api=solaris
Packit Service f629e6
          LIBTHREAD=-lthread
Packit Service f629e6
          LTLIBTHREAD=-lthread
Packit Service f629e6
          LIBMULTITHREAD="$LIBTHREAD"
Packit Service f629e6
          LTLIBMULTITHREAD="$LTLIBTHREAD"
Packit Service f629e6
          AC_DEFINE([USE_SOLARIS_THREADS], [1],
Packit Service f629e6
            [Define if the old Solaris multithreading library can be used.])
Packit Service f629e6
          if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
Packit Service f629e6
            AC_DEFINE([USE_SOLARIS_THREADS_WEAK], [1],
Packit Service f629e6
              [Define if references to the old Solaris multithreading library should be made weak.])
Packit Service f629e6
            LIBTHREAD=
Packit Service f629e6
            LTLIBTHREAD=
Packit Service f629e6
          fi
Packit Service f629e6
        fi
Packit Service f629e6
      fi
Packit Service f629e6
    fi
Packit Service f629e6
    if test "$gl_use_threads" = pth; then
Packit Service f629e6
      gl_save_CPPFLAGS="$CPPFLAGS"
Packit Service f629e6
      AC_LIB_LINKFLAGS([pth])
Packit Service f629e6
      gl_have_pth=
Packit Service f629e6
      gl_save_LIBS="$LIBS"
Packit Service f629e6
      LIBS="$LIBS $LIBPTH"
Packit Service f629e6
      AC_LINK_IFELSE(
Packit Service f629e6
        [AC_LANG_PROGRAM([[#include <pth.h>]], [[pth_self();]])],
Packit Service f629e6
        [gl_have_pth=yes])
Packit Service f629e6
      LIBS="$gl_save_LIBS"
Packit Service f629e6
      if test -n "$gl_have_pth"; then
Packit Service f629e6
        gl_threads_api=pth
Packit Service f629e6
        LIBTHREAD="$LIBPTH"
Packit Service f629e6
        LTLIBTHREAD="$LTLIBPTH"
Packit Service f629e6
        LIBMULTITHREAD="$LIBTHREAD"
Packit Service f629e6
        LTLIBMULTITHREAD="$LTLIBTHREAD"
Packit Service f629e6
        AC_DEFINE([USE_PTH_THREADS], [1],
Packit Service f629e6
          [Define if the GNU Pth multithreading library can be used.])
Packit Service f629e6
        if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
Packit Service f629e6
          if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
Packit Service f629e6
            AC_DEFINE([USE_PTH_THREADS_WEAK], [1],
Packit Service f629e6
              [Define if references to the GNU Pth multithreading library should be made weak.])
Packit Service f629e6
            LIBTHREAD=
Packit Service f629e6
            LTLIBTHREAD=
Packit Service f629e6
          fi
Packit Service f629e6
        fi
Packit Service f629e6
      else
Packit Service f629e6
        CPPFLAGS="$gl_save_CPPFLAGS"
Packit Service f629e6
      fi
Packit Service f629e6
    fi
Packit Service f629e6
    if test -z "$gl_have_pthread"; then
Packit Service f629e6
      case "$gl_use_threads" in
Packit Service f629e6
        yes | windows | win32) # The 'win32' is for backward compatibility.
Packit Service f629e6
          if { case "$host_os" in
Packit Service f629e6
                 mingw*) true;;
Packit Service f629e6
                 *) false;;
Packit Service f629e6
               esac
Packit Service f629e6
             }; then
Packit Service f629e6
            gl_threads_api=windows
Packit Service f629e6
            AC_DEFINE([USE_WINDOWS_THREADS], [1],
Packit Service f629e6
              [Define if the native Windows multithreading API can be used.])
Packit Service f629e6
          fi
Packit Service f629e6
          ;;
Packit Service f629e6
      esac
Packit Service f629e6
    fi
Packit Service f629e6
  fi
Packit Service f629e6
  AC_MSG_CHECKING([for multithread API to use])
Packit Service f629e6
  AC_MSG_RESULT([$gl_threads_api])
Packit Service f629e6
  AC_SUBST([LIBTHREAD])
Packit Service f629e6
  AC_SUBST([LTLIBTHREAD])
Packit Service f629e6
  AC_SUBST([LIBMULTITHREAD])
Packit Service f629e6
  AC_SUBST([LTLIBMULTITHREAD])
Packit Service f629e6
])
Packit Service f629e6
Packit Service f629e6
AC_DEFUN([gl_THREADLIB],
Packit Service f629e6
[
Packit Service f629e6
  AC_REQUIRE([gl_THREADLIB_EARLY])
Packit Service f629e6
  AC_REQUIRE([gl_THREADLIB_BODY])
Packit Service f629e6
])
Packit Service f629e6
Packit Service f629e6
Packit Service f629e6
dnl gl_DISABLE_THREADS
Packit Service f629e6
dnl ------------------
Packit Service f629e6
dnl Sets the gl_THREADLIB default so that threads are not used by default.
Packit Service f629e6
dnl The user can still override it at installation time, by using the
Packit Service f629e6
dnl configure option '--enable-threads'.
Packit Service f629e6
Packit Service f629e6
AC_DEFUN([gl_DISABLE_THREADS], [
Packit Service f629e6
  m4_divert_text([INIT_PREPARE], [gl_use_threads_default=no])
Packit Service f629e6
])
Packit Service f629e6
Packit Service f629e6
Packit Service f629e6
dnl Survey of platforms:
Packit Service f629e6
dnl
Packit Service f629e6
dnl Platform           Available  Compiler    Supports   test-lock
Packit Service f629e6
dnl                    flavours   option      weak       result
Packit Service f629e6
dnl ---------------    ---------  ---------   --------   ---------
Packit Service f629e6
dnl Linux 2.4/glibc    posix      -lpthread       Y      OK
Packit Service f629e6
dnl
Packit Service f629e6
dnl GNU Hurd/glibc     posix
Packit Service f629e6
dnl
Packit Service f629e6
dnl Ubuntu 14.04       posix      -pthread        Y      OK
Packit Service f629e6
dnl
Packit Service f629e6
dnl FreeBSD 5.3        posix      -lc_r           Y
Packit Service f629e6
dnl                    posix      -lkse ?         Y
Packit Service f629e6
dnl                    posix      -lpthread ?     Y
Packit Service f629e6
dnl                    posix      -lthr           Y
Packit Service f629e6
dnl
Packit Service f629e6
dnl FreeBSD 5.2        posix      -lc_r           Y
Packit Service f629e6
dnl                    posix      -lkse           Y
Packit Service f629e6
dnl                    posix      -lthr           Y
Packit Service f629e6
dnl
Packit Service f629e6
dnl FreeBSD 4.0,4.10   posix      -lc_r           Y      OK
Packit Service f629e6
dnl
Packit Service f629e6
dnl NetBSD 1.6         --
Packit Service f629e6
dnl
Packit Service f629e6
dnl OpenBSD 3.4        posix      -lpthread       Y      OK
Packit Service f629e6
dnl
Packit Service f629e6
dnl Mac OS X 10.[123]  posix      -lpthread       Y      OK
Packit Service f629e6
dnl
Packit Service f629e6
dnl Solaris 7,8,9      posix      -lpthread       Y      Sol 7,8: 0.0; Sol 9: OK
Packit Service f629e6
dnl                    solaris    -lthread        Y      Sol 7,8: 0.0; Sol 9: OK
Packit Service f629e6
dnl
Packit Service f629e6
dnl HP-UX 11           posix      -lpthread       N (cc) OK
Packit Service f629e6
dnl                                               Y (gcc)
Packit Service f629e6
dnl
Packit Service f629e6
dnl IRIX 6.5           posix      -lpthread       Y      0.5
Packit Service f629e6
dnl
Packit Service f629e6
dnl AIX 4.3,5.1        posix      -lpthread       N      AIX 4: 0.5; AIX 5: OK
Packit Service f629e6
dnl
Packit Service f629e6
dnl OSF/1 4.0,5.1      posix      -pthread (cc)   N      OK
Packit Service f629e6
dnl                               -lpthread (gcc) Y
Packit Service f629e6
dnl
Packit Service f629e6
dnl Cygwin             posix      -lpthread       Y      OK
Packit Service f629e6
dnl
Packit Service f629e6
dnl Any of the above   pth        -lpth                  0.0
Packit Service f629e6
dnl
Packit Service f629e6
dnl Mingw              windows                    N      OK
Packit Service f629e6
dnl
Packit Service f629e6
dnl BeOS 5             --
Packit Service f629e6
dnl
Packit Service f629e6
dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is
Packit Service f629e6
dnl turned off:
Packit Service f629e6
dnl   OK if all three tests terminate OK,
Packit Service f629e6
dnl   0.5 if the first test terminates OK but the second one loops endlessly,
Packit Service f629e6
dnl   0.0 if the first test already loops endlessly.