Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Unity-Technologies/libatomic_ops.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2013-05-26 13:01:27 +0400
committerIvan Maidanski <ivmai@mail.ru>2013-05-26 16:17:14 +0400
commit51eb4e32bde632eeda20d7f7281f843ed3b2b08d (patch)
treeb7c660a936a7e72db93dd102ae89bd62900c9656
parent902b4ad5295141295814a90eb7ec61189b9bc712 (diff)
Better document configure THREADDLLIBS variable
* configure.ac (THREADDLLIBS, have_pthreads): Add comments.
-rw-r--r--configure.ac10
1 files changed, 8 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index e5201d5..3701650 100644
--- a/configure.ac
+++ b/configure.ac
@@ -138,23 +138,29 @@ AH_TEMPLATE([AO_WEAK_DOUBLE_CAS_EMULATION],
[Emulate double-width CAS via pthread locking in case of no hardware \
support (only gcc/x86_64, the emulation is unsafe)])
+AC_DEFINE(_REENTRANT, 1, [Required define if using POSIX threads.])
+
+# Libraries needed to support threads (if any).
THREADDLLIBS=
have_pthreads=true
-## Libraries needed to support threads.
AC_CHECK_LIB(pthread, pthread_self, THREADDLLIBS="-lpthread",,)
-AC_DEFINE(_REENTRANT, 1, [Required define if using POSIX threads.])
case "$host" in
*-*-netbsd*)
+ # Indicates the use of pthreads.
AC_DEFINE(_PTHREADS)
;;
*-*-openbsd* | *-*-kfreebsd*-gnu | *-*-dgux*)
THREADDLLIBS=-pthread
;;
*-*-cygwin* | *-*-darwin*)
+ # Cygwin does not have a real libpthread, so Libtool cannot link
+ # against it.
THREADDLLIBS=
;;
*-*-mingw*)
+ # Use Win32 threads for tests anyway.
THREADDLLIBS=
+ # Skip test_atomic_pthreads.
have_pthreads=false
;;
esac