Blame gl/m4/threadlib.m4

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