From 5a444d6bb81245d6a086a9198cfdaa8be528dd5c Mon Sep 17 00:00:00 2001 From: tradke Date: Thu, 5 Apr 2001 14:32:41 +0000 Subject: Set the compiler/linker flags for PTHREADS support according to the detected configuration from the configure script. Changed '#define PTHREADS' into '#define CCTK_PTHREADS 1'. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2093 17b73243-c579-4c4c-a9d2-2d5706c11dac --- lib/make/extras/PTHREADS/setup.sh | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'lib/make/extras/PTHREADS') diff --git a/lib/make/extras/PTHREADS/setup.sh b/lib/make/extras/PTHREADS/setup.sh index 52082e6d..3398f89c 100755 --- a/lib/make/extras/PTHREADS/setup.sh +++ b/lib/make/extras/PTHREADS/setup.sh @@ -8,18 +8,22 @@ # @enddesc # @@*/ -if test -n "$PTHREADS" ; then - -echo "Configuring with PTHREADS." +if test "X$PTHREADS" != "Xyes"; then + return +fi + +echo "Configuring with PTHREADS" # Write the data out to the header and make files. -CCTK_WriteLine cctk_Extradefs.h "#define PTHREADS" -CCTK_WriteLine make.extra.defn "PTHREADS_LIBS = pthread" +CCTK_WriteLine cctk_Extradefs.h "#define CCTK_PTHREADS 1" +# the PTHREAD_xxx variables are set by configure +CCTK_WriteLine make.extra.defn "PTHREADS_CFLAGS = $PTHREADS_CFLAGS" +CCTK_WriteLine make.extra.defn "PTHREADS_CXXFLAGS = $PTHREADS_CXXFLAGS" +CCTK_WriteLine make.extra.defn "PTHREADS_LIBS = $PTHREAD_LIBS" CCTK_WriteLine make.extra.defn "" CCTK_WriteLine make.extra.defn "" - -CCTK_WriteLine make.extra.defn 'LIBS += $(PTHREADS_LIBS)' - -fi +CCTK_WriteLine make.extra.defn 'CFLAGS += $(PTHREADS_CFLAGS)' +CCTK_WriteLine make.extra.defn 'CXXFLAGS += $(PTHREADS_CXXFLAGS)' +CCTK_WriteLine make.extra.defn 'LIBS += $(PTHREADS_LIBS)' -- cgit v1.2.3