[gs-cvs] rev 8656 - branches/mtrender/src
giles at ghostscript.com
giles at ghostscript.com
Mon Apr 21 14:28:46 PDT 2008
Author: giles
Date: 2008-04-21 14:28:46 -0700 (Mon, 21 Apr 2008)
New Revision: 8656
Modified:
branches/mtrender/src/Makefile.in
branches/mtrender/src/configure.ac
Log:
Check for pthread_create in -lpthread in the autoconf script, and enable
SYNC=posync if it is available. This is sufficient on GNU/Linux and MacOS X,
but may not be elsewhere.
Modified: branches/mtrender/src/Makefile.in
===================================================================
--- branches/mtrender/src/Makefile.in 2008-04-21 14:53:38 UTC (rev 8655)
+++ branches/mtrender/src/Makefile.in 2008-04-21 21:28:46 UTC (rev 8656)
@@ -304,11 +304,8 @@
# All reasonable platforms require -lm, but Rhapsody and perhaps one or
# two others fold libm into libc and don't require any additional library.
-#STDLIBS=-lpthread -lm
+STDLIBS=@PTHREAD_LIBS@ -lm
-# Since the default build is for nosync, don't include pthread lib
-STDLIBS=-lm
-
# Define the include switch(es) for the X11 header files.
# This can be null if handled in some other way (e.g., the files are
# in /usr/include, or the directory is supplied by an environment variable)
@@ -339,12 +336,11 @@
# primitives for this platform.
# If POSIX sync primitives are used, also change the STDLIBS to include
-# the pthread library.
+# the pthread library. Otherwise use SYNC=nosync
#SYNC=posync
+#SYNC=nosync
+SYNC=@SYNC@
-# Default is No sync primitives since some platforms don't have it (HP-UX)
-SYNC=nosync
-
# programs we use
RM=rm -f
Modified: branches/mtrender/src/configure.ac
===================================================================
--- branches/mtrender/src/configure.ac 2008-04-21 14:53:38 UTC (rev 8655)
+++ branches/mtrender/src/configure.ac 2008-04-21 21:28:46 UTC (rev 8656)
@@ -247,8 +247,16 @@
dnl --------------------------------------------------
AC_CHECK_LIB(m, cos)
-dnl AC_CHECK_LIB(pthread, pthread_create)
+SYNC="nosync"
+PTHREAD_LIBS=""
+AC_CHECK_LIB(pthread, pthread_create, [
+ SYNC=posync;
+ PTHREAD_LIBS="-lpthread"
+])
+AC_SUBST(SYNC)
+AC_SUBST(PTHREAD_LIBS)
+
dnl Tests for iconv (Needed for OpenPrinting Vector, "opvp" output device)
AC_ARG_WITH(libiconv,
[AC_HELP_STRING([--with-libiconv=@<:@no/gnu/native@:>@],
More information about the gs-cvs
mailing list