+dnl -------------------------------------------------------------
+dnl A third test: MIPSpro gives a bogus warning about unused code
+dnl on code that is clearly used, when inline member functions
+dnl are in classes in anonymous namespaces. Check for this to allow
+dnl us to work around this problem
+dnl
+dnl Usage: DEAL_II_CHECK_ANON_NAMESPACE_BUG3
+dnl
+dnl -------------------------------------------------------------
+AC_DEFUN(DEAL_II_CHECK_ANON_NAMESPACE_BUG3, dnl
+[
+ AC_MSG_CHECKING(for bogus warning with anonymous namespaces)
+
+ AC_LANG(C++)
+ CXXFLAGS="$CXXFLAGSG"
+ case "$GXXVERSION" in
+ gcc*)
+ CXXFLAGS="$CXXFLAGS -Werror"
+ ;;
+ MIPSpro*)
+ CXXFLAGS="$CXXFLAGS -diagerror"
+ ;;
+ esac
+
+ AC_TRY_COMPILE(
+ [
+ template<int dim> class Point
+ {
+ public:
+ Point() {};
+ };
+
+ class GridTools {
+ public:
+ template <int dim> static void shift (const Point<dim> &s);
+
+ template <typename Predicate>
+ static void transform (const Predicate &predicate);
+ };
+
+ namespace {
+ template <int dim> class ShiftPoint {
+ public:
+ ShiftPoint (const Point<dim> &) {};
+ void g() const;
+ };
+
+ template<int dim> void ShiftPoint<dim>::g() const {}
+ }
+
+ template <typename Predicate>
+ void GridTools::transform (const Predicate &predicate)
+ { predicate.g(); }
+
+ template <int dim>
+ void GridTools::shift (const Point<dim> &s)
+ { transform (ShiftPoint<dim>(s)); }
+
+ template void GridTools::shift (const Point<1> &);
+ ],
+ [
+ ;
+ ],
+ [
+ AC_MSG_RESULT(no)
+ ],
+ [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE_UNQUOTED(DEAL_II_ANON_NAMESPACE_BOGUS_WARNING, 1
+ [Flag indicating whether there is a bug in the
+ compiler that leads to bogus warnings for
+ inline class members in anonymous namespaces])
+ ])
+])
+
+
+
dnl -------------------------------------------------------------
dnl We have so many templates in deal.II that sometimes we need
dnl to make it clear with which types a template parameter can
rm -f conftest.$ac_objext
+ echo "$as_me:$LINENO: checking for bogus warning with anonymous namespaces" >&5
+echo $ECHO_N "checking for bogus warning with anonymous namespaces... $ECHO_C" >&6
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ CXXFLAGS="$CXXFLAGSG"
+ case "$GXXVERSION" in
+ gcc*)
+ CXXFLAGS="$CXXFLAGS -Werror"
+ ;;
+ MIPSpro*)
+ CXXFLAGS="$CXXFLAGS -diagerror"
+ ;;
+ esac
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ template<int dim> class Point
+ {
+ public:
+ Point() {};
+ };
+
+ class GridTools {
+ public:
+ template <int dim> static void shift (const Point<dim> &s);
+
+ template <typename Predicate>
+ static void transform (const Predicate &predicate);
+ };
+
+ namespace {
+ template <int dim> class ShiftPoint {
+ public:
+ ShiftPoint (const Point<dim> &) {};
+ void g() const;
+ };
+
+ template<int dim> void ShiftPoint<dim>::g() const {}
+ }
+
+ template <typename Predicate>
+ void GridTools::transform (const Predicate &predicate)
+ { predicate.g(); }
+
+ template <int dim>
+ void GridTools::shift (const Point<dim> &s)
+ { transform (ShiftPoint<dim>(s)); }
+
+ template void GridTools::shift (const Point<1> &);
+
+int
+main ()
+{
+
+ ;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ cat >>confdefs.h <<_ACEOF
+#define DEAL_II_ANON_NAMESPACE_BOGUS_WARNING 1
+ Flag indicating whether there is a bug in the
+ compiler that leads to bogus warnings for
+ inline class members in anonymous namespaces
+_ACEOF
+
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+
echo "$as_me:$LINENO: checking for SFINAE bug" >&5
echo $ECHO_N "checking for SFINAE bug... $ECHO_C" >&6
ac_ext=cc