]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make sure we can configure with Trilinos despite their silly HAVE_INTTYPES_H convention.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 24 Jun 2010 19:55:09 +0000 (19:55 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 24 Jun 2010 19:55:09 +0000 (19:55 +0000)
git-svn-id: https://svn.dealii.org/trunk@21330 0785d39b-7218-0410-832d-ea1e28bc413d

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

index a407c939b204fb79ee9a26160138b0fb211ddcf1..2f12fa86fcd7f41bc64b12d8edc22590458dfabd 100644 (file)
@@ -6107,6 +6107,20 @@ AC_DEFUN(DEAL_II_CHECK_TRILINOS_HEADER_FILES, dnl
 
   CPPFLAGS="-I$DEAL_II_TRILINOS_INCDIR $CPPFLAGS"
   CXXFLAGS="-I$DEAL_II_TRILINOS_INCDIR $CXXFLAGS"
+
+  dnl This is a subtle problem: Trilinos ML's ml_config.h has a
+  dnl   #define HAVE_INTTYPES_H
+  dnl without giving it a value. On the other hand, the previous
+  dnl autoconf test for this header file will have put a
+  dnl   #define HAVE_INTTYPES_H 1
+  dnl into confdefs.h, which will lead to an error. Avoid this
+  dnl problem by #undefining HAVE_INTTYPES_H for now and undoing
+  dnl this later on again.
+  cp confdefs.h confdefs.h.bak
+  echo "#ifdef HAVE_INTTYPES_H" >> confdefs.h
+  echo "#undef HAVE_INTTYPES_H" >> confdefs.h
+  echo "#endif" >> confdefs.h
+
   AC_CHECK_HEADERS([Amesos.h \
                     AztecOO.h \
                     AztecOO_Operator.h \
@@ -6134,13 +6148,15 @@ AC_DEFUN(DEAL_II_CHECK_TRILINOS_HEADER_FILES, dnl
                                    Trilinos sub-packages enabled.])
                    ],
                    [])
+  mv confdefs.h.bak confdefs.h
+
   CPPFLAGS="${OLD_CPPFLAGS}"
   CXXFLAGS="${OLD_CXXFLAGS}"
 ])
 
 
 dnl ------------------------------------------------------------
-dnl Check whether MUMPS is installed; and, if so, then check for 
+dnl Check whether MUMPS is installed; and, if so, then check for
 dnl two known dependecies, namely, SCALAPACK and BLACS.
 dnl
 dnl Usage: DEAL_II_CONFIGURE_MUMPS
@@ -6186,7 +6202,7 @@ AC_DEFUN(DEAL_II_CONFIGURE_MUMPS, dnl
       [Specify the path to the scalapack installation; use this if you want to override the SCALAPACK_DIR environment variable.])],
       [dnl action-if-given (test)
        DEAL_II_SCALAPACK_DIR="$withval"
-       AC_MSG_RESULT($DEAL_II_SCALAPACK_DIR) 
+       AC_MSG_RESULT($DEAL_II_SCALAPACK_DIR)
        dnl Make sure that what was specified is actually correct
        if test ! -d $DEAL_II_SCALAPCK_DIR ; then
          AC_MSG_ERROR([The path to SCALAPACK specified with --with-scalapack does t point to a complete SCALAPACK installation])
@@ -6235,7 +6251,7 @@ AC_DEFUN(DEAL_II_CONFIGURE_MUMPS, dnl
     AC_MSG_RESULT($DEAL_II_BLACS_ARCH)
     dnl ------------------------------------------------------------
 
-  fi 
+  fi
   dnl End check for MUMPS dependencies
   dnl ------------------------------------------------------------
 
@@ -6244,11 +6260,11 @@ AC_DEFUN(DEAL_II_CONFIGURE_MUMPS, dnl
     AC_DEFINE([DEAL_II_USE_MUMPS], [1],
               [Defined if a MUMPS installation was found and is going to be used              ])
     dnl and set an additional variable:
-    DEAL_II_DEFINE_DEAL_II_USE_MUMPS=DEAL_II_USE_MUMPS 
+    DEAL_II_DEFINE_DEAL_II_USE_MUMPS=DEAL_II_USE_MUMPS
     dnl and finally set with_mumps if this hasn't happened yet:
     if test "x$with_mumps" = "x" ; then
       with_mumps="yes"
-    fi 
+    fi
   fi
 ])
 
index 79e39f2cdb7aa99ffb8d40e2a2eb0dcb2a2bddb1..c2cbfcf18e9d509fd3106f28658aeef9acda8c38 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 21091 .
+# From configure.in Revision: 21162 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.63 for deal.II 6.3.pre.
 #
@@ -13777,18 +13777,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   CPPFLAGS="-I$DEAL_II_TRILINOS_INCDIR $CPPFLAGS"
   CXXFLAGS="-I$DEAL_II_TRILINOS_INCDIR $CXXFLAGS"
 
-
-
-
-
-
-
-
-
-
-
-
-
+                  cp confdefs.h confdefs.h.bak
+  echo "#ifdef HAVE_INTTYPES_H" >> confdefs.h
+  echo "#undef HAVE_INTTYPES_H" >> confdefs.h
+  echo "#endif" >> confdefs.h
 
 
 
@@ -13988,6 +13980,8 @@ fi
 
 done
 
+  mv confdefs.h.bak confdefs.h
+
   CPPFLAGS="${OLD_CPPFLAGS}"
   CXXFLAGS="${OLD_CXXFLAGS}"
 

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.