]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fall back to a list of Trilinos libs if we can't find the file in which it should...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 1 Oct 2011 13:00:44 +0000 (13:00 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 1 Oct 2011 13:00:44 +0000 (13:00 +0000)
git-svn-id: https://svn.dealii.org/trunk@24498 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/aclocal.m4
deal.II/configure

index 73384ace334261dbbcc343b39c6bcd6f96f3188a..33d14289153d816df6c33f00f4b3a372f4eed80b 100644 (file)
@@ -6523,17 +6523,26 @@ AC_DEFUN(DEAL_II_CHECK_TRILINOS_LIBS, dnl
   dnl Trilinos' cmake invokation stores the set of libraries
   dnl in a special file for consumption of cmake at a later
   dnl time. We'll simply grep through it. Unfortunately, it has
-  dnl changed place in Trilinos starting from version 10.8.0, so 
-  dnl manually detected prior version
-  if test "$DEAL_II_TRILINOS_VERSION_MAJOR" = 10 -a "$DEAL_II_TRILINOS_VERSION_MINOR" -lt 8 ; then
-    DEAL_II_TRILINOS_LIBS="`grep Trilinos_LIBRARIES $DEAL_II_TRILINOS_INCDIR/TrilinosConfig.cmake \
-      | perl -pi -e 's/.*\"(.*)\".*/\1/g; s/;/ /g;'`"
-    AC_MSG_RESULT([$DEAL_II_TRILINOS_LIBS])
-  else
+  dnl changed place in Trilinos starting from version 10.8.0, and
+  dnl at least 10.0.4 did not have the file at all. So test
+  dnl whether the file is available at one location or another
+  dnl and if it is at neither then fall back to a hardcoded
+  dnl list of libraries
+  if test -f $DEAL_II_TRILINOS_LIBDIR/cmake/Trilinos/TrilinosConfig.cmake ; then
+    dnl This is the location for 10.8 and following
     DEAL_II_TRILINOS_LIBS="`grep Trilinos_LIBRARIES $DEAL_II_TRILINOS_LIBDIR/cmake/Trilinos/TrilinosConfig.cmake \
       | perl -pi -e 's/.*\"(.*)\".*/\1/g; s/;/ /g;'`"
-    AC_MSG_RESULT([$DEAL_II_TRILINOS_LIBS])
+  else
+    if test -f $DEAL_II_TRILINOS_INCDIR/TrilinosConfig.cmake ; then
+      dnl The location prior to 10.8
+      DEAL_II_TRILINOS_LIBS="`grep Trilinos_LIBRARIES $DEAL_II_TRILINOS_INCDIR/TrilinosConfig.cmake \
+        | perl -pi -e 's/.*\"(.*)\".*/\1/g; s/;/ /g;'`"
+    else
+      dnl Fall back to the fixed list
+      DEAL_II_TRILINOS_LIBS="stratimikosamesos stratimikosaztecoo stratimikosifpack stratimikosml stratimikos ml amesos belos ifpack aztecoo rtop sacado thyra thyraepetra thyraepetraext epetraext epetra teuchos triutils"
+    fi
   fi
+  AC_MSG_RESULT([$DEAL_II_TRILINOS_LIBS])
   AC_SUBST(DEAL_II_TRILINOS_LIBS)
 ])
 
index 37888e460118240912158e199bd75765aeafa910..705789881e7e827372d5dfeca56d366513e1b752 100755 (executable)
@@ -10871,8 +10871,17 @@ $as_echo "no" >&6; }
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the set of Trilinos libraries" >&5
 $as_echo_n "checking for the set of Trilinos libraries... " >&6; }
 
-        DEAL_II_TRILINOS_LIBS="`grep Trilinos_LIBRARIES $DEAL_II_TRILINOS_INCDIR/TrilinosConfig.cmake \
-    | perl -pi -e 's/.*\"(.*)\".*/\1/g; s/;/ /g;'`"
+                  if test -f $DEAL_II_TRILINOS_LIBDIR/cmake/Trilinos/TrilinosConfig.cmake ; then
+        DEAL_II_TRILINOS_LIBS="`grep Trilinos_LIBRARIES $DEAL_II_TRILINOS_LIBDIR/cmake/Trilinos/TrilinosConfig.cmake \
+      | perl -pi -e 's/.*\"(.*)\".*/\1/g; s/;/ /g;'`"
+  else
+    if test -f $DEAL_II_TRILINOS_INCDIR/TrilinosConfig.cmake ; then
+            DEAL_II_TRILINOS_LIBS="`grep Trilinos_LIBRARIES $DEAL_II_TRILINOS_INCDIR/TrilinosConfig.cmake \
+        | perl -pi -e 's/.*\"(.*)\".*/\1/g; s/;/ /g;'`"
+    else
+            DEAL_II_TRILINOS_LIBS="stratimikosamesos stratimikosaztecoo stratimikosifpack stratimikosml stratimikos ml amesos belos ifpack aztecoo rtop sacado thyra thyraepetra thyraepetraext epetraext epetra teuchos triutils"
+    fi
+  fi
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEAL_II_TRILINOS_LIBS" >&5
 $as_echo "$DEAL_II_TRILINOS_LIBS" >&6; }
 

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.