]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Don't check for multithreading flags on Mac OS X, since there no flags seem to be...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 23 Nov 2004 20:19:29 +0000 (20:19 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 23 Nov 2004 20:19:29 +0000 (20:19 +0000)
git-svn-id: https://svn.dealii.org/trunk@9806 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/aclocal.m4

index eecc0ad83d8e932de5c4c22349ad82d1c91f70b9..d3dc8fc66101095a3b448d71a24381d7dc2fde3c 100644 (file)
@@ -1356,33 +1356,47 @@ dnl -------------------------------------------------------------
 dnl Versions of gcc on different platforms use a multitude of flags to
 dnl denote thread safe libraries and the like. They are, for example
 dnl -threads/-pthread/-mthread, sometimes *thread, sometimes *threads. 
-dnl Find out which is the right one on the present platform
+dnl On some other platforms, such as Mac OS X, no flags are necessary
+dnl and none are understood by the compiler.
+dnl
+dnl Find out which flag the right one on the present platform
 dnl
 dnl Usage: DEAL_II_FIND_THREAD_FLAGS
 dnl
 dnl -------------------------------------------------------------
 AC_DEFUN(DEAL_II_GET_THREAD_FLAGS, dnl
 [
-  AC_MSG_CHECKING(for platform specific thread flags)
-  AC_LANG(C++)
-  for i in threads mt pthread pthreads mthreads Kthread kthread invalid_last_entry; do
-    CXXFLAGS="$CXXFLAGSG -$i"
-    DEAL_II_TRY_COMPILER_FLAG(
-       [
-         thread_flag=$i
-         CXXFLAGSG="$CXXFLAGSG -$i"
-         CXXFLAGSO="$CXXFLAGSO -$i"
-          LDFLAGS="$LDFLAGS -$i"
-       
-         dnl The right parameter was found, so exit
-         break
-       ])
-  done
-  if test "$thread_flag" = invalid_last_entry ; then
-       AC_MSG_RESULT(no flag found!)
-       AC_MSG_ERROR(Could not determine multithreading flag for this platform. Aborting!)
-  fi
-  AC_MSG_RESULT(-$thread_flag)
+  case "$target" in
+    *apple-darwin*)
+       dnl Mac OS X is special in that the compiler generates thread-safe
+       dnl code by default, apparently.
+       ;;
+
+    *)
+       dnl Everything else needs the following setup:
+       AC_MSG_CHECKING(for platform specific thread flags)
+       AC_LANG(C++)
+       for i in threads mt pthread pthreads mthreads Kthread kthread invalid_last_entry; do
+         CXXFLAGS="$CXXFLAGSG -$i"
+         DEAL_II_TRY_COMPILER_FLAG(
+           [
+            thread_flag=$i
+            CXXFLAGSG="$CXXFLAGSG -$i"
+            CXXFLAGSO="$CXXFLAGSO -$i"
+             LDFLAGS="$LDFLAGS -$i"
+       
+            dnl The right parameter was found, so exit
+            break
+          ])
+       done
+
+       if test "$thread_flag" = invalid_last_entry ; then
+         AC_MSG_RESULT(no flag found!)
+         AC_MSG_ERROR(Could not determine multithreading flag for this platform. Aborting!)
+       fi
+       AC_MSG_RESULT(-$thread_flag)
+       ;;
+  esac
 ])
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.