summaryrefslogtreecommitdiff
path: root/lib/make/extras/PTHREADS
diff options
context:
space:
mode:
authortradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2001-04-05 14:32:41 +0000
committertradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2001-04-05 14:32:41 +0000
commit5a444d6bb81245d6a086a9198cfdaa8be528dd5c (patch)
treea526f00c202c5db1b5d1f8343688edb43189cabc /lib/make/extras/PTHREADS
parentb3e2bc11de167e4ec2f781aaf7f959e69c7a3c03 (diff)
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
Diffstat (limited to 'lib/make/extras/PTHREADS')
-rwxr-xr-xlib/make/extras/PTHREADS/setup.sh22
1 files changed, 13 insertions, 9 deletions
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)'