+dnl -------------------------------------------------------------
+dnl A second test in this direction: if the name of a function is
+dnl not mangled differently for each compiler invokation, then
+dnl it should at least result in a weak symbol. Test this.
+dnl
+dnl Note that this is not a problem in itself if the name is
+dnl mangled differently each time a file is compiled.
+dnl
+dnl Usage: DEAL_II_CHECK_ANON_NAMESPACE_BUG2
+dnl
+dnl -------------------------------------------------------------
+AC_DEFUN(DEAL_II_CHECK_ANON_NAMESPACE_BUG2, dnl
+[
+ AC_MSG_CHECKING(for anonymous namespace and weak linkage bug)
+
+ dnl Create the testfile
+ echo "namespace { int SYMBOL() {return 1;}; }" > conftest.cc
+ echo "static int f() { return SYMBOL(); }" >> conftest.cc
+
+ dnl Compile it
+ $CXX -c conftest.cc -o conftest.$ac_objext
+
+ dnl Then look for lines in the output of "nm" that have the name of
+ dnl SYMBOL in them. Then make sure that we don't find a line with
+ dnl " T " in it, i.e. a text symbol with strong linkage
+ check="`nm conftest.$ac_objext | grep SYMBOL | grep ' T '`"
+
+ dnl Then try to link everything
+ if test "x$check" = "x" ;
+ then
+ AC_MSG_RESULT(no)
+ else
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(DEAL_II_ANON_NAMESPACE_LINKAGE_BUG, 1,
+ [Another test if the compiler needs to see the static
+ keyword even for functions in anonymous namespaces,
+ to avoid duplicate symbol errors when linking.
+ For the details, look at aclocal.m4 in the
+ top-level directory.])
+ fi
+ rm -f conftest.$ac_objext
+])
+
+
+
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
the details, look at aclocal.m4 in the top-level directory. */
#undef DEAL_II_ANON_NAMESPACE_BUG
+/* Another test if the compiler needs to see the static keyword even for
+ functions in anonymous namespaces, to avoid duplicate symbol errors when
+ linking. For the details, look at aclocal.m4 in the top-level directory. */
+#undef DEAL_II_ANON_NAMESPACE_LINKAGE_BUG
+
/* Defined if the compiler has a problem with assigning arrays in conditionals
*/
#undef DEAL_II_ARRAY_CONDITIONAL_DECAY_BUG
#! /bin/sh
-# From configure.in Revision: 1.157 .
+# From configure.in Revision: 1.158 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.57.
#
rm -f conftest.1.$ac_objext conftest.2.$ac_objext conftest
+ echo "$as_me:$LINENO: checking for anonymous namespace and weak linkage bug" >&5
+echo $ECHO_N "checking for anonymous namespace and weak linkage bug... $ECHO_C" >&6
+
+ echo "namespace { int SYMBOL() {return 1;}; }" > conftest.cc
+ echo "static int f() { return SYMBOL(); }" >> conftest.cc
+
+ $CXX -c conftest.cc -o conftest.$ac_objext
+
+ check="`nm conftest.$ac_objext | grep SYMBOL | grep ' T '`"
+
+ if test "x$check" = "x" ;
+ then
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ else
+ echo "$as_me:$LINENO: result: yes. using workaround" >&5
+echo "${ECHO_T}yes. using workaround" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define DEAL_II_ANON_NAMESPACE_LINKAGE_BUG 1
+_ACEOF
+
+ fi
+ rm -f conftest.$ac_objext
+
+
echo "$as_me:$LINENO: checking for SFINAE bug" >&5
echo $ECHO_N "checking for SFINAE bug... $ECHO_C" >&6
ac_ext=cc
DEAL_II_CHECK_MEMBER_VAR_SPECIALIZATION_BUG
DEAL_II_CHECK_LONG_DOUBLE_LOOP_BUG
DEAL_II_CHECK_ANON_NAMESPACE_BUG
+DEAL_II_CHECK_ANON_NAMESPACE_BUG2
DEAL_II_CHECK_SFINAE_BUG
DEAL_II_CHECK_ARRAY_CONDITIONAL_DECAY_BUG
DEAL_II_CHECK_BOOST_SHARED_PTR_ASSIGNMENT