]> granicus.if.org Git - libatomic_ops/commitdiff
Better document configure THREADDLLIBS variable
authorIvan Maidanski <ivmai@mail.ru>
Sun, 26 May 2013 09:01:27 +0000 (13:01 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Sun, 26 May 2013 12:17:14 +0000 (16:17 +0400)
* configure.ac (THREADDLLIBS, have_pthreads): Add comments.

configure.ac

index e5201d5c6e6fe21c22701a10c914c267af66e070..37016503b768aee93c20ea82ea676ea0e6ba7caf 100644 (file)
@@ -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