[Pcsclite-cvs-commit] PCSC/aclocal acx_pthread.m4,1.2,1.3
rousseau@haydn.debian.org
rousseau@haydn.debian.org
Update of /cvsroot/pcsclite/PCSC/aclocal
In directory haydn:/tmp/cvs-serv3152
Modified Files:
acx_pthread.m4
Log Message:
version 1.9 to add support of GNU Pth (http://www.gnu.org/software/pth/)
Index: acx_pthread.m4
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/aclocal/acx_pthread.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- acx_pthread.m4 20 Nov 2003 09:15:00 -0000 1.2
+++ acx_pthread.m4 10 Jun 2004 20:18:10 -0000 1.3
@@ -37,9 +37,10 @@
# Create a list of thread flags to try. Items starting with a "-" are
# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all.
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
-acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt"
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:
@@ -58,6 +59,7 @@
# also defines -D_REENTRANT)
# pthread: Linux, etcetera
# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
case "${host_cpu}-${host_os}" in
*solaris*)
@@ -86,6 +88,13 @@
AC_MSG_CHECKING([whether pthreads work with $flag])
PTHREAD_CFLAGS="$flag"
;;
+
+ pthread-config)
+ AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
+ if test x"$acx_pthread_config" = xno; then continue; fi
+ PTHREAD_CFLAGS="`pthread-config --cflags`"
+ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+ ;;
*)
AC_MSG_CHECKING([for the pthreads library -l$flag])