From: Wolfgang Bangerth Date: Tue, 11 Aug 2009 21:37:55 +0000 (+0000) Subject: gcc3.3.2 is unhappy if we have arrays as arguments in places where the array bounds... X-Git-Tag: v8.0.0~7342 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ff96d50e2e371c39214d7b712560228fd8a6fdb;p=dealii.git gcc3.3.2 is unhappy if we have arrays as arguments in places where the array bounds depend on member variables. git-svn-id: https://svn.dealii.org/trunk@19226 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index e9b39d5a84..af7c09ccb6 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -40,7 +40,7 @@ AC_DEFUN(DEAL_II_EXTERNAL_LIBS_RESTORE_VAL, dnl dnl ------------------------------------------------------------- dnl Like AC_PATH_PROG, but do not discard arguments given to the -dnl program. In other words, while +dnl program. In other words, while dnl AC_PATH_PROG(CXX, [g++ -pg]) dnl results in CXX=/usr/bin/g++, the result of the current dnl macro would be CXX="/usr/bin/g++ -pg". @@ -251,7 +251,7 @@ AC_DEFUN(DEAL_II_DETERMINE_CXX_BRAND, dnl else dnl Check other (non-gcc) compilers - + dnl Check for IBM xlC. For some reasons, depending on some environment dnl variables, moon position, and other reasons unknown to me, the dnl compiler displays different names in the first line of output, so @@ -265,7 +265,7 @@ AC_DEFUN(DEAL_II_DETERMINE_CXX_BRAND, dnl GXX_VERSION=ibm_xlc GXX_VERSION_DETAILED="$GXX_VERSION" else - + dnl Check whether we are dealing with the MIPSpro C++ compiler mips_pro="`($CXX -version 2>&1) | grep MIPSpro`" if test "x$mips_pro" != "x" ; then @@ -301,7 +301,7 @@ AC_DEFUN(DEAL_II_DETERMINE_CXX_BRAND, dnl ;; esac else - + dnl Intel's ICC C++ compiler? On Linux, it uses -V, on Windows dnl it is -help is_intel_icc1="`($CXX -V 2>&1) | grep 'Intel'`" @@ -349,7 +349,7 @@ AC_DEFUN(DEAL_II_DETERMINE_CXX_BRAND, dnl fi fi fi fi fi fi fi GXX_VERSION_DETAILED="$GXX_VERSION" else - + dnl Or DEC's cxx compiler? is_dec_cxx="`($CXX -V 2>&1) | grep 'Compaq C++'`" if test "x$is_dec_cxx" != "x" ; then @@ -357,7 +357,7 @@ AC_DEFUN(DEAL_II_DETERMINE_CXX_BRAND, dnl GXX_VERSION=compaq_cxx GXX_VERSION_DETAILED="$GXX_VERSION" else - + dnl Sun Workshop/Studio? is_sun_cc_1="`($CXX -V 2>&1) | grep 'Sun WorkShop'`" is_sun_cc_2="`($CXX -V 2>&1) | grep 'Sun C++'`" @@ -366,7 +366,7 @@ AC_DEFUN(DEAL_II_DETERMINE_CXX_BRAND, dnl GXX_VERSION=sun_workshop GXX_VERSION_DETAILED="$GXX_VERSION" else - + dnl Sun Forte? is_sun_forte_cc="`($CXX -V 2>&1) | grep 'Forte'`" if test "x$is_sun_forte_cc" != "x" ; then @@ -374,7 +374,7 @@ AC_DEFUN(DEAL_II_DETERMINE_CXX_BRAND, dnl GXX_VERSION=sun_forte GXX_VERSION_DETAILED="$GXX_VERSION" else - + dnl Portland Group C++? is_pgcc="`($CXX -V 2>&1) | grep 'Portland Group'`" if test "x$is_pgcc" != "x" ; then @@ -382,7 +382,7 @@ AC_DEFUN(DEAL_II_DETERMINE_CXX_BRAND, dnl GXX_VERSION=portland_group GXX_VERSION_DETAILED="$GXX_VERSION" else - + dnl HP aCC? is_aCC="`($CXX -V 2>&1) | grep 'aCC'`" if test "x$is_aCC" != "x" ; then @@ -390,7 +390,7 @@ AC_DEFUN(DEAL_II_DETERMINE_CXX_BRAND, dnl GXX_VERSION=hp_aCC GXX_VERSION_DETAILED="$GXX_VERSION" else - + dnl Borland C++ is_bcc="`($CXX -h 2>&1) | grep 'Borland'`" if test "x$is_bcc" != "x" ; then @@ -398,7 +398,7 @@ AC_DEFUN(DEAL_II_DETERMINE_CXX_BRAND, dnl GXX_VERSION=borland_bcc GXX_VERSION_DETAILED="$GXX_VERSION" else - + dnl KAI C++? It seems as if the documented options dnl -V and --version are not always supported, so give dnl the whole thing a second try by looking for /KCC/ @@ -415,7 +415,7 @@ AC_DEFUN(DEAL_II_DETERMINE_CXX_BRAND, dnl GXX_VERSION=kai_cc GXX_VERSION_DETAILED="$GXX_VERSION" else - + dnl Maybe PathScale's compiler? is_pathscale="`($CXX -v 2>&1) | grep PathScale`" if test "x$is_pathscale" != "x" ; then @@ -475,7 +475,7 @@ AC_DEFUN(DEAL_II_DETERMINE_IF_SUPPORTS_MPI, dnl dnl ------------------------------------------------------------- -dnl Set C++ compiler flags to their default values. They will be +dnl Set C++ compiler flags to their default values. They will be dnl modified according to other options in later steps of dnl configuration dnl @@ -565,7 +565,7 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl ;; *cygwin* ) - dnl On Cygwin, when using shared libraries, there might occur + dnl On Cygwin, when using shared libraries, there might occur dnl difficulties when linking libraries for several dimensions, dnl as some symbols are defined in all of them. This leads to a dnl linker error. We force the linker to ignore multiple symbols, @@ -590,47 +590,47 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl dnl - after egcs1.1, the optimization flag -fstrict-aliasing was dnl introduced, which enables better optimizations for dnl well-written C++ code. we believe that deal.II falls into that - dnl category and thus enable the flag + dnl category and thus enable the flag dnl - egcs1.1 yielded incorrect code with vtable-thunks. thus disable dnl them for egcs1.1. however, if on Linux, disabling them dnl prevents programs from being linked, so take the risk of broken dnl thunks on this platform - + case "$GXX_VERSION" in egcs1.1) case "$target" in *linux*) ;; - + *) CXXFLAGSG="$CXXFLAGSG -fno-vtable-thunks" CXXFLAGSO="$CXXFLAGSO -fno-vtable-thunks" ;; esac ;; - + dnl All other gcc versions *) CXXFLAGSO="$CXXFLAGSO -funroll-loops -funroll-all-loops -fstrict-aliasing" ;; esac - + dnl - after gcc2.95, some flags were deemed obsolete for C++ dnl (and are only supported for C any more), so only define them for dnl previous compilers - + case "$GXX_VERSION" in egcs1.1 | gcc2.95) CXXFLAGSG="$CXXFLAGSG -Wmissing-declarations -Wbad-function-cast -Wtraditional -Wnested-externs -Wno-non-template-friend" CXXFLAGSO="$CXXFLAGSO -fnonnull-objects -Wno-non-template-friend" ;; - + *) ;; esac - + dnl Some gcc compiler versions have a problem when using an unsigned count - dnl in the std::advance function. Unfortunately, this also happens + dnl in the std::advance function. Unfortunately, this also happens dnl occasionally from within the standard library, so we can't prevent the dnl warning messages. Since this is annoying, switch of the flag -W which dnl causes this. @@ -642,7 +642,7 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl dnl Some system specific things case "$target" in dnl Use -Wno-long-long on Apple Darwin to avoid some unnecessary - dnl warnings. However, newer gccs on that platform do not have + dnl warnings. However, newer gccs on that platform do not have dnl this flag any more, so check whether we can indeed do this dnl dnl Also, the TBB tries to determine whether the system is @@ -705,14 +705,14 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl if test "$GXX_VERSION" = "gcc2.95"; then SHLIBLD="$CC" fi - + else dnl Non-gcc compilers. By default, use the C++ compiler also for linking dnl shared libraries. If some compiler cannot do that and needs something dnl different, then this must be specified in the respective section dnl below, overriding this define: SHLIBLD="$CXX" - + case "$GXX_VERSION" in ibm_xlc) CXXFLAGSG="$CXXFLAGS -DDEBUG -check=bounds -info=all -qrtti=all -qsuppress=1540-2907" @@ -720,7 +720,7 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl CXXFLAGSPIC="-qpic" LDFLAGSPIC="-qpic" ;; - + MIPSpro*) dnl Disable some compiler warnings, as they trigger some warnings in dnl system and compiler include files @@ -751,7 +751,7 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl dnl linker command, therefore it cannot be included into LDFLAGS DEAL_II_ADD_EXTERNAL_LIBS_AT_TAIL(-lm) ;; - + intel_icc*) dnl Earlier icc versions used -Kxxx for flags. Later versions use dnl the gcc convention -fxxx. Also, at least since icc11, the @@ -798,7 +798,7 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl CXXFLAGSO="$CXXFLAGSO -w0 -wd424 -wd11" dnl To reduce output, use -opt_report_levelmin where possible, - dnl i.e. post icc5. from icc10 onwards, this flag is called + dnl i.e. post icc5. from icc10 onwards, this flag is called dnl -opt-report, and -vec-report controls output of the dnl autovectorizer (to make things simpler, one of the two options dnl wants a space between option and level, whereas the other does @@ -825,7 +825,7 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl esac dnl Some versions of icc on some platforms issue a lot of warnings - dnl about the unreliability of floating point comparisons. Check + dnl about the unreliability of floating point comparisons. Check dnl whether we can switch that off DEAL_II_ICC_WD_1572 @@ -836,7 +836,7 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl dnl segfault), at least with versions prior to 7.0. So only dnl use these flags with versions we know are safe dnl - dnl Second thing: icc7 allows using alias information for + dnl Second thing: icc7 allows using alias information for dnl optimization. Use this. if test "x$GXX_VERSION" = "xintel_icc7"; then CXXFLAGSG="$CXXFLAGSG -Xc -ansi" @@ -847,7 +847,7 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl else if test "x$GXX_VERSION" = "xintel_icc8" ; then CXXFLAGSO="$CXXFLAGSO -ansi_alias -vec_report0" fi fi - + dnl If we are on an x86 platform, add -tpp6 to optimization dnl flags (for version <10), or the equivalent for later dnl processors @@ -870,7 +870,7 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl ;; esac ;; - + compaq_cxx) dnl Disable some warning messages: dnl #11: ` unrecognized preprocessing directive" (we use @@ -912,28 +912,28 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl dnl instantiations of template with the `weak' link flag) since dnl otherwise not all templates are instantiated (also some from the dnl standards library are missing). - + CXXFLAGSG="$CXXFLAGS -model ansi -std strict_ansi -w1 -msg_display_number -timplicit_local -DDEBUG" CXXFLAGSO="$CXXFLAGS -model ansi -std strict_ansi -w2 -msg_display_number -timplicit_local -fast" - + for i in 11 175 236 237 381 487 1136 1156 111 1182 265 450 ; do CXXFLAGSG="$CXXFLAGSG -msg_disable $i" CXXFLAGSO="$CXXFLAGSO -msg_disable $i" done - + dnl If we use -model ansi to compile the files, we also have to dnl specify it for linking LDFLAGS="$LDFLAGS -model ansi" - + dnl For some reason, cxx also forgets to add the math lib to the dnl linker line, so we do that ourselves LDFLAGS="$LDFLAGS -lm" - + CXXFLAGSPIC="-shared" LDFLAGSPIC="" ;; - + sun_workshop | sun_forte) CXXFLAGSG="$CXXFLAGS -DDEBUG -w" @@ -947,7 +947,7 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl AC_TRY_COMPILE( [ ], - [ + [ ; ], [ @@ -959,11 +959,11 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl AC_MSG_RESULT(no) ]) ;; - + portland_group) dnl Suppress warnings: dnl #68: "integer conversion resulted in a change of sign". This - dnl is what we get every time we use + dnl is what we get every time we use dnl numbers::invalid_unsigned_int dnl #111: "Statement unreachable": we use return statements dnl occasionally after case-switches where you cannot @@ -1003,7 +1003,7 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl CXXFLAGSPIC="+Z" # for linking shared libs, -b is also necessary... ;; - + borland_bcc) CXXFLAGSG="$CXXFLAGS -q -DDEBUG -w -w-use -w-amp -w-prc" CXXFLAGSO="$CXXFLAGS -q -O2" @@ -1033,16 +1033,16 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl dnl ------------------------------------------------------------- dnl Depending on what compiler we use, set the flag necessary to -dnl obtain debug output. We will usually use -ggdb, but on DEC Alpha -dnl OSF1, this leads to stabs symbols that are too long for the system +dnl obtain debug output. We will usually use -ggdb, but on DEC Alpha +dnl OSF1, this leads to stabs symbols that are too long for the system dnl assembler. We will therefore check whether the assembler can handle -dnl these symbols by a rather perverse function with many templates, -dnl and if the assembler can't handle them, then use -gstabs +dnl these symbols by a rather perverse function with many templates, +dnl and if the assembler can't handle them, then use -gstabs dnl instead. This reduces debugging possibilities, but no other dnl way is known at present. dnl dnl For all compilers other than gcc, use -g instead and don't check. -dnl +dnl dnl Usage: DEAL_II_SET_CXX_DEBUG_FLAG dnl dnl ------------------------------------------------------------- @@ -1083,7 +1083,7 @@ AC_DEFUN(DEAL_II_SET_CXX_DEBUG_FLAG, dnl AC_MSG_RESULT(no -- using -gstabs instead) ]) ;; - + dnl For all other systems test whether -ggdb works at all, and if dnl not fall back on -g instead. This test is mainly used to dnl accomodate for a failure on Mac OS X, where -ggdb leads to @@ -1105,7 +1105,7 @@ AC_DEFUN(DEAL_II_SET_CXX_DEBUG_FLAG, dnl ]) ;; esac - + else dnl Non-gcc compilers use -g instead of -ggdb, except for Borland C++ dnl which wants something entirely different @@ -1125,10 +1125,10 @@ AC_DEFUN(DEAL_II_SET_CXX_DEBUG_FLAG, dnl dnl ------------------------------------------------------------- dnl Given the command line flag specified as argument to this macro, -dnl test whether all components that we need from the C++1X +dnl test whether all components that we need from the C++1X dnl standard are actually available. If so, add the flag to dnl CXXFLAGS.g and CXXFLAGS.o, and set a flag in config.h -dnl +dnl dnl Usage: DEAL_II_CHECK_CXX1X_COMPONENTS(cxxflag) dnl dnl ------------------------------------------------------------- @@ -1141,7 +1141,7 @@ AC_DEFUN(DEAL_II_CHECK_CXX1X_COMPONENTS, dnl AC_MSG_CHECKING(for std::array) AC_TRY_COMPILE( - [#include ], + [#include ], [ std::array p; p[0];], [ AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no); all_cxx1x_available=no ] @@ -1149,7 +1149,7 @@ AC_DEFUN(DEAL_II_CHECK_CXX1X_COMPONENTS, dnl AC_MSG_CHECKING(for std::condition_variable) AC_TRY_COMPILE( - [#include ], + [#include ], [ std::condition_variable c; c.notify_all()], [ AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no); all_cxx1x_available=no ] @@ -1158,8 +1158,8 @@ AC_DEFUN(DEAL_II_CHECK_CXX1X_COMPONENTS, dnl AC_MSG_CHECKING(for std::function and std::bind) AC_TRY_COMPILE( [#include - void f(int, double); ], - [ std::function + void f(int, double); ], + [ std::function g = std::bind (f, std::placeholders::_1, 1.1) ;], [ AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no); all_cxx1x_available=no ] @@ -1169,7 +1169,7 @@ AC_DEFUN(DEAL_II_CHECK_CXX1X_COMPONENTS, dnl AC_MSG_CHECKING(for std::bind works with rvalues) AC_TRY_COMPILE( [#include - void f(int); ], + void f(int); ], [ using namespace std; using namespace std::placeholders; bind(multiplies(),4,_1)(5); ;], @@ -1179,7 +1179,7 @@ AC_DEFUN(DEAL_II_CHECK_CXX1X_COMPONENTS, dnl AC_MSG_CHECKING(for std::shared_ptr) AC_TRY_COMPILE( - [#include ], + [#include ], [ std::shared_ptr p(new int(3))], [ AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no); all_cxx1x_available=no ] @@ -1188,7 +1188,7 @@ AC_DEFUN(DEAL_II_CHECK_CXX1X_COMPONENTS, dnl AC_MSG_CHECKING(for std::thread) AC_TRY_COMPILE( [#include - void f(int); ], + void f(int); ], [ std::thread t(f,1); t.join();], [ AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no); all_cxx1x_available=no ] @@ -1196,7 +1196,7 @@ AC_DEFUN(DEAL_II_CHECK_CXX1X_COMPONENTS, dnl AC_MSG_CHECKING(for std::mutex) AC_TRY_COMPILE( - [#include ], + [#include ], [ std::mutex m; m.lock();], [ AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no); all_cxx1x_available=no ] @@ -1204,7 +1204,7 @@ AC_DEFUN(DEAL_II_CHECK_CXX1X_COMPONENTS, dnl AC_MSG_CHECKING(for std::tuple) AC_TRY_COMPILE( - [#include ], + [#include ], [ std::tuple p(1,1.1,'a')], [ AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no); all_cxx1x_available=no ] @@ -1324,7 +1324,7 @@ AC_DEFUN(DEAL_II_DETERMINE_CC_BRAND, dnl esac else dnl Check other (non-gcc) compilers - + dnl Check for IBM xlC. For some reasons, depending on some environment dnl variables, moon position, and other reasons unknown to me, the dnl compiler displays different names in the first line of output, so @@ -1337,7 +1337,7 @@ AC_DEFUN(DEAL_II_DETERMINE_CC_BRAND, dnl AC_MSG_RESULT(C compiler is IBM xlC) CC_VERSION=ibm_xlc else - + dnl Check whether we are dealing with the MIPSpro C compiler mips_pro="`($CC -version 2>&1) | grep MIPSpro`" if test "x$mips_pro" != "x" ; then @@ -1368,7 +1368,7 @@ AC_DEFUN(DEAL_II_DETERMINE_CC_BRAND, dnl ;; esac else - + dnl Intel's ICC C compiler? On Linux, it uses -V, on Windows dnl it is -help dnl @@ -1417,49 +1417,49 @@ AC_DEFUN(DEAL_II_DETERMINE_CC_BRAND, dnl CC_VERSION=intel_icc fi fi fi fi fi fi else - + dnl Or DEC's cxx compiler? is_dec_cxx="`($CC -V 2>&1) | grep 'Compaq C'`" if test "x$is_dec_cxx" != "x" ; then AC_MSG_RESULT(C compiler is Compaq cxx) CC_VERSION=compaq_cxx else - + dnl Sun Workshop? is_sun_cc="`($CC -V 2>&1) | grep 'Sun WorkShop'`" if test "x$is_sun_cc" != "x" ; then AC_MSG_RESULT(C compiler is Sun Workshop compiler) CC_VERSION=sun_workshop else - + dnl Sun Forte? is_sun_forte_cc="`($CC -V 2>&1) | grep 'Forte'`" if test "x$is_sun_forte_cc" != "x" ; then AC_MSG_RESULT(C compiler is Sun Forte compiler) CC_VERSION=sun_forte else - + dnl Portland Group C? is_pgcc="`($CC -V 2>&1) | grep 'Portland Group'`" if test "x$is_pgcc" != "x" ; then AC_MSG_RESULT(C compiler is Portland Group C) CC_VERSION=portland_group else - + dnl HP aCC? is_aCC="`($CC -V 2>&1) | grep 'aCC'`" if test "x$is_aCC" != "x" ; then AC_MSG_RESULT(C compiler is HP aCC) CC_VERSION=hp_aCC else - + dnl Borland C is_bcc="`($CC -h 2>&1) | grep 'Borland'`" if test "x$is_bcc" != "x" ; then AC_MSG_RESULT(C compiler is Borland C) CC_VERSION=borland_bcc else - + dnl KAI C? It seems as if the documented options dnl -V and --version are not always supported, so give dnl the whole thing a second try by looking for /KCC/ @@ -1475,7 +1475,7 @@ AC_DEFUN(DEAL_II_DETERMINE_CC_BRAND, dnl AC_MSG_RESULT(C compiler is KAI C) CC_VERSION=kai_cc else - + dnl Aw, nothing suitable found... AC_MSG_RESULT([Unrecognized compiler -- still trying]) CC_VERSION=unknown_cc @@ -1497,7 +1497,7 @@ AC_DEFUN(DEAL_II_DETERMINE_CC_BRAND, dnl dnl ------------------------------------------------------------- -dnl Set C compiler flags to their default values. They will be +dnl Set C compiler flags to their default values. They will be dnl modified according to other options in later steps of dnl configuration dnl @@ -1549,19 +1549,19 @@ AC_DEFUN(DEAL_II_SET_CC_FLAGS, dnl dnl different, then this must be specified in the respective section dnl below, overriding this define: SHLIBLD="$CC" - + case "$CC_VERSION" in ibm_xlc) CFLAGS="$CFLAGS -O2" CFLAGSPIC="-fPIC" SHLIBLD="$CXX" ;; - + MIPSpro*) CFLAGS="$CFLAGS -O2" CFLAGSPIC="-KPIC" ;; - + intel_icc*) CFLAGS="$CFLAGS -O2 -unroll" case "$CC_VERSION" in @@ -1575,7 +1575,7 @@ AC_DEFUN(DEAL_II_SET_CC_FLAGS, dnl esac dnl To reduce output, use -opt_report_levelmin where possible, - dnl i.e. post icc5. from icc10 onwards, this flag is called + dnl i.e. post icc5. from icc10 onwards, this flag is called dnl -opt-report, and -vec-report controls output of the dnl autovectorizer (to make things simpler, one of the two options dnl wants a space between option and level, whereas the other does @@ -1592,7 +1592,7 @@ AC_DEFUN(DEAL_II_SET_CC_FLAGS, dnl esac CFLAGS="$CFLAGS -ansi_alias -vec_report0" - + dnl If we are on an x86 platform, add -tpp6 to optimization dnl flags case "$target" in @@ -1715,18 +1715,18 @@ AC_DEFUN(DEAL_II_DETERMINE_F77_BRAND, dnl F77_VERSION=gcc-other ;; esac - + else - + dnl No GNU g77 version, something else. Try to find out what it is: if test -n "`echo $F77_VERSION_STRING | grep \"XL Fortran for AIX\"`" ; then - + dnl This is the "XL Fortran for AIX" compiler F77_VERSION=AIXF77 AC_MSG_RESULT(F77 compiler is AIX Fortran77) - + else - + dnl Umh, still something else unknown. Try to find it out by a dnl different method (-V instead of -v): F77_VERSION_STRING=`($F77 -V 2>&1)` @@ -1738,9 +1738,9 @@ AC_DEFUN(DEAL_II_DETERMINE_F77_BRAND, dnl dnl OK, this is the Sun Fortran77 compiler AC_MSG_RESULT(F77 compiler is Sun WorkShop f77) F77_VERSION="SunF77" - + else - + dnl If we can detect IRIX's f77 somehow, then the following flags dnl might be appropriate: F77_VERSION_STRING=`($F77 -version 2>&1)` @@ -1758,7 +1758,7 @@ AC_DEFUN(DEAL_II_DETERMINE_F77_BRAND, dnl else - + dnl Now, this is a hard case, we have no more clues... F77_VERSION="UnknownF77" AC_MSG_RESULT(F77 compiler is unkown. no flags set!) @@ -1790,14 +1790,14 @@ AC_DEFUN(DEAL_II_SET_F77_FLAGS, dnl egcs-1.1 | gcc2.95 | gcc2.96 | gcc2.97 | gcc[[34]].*) F77FLAGSG="$FFLAGS -ggdb -DDEBUG -pedantic -W -Wall" F77FLAGSO="$FFLAGS -O2" - + dnl Some flags can only be set for some compilers as others either dnl did not accept them or were buggy on them (see the explanation dnl for CXXFLAGS for an explanation of some of these cases) if test "x$F77_VERSION" != "xegcs1.1" ; then F77FLAGSO="$F77FLAGSO -funroll-loops -funroll-all-loops -fstrict-aliasing" fi - + case "$target" in *cygwin* ) F77FLAGSPIC= @@ -1829,11 +1829,11 @@ AC_DEFUN(DEAL_II_SET_F77_FLAGS, dnl dnl we expect when linking with FORTRAN functions F77FLAGSG="$FFLAGS -g -qextname" F77FLAGSO="$FFLAGS -O3 -w -qextname" - F77LIBS="$F77LIBS -lxlf90" + F77LIBS="$F77LIBS -lxlf90" F77FLAGSPIC="unknown!" ;; - + SunF77) F77FLAGSG="$FFLAGS -silent -g" F77FLAGSO="$FFLAGS -silent -O3 -w" @@ -1845,12 +1845,12 @@ AC_DEFUN(DEAL_II_SET_F77_FLAGS, dnl F77FLAGSG="$FFLAGS -ansi -g" F77FLAGSO="$FFLAGS -O3 -woffall" F77LIBS="$F77LIBS -lftn" - + F77FLAGSPIC="shared -KPIC" ;; INTEL_F77*) - F77FLAGSG="$FFLAGS" + F77FLAGSG="$FFLAGS" F77FLAGSO="$FFLAGS -O3" ;; @@ -1861,7 +1861,7 @@ AC_DEFUN(DEAL_II_SET_F77_FLAGS, dnl F77="UnknownF77" F77FLAGSG="$FFLAGS -g" F77FLAGSO="$FFLAGS -O2" - F77LIBS="$F77LIBS" + F77LIBS="$F77LIBS" F77FLAGSPIC="unknown!" AC_MSG_RESULT(Unknown FORTRAN compiler has been disabled!) @@ -1902,8 +1902,8 @@ AC_DEFUN(DEAL_II_CHECK_RPATH, dnl ------------------------------------------------------------- dnl -dnl Check whether we can use -soname for linking in the shared -dnl library version. On Mac OS X, -soname is called +dnl Check whether we can use -soname for linking in the shared +dnl library version. On Mac OS X, -soname is called dnl -dylib_install_name dnl dnl ------------------------------------------------------------- @@ -1915,11 +1915,11 @@ AC_DEFUN(DEAL_II_CHECK_LINK_SONAME, AC_MSG_CHECKING([whether compiler understands option -Wl,-soname]) AC_LINK_IFELSE( [ AC_LANG_PROGRAM([[]],[[]])], - [ + [ AC_MSG_RESULT(yes) DEAL_II_LD_UNDERSTANDS_SONAME="yes" ], - [ + [ AC_MSG_RESULT(no) DEAL_II_LD_UNDERSTANDS_SONAME="no" ] @@ -1933,11 +1933,11 @@ AC_DEFUN(DEAL_II_CHECK_LINK_SONAME, AC_MSG_CHECKING([whether compiler understands option -Wl,-dynamic,-install_name]) AC_LINK_IFELSE( [ AC_LANG_PROGRAM([[]],[[]])], - [ + [ AC_MSG_RESULT(yes) DEAL_II_LD_UNDERSTANDS_DYLIB_INSTALL_NAME="yes" ], - [ + [ AC_MSG_RESULT(no) DEAL_II_LD_UNDERSTANDS_DYLIB_INSTALL_NAME="no" ] @@ -1962,7 +1962,7 @@ dnl ------------------------------------------------------------- AC_DEFUN(DEAL_II_CHECK_CPU_OPTIMIZATIONS, dnl [ AC_ARG_WITH(cpu, - [ --with-cpu=cpu Optimize specifically for the given CPU type, + [ --with-cpu=cpu Optimize specifically for the given CPU type, rather than just generating code for this processor family.], withcpu="$withval", @@ -2022,7 +2022,7 @@ dnl ------------------------------------------------------------- dnl In some cases, -threads (or whatever else command line option) dnl switches on some preprocessor flags. If this is not the case, dnl then define them explicitely. -dnl +dnl dnl Usage: DEAL_II_THREAD_CPPFLAGS dnl dnl ------------------------------------------------------------- @@ -2057,7 +2057,7 @@ AC_DEFUN(DEAL_II_THREAD_CPPFLAGS, dnl 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 -threads/-pthread/-mthread, sometimes *thread, sometimes *threads. dnl On some other platforms, such as Mac OS X, no flags are necessary dnl and none are understood by the compiler. dnl @@ -2086,7 +2086,7 @@ AC_DEFUN(DEAL_II_GET_THREAD_FLAGS, dnl CXXFLAGSG="$CXXFLAGSG -$i" CXXFLAGSO="$CXXFLAGSO -$i" LDFLAGS="$LDFLAGS -$i" - + dnl The right parameter was found, so exit break ]) @@ -2158,7 +2158,7 @@ AC_DEFUN(DEAL_II_CHECK_MULTITHREADING, dnl if test "$GXX" = yes ; then DEAL_II_GET_THREAD_FLAGS DEAL_II_THREAD_CPPFLAGS - + CXXFLAGSG="$CXXFLAGSG -D_REENTRANT" CXXFLAGSO="$CXXFLAGSO -D_REENTRANT" if test "$GXX_VERSION" = "gcc2.95" \ @@ -2170,12 +2170,12 @@ AC_DEFUN(DEAL_II_CHECK_MULTITHREADING, dnl else case "$GXX_VERSION" in ibm_xlc) - CXXFLAGSG="$CXXFLAGSG -threaded" + CXXFLAGSG="$CXXFLAGSG -threaded" CXXFLAGSO="$CXXFLAGSO -threaded" ;; compaq_cxx) - CXXFLAGSG="$CXXFLAGSG -pthread" + CXXFLAGSG="$CXXFLAGSG -pthread" CXXFLAGSO="$CXXFLAGSO -pthread" ;; @@ -2200,7 +2200,7 @@ AC_DEFUN(DEAL_II_CHECK_MULTITHREADING, dnl [Defined if multi-threading is to be achieved by using the POSIX functions]) - dnl In any case, we need to link with libdl since the Threading + dnl In any case, we need to link with libdl since the Threading dnl Building Blocks require this LDFLAGS="$LDFLAGS -ldl" fi @@ -2211,7 +2211,7 @@ AC_DEFUN(DEAL_II_CHECK_MULTITHREADING, dnl DEAL_II_USE_MT_VAL=0 fi - AC_DEFINE_UNQUOTED(DEAL_II_USE_MT, $DEAL_II_USE_MT_VAL, + AC_DEFINE_UNQUOTED(DEAL_II_USE_MT, $DEAL_II_USE_MT_VAL, [Flag indicating whether the library shall be compiled for multithreaded applications. If so, then it is set to one, otherwise to zero.]) @@ -2267,7 +2267,7 @@ AC_DEFUN(DEAL_II_CHECK_PARTLY_BRACKETED_INITIALIZER, dnl dnl ------------------------------------------------------------- dnl Check whether the POSIX functions needed for multi-threading dnl are available on this system -dnl +dnl dnl Usage: DEAL_II_CHECK_POSIX_THREAD_FUNCTIONS dnl dnl ------------------------------------------------------------- @@ -2375,7 +2375,7 @@ dnl ------------------------------------------------------------- AC_DEFUN(DEAL_II_CHECK_COMPAT_BLOCKER, dnl [ AC_ARG_ENABLE(compat-blocker, - [ --enable-compat-blocker=mapping + [ --enable-compat-blocker=mapping Block functions that implicitely assume a Q1 mapping], enable_compat_blocker="$enableval", enable_compat_blocker="") @@ -2384,12 +2384,12 @@ AC_DEFUN(DEAL_II_CHECK_COMPAT_BLOCKER, dnl disable_compat=`echo $enable_compat_blocker | perl -pi -e 's/,/ /g;'` dnl Check that each entry is an allowed one - for i in $disable_compat ; do + for i in $disable_compat ; do case $i in mapping) AC_MSG_RESULT(Disabling backward compatibility feature: "$i") ;; - *) + *) AC_MSG_ERROR(Backward compatibility feature "$i" unknown) ;; esac @@ -2407,7 +2407,7 @@ AC_DEFUN(DEAL_II_CHECK_COMPAT_BLOCKER, dnl else compat_value=true fi - + case $i in mapping) AC_DEFINE_UNQUOTED(DEAL_II_COMPAT_MAPPING,$compat_value, @@ -2444,7 +2444,7 @@ AC_DEFUN(DEAL_II_TRY_COMPILER_FLAG, dnl dnl lets see whether the compiler generates output to stdout or stderr deal_II_compiler_output=`eval $ac_compile 2>&1` if test ! "$deal_II_compiler_output"; then - ifelse([$1], , :, + ifelse([$1], , :, [ rm -rf conftest* $1 @@ -2452,7 +2452,7 @@ AC_DEFUN(DEAL_II_TRY_COMPILER_FLAG, dnl else echo "configure: failed program was:" >&AC_FD_CC cat conftest.$ac_ext >&AC_FD_CC - ifelse([$2], , , + ifelse([$2], , , [ rm -rf conftest* $2 @@ -2466,7 +2466,7 @@ AC_DEFUN(DEAL_II_TRY_COMPILER_FLAG, dnl dnl ------------------------------------------------------------- dnl On SunOS 4.x, the `getrusage' function exists, but is not declared dnl in the respective header file `resource.h', as one would think when -dnl reading the man pages. Then we have to declare this function +dnl reading the man pages. Then we have to declare this function dnl ourselves in those files that use this function. The question whether dnl we have to do so is controlled by a preprocessor variable. dnl @@ -2494,8 +2494,8 @@ AC_DEFUN(DEAL_II_CHECK_GETRUSAGE, dnl ], [ AC_MSG_RESULT(no) - AC_DEFINE(NO_HAVE_GETRUSAGE, 1, - [On SunOS 4.x, the getrusage() function exists, but + AC_DEFINE(NO_HAVE_GETRUSAGE, 1, + [On SunOS 4.x, the getrusage() function exists, but is not declared in the respective header file , as one would think when reading the man pages. Then we have to declare this function @@ -2504,7 +2504,7 @@ AC_DEFUN(DEAL_II_CHECK_GETRUSAGE, dnl by the preprocessor variable.]) ]) ] -) +) @@ -2535,12 +2535,12 @@ extern "C" void abort () { for(;;) ; } ], [ AC_MSG_RESULT(yes) - AC_DEFINE(DEAL_II_ABORT_NOTHROW_EXCEPTION, 1, + AC_DEFINE(DEAL_II_ABORT_NOTHROW_EXCEPTION, 1, [Defined if the prototype of abort() has a no-throw exception specification.]) ]) ] -) +) @@ -2550,7 +2550,7 @@ dnl We'd like to use the `isnan' function. On some systems, this is dnl simply declared in (or , for what it's worth), but dnl on Linux for example, it is only declared if we specifically require dnl support for ISO C 99. This macro checks whether `isnan' is declared -dnl or whether we have to pass special compiler flags, namely +dnl or whether we have to pass special compiler flags, namely dnl -D_ISOC99_SOURCE (Linux) or -D__EXTENSIONS__ (Sun). Note that when dnl checking we have to use the two sets of compiler flags. dnl @@ -2570,7 +2570,7 @@ AC_DEFUN(DEAL_II_CHECK_ISNAN, dnl dnl ------------------------------------------------------------- dnl The following function actually performs the check for the right flag -dnl for `isnan'. If a flag is found, the third argument is executed, and +dnl for `isnan'. If a flag is found, the third argument is executed, and dnl the right flag is available in $deal_II_isnan_flag. dnl dnl Usage: DEAL_II_CHECK_ISNAN_FLAG("description of options set", @@ -2620,10 +2620,10 @@ AC_DEFUN(DEAL_II_CHECK_ISNAN_FLAG, dnl dnl Let's see whether we _now_ have found something if test "x$deal_II_isnan_flag" = "x" ; then - dnl We need to define something. Unfortunately, this is system + dnl We need to define something. Unfortunately, this is system dnl dependent (argh!) deal_II_isnan_flag="" - for testflag in -D_ISOC99_SOURCE -D__EXTENSIONS__ ; do + for testflag in -D_ISOC99_SOURCE -D__EXTENSIONS__ ; do CXXFLAGS="$2 $testflag" AC_TRY_COMPILE( [ @@ -2670,7 +2670,7 @@ AC_DEFUN(DEAL_II_CHECK_ISNAN_FLAG, dnl $3 fi fi -]) +]) @@ -2732,7 +2732,7 @@ int i=rand_r(&i); ], [ AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_RAND_R, 1, + AC_DEFINE(HAVE_RAND_R, 1, [Define if you have the rand_r function]) ], [ @@ -2799,7 +2799,7 @@ void __IssueError_Assert (const char *file, e.PrintExcData (std::cerr); e.PrintInfo (std::cerr); std::cerr << "--------------------------------------------------------" - << std::endl; + << std::endl; std::abort (); } @@ -2826,7 +2826,7 @@ void __IssueError_Throw (const char *file, #define DeclException0(Exception0) \ class Exception0 : public ExceptionBase {} -namespace StandardExceptions +namespace StandardExceptions { DeclException0 (ExcInternalError); } @@ -2856,7 +2856,7 @@ dnl names. dnl dnl If __PRETTY_FUNCTION__ is not available, try to find out whether dnl __func__ is available and use the preprocessor to set the first -dnl thing to the second. If this is also not the case, then set it +dnl thing to the second. If this is also not the case, then set it dnl to something indicating non-availability. dnl dnl Usage: DEAL_II_HAVE_PRETTY_FUNCTION @@ -2894,8 +2894,8 @@ AC_DEFUN(DEAL_II_HAVE_PRETTY_FUNCTION, dnl [ AC_MSG_RESULT(no) x="\"(not available)\"" - ]) - AC_DEFINE_UNQUOTED(__PRETTY_FUNCTION__, $x, + ]) + AC_DEFINE_UNQUOTED(__PRETTY_FUNCTION__, $x, [If already available, do not define at all. Otherwise, define to __func__ if that is available. In all other cases, indicate that no information about the present function @@ -2909,7 +2909,7 @@ dnl ------------------------------------------------------------- dnl Sun's Forte compiler (at least up to the Version 7 Early Access dnl release) has a problem with the following code, when compiling dnl with debug output: -dnl +dnl dnl /* ---------------------------------------------------------- */ dnl /* Internal compiler error in abi2_mangler::entity_expression */ dnl /* when compiled with -g. */ @@ -2917,9 +2917,9 @@ dnl template < int dim > struct T { dnl typedef T SubT; dnl T (SubT); dnl }; -dnl +dnl dnl template T::T (SubT) {}; -dnl +dnl dnl template class T<3> ; dnl /* ---------------------------------------------------------- */ dnl @@ -2951,7 +2951,7 @@ AC_DEFUN(DEAL_II_CHECK_LOCAL_TYPEDEF_COMP, dnl ], [ AC_MSG_RESULT(yes. using workaround) - AC_DEFINE(DEAL_II_LOCAL_TYPEDEF_COMP_WORKAROUND, 1, + AC_DEFINE(DEAL_II_LOCAL_TYPEDEF_COMP_WORKAROUND, 1, [Define if we have to work around a bug in Sun's Forte compiler. See the aclocal.m4 file in the top-level directory for a description of this bug.]) @@ -2964,23 +2964,23 @@ dnl ------------------------------------------------------------- dnl Sun's Forte compiler (at least up to the Version 7 Early Access dnl release) have a problem with the following code, when compiling dnl with debug output: -dnl +dnl dnl /* ----------------------------------------------- */ dnl /* Problem 14: Access control. Friendship is not */ dnl /* granted although explicitly declared. */ dnl template class T { int bar (); }; -dnl -dnl template class T<1,M> { +dnl +dnl template class T<1,M> { dnl private: dnl static int i; dnl template friend class T; dnl }; -dnl -dnl template int T::bar () { -dnl return T::i; +dnl +dnl template int T::bar () { +dnl return T::i; dnl }; -dnl -dnl template class T<2,1> ; +dnl +dnl template class T<2,1> ; dnl /* ---------------------------------------------------------- */ dnl dnl The compiler does not allow access to T<1,1>::i, although the @@ -2998,15 +2998,15 @@ AC_DEFUN(DEAL_II_CHECK_TEMPLATE_SPEC_ACCESS, dnl [ template struct T { int bar (); }; - template struct T<1,M> { + template struct T<1,M> { T (); private: static int i; template friend class T; }; - template int T::bar () { - return T::i; + template int T::bar () { + return T::i; } template class T<2,1>; @@ -3017,7 +3017,7 @@ AC_DEFUN(DEAL_II_CHECK_TEMPLATE_SPEC_ACCESS, dnl ], [ AC_MSG_RESULT(yes. using workaround) - AC_DEFINE(DEAL_II_TEMPLATE_SPEC_ACCESS_WORKAROUND, 1, + AC_DEFINE(DEAL_II_TEMPLATE_SPEC_ACCESS_WORKAROUND, 1, [Define if we have to work around a bug in Sun's Forte compiler. See the aclocal.m4 file in the top-level directory for a description of this bug.]) @@ -3032,19 +3032,19 @@ dnl Versions of GCC before 3.0 had a problem with the explicit dnl instantiation of member templates when the member was in fact dnl an operator. In that case, they needed the "template" keyword, dnl which is actually not allowed at this place. Test case is -dnl +dnl dnl /* ----------------------------------------------- */ dnl struct X dnl { dnl template dnl X operator = (T2 &) { return X(); }; dnl }; -dnl +dnl dnl template X X::operator= (float &); dnl /* ---------------------------------------------------------- */ dnl dnl The compiler only groks this if the "operator=" is prepended -dnl by "template". We detect this, and either set the +dnl by "template". We detect this, and either set the dnl DEAL_II_MEMBER_OP_TEMPLATE_INST to "template" or nothing, so dnl that it gets expanded to the right string needed in this place. dnl @@ -3075,7 +3075,7 @@ AC_DEFUN(DEAL_II_CHECK_MEMBER_OP_TEMPLATE_INST, dnl AC_MSG_RESULT(yes. using workaround) x="template" ]) - AC_DEFINE_UNQUOTED(DEAL_II_MEMBER_OP_TEMPLATE_INST, $x, + AC_DEFINE_UNQUOTED(DEAL_II_MEMBER_OP_TEMPLATE_INST, $x, [Define if we have to work around a bug in gcc with explicitly instantiating template member operators. See the aclocal.m4 file in the top-level directory @@ -3087,7 +3087,7 @@ AC_DEFUN(DEAL_II_CHECK_MEMBER_OP_TEMPLATE_INST, dnl dnl ------------------------------------------------------------- dnl Versions of GCC before 3.0 had a problem with the following dnl code: -dnl +dnl dnl /* ----------------------------------------------- */ dnl namespace NS { dnl template class C { @@ -3152,7 +3152,7 @@ AC_DEFUN(DEAL_II_CHECK_NAMESP_TEMPL_FRIEND_BUG, dnl ], [ AC_MSG_RESULT(yes. using workaround) - AC_DEFINE_UNQUOTED(DEAL_II_NAMESP_TEMPL_FRIEND_BUG, 1, + AC_DEFINE_UNQUOTED(DEAL_II_NAMESP_TEMPL_FRIEND_BUG, 1, [Define if we have to work around a bug in gcc with marking all instances of a template class as friends to this class if the class is inside a namespace. @@ -3164,22 +3164,22 @@ AC_DEFUN(DEAL_II_CHECK_NAMESP_TEMPL_FRIEND_BUG, dnl dnl ------------------------------------------------------------- -dnl Another bug in gcc with template and namespaces (fixed since 3.2, +dnl Another bug in gcc with template and namespaces (fixed since 3.2, dnl but present in 3.0): -dnl +dnl dnl /* ----------------------------------------------- */ dnl namespace NS { dnl template struct Foo; dnl } -dnl +dnl dnl class Bar { dnl template friend struct NS::Foo; dnl }; -dnl +dnl dnl namespace NS { dnl template struct Foo { Foo (); }; dnl } -dnl +dnl dnl template struct NS::Foo; dnl /* ----------------------------------------------- */ dnl @@ -3216,7 +3216,7 @@ AC_DEFUN(DEAL_II_CHECK_NAMESP_TEMPL_FRIEND_BUG2, dnl ], [ AC_MSG_RESULT(yes. using workaround) - AC_DEFINE_UNQUOTED(DEAL_II_NAMESP_TEMPL_FRIEND_BUG2, 1, + AC_DEFINE_UNQUOTED(DEAL_II_NAMESP_TEMPL_FRIEND_BUG2, 1, [Define if we have to work around another bug in gcc with marking all instances of a template class as friends to this class if the class is inside a namespace. @@ -3276,7 +3276,7 @@ template class X<1,int>; ], [ AC_MSG_RESULT(yes) - AC_DEFINE_UNQUOTED(DEAL_II_TEMPL_SPEC_FRIEND_BUG, 1, + AC_DEFINE_UNQUOTED(DEAL_II_TEMPL_SPEC_FRIEND_BUG, 1, [Define if we have to work around a bug with some compilers that will not allow us to specify a fully specialized class of a template as a friend. @@ -3332,7 +3332,7 @@ AC_DEFUN(DEAL_II_CHECK_IMPLEMENTED_PURE_FUNCTION_BUG, dnl ], [ AC_MSG_RESULT(yes. using workaround) - AC_DEFINE(DEAL_II_IMPLEMENTED_PURE_FUNCTION_BUG, 1, + AC_DEFINE(DEAL_II_IMPLEMENTED_PURE_FUNCTION_BUG, 1, [Defined if the compiler refuses to compile the definition of a function that was previously declared abstract.]) ]) @@ -3386,7 +3386,7 @@ AC_DEFUN(DEAL_II_CHECK_TEMPLATE_TEMPLATE_TYPEDEF_BUG, dnl ], [ AC_MSG_RESULT(yes. using workaround) - AC_DEFINE(DEAL_II_TEMPLATE_TEMPLATE_TYPEDEF_BUG, 1, + AC_DEFINE(DEAL_II_TEMPLATE_TEMPLATE_TYPEDEF_BUG, 1, [Defined if the compiler refuses to allow a typedef to a template template class template parameter. For the exact failure mode, look at aclocal.m4 in the @@ -3408,7 +3408,7 @@ dnl struct X { dnl X (); dnl private: dnl static int f(); -dnl +dnl dnl struct Y { dnl int g() { return f(); }; dnl }; @@ -3431,7 +3431,7 @@ AC_DEFUN(DEAL_II_CHECK_NESTED_CLASS_FRIEND_BUG, dnl X (); private: static int f(); - + struct Y { int g() { return f(); }; }; @@ -3443,7 +3443,7 @@ AC_DEFUN(DEAL_II_CHECK_NESTED_CLASS_FRIEND_BUG, dnl ], [ AC_MSG_RESULT(yes. using workaround) - AC_DEFINE(DEAL_II_NESTED_CLASS_FRIEND_BUG, 1, + AC_DEFINE(DEAL_II_NESTED_CLASS_FRIEND_BUG, 1, [Defined if the compiler does not properly implement the resolution of defect report #45 to the C++ standard, which makes nested types implicit friends @@ -3458,18 +3458,18 @@ dnl gcc up to 3.3 won't accept the following code: dnl ----------------------------- dnl template class X { dnl template class Y {}; -dnl +dnl dnl template dnl template dnl friend class X::Y; dnl }; -dnl +dnl dnl X x; dnl ----------------------------- dnl dnl They don't accept the X::Y here, probably because the class is dnl not complete at this point. gcc3.4 gets it right, though. One -dnl can work around by simply saying +dnl can work around by simply saying dnl template friend class Y; dnl but then icc doesn't understand this :-( So everyone's got a bug dnl here. Also, note that the standard says that Y is an implicit friend @@ -3502,7 +3502,7 @@ AC_DEFUN(DEAL_II_CHECK_NESTED_CLASS_TEMPL_FRIEND_BUG, dnl ], [ AC_MSG_RESULT(yes. using workaround) - AC_DEFINE(DEAL_II_NESTED_CLASS_TEMPL_FRIEND_BUG, 1, + AC_DEFINE(DEAL_II_NESTED_CLASS_TEMPL_FRIEND_BUG, 1, [Defined if the compiler does not understand friend declarations for nested member classes when giving a full class specification.]) @@ -3550,9 +3550,9 @@ AC_DEFUN(DEAL_II_CHECK_MEMBER_VAR_SPECIALIZATION_BUG, dnl ], [ AC_MSG_RESULT(yes. using workaround) - AC_DEFINE(DEAL_II_MEMBER_VAR_SPECIALIZATION_BUG, 1, + AC_DEFINE(DEAL_II_MEMBER_VAR_SPECIALIZATION_BUG, 1, [Defined if the compiler refuses to allow the - explicit specialization of static member + explicit specialization of static member variables. For the exact failure mode, look at aclocal.m4 in the top-level directory.]) ]) @@ -3604,9 +3604,9 @@ AC_DEFUN(DEAL_II_CHECK_MEMBER_ARRAY_SPECIALIZATION_BUG, dnl ], [ AC_MSG_RESULT(yes. using workaround) - AC_DEFINE(DEAL_II_MEMBER_ARRAY_SPECIALIZATION_BUG, 1, + AC_DEFINE(DEAL_II_MEMBER_ARRAY_SPECIALIZATION_BUG, 1, [Defined if the compiler refuses to allow the - explicit specialization of static member + explicit specialization of static member arrays. For the exact failure mode, look at aclocal.m4 in the top-level directory.]) ]) @@ -3629,7 +3629,7 @@ AC_DEFUN(DEAL_II_CHECK_MEMBER_TEMPLATE_SPECIALIZATION_BUG, dnl CXXFLAGS="$CXXFLAGSG" AC_TRY_COMPILE( [ - template struct X + template struct X { template void f(T); }; @@ -3647,7 +3647,7 @@ AC_DEFUN(DEAL_II_CHECK_MEMBER_TEMPLATE_SPECIALIZATION_BUG, dnl ], [ AC_MSG_RESULT(yes. using workaround) - AC_DEFINE(DEAL_II_MEMBER_TEMPLATE_SPECIALIZATION_BUG, 1, + AC_DEFINE(DEAL_II_MEMBER_TEMPLATE_SPECIALIZATION_BUG, 1, [Defined if the compiler refuses to specialize an outer class template while keeping a member as a template. For the exact failure mode, look at @@ -3662,7 +3662,7 @@ dnl gcc3.1 (and maybe later compilers) has a bug with long double dnl and optimization (see code below), when compiling on Sparc dnl machines. Since it affects only one platform and one compiler, dnl we take the liberty to disable the function in which the problem -dnl occurs (Polynomial::shift in base/source/polynomial.cc), since +dnl occurs (Polynomial::shift in base/source/polynomial.cc), since dnl this is a function that is rarely used anyway. dnl dnl For more information: the bug just described is reported to @@ -3703,7 +3703,7 @@ AC_DEFUN(DEAL_II_CHECK_LONG_DOUBLE_LOOP_BUG, dnl ], [ AC_MSG_RESULT(yes. disabling respective functions) - AC_DEFINE(DEAL_II_LONG_DOUBLE_LOOP_BUG, 1, + AC_DEFINE(DEAL_II_LONG_DOUBLE_LOOP_BUG, 1, [Defined if the compiler gets an internal compiler upon some code involving long doubles, and with optimization. For the details, look at @@ -3736,7 +3736,7 @@ AC_DEFUN(DEAL_II_CHECK_FUNPTR_TEMPLATE_TEMPLATE_BUG, dnl void f(T); template class T> - void* g() + void* g() { void (*p) (T) = &f; return (void*)p; @@ -3750,9 +3750,9 @@ AC_DEFUN(DEAL_II_CHECK_FUNPTR_TEMPLATE_TEMPLATE_BUG, dnl ], [ AC_MSG_RESULT(yes. using workaround) - AC_DEFINE(DEAL_II_FUNPTR_TEMPLATE_TEMPLATE_BUG, 1, + AC_DEFINE(DEAL_II_FUNPTR_TEMPLATE_TEMPLATE_BUG, 1, [Defined if the compiler needs a workaround for - certain problems with taking the address of + certain problems with taking the address of template template functions. For the details, look at aclocal.m4 in the top-level directory.]) ]) @@ -3800,7 +3800,7 @@ AC_DEFUN(DEAL_II_CHECK_ANON_NAMESPACE_BUG, dnl AC_MSG_RESULT(no) else AC_MSG_RESULT(yes. using workaround) - AC_DEFINE(DEAL_II_ANON_NAMESPACE_BUG, 1, + AC_DEFINE(DEAL_II_ANON_NAMESPACE_BUG, 1, [Defined if the compiler needs to see the static keyword even for functions in anonymous namespaces, to avoid duplicate symbol errors when linking. @@ -3845,20 +3845,20 @@ AC_DEFUN(DEAL_II_CHECK_ANON_NAMESPACE_BUG2, dnl AC_MSG_RESULT(no) else AC_MSG_RESULT(yes) - AC_DEFINE(DEAL_II_ANON_NAMESPACE_LINKAGE_BUG, 1, + 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 + rm -f conftest.$ac_objext ]) dnl ------------------------------------------------------------- -dnl A third test: MIPSpro gives a bogus warning about unused code +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 @@ -3889,33 +3889,33 @@ AC_DEFUN(DEAL_II_CHECK_ANON_NAMESPACE_BUG3, dnl public: Point() {}; }; - + class GridTools { public: template static void shift (const Point &s); - + template static void transform (const Predicate &predicate); }; - + namespace { template class ShiftPoint { public: ShiftPoint (const Point &) {}; void g() const; }; - + template void ShiftPoint::g() const {} } - + template void GridTools::transform (const Predicate &predicate) { predicate.g(); } - + template void GridTools::shift (const Point &s) { transform (ShiftPoint(s)); } - + template void GridTools::shift (const Point<1> &); ], [ @@ -3940,7 +3940,7 @@ dnl A test to identify Apples buggy gcc3.3 version. If the dnl explicit instantiations are placed at the end of a source dnl file, sometimes only weak symbols are generated, which dnl lead to linker problems. -dnl For more information, see +dnl For more information, see dnl http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24331 dnl As this bug can be easily avoided by applying the dnl "november2004gccupdate" Patch which can be found @@ -3993,7 +3993,7 @@ AC_DEFUN(DEAL_II_CHECK_WEAK_LINKAGE_BUG, dnl else AC_MSG_RESULT(yes) DARWIN_GCC_WEAK_LINKAGE_BUG="yes" - AC_DEFINE(DEAL_II_WEAK_LINKAGE_BUG, 1, + AC_DEFINE(DEAL_II_WEAK_LINKAGE_BUG, 1, [This error appears in the Apple edition of the gcc 3.3, which ships with Darwin7.9.0 and probably previous version. It leads to @@ -4001,7 +4001,7 @@ AC_DEFUN(DEAL_II_CHECK_WEAK_LINKAGE_BUG, dnl For the details, look at aclocal.m4 in the top-level directory.]) fi - rm -f conftest.$ac_objext + rm -f conftest.$ac_objext rm -f symb1 symb2 ;; esac @@ -4015,7 +4015,7 @@ dnl to make it clear with which types a template parameter can dnl be instantiated. There is a neat trick to do this: SFINAE dnl (substitution failure is not an error). The idea is this: the dnl C++ standard prescribes that a template function is only -dnl considered in a call, if all parts of its signature can be +dnl considered in a call, if all parts of its signature can be dnl instantiated with the template parameter replaced by the dnl respective types/values in this particular call. Example: dnl template @@ -4027,7 +4027,7 @@ dnl The compiler should detect that in this call, the template dnl parameter T must be identified with the type "int". However, dnl the return type T::type does not exist. The trick now is dnl that this is not considered an error: this template is simply -dnl not considered, the compiler keeps on looking for another +dnl not considered, the compiler keeps on looking for another dnl possible function foo. dnl dnl That allows for a neat trick to rule out a template for certain @@ -4083,8 +4083,8 @@ AC_DEFUN(DEAL_II_CHECK_SFINAE_BUG, dnl ], [ AC_MSG_RESULT(yes. disabling template constraints) - AC_DEFINE(DEAL_II_SFINAE_BUG, 1, - [Defined if the compiler does not support the + AC_DEFINE(DEAL_II_SFINAE_BUG, 1, + [Defined if the compiler does not support the substitution-failure-is-not-an-error paradigm. For the details, look at aclocal.m4 in the top-level directory.]) @@ -4095,7 +4095,7 @@ AC_DEFUN(DEAL_II_CHECK_SFINAE_BUG, dnl dnl ------------------------------------------------------------- -dnl Old versions of gcc had a problem with arrays inside ?: +dnl Old versions of gcc had a problem with arrays inside ?: dnl expressions: they decayed too quickly to pointers. This then dnl leads to erroneous warnings :-( dnl @@ -4120,7 +4120,7 @@ AC_DEFUN(DEAL_II_CHECK_ARRAY_CONDITIONAL_DECAY_BUG, dnl ], [ AC_MSG_RESULT(yes) - AC_DEFINE(DEAL_II_ARRAY_CONDITIONAL_DECAY_BUG, 1, + AC_DEFINE(DEAL_II_ARRAY_CONDITIONAL_DECAY_BUG, 1, [Defined if the compiler has a problem with assigning arrays in conditionals]) ]) @@ -4128,6 +4128,43 @@ AC_DEFUN(DEAL_II_CHECK_ARRAY_CONDITIONAL_DECAY_BUG, dnl +dnl ------------------------------------------------------------- +dnl Old versions of gcc (in particular gcc 3.3.3) has a problem +dnl if an argument to a member function is an array with bounds +dnl that depend on a static const variable inside that class. +dnl +dnl Usage: DEAL_II_CHECK_ARRAY_CONDITIONAL_DECAY_BUG +dnl +dnl ------------------------------------------------------------- +AC_DEFUN(DEAL_II_CHECK_ARRAY_ARG_BUG, dnl +[ + AC_MSG_CHECKING(for array argument bug) + AC_LANG(C++) + CXXFLAGS="-W -Wall -Werror" + AC_TRY_COMPILE( + [ + template struct X { + static const unsigned int N = 1< void X::f(int (&)[N]) {} + ], + [ + ], + [ + AC_MSG_RESULT(no) + ], + [ + AC_MSG_RESULT(yes) + AC_DEFINE(DEAL_II_ARRAY_ARG_BUG, 1, + [Defined if the compiler has a problem with + using arrays as arguments in functions]) + ]) +]) + + + dnl ------------------------------------------------------------- dnl Some versions of gcc get this example wrong: dnl --------------------------------- @@ -4135,7 +4172,7 @@ dnl struct X dnl { dnl template void operator << (T); dnl }; -dnl +dnl dnl void f() dnl { dnl X x; @@ -4164,7 +4201,7 @@ AC_DEFUN(DEAL_II_CHECK_TEMPL_OP_DISAMBIGUATION_BUG, dnl { template void operator << (T); }; - + void f() { X x; @@ -4177,7 +4214,7 @@ AC_DEFUN(DEAL_II_CHECK_TEMPL_OP_DISAMBIGUATION_BUG, dnl ], [ AC_MSG_RESULT(yes. using workaround) - AC_DEFINE(DEAL_II_TEMPL_OP_DISAMBIGUATION_BUG, 1, + AC_DEFINE(DEAL_II_TEMPL_OP_DISAMBIGUATION_BUG, 1, [Defined if the compiler requires the use of the template keyword for disambiguation keyword in certain contexts in which it is not supposed to @@ -4196,16 +4233,16 @@ dnl struct X { dnl template dnl explicit X(T); dnl }; -dnl +dnl dnl void f(X); -dnl +dnl dnl int main () { f(1); } dnl --------------------------------- -dnl +dnl dnl Check for this misfeature. -dnl +dnl dnl Usage: DEAL_II_CHECK_EXPLICIT_CONSTRUCTOR_BUG -dnl +dnl dnl -------------------------------------------------------------- AC_DEFUN(DEAL_II_CHECK_EXPLICIT_CONSTRUCTOR_BUG, dnl [ @@ -4226,7 +4263,7 @@ AC_DEFUN(DEAL_II_CHECK_EXPLICIT_CONSTRUCTOR_BUG, dnl ], [ AC_MSG_RESULT(yes. disabling some functions) - AC_DEFINE(DEAL_II_EXPLICIT_CONSTRUCTOR_BUG, 1, + AC_DEFINE(DEAL_II_EXPLICIT_CONSTRUCTOR_BUG, 1, [Defined if the compiler does not honor the explicit keyword on template constructors.]) ], @@ -4241,11 +4278,11 @@ dnl ------------------------------------------------------------- dnl Some older versions of gcc deduce pointers to const functions in dnl template contexts to pointer-to-function of const objects. dnl This is not correct -dnl +dnl dnl Check for this misfeature. -dnl +dnl dnl Usage: DEAL_II_CHECK_CONST_MEMBER_DEDUCTION_BUG -dnl +dnl dnl -------------------------------------------------------------- AC_DEFUN(DEAL_II_CHECK_CONST_MEMBER_DEDUCTION_BUG, dnl [ @@ -4271,7 +4308,7 @@ AC_DEFUN(DEAL_II_CHECK_CONST_MEMBER_DEDUCTION_BUG, dnl ], [ AC_MSG_RESULT(yes) - AC_DEFINE(DEAL_II_CONST_MEMBER_DEDUCTION_BUG, 1, + AC_DEFINE(DEAL_II_CONST_MEMBER_DEDUCTION_BUG, 1, [Defined if the compiler has a bug in deducing the type of pointers to const member functions.]) ]) @@ -4282,9 +4319,9 @@ AC_DEFUN(DEAL_II_CHECK_CONST_MEMBER_DEDUCTION_BUG, dnl dnl ------------------------------------------------------------- dnl Check for GCC bug 36052, see dnl http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36052 -dnl +dnl dnl Usage: DEAL_II_CHECK_TYPE_QUALIFIER_BUG -dnl +dnl dnl -------------------------------------------------------------- AC_DEFUN(DEAL_II_CHECK_TYPE_QUALIFIER_BUG, dnl [ @@ -4298,17 +4335,17 @@ AC_DEFUN(DEAL_II_CHECK_TYPE_QUALIFIER_BUG, dnl struct S { typedef double value_type; }; - + template struct Traits { typedef const typename T::value_type dereference_type; }; - + template struct ConstIterator { typedef typename Traits::dereference_type dereference_type; - + dereference_type operator * () const { return 0; } }; - + template class ConstIterator; ], [ @@ -4328,11 +4365,11 @@ AC_DEFUN(DEAL_II_CHECK_TYPE_QUALIFIER_BUG, dnl dnl ------------------------------------------------------------- -dnl In the gcc libstdc++ headers for std::complex, there is -dnl no defined default copy constructor, but a templated copy -dnl constructor. So when using using a normal assignment -dnl between identical types, the compiler synthesizes the -dnl default operator, rather than using the template. +dnl In the gcc libstdc++ headers for std::complex, there is +dnl no defined default copy constructor, but a templated copy +dnl constructor. So when using using a normal assignment +dnl between identical types, the compiler synthesizes the +dnl default operator, rather than using the template. dnl The code will still be ok, though. dnl dnl With -Wsynth in gcc we then get a warning. So if we find that @@ -4406,7 +4443,7 @@ AC_DEFUN(DEAL_II_CHECK_CTOR_DTOR_PRIVACY, dnl == sizeof(yes_type)); }; - + const bool x = IsInt::value; ], [ @@ -4428,9 +4465,9 @@ dnl ------------------------------------------------------------- AC_DEFUN(DEAL_II_CHECK_BOOST, dnl [ AC_ARG_WITH(boost, - [ --with-boost=/path/to/boost - Use an installed boost library instead of the - contributed one. The optional argument points to the + [ --with-boost=/path/to/boost + Use an installed boost library instead of the + contributed one. The optional argument points to the directory containing the boost subdirectory for header files.], DEAL_II_WITH_BOOST($withval)) @@ -4492,10 +4529,10 @@ AC_DEFUN(DEAL_II_CHECK_BOOST_SHARED_PTR_ASSIGNMENT, dnl dnl ------------------------------------------------------------- dnl Some versions of icc on some platforms issue a lot of warnings -dnl about the unreliability of floating point comparisons. Check +dnl about the unreliability of floating point comparisons. Check dnl whether we can switch that off by checking whether the compiler dnl allows -wdXXXX for this warning: -dnl #1572: `floating-point equality and inequality comparisons are +dnl #1572: `floating-point equality and inequality comparisons are dnl unreliable' dnl (while true, this warning also triggers on comparisons dnl with zero, or comparing two variables for which one is @@ -4603,7 +4640,7 @@ AC_DEFUN(DEAL_II_HAVE_STD_STRINGSTREAM, dnl ], [ AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_STD_STRINGSTREAM, 1, + AC_DEFINE(HAVE_STD_STRINGSTREAM, 1, [Define if the compiler's library in use provides std::i/ostringstream classes (early gcc versions did not)]) ], @@ -4623,7 +4660,7 @@ dnl dnl Annoyingly, the Portland Group compiler compiles code with dnl __builtin_expect just fine, but then doesn't want to link it, dnl saying it doesn't know this function. So simply not test for -dnl __builtin_expect with that compiler, and to be extrasure make +dnl __builtin_expect with that compiler, and to be extrasure make dnl sure we're doing the right thing also link . dnl dnl Usage: DEAL_II_HAVE_BUILTIN_EXPECT @@ -4644,7 +4681,7 @@ AC_DEFUN(DEAL_II_HAVE_BUILTIN_EXPECT, dnl ], [ AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_BUILTIN_EXPECT, 1, + AC_DEFINE(HAVE_BUILTIN_EXPECT, 1, [Define if the compiler provides __builtin_expect]) ], [ @@ -4698,7 +4735,7 @@ static preload_terminate_dummy dummy; ], [ AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_VERBOSE_TERMINATE, 1, + AC_DEFINE(HAVE_VERBOSE_TERMINATE, 1, [Define if the compiler provides __verbose_terminate_handler]) ], [ @@ -4780,7 +4817,7 @@ int main () { [ result="$?" AC_MSG_RESULT($result) - AC_DEFINE_UNQUOTED(DEAL_II_MIN_VECTOR_CAPACITY, $result, + AC_DEFINE_UNQUOTED(DEAL_II_MIN_VECTOR_CAPACITY, $result, [Set to the minimal number of elements a std::vector can always hold, i.e. its minimal capacity.]) ] @@ -4805,7 +4842,7 @@ int main () { [ result="$?" AC_MSG_RESULT($result) - AC_DEFINE_UNQUOTED(DEAL_II_MIN_BOOL_VECTOR_CAPACITY, $result, + AC_DEFINE_UNQUOTED(DEAL_II_MIN_BOOL_VECTOR_CAPACITY, $result, [Set to the minimal number of elements a std::vector can always hold, i.e. its minimal capacity.]) ] @@ -4834,7 +4871,7 @@ AC_DEFUN(DEAL_II_HAVE_STD_NUMERIC_LIMITS, dnl ], [ AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_STD_NUMERIC_LIMITS, 1, + AC_DEFINE(HAVE_STD_NUMERIC_LIMITS, 1, [Define if the compiler's library in use provides std::numeric_limits classes in the appropriate header file]) ], @@ -4865,7 +4902,7 @@ void f (const std::ostream &out); ], [ AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_STD_OSTREAM_HEADER, 1, + AC_DEFINE(HAVE_STD_OSTREAM_HEADER, 1, [Define if the compiler provides an header file]) ], [ @@ -4895,7 +4932,7 @@ void f (const std::ostream &out); ], [ AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_STD_IOSFWD_HEADER, 1, + AC_DEFINE(HAVE_STD_IOSFWD_HEADER, 1, [Define if the compiler provides an header file]) ], [ @@ -4932,7 +4969,7 @@ AC_DEFUN(DEAL_II_HAVE_GLIBC_STACKTRACE, dnl ], [ AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GLIBC_STACKTRACE, 1, + AC_DEFINE(HAVE_GLIBC_STACKTRACE, 1, [Define if deal.II is linked against a libc that provides stacktrace debug information that can be printed out in the exception class]) @@ -5022,7 +5059,7 @@ template ], [ AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_LIBSTDCXX_DEMANGLER, 1, + AC_DEFINE(HAVE_LIBSTDCXX_DEMANGLER, 1, [Define if the std c++ library provides a demangler conforming to the GCC libstdc++ interface.]) ], @@ -5039,11 +5076,11 @@ dnl #define quad quad_t dnl This is of course silly, but beyond that it also hurts as dnl since we have member functions and variables with that name dnl and we get compile errors depending or not we have this -dnl particular header file included. +dnl particular header file included. dnl dnl Fortunately, the define is only active is _POSIX_SOURCE is dnl not set, so check for this define, and if necessary set -dnl this flag. We check on all systems, since maybe there are +dnl this flag. We check on all systems, since maybe there are dnl other such systems elsewhere... dnl dnl Usage: DEAL_II_CHECK_QUAD_DEFINE @@ -5080,7 +5117,7 @@ dnl On DEC OSF1, when we specify "-std strict_ansi", we can include dnl errno.h, and still not get the definition of the error codes dnl such as EINTR, EPIPE, etc. dnl -dnl In this case, use a workaround by explicitly including +dnl In this case, use a workaround by explicitly including dnl /usr/include/errno.h, instead of just errno.h, which the compiler dnl maps to one of its own C/C++ compatibility headers, which only dnl define 3 error codes (for reasons unknown) @@ -5107,7 +5144,7 @@ using namespace std; ], [ AC_MSG_RESULT(no. working around) - AC_DEFINE(DEAL_II_USE_DIRECT_ERRNO_H, 1, + AC_DEFINE(DEAL_II_USE_DIRECT_ERRNO_H, 1, [Define if the compiler provides a header file which does not define all error codes such as EINTR. In that case, use the system include file at /usr/include @@ -5165,9 +5202,9 @@ int main() ], [ AC_MSG_RESULT([yes. disabling socket functions]) - AC_DEFINE(DEAL_II_BROKEN_SOCKETS, 1, + AC_DEFINE(DEAL_II_BROKEN_SOCKETS, 1, [Define if the use of socket functionality leads to strange - results with floating point computations on cygwin + results with floating point computations on cygwin systems.]) ]) ]) @@ -5196,7 +5233,7 @@ AC_DEFUN(DEAL_II_CHECK_CXXFLAGS_CONSISTENCY, dnl AC_MSG_ERROR(invalid combination of flags!) exit 1; ]) - + AC_MSG_CHECKING(for consistency of CXXFLAGSO flags) CXXFLAGS="$CXXFLAGSO" AC_TRY_COMPILE( @@ -5243,7 +5280,7 @@ dnl [ dnl AC_MSG_ERROR(invalid combination of flags!) dnl exit 1; dnl ]) -dnl +dnl dnl FFLAGS="$F77FLAGSO" dnl AC_MSG_CHECKING(for consistency of F77FLAGSO flags) dnl AC_TRY_COMPILE( @@ -5350,17 +5387,17 @@ AC_DEFUN(DEAL_II_CONFIGURE_HSL, dnl hsl_subroutines="" if test -r contrib/hsl/source/ma27.f ; then hsl_subroutines="$hsl_subroutines MA27" - AC_DEFINE(HAVE_HSL_MA27, 1, + AC_DEFINE(HAVE_HSL_MA27, 1, [Availability of the MA27 algorithm from HSL]) fi - + if (test -r contrib/hsl/source/ma47.f && \ test -r contrib/hsl/source/ma47dep.f) ; then hsl_subroutines="$hsl_subroutines MA47" - AC_DEFINE(HAVE_HSL_MA47, 1, + AC_DEFINE(HAVE_HSL_MA47, 1, [Availability of the MA47 algorithm from HSL]) fi - + if test "x$hsl_subroutines" != "x" ; then AC_MSG_RESULT($hsl_subroutines) USE_CONTRIB_HSL=yes @@ -5371,7 +5408,7 @@ AC_DEFUN(DEAL_II_CONFIGURE_HSL, dnl fi ]) - + dnl ------------------------------------------------------------- dnl Check for the Tecplot API. If it is found we will be able to write @@ -5420,10 +5457,10 @@ dnl ------------------------------------------------------------- AC_DEFUN(DEAL_II_CONFIGURE_NETCDF, dnl [ AC_ARG_WITH(netcdf, - [ --with-netcdf=/path/to/netcdf + [ --with-netcdf=/path/to/netcdf Specify the path to the NetCDF installation, of which the include and library directories are subdirs; use - this if you want to override the NETCDF_DIR + this if you want to override the NETCDF_DIR environment variable.], [ DEAL_II_NETCDF_DIR="$withval" @@ -5436,9 +5473,9 @@ AC_DEFUN(DEAL_II_CONFIGURE_NETCDF, dnl DEAL_II_NETCDF_DIR="" fi ]) - + AC_ARG_WITH(netcdf-include, - [ --with-netcdf-include=/path/to/netcdf + [ --with-netcdf-include=/path/to/netcdf Specify the path to the NetCDF headers file; use this if you want to override the NETCDF_INCLUDE_DIR environment variable.], @@ -5447,14 +5484,14 @@ AC_DEFUN(DEAL_II_CONFIGURE_NETCDF, dnl ]) AC_ARG_WITH(netcdf-libs, - [ --with-netcdf-libs=/path/to/netcdf + [ --with-netcdf-libs=/path/to/netcdf Specify the path to the NetCDF libraries; use this if - you want to override the NETCDF_LIBDIR environment + you want to override the NETCDF_LIBDIR environment variable.], [ NETCDF_LIBDIR="$withval" ]) - + if test "x$DEAL_II_NETCDF_DIR" != "x" ; then if test "x$NETCDF_INCLUDE_DIR" != "x" ; then @@ -5471,7 +5508,7 @@ AC_DEFUN(DEAL_II_CONFIGURE_NETCDF, dnl if test "$LD_PATH_OPTION" != "no" ; then LDFLAGS="$LD_PATH_OPTION$DEAL_II_NETCDF_DIR/lib $LDFLAGS" fi - fi + fi else if test "x$NETCDF_INCLUDE_DIR" != "x" ; then CPPFLAGS="-I$NETCDF_INCLUDE_DIR $CPPFLAGS" @@ -5481,12 +5518,12 @@ AC_DEFUN(DEAL_II_CONFIGURE_NETCDF, dnl LDFLAGS="$LDFLAGS -L$NETCDF_LIBDIR" fi fi - + dnl Check for header, if found check for C library, dnl if found check for C++ library, dnl if successful, HAVE_LIBNETCDF will be set AC_CHECK_HEADER(netcdfcpp.h) - + AC_CHECK_LIB(netcdf, nc_open, [ DEAL_II_EXTERNAL_LIBS_SAVE_VAL() DEAL_II_ADD_EXTERNAL_LIBS_AT_FRONT(-lnetcdf_c++ -lnetcdf) @@ -5501,14 +5538,14 @@ AC_DEFUN(DEAL_II_CONFIGURE_NETCDF, dnl ], [ AC_MSG_RESULT(no) DEAL_II_EXTERNAL_LIBS_RESTORE_VAL() - ]) + ]) ]) - + ]) dnl ------------------------------------------------------------ -dnl Check whether PETSc is installed, and if so store the +dnl Check whether PETSc is installed, and if so store the dnl respective links dnl dnl Usage: DEAL_II_CONFIGURE_PETSC @@ -5520,9 +5557,9 @@ AC_DEFUN(DEAL_II_CONFIGURE_PETSC, dnl AC_MSG_CHECKING(for PETSc library directory) AC_ARG_WITH(petsc, - [ --with-petsc=/path/to/petsc + [ --with-petsc=/path/to/petsc Specify the path to the PETSc installation, of which - the include and library directories are subdirs; use + the include and library directories are subdirs; use this if you want to override the PETSC_DIR environment variable.], [ @@ -5622,9 +5659,9 @@ AC_DEFUN(DEAL_II_CONFIGURE_PETSC_ARCH, dnl AC_MSG_CHECKING(for PETSc library architecture) AC_ARG_WITH(petsc-arch, - [ --with-petsc-arch=architecture + [ --with-petsc-arch=architecture Specify the architecture for your PETSc installation; - use this if you want to override the PETSC_ARCH + use this if you want to override the PETSC_ARCH environment variable.], [ DEAL_II_PETSC_ARCH="$withval" @@ -5663,7 +5700,7 @@ AC_DEFUN(DEAL_II_CONFIGURE_PETSC_ARCH, dnl fi fi ;; - + 2.3*) if test ! -d $DEAL_II_PETSC_DIR/lib/$DEAL_II_PETSC_ARCH \ ; then @@ -5743,8 +5780,8 @@ AC_DEFUN(DEAL_II_CONFIGURE_PETSC_MPIUNI_LIB, dnl dnl ------------------------------------------------------------ -dnl Check whether SLEPc is installed, and if so store the -dnl respective links. +dnl Check whether SLEPc is installed, and if so store the +dnl respective links. dnl dnl Usage: DEAL_II_CONFIGURE_SLEPC dnl @@ -5757,7 +5794,7 @@ AC_DEFUN(DEAL_II_CONFIGURE_SLEPC, dnl AC_ARG_WITH(slepc, [ --with-slepc=/path/to/slepc Specify the path to the SLEPc installation, for which - the include directory is a subdir; use this if you + the include directory is a subdir; use this if you want to override the SLEPC_DIR environment variable.], [ dnl Special case when someone does --with-slepc=no @@ -5831,7 +5868,7 @@ AC_DEFUN(DEAL_II_CONFIGURE_SLEPC, dnl ]) dnl ------------------------------------------------------------ -dnl Figure out the version numbers of SLEPc and compare with +dnl Figure out the version numbers of SLEPc and compare with dnl version numbers of PETSc. This is not strictly necessary dnl but highly recommended that major, minor, and subminor dnl version match. We blissfully ignor patch versions and hope @@ -5856,19 +5893,19 @@ AC_DEFUN(DEAL_II_CONFIGURE_SLEPC_VERSION, dnl SLEPC_VERSION="$DEAL_II_SLEPC_VERSION_MAJOR.$DEAL_II_SLEPC_VERSION_MINOR.$DEAL_II_SLEPC_VERSION_SUBMINOR" AC_MSG_RESULT($SLEPC_VERSION) - dnl Then check that PETSc and SLEPc versions are compatible + dnl Then check that PETSc and SLEPc versions are compatible dnl ie. that they are equivalent. if test "${PETSC_VERSION}" != "${SLEPC_VERSION}" \ ; then AC_MSG_ERROR([If SLEPc is used, you must use the same version number as your PETSc Installation]) - fi + fi ]) dnl ------------------------------------------------------------ -dnl Check whether Trilinos is installed, and if so store the +dnl Check whether Trilinos is installed, and if so store the dnl respective links dnl dnl Usage: DEAL_II_CONFIGURE_TRILINOS @@ -5878,10 +5915,10 @@ AC_DEFUN(DEAL_II_CONFIGURE_TRILINOS, dnl [ AC_MSG_CHECKING(for Trilinos directory) AC_ARG_WITH(trilinos, - [ --with-trilinos=/path/to/trilinos - Specify the path to the Trilinos installation, of + [ --with-trilinos=/path/to/trilinos + Specify the path to the Trilinos installation, of which the include and lib directories are subdirs; use - this if you want to override the TRILINOS_DIR + this if you want to override the TRILINOS_DIR environment variable.], [ dnl Special case when someone does --with-petsc=no @@ -5899,7 +5936,7 @@ AC_DEFUN(DEAL_II_CONFIGURE_TRILINOS, dnl AC_MSG_ERROR([Path to Trilinos specified with --with-trilinos does not point to a complete Trilinos installation]) fi - + DEAL_II_TRILINOS_INCDIR="$DEAL_II_TRILINOS_DIR/include" DEAL_II_TRILINOS_LIBDIR="$DEAL_II_TRILINOS_DIR/lib" fi @@ -5929,8 +5966,8 @@ AC_DEFUN(DEAL_II_CONFIGURE_TRILINOS, dnl AC_MSG_CHECKING(for Trilinos header directory) AC_ARG_WITH(trilinos-include, - [ --with-trilinos-include=/path/to/trilinos - Specify the path to the Trilinos include; use this if + [ --with-trilinos-include=/path/to/trilinos + Specify the path to the Trilinos include; use this if you want to override the TRILINOS_INCDIR environment variable.], [ @@ -5978,9 +6015,9 @@ AC_DEFUN(DEAL_II_CONFIGURE_TRILINOS, dnl AC_MSG_CHECKING(for Trilinos library directory) AC_ARG_WITH(trilinos-libs, - [ --with-trilinos-libs=/path/to/trilinos + [ --with-trilinos-libs=/path/to/trilinos Specify the path to the Trilinos libraries; use this - if you want to override the TRILINOS_LIBDIR + if you want to override the TRILINOS_LIBDIR environment variable.], [ dnl Special case when someone does --with-petsc=no @@ -6025,7 +6062,7 @@ AC_DEFUN(DEAL_II_CONFIGURE_TRILINOS, dnl fi fi ]) - + dnl If we have found Trilinos, determine and set additional pieces of data if test "$USE_CONTRIB_TRILINOS" = "yes" ; then AC_DEFINE(DEAL_II_USE_TRILINOS, 1, @@ -6244,7 +6281,7 @@ AC_DEFUN(DEAL_II_CHECK_TRILINOS_HEADER_FILES, dnl dnl ------------------------------------------------------------ -dnl Check whether Metis is installed, and if so store the +dnl Check whether Metis is installed, and if so store the dnl respective links dnl dnl Usage: DEAL_II_CONFIGURE_METIS @@ -6255,8 +6292,8 @@ AC_DEFUN(DEAL_II_CONFIGURE_METIS, dnl dnl First check for the Metis directory AC_ARG_WITH(metis, - [ --with-metis=/path/to/metis - Specify the path to the Metis installation, of which + [ --with-metis=/path/to/metis + Specify the path to the Metis installation, of which the include and library directories are subdirs; use this if you want to override the METIS_DIR environment variable.], @@ -6270,7 +6307,7 @@ AC_DEFUN(DEAL_II_CONFIGURE_METIS, dnl AC_MSG_ERROR([Path to Metis specified with --with-metis does not point to a complete Metis installation]) fi - + DEAL_II_METIS_LIBDIR="$DEAL_II_METIS_DIR" ], [ @@ -6294,18 +6331,18 @@ AC_DEFUN(DEAL_II_CONFIGURE_METIS, dnl ]) AC_ARG_WITH(metis-include, - [ --with-metis-include=/path/to/metis + [ --with-metis-include=/path/to/metis Specify the path to the METIS headers file; use this if you want to override the METIS_INCLUDE_DIR environment variable.], [ AC_MSG_ERROR([The --with-metis-include directive is no longer supported]) ]) - + AC_ARG_WITH(metis-libs, - [ --with-metis-libs=/path/to/metis + [ --with-metis-libs=/path/to/metis Specify the path to the METIS libraries; use this if - you want to override the METIS_LIBDIR + you want to override the METIS_LIBDIR environment variable.], [ USE_CONTRIB_METIS=yes @@ -6340,7 +6377,7 @@ AC_DEFUN(DEAL_II_CONFIGURE_METIS, dnl fi fi ]) - + if test "x$USE_CONTRIB_METIS" = "xyes" ; then AC_DEFINE(DEAL_II_USE_METIS, 1, [Defined if a Metis installation was found and is going @@ -6360,10 +6397,10 @@ dnl -------------------------------------------------- AC_DEFUN(DEAL_II_WITH_UMFPACK, dnl [ AC_ARG_WITH(umfpack, - [ --with-umfpack=umfpack-root-directory - Use installed UMFPack version. - 'umfpack-root-directory' should be the directory - containing directories AMD and UMFPACK. The + [ --with-umfpack=umfpack-root-directory + Use installed UMFPack version. + 'umfpack-root-directory' should be the directory + containing directories AMD and UMFPACK. The contributed UMFPack library is used if no argument is given. Default is not to use UMFPack.], [ @@ -6385,17 +6422,17 @@ AC_DEFUN(DEAL_II_WITH_UMFPACK, dnl acx_umfpack=no AC_ARG_WITH(umfpack-include, - [ --with-umfpack-include=/path/to/UMFPACK + [ --with-umfpack-include=/path/to/UMFPACK Specify the path to the UMFPACK headers file; use this - if you want to override the UMFPACK_INCDIR + if you want to override the UMFPACK_INCDIR environment variable.], [ UMFPACK_INCDIR="$withval" acx_umfpack=yes ]) - + AC_ARG_WITH(umfpack-libs, - [ --with-umfpack-libs=/path/to/UMFPACK + [ --with-umfpack-libs=/path/to/UMFPACK Specify the path to the UMFPACK libraries; use this if you want to override the UMFPACK_LIBDIR environment variable.], @@ -6416,12 +6453,12 @@ AC_DEFUN(DEAL_II_WITH_UMFPACK, dnl dnl internal version, which we will first have to compile dnl before the libs are there) if test "x$DEAL_II_USE_INTERNAL_UMFPACK" != "xyes" ; then - dnl Try old naming scheme for umfpack/amd libraries (before + dnl Try old naming scheme for umfpack/amd libraries (before dnl Tim Davis incorporated everything into SuiteSparse) OLD_LDFLAGS="$LDFLAGS" LDFLAGS="-L${UMFPACK_DIR}/UMFPACK $LDFLAGS" AC_CHECK_LIB( - [umfpack], + [umfpack], [umfpack_di_defaults], [ DEAL_II_ADD_EXTERNAL_LIBS_AT_TAIL(-lumfpack) @@ -6433,7 +6470,7 @@ AC_DEFUN(DEAL_II_WITH_UMFPACK, dnl dnl Old naming scheme failed, try the new one LDFLAGS="-L${UMFPACK_DIR}/lib $OLD_LDFLAGS" AC_CHECK_LIB( - [umfpack], + [umfpack], [umfpack_di_defaults], [ DEAL_II_ADD_EXTERNAL_LIBS_AT_TAIL(-lumfpack) @@ -6447,13 +6484,13 @@ AC_DEFUN(DEAL_II_WITH_UMFPACK, dnl ) ] ) - + dnl Now do the same for amd. this one comes second since on the linker dnl line, -lumfpack has to preceded -lamd OLD_LDFLAGS="$LDFLAGS" LDFLAGS="-L${UMFPACK_DIR}/AMD/Lib $LDFLAGS" AC_CHECK_LIB( - [amd], + [amd], [amd_info], [ DEAL_II_ADD_EXTERNAL_LIBS_AT_TAIL(-lamd) @@ -6465,7 +6502,7 @@ AC_DEFUN(DEAL_II_WITH_UMFPACK, dnl dnl Old naming scheme failed, try the new one LDFLAGS="-L${UMFPACK_DIR}/lib $OLD_LDFLAGS" AC_CHECK_LIB( - [amd], + [amd], [amd_info], [ DEAL_II_ADD_EXTERNAL_LIBS_AT_TAIL(-lamd) @@ -6487,13 +6524,13 @@ AC_DEFUN(DEAL_II_WITH_UMFPACK, dnl [ UMFPACK_INCLUDE_DIR=-I${UMFPACK_DIR}/UMFPACK/Include ], - [ + [ AC_CHECK_FILE( [${UMFPACK_DIR}/include/suitesparse/umfpack.h], [ UMFPACK_INCLUDE_DIR=-I${UMFPACK_DIR}/include/suitesparse ], - [ + [ AC_MSG_ERROR(installation of UMFPACK could not be determined) ] ) @@ -6505,13 +6542,13 @@ AC_DEFUN(DEAL_II_WITH_UMFPACK, dnl [ UMFPACK_INCLUDE_DIR="${UMFPACK_INCLUDE_DIR} -I${UMFPACK_DIR}/AMD/Include" ], - [ + [ AC_CHECK_FILE( [${UMFPACK_DIR}/include/suitesparse/umfpack.h], [ UMFPACK_INCLUDE_DIR="${UMFPACK_INCLUDE_DIR} -I${UMFPACK_DIR}/include/suitesparse" ], - [ + [ AC_MSG_ERROR(installation of UMFPACK could not be determined) ] ) @@ -6527,7 +6564,7 @@ AC_DEFUN(DEAL_II_WITH_UMFPACK, dnl [ UMFPACK_INCLUDE_DIR="${UMFPACK_INCLUDE_DIR} -I${UMFPACK_DIR}/UFconfig" ], - [ + [ AC_MSG_ERROR(not found) ] ) @@ -6535,7 +6572,7 @@ AC_DEFUN(DEAL_II_WITH_UMFPACK, dnl else - if test "x$UMFPACK_INCDIR" != "x" ; then + if test "x$UMFPACK_INCDIR" != "x" ; then dnl Something has been passed to --with-umfpack-include UMFPACK_INCLUDE_DIR="-I${UMFPACK_INCDIR}" @@ -6544,18 +6581,18 @@ AC_DEFUN(DEAL_II_WITH_UMFPACK, dnl CXXFLAGS="-I$UMFPACK_INCDIR $CXXFLAGS" CPPFLAGS="-I$UMFPACK_INCDIR $CPPFLAGS" AC_CHECK_HEADER( - [umfpack.h], - [], + [umfpack.h], + [], [AC_MSG_ERROR(installation of UMFPACK could not be determined)] ) - AC_CHECK_HEADER([amd.h], [], + AC_CHECK_HEADER([amd.h], [], [AC_MSG_ERROR(installation of UMFPACK could not be determined)]) - AC_CHECK_HEADER([UFconfig.h], [], + AC_CHECK_HEADER([UFconfig.h], [], [AC_MSG_ERROR(installation of UMFPACK could not be determined)]) - if test "x$UMFPACK_LIBDIR" != "x" ; then + if test "x$UMFPACK_LIBDIR" != "x" ; then AC_CHECK_LIB( - [amd], + [amd], [amd_info], [ DEAL_II_ADD_EXTERNAL_LIBS_AT_TAIL(-lamd) @@ -6566,7 +6603,7 @@ AC_DEFUN(DEAL_II_WITH_UMFPACK, dnl [AC_MSG_ERROR(installation of AMD could not be determined)] ) AC_CHECK_LIB( - [umfpack], + [umfpack], [umfpack_di_defaults], [ DEAL_II_ADD_EXTERNAL_LIBS_AT_TAIL(-lumfpack) @@ -6578,7 +6615,7 @@ AC_DEFUN(DEAL_II_WITH_UMFPACK, dnl ) else AC_CHECK_LIB( - [amd], + [amd], [amd_info], [ DEAL_II_ADD_EXTERNAL_LIBS_AT_TAIL(-lamd) @@ -6586,7 +6623,7 @@ AC_DEFUN(DEAL_II_WITH_UMFPACK, dnl [AC_MSG_ERROR(installation of AMD could not be determined)] ) AC_CHECK_LIB( - [umfpack], + [umfpack], [umfpack_di_defaults], [ DEAL_II_ADD_EXTERNAL_LIBS_AT_TAIL(-lumfpack) @@ -6594,7 +6631,7 @@ AC_DEFUN(DEAL_II_WITH_UMFPACK, dnl [AC_MSG_ERROR(installation of UMFPACK could not be determined)] ) fi - fi + fi fi ]) @@ -6608,7 +6645,7 @@ AC_DEFUN(DEAL_II_WITH_LAPACK, dnl if test "x$1" != "xyes" ; then lapack="$1"; else lapack="lapack"; fi AC_CHECK_LIB($lapack, dgbsv_, [ DEAL_II_ADD_EXTERNAL_LIBS_AT_FRONT(-l$lapack) - AC_DEFINE([HAVE_LIBLAPACK], [1], + AC_DEFINE([HAVE_LIBLAPACK], [1], [Defined if deal.II was configured with LAPACK support]) ], [AC_MSG_ERROR([LAPACK library $lapack not found])] @@ -6670,11 +6707,11 @@ AC_DEFUN(DEAL_II_CHECK_BLAS_FRAMEWORK, dnl [ AC_LANG_PROGRAM([[extern "C" void daxpy(int,double,double*,int,double*,int);]], [[daxpy(0,0.,0,0,0,0);]]) ], - [ + [ AC_MSG_RESULT(yes) framework_works=yes ], - [ + [ AC_MSG_RESULT(no) ]) @@ -6686,11 +6723,11 @@ AC_DEFUN(DEAL_II_CHECK_BLAS_FRAMEWORK, dnl [ AC_LANG_PROGRAM([[extern "C" void daxpy(int,double,double*,int,double*,int);]], [[daxpy(0,0.,0,0,0,0);]]) ], - [ + [ AC_MSG_RESULT(yes) framework_works=yes ], - [ + [ AC_MSG_RESULT(no) ]) fi @@ -6706,26 +6743,26 @@ AC_DEFUN(DEAL_II_CHECK_BLAS_FRAMEWORK, dnl AC_DEFUN(DEAL_II_WITH_BLAS, dnl [ if test "x$1" != "xno" ; then - if test "x$1" != "xyes" ; then + if test "x$1" != "xyes" ; then blas="$1" AC_CHECK_LIB($blas, daxpy_, - [ + [ DEAL_II_ADD_EXTERNAL_LIBS_AT_FRONT(-l$blas) - AC_DEFINE([HAVE_LIBBLAS], [1], + AC_DEFINE([HAVE_LIBBLAS], [1], [Defined if deal.II was configured with BLAS support]) ],,$F77LIBS) AC_SUBST(NEEDS_F77LIBS, "yes") else DEAL_II_CHECK_BLAS_FRAMEWORK if test "x$framework_works" != "xyes"; then - blas="blas"; + blas="blas"; AC_CHECK_LIB($blas, daxpy_, - [ + [ DEAL_II_ADD_EXTERNAL_LIBS_AT_FRONT(-l$blas) - AC_DEFINE([HAVE_LIBBLAS], [1], + AC_DEFINE([HAVE_LIBBLAS], [1], [Defined if deal.II was configured with BLAS support]) ],,$F77LIBS) - + AC_SUBST(NEEDS_F77LIBS, "yes") fi fi diff --git a/deal.II/base/include/base/config.h.in b/deal.II/base/include/base/config.h.in index ce11c22bd7..4c9b5d5aa0 100644 --- a/deal.II/base/include/base/config.h.in +++ b/deal.II/base/include/base/config.h.in @@ -57,6 +57,10 @@ 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 using arrays as arguments in + functions */ +#undef DEAL_II_ARRAY_ARG_BUG + /* Defined if the compiler has a problem with assigning arrays in conditionals */ #undef DEAL_II_ARRAY_CONDITIONAL_DECAY_BUG diff --git a/deal.II/base/include/base/geometry_info.h b/deal.II/base/include/base/geometry_info.h index 8cf3f8a00e..8e821eba22 100644 --- a/deal.II/base/include/base/geometry_info.h +++ b/deal.II/base/include/base/geometry_info.h @@ -300,7 +300,7 @@ class RefinementCase : public RefinementPossibilities * explicit. */ explicit RefinementCase (const unsigned char refinement_case); - + /** * Return the numeric value * stored by this class. While @@ -335,7 +335,7 @@ class RefinementCase : public RefinementPossibilities * one given as argument. */ RefinementCase operator | (const RefinementCase &r) const; - + /** * Return the intersection of the * refinement flags represented @@ -373,7 +373,7 @@ class RefinementCase : public RefinementPossibilities */ static RefinementCase cut_axis (const unsigned int i); - + /** * Return the amount of memory * occupied by an object of this @@ -388,7 +388,7 @@ class RefinementCase : public RefinementPossibilities int, << "The refinement flags given (" << arg1 << ") contain set bits that do not " << "make sense for the space dimension of the object to which they are applied."); - + private: /** * Store the refinement case as a @@ -579,55 +579,55 @@ namespace internal | 0 | case_none | | *-------* - + *---*---* | | | | 0 | 1 | case_x | | | *---*---* - + *---*---* | 1 | | *---* 2 | case_x1y | 0 | | *---*---* - + *---*---* | | 2 | | 0 *---* case_x2y | | 1 | *---*---* - + *---*---* | 1 | 3 | *---*---* case_x1y2y (successive refinement: first cut_x, then cut_y for both children) | 0 | 2 | *---*---* - + *-------* | 1 | *-------* case_y | 0 | *-------* - + *-------* | 2 | *---*---* case_y1x | 0 | 1 | *---*---* - + *---*---* | 1 | 2 | *---*---* case_y2x | 0 | *-------* - + *---*---* | 2 | 3 | *---*---* case_y1x2x (successive refinement: first cut_y, then cut_x for both children) | 0 | 1 | *---+---* - + *---*---* | 2 | 3 | *---*---* case_xy (one isotropic refinement step) @@ -693,7 +693,7 @@ namespace internal * specified in the base class. */ SubfaceCase (const typename SubfacePossibilities::Possibilities subface_possibility); - + /** * Return the numeric value * stored by this class. While @@ -720,7 +720,7 @@ namespace internal * values (the array indices). */ operator unsigned char () const; - + /** * Return the amount of memory * occupied by an object of this @@ -735,7 +735,7 @@ namespace internal int, << "The subface case given (" << arg1 << ") does not make sense " << "for the space dimension of the object to which they are applied."); - + private: /** * Store the refinement case as a @@ -745,7 +745,7 @@ namespace internal */ unsigned char value : (dim == 3 ? 4 : 1); }; - + } // namespace internal @@ -776,7 +776,7 @@ template class GeometryInfo; * @author Wolfgang Bangerth, 1998 */ template <> -struct GeometryInfo<0> +struct GeometryInfo<0> { /** @@ -819,7 +819,7 @@ struct GeometryInfo<0> * is equal to one. */ static unsigned int n_children(const RefinementCase<0> &refinement_case); - + /** * Number of vertices a cell has. */ @@ -840,7 +840,7 @@ struct GeometryInfo<0> * Number of lines each face has. */ static const unsigned int lines_per_face = 0; - + /** * Number of quads on each face. */ @@ -891,7 +891,7 @@ struct GeometryInfo<0> * * *

Implementation conventions for two spatial dimensions

- * + * * From version 5.2 onwards deal.II is based on a numbering scheme * that uses a lexicographic ordering (with x running fastest) * wherever possible, hence trying to adopt a kind of 'canonical' @@ -910,7 +910,7 @@ struct GeometryInfo<0> * N3) the direction of a line is represented by the direction of * point 0 towards point 1 and is always in one of the coordinate * directions - * + * * N4) face lines in 3d are ordered, such that the induced 2d local * coordinate system (x,y) implies (right hand rule) a normal in * face normal direction, see N2/. @@ -926,7 +926,7 @@ struct GeometryInfo<0> * 0-->--1 * 2 * @endverbatim - * + * * Note that the orientation of lines has to be correct upon construction of a * grid; however, it is automatically preserved upon refinement. * @@ -957,7 +957,7 @@ struct GeometryInfo<0> * | 0-----1 * *------------>x * @endverbatim - * + * * Here, vertex 0 is the origin of the coordinate system, vertex 1 has * coordinates (1,0), vertex 2 at (0,1) and vertex 3 at * (1,1). The GeometryInfo::unit_cell_vertex() function can be @@ -992,13 +992,13 @@ struct GeometryInfo<0> * member functions and variables of the present class. * *

Vertices

- * + * * The ordering of vertices in 3d is defined by the same rules as in * the 2d case, i.e. * * N1) vertices are numbered in lexicographic ordering. * - * Hence, the vertices are numbered as follows + * Hence, the vertices are numbered as follows * @verbatim * 6-------7 6-------7 * /| | / /| @@ -1011,14 +1011,14 @@ struct GeometryInfo<0> * |/ / | |/ * 0-------1 0-------1 * @endverbatim - * + * * We note, that first the vertices on the bottom face (z=0) are numbered * exactly the same way as are the vertices on a quadrilateral. Then the * vertices on the top face (z=1) are numbered similarly by moving the bottom * face to the top. Again, the GeometryInfo::unit_cell_vertex() function * can be used to query this information at run-time. * - * + * *

Lines

* * Here, the same holds as for the vertices: @@ -1067,7 +1067,7 @@ struct GeometryInfo<0> * globally according to above convention. However, the GridReordering * class can do this for you, by reorienting cells and edges of an * arbitrary list of input cells that need not be already sorted. - * + * *

Faces

* * The numbering of faces in 3d is defined by a rule analogous to 2d: @@ -1113,7 +1113,7 @@ struct GeometryInfo<0> * |/ / | |/ * *-------* *-------* * @endverbatim - * + * *
  • Faces 2 and 3: * @verbatim * x Face 3 Face 2 @@ -1127,8 +1127,8 @@ struct GeometryInfo<0> * | / / 2 | / * |/ / | |/ * *-------* *---0---*y - * @endverbatim - * + * @endverbatim + * *
  • Faces 4 and 5: * @verbatim * Face 4 y Face 5 @@ -1390,7 +1390,7 @@ struct GeometryInfo<0> *
  • Vertex 7: (1,1,1). * * - * + * * * @note Instantiations for this template are provided for dimensions 1,2,3,4, * and there is a specialization for dim=0 (see the section on @ref @@ -1402,7 +1402,7 @@ struct GeometryInfo<0> template struct GeometryInfo { - + /** * Maximum number of children of * a refined cell, i.e. the @@ -1450,7 +1450,7 @@ struct GeometryInfo */ static const unsigned int lines_per_face = GeometryInfo::lines_per_cell; - + /** * Number of quads on each face. */ @@ -1555,7 +1555,7 @@ struct GeometryInfo * the vertex belongs */ static const unsigned int vertex_to_face[vertices_per_cell][dim]; - + /** * Return the number of children * of a cell (or face) refined @@ -1709,7 +1709,7 @@ struct GeometryInfo * In the case of anisotropically refined * cells and faces, the @p RefinementCase of * the face, face_ref_case, - * might have an influence on + * might have an influence on * which child is behind which given * subface, thus this is an additional * argument, defaulting to isotropic @@ -1725,7 +1725,7 @@ struct GeometryInfo const bool face_rotation = false, const RefinementCase &face_refinement_case = RefinementCase::isotropic_refinement); - + /** * Map line vertex number to cell * vertex number, i.e. give the @@ -1838,7 +1838,7 @@ struct GeometryInfo const bool face_orientation = true, const bool face_flip = false, const bool face_rotation = false); - + /** * Map the vertex index @p vertex of a face * with arbitrary @p face_orientation, @p @@ -1858,7 +1858,7 @@ struct GeometryInfo const bool face_orientation = true, const bool face_flip = false, const bool face_rotation = false); - + /** * Map the line index @p line of a face * in standard orientation to one of a face @@ -1878,7 +1878,7 @@ struct GeometryInfo const bool face_orientation = true, const bool face_flip = false, const bool face_rotation = false); - + /** * Map the line index @p line of a face * with arbitrary @p face_orientation, @p @@ -1898,7 +1898,7 @@ struct GeometryInfo const bool face_orientation = true, const bool face_flip = false, const bool face_rotation = false); - + /** * Return the position of the @p ith * vertex on the unit cell. The order of @@ -1973,7 +1973,7 @@ struct GeometryInfo static bool is_inside_unit_cell (const Point &p); - + /** * Return true if the given point * is inside the unit cell of the @@ -2042,7 +2042,7 @@ struct GeometryInfo Tensor<1,dim> d_linear_shape_function_gradient (const Point &xi, const unsigned int i); - + /** * For a (bi-, tri-)linear * mapping from the reference @@ -2142,9 +2142,16 @@ struct GeometryInfo template static void - alternating_form_at_vertices (const Point (&vertices)[vertices_per_cell], - Tensor (&forms)[vertices_per_cell]); - + alternating_form_at_vertices +#ifndef DEAL_II_ARRAY_ARG_BUG + (const Point (&vertices)[vertices_per_cell], + Tensor (&forms)[vertices_per_cell]) +#else + (const Point *vertices, + Tensor *forms) +#endif + ; + /** * For each face of the reference * cell, this field stores the @@ -2214,7 +2221,7 @@ struct GeometryInfo double, << "The coordinates must satisfy 0 <= x_i <= 1, " << "but here we have x_i=" << arg1); - + /** * Exception */ @@ -2292,18 +2299,18 @@ namespace internal : value (subface_possibility) {} - - + + template inline SubfaceCase::operator unsigned char () const { return value; } - - + + } // namespace internal - + template inline @@ -2490,7 +2497,7 @@ GeometryInfo::unit_cell_vertex (const unsigned int) { Assert(false, ExcNotImplemented()); - return Point (); + return Point (); } @@ -2501,7 +2508,7 @@ unsigned int GeometryInfo<1>::child_cell_from_point (const Point<1> &p) { Assert ((p[0] >= 0) && (p[0] <= 1), ExcInvalidCoordinate(p[0])); - + return (p[0] <= 0.5 ? 0 : 1); } @@ -2514,7 +2521,7 @@ GeometryInfo<2>::child_cell_from_point (const Point<2> &p) { Assert ((p[0] >= 0) && (p[0] <= 1), ExcInvalidCoordinate(p[0])); Assert ((p[1] >= 0) && (p[1] <= 1), ExcInvalidCoordinate(p[1])); - + return (p[0] <= 0.5 ? (p[1] <= 0.5 ? 0 : 2) : (p[1] <= 0.5 ? 1 : 3)); @@ -2530,7 +2537,7 @@ GeometryInfo<3>::child_cell_from_point (const Point<3> &p) Assert ((p[0] >= 0) && (p[0] <= 1), ExcInvalidCoordinate(p[0])); Assert ((p[1] >= 0) && (p[1] <= 1), ExcInvalidCoordinate(p[1])); Assert ((p[2] >= 0) && (p[2] <= 1), ExcInvalidCoordinate(p[2])); - + return (p[0] <= 0.5 ? (p[1] <= 0.5 ? (p[2] <= 0.5 ? 0 : 4) : diff --git a/deal.II/base/source/geometry_info.cc b/deal.II/base/source/geometry_info.cc index 405469429d..d74c97cdf7 100644 --- a/deal.II/base/source/geometry_info.cc +++ b/deal.II/base/source/geometry_info.cc @@ -40,15 +40,15 @@ template const unsigned int GeometryInfo::hexes_per_cell; using namespace numbers; -// make sure that also the icc compiler defines (and not only declares) +// make sure that also the icc compiler defines (and not only declares) // these variables namespace internal { void foo (const unsigned int *) {} template - void define_variables () - { + void define_variables () + { foo(&::dealii::GeometryInfo::vertices_per_cell); } @@ -284,7 +284,7 @@ GeometryInfo<1>::subface_ratio(const internal::SubfaceCase<1> &, return 1; } - + template<> double GeometryInfo<2>::subface_ratio(const internal::SubfaceCase<2> &subface_case, @@ -322,7 +322,7 @@ GeometryInfo<2>::subface_ratio(const internal::SubfaceCase<2> &subface_case, Assert(false, ExcInternalError()); break; } - + return ratio; } @@ -381,7 +381,7 @@ GeometryInfo<3>::subface_ratio(const internal::SubfaceCase<3> &subface_case, Assert(false, ExcInternalError()); break; } - + return ratio; } @@ -419,17 +419,17 @@ GeometryInfo<2>::face_refinement_case(const RefinementCase<2> &cell_refinement_c ref_cases[RefinementCase::isotropic_refinement+1][GeometryInfo::faces_per_cell/2]= {{RefinementCase::no_refinement, // no_refinement RefinementCase::no_refinement}, - + {RefinementCase::no_refinement, RefinementCase::cut_x}, - + {RefinementCase::cut_x, RefinementCase::no_refinement}, - + {RefinementCase::cut_x, // cut_xy - RefinementCase::cut_x} + RefinementCase::cut_x} }; - + return ref_cases[cell_refinement_case][face_no/2]; } @@ -453,23 +453,23 @@ GeometryInfo<3>::face_refinement_case(const RefinementCase<3> &cell_refinement_c {{RefinementCase::no_refinement, // no_refinement RefinementCase::no_refinement, RefinementCase::no_refinement}, - + {RefinementCase::no_refinement, // cut_x RefinementCase::cut_y, RefinementCase::cut_x}, - + {RefinementCase::cut_x, // cut_y RefinementCase::no_refinement, RefinementCase::cut_y}, - + {RefinementCase::cut_x, // cut_xy RefinementCase::cut_y, RefinementCase::cut_xy}, - + {RefinementCase::cut_y, // cut_z RefinementCase::cut_x, RefinementCase::no_refinement}, - + {RefinementCase::cut_y, // cut_xz RefinementCase::cut_xy, RefinementCase::cut_x}, @@ -480,17 +480,17 @@ GeometryInfo<3>::face_refinement_case(const RefinementCase<3> &cell_refinement_c {RefinementCase::cut_xy, // cut_xyz RefinementCase::cut_xy, - RefinementCase::cut_xy}, + RefinementCase::cut_xy}, }; const RefinementCase ref_case=ref_cases[cell_refinement_case][face_no/2]; - + static const RefinementCase flip[4]= {RefinementCase::no_refinement, RefinementCase::cut_y, RefinementCase::cut_x, RefinementCase::cut_xy}; - + // correct the ref_case for face_orientation // and face_rotation. for face_orientation, // 'true' is the default value whereas for @@ -518,7 +518,7 @@ GeometryInfo<1>::line_refinement_case(const RefinementCase<1> &cell_refinement_c ExcIndexRange(cell_refinement_case, 0, RefinementCase::isotropic_refinement+1)); Assert(line_no::lines_per_cell, ExcIndexRange(line_no, 0, GeometryInfo::lines_per_cell)); - + return cell_refinement_case; } @@ -528,7 +528,7 @@ RefinementCase<1> GeometryInfo<2>::line_refinement_case(const RefinementCase<2> &cell_refinement_case, const unsigned int line_no) { - // Assertions are in face_refinement_case() + // Assertions are in face_refinement_case() return face_refinement_case(cell_refinement_case, line_no); } @@ -560,7 +560,7 @@ GeometryInfo<3>::line_refinement_case(const RefinementCase<3> &cell_refinement_c // 0->x, 1->y, 2->z static const unsigned int direction[lines_per_cell]= {1,1,0,0,1,1,0,0,2,2,2,2}; - + return ((cell_refinement_case & cut_one[direction[line_no]]) ? RefinementCase<1>::cut_x : RefinementCase<1>::no_refinement); } @@ -577,7 +577,7 @@ GeometryInfo<1>::min_cell_refinement_case_for_face_refinement(const RefinementCa { const unsigned int dim = 1; Assert(false, ExcImpossibleInDim(dim)); - + return RefinementCase::no_refinement; } @@ -643,12 +643,12 @@ GeometryInfo<3>::min_cell_refinement_case_for_face_refinement(const RefinementCa RefinementCase::cut_y, // cut_x in face 0 means cut_y for the cell RefinementCase::cut_z, RefinementCase::cut_yz}, - + {RefinementCase::no_refinement, // faces 2 and 3 (note that x and y are "exchanged on faces 2 and 3") RefinementCase::cut_z, RefinementCase::cut_x, RefinementCase::cut_xz}, - + {RefinementCase::no_refinement, // faces 4 and 5 RefinementCase::cut_x, RefinementCase::cut_y, @@ -664,7 +664,7 @@ RefinementCase<1> GeometryInfo<1>::min_cell_refinement_case_for_line_refinement(const unsigned int line_no) { Assert(line_no==0, ExcIndexRange(line_no,0,1)); - + return RefinementCase<1>::cut_x; } @@ -729,7 +729,7 @@ GeometryInfo<3>::standard_to_real_face_vertex(const unsigned int vertex, // // forth index: face_rotation: 0: standard, // 1: face rotated by 90 degrees - + static const unsigned int vertex_translation[4][2][2][2] = { { { { 0, 2 }, // vertex 0, face_orientation=false, face_flip=false, face_rotation=false and true { 3, 1 }}, // vertex 0, face_orientation=false, face_flip=true, face_rotation=false and true @@ -798,7 +798,7 @@ GeometryInfo<3>::real_to_standard_face_vertex(const unsigned int vertex, // // forth index: face_rotation: 0: standard, // 1: face rotated by 90 degrees - + static const unsigned int vertex_translation[4][2][2][2] = { { { { 0, 2 }, // vertex 0, face_orientation=false, face_flip=false, face_rotation=false and true { 3, 1 }}, // vertex 0, face_orientation=false, face_flip=true, face_rotation=false and true @@ -850,7 +850,7 @@ GeometryInfo<3>::standard_to_real_face_line(const unsigned int line, Assert(line::lines_per_face, ExcIndexRange(line,0,GeometryInfo<3>::lines_per_face)); - + // make sure we handle // non-standard faces correctly // @@ -867,7 +867,7 @@ GeometryInfo<3>::standard_to_real_face_line(const unsigned int line, // // forth index: face_rotation: 0: standard, // 1: face rotated by 90 degrees - + static const unsigned int line_translation[4][2][2][2] = { { { { 2, 0 }, // line 0, face_orientation=false, face_flip=false, face_rotation=false and true { 3, 1 }}, // line 0, face_orientation=false, face_flip=true, face_rotation=false and true @@ -917,7 +917,7 @@ GeometryInfo<3>::real_to_standard_face_line(const unsigned int line, Assert(line::lines_per_face, ExcIndexRange(line,0,GeometryInfo<3>::lines_per_face)); - + // make sure we handle // non-standard faces correctly // @@ -934,7 +934,7 @@ GeometryInfo<3>::real_to_standard_face_line(const unsigned int line, // // forth index: face_rotation: 0: standard, // 1: face rotated by 90 degrees - + static const unsigned int line_translation[4][2][2][2] = { { { { 2, 0 }, // line 0, face_orientation=false, face_flip=false, face_rotation=false and true { 3, 1 }}, // line 0, face_orientation=false, face_flip=true, face_rotation=false and true @@ -1015,7 +1015,7 @@ GeometryInfo<2>::child_cell_on_face (const RefinementCase<2> &ref_case, {{{0,0},{1,1},{0,1},{0,1}}, // cut_x {{0,1},{0,1},{0,0},{1,1}}, // cut_y {{0,2},{1,3},{0,1},{2,3}}}; // cut_xy - + return subcells[ref_case-1][face][subface]; } @@ -1051,7 +1051,7 @@ GeometryInfo<3>::child_cell_on_face (const RefinementCase<3> &ref_case, // orientation, flip and rotation of the face // is quite complicated. thus, we break it // down into several steps. - + // first step: convert the given face refine // case to a face refine case concerning the // face in standard orientation (, flip and @@ -1086,7 +1086,7 @@ GeometryInfo<3>::child_cell_on_face (const RefinementCase<3> &ref_case, // no_refinement (subface 0 stays 0, // all others are invalid) {{{{0,e,e,e}, - {0,e,e,e}}, + {0,e,e,e}}, {{0,e,e,e}, {0,e,e,e}}}, {{{0,e,e,e}, @@ -1107,7 +1107,7 @@ GeometryInfo<3>::child_cell_on_face (const RefinementCase<3> &ref_case, // conversion to a 'standard face // refine case') {{{{0,1,e,e}, - {0,1,e,e}}, + {0,1,e,e}}, {{1,0,e,e}, {1,0,e,e}}}, {{{0,1,e,e}, @@ -1117,7 +1117,7 @@ GeometryInfo<3>::child_cell_on_face (const RefinementCase<3> &ref_case, // cut_y (the same applies as for // cut_x) {{{{0,1,e,e}, - {1,0,e,e}}, + {1,0,e,e}}, {{1,0,e,e}, {0,1,e,e}}}, {{{0,1,e,e}, @@ -1163,13 +1163,13 @@ GeometryInfo<3>::child_cell_on_face (const RefinementCase<3> &ref_case, {0, 1, 0, 1}, // face 4, subfaces 0,1,2,3 {0, 1, 0, 1}}, // face 5, subfaces 0,1,2,3 // cut_y - {{0, 1, 0, 1}, + {{0, 1, 0, 1}, {0, 1, 0, 1}, {0, 0, 0, 0}, {1, 1, 1, 1}, {0, 0, 1, 1}, {0, 0, 1, 1}}, - // cut_xy + // cut_xy {{0, 2, 0, 2}, {1, 3, 1, 3}, {0, 0, 1, 1}, @@ -1294,8 +1294,8 @@ GeometryInfo<3>::line_to_cell_vertices (const unsigned int line, const unsigned int vertex) { Assert (line::face_to_cell_lines (const unsigned int face, { Assert (face+1::distance_to_unit_cell (const Point &p) { double result = 0.0; - + for(unsigned i=0; i result) result = -p[i]; @@ -1445,7 +1445,7 @@ d_linear_shape_function (const Point &xi, { Assert (i < GeometryInfo::vertices_per_cell, ExcIndexRange (i, 0, GeometryInfo::vertices_per_cell)); - + switch (dim) { case 1: @@ -1459,7 +1459,7 @@ d_linear_shape_function (const Point &xi, return x; } } - + case 2: { const double x = xi[0]; @@ -1519,7 +1519,7 @@ d_linear_shape_function_gradient (const Point<1> &, { Assert (i < GeometryInfo<1>::vertices_per_cell, ExcIndexRange (i, 0, GeometryInfo<1>::vertices_per_cell)); - + switch (i) { case 0: @@ -1541,7 +1541,7 @@ d_linear_shape_function_gradient (const Point<2> &xi, { Assert (i < GeometryInfo<2>::vertices_per_cell, ExcIndexRange (i, 0, GeometryInfo<2>::vertices_per_cell)); - + const double x = xi[0]; const double y = xi[1]; switch (i) @@ -1568,7 +1568,7 @@ d_linear_shape_function_gradient (const Point<3> &xi, { Assert (i < GeometryInfo<3>::vertices_per_cell, ExcIndexRange (i, 0, GeometryInfo<3>::vertices_per_cell)); - + const double x = xi[0]; const double y = xi[1]; const double z = xi[2]; @@ -1640,7 +1640,7 @@ namespace internal Tensor<1,2> result; result[0] = derivative[0][1]; result[1] = -derivative[0][0]; - + return result; } @@ -1680,8 +1680,14 @@ template template void GeometryInfo:: -alternating_form_at_vertices (const Point (&vertices)[vertices_per_cell], - Tensor (&forms)[vertices_per_cell]) +alternating_form_at_vertices +#ifndef DEAL_II_ARRAY_ARG_BUG + (const Point (&vertices)[vertices_per_cell], + Tensor (&forms)[vertices_per_cell]) +#else + (const Point *vertices, + Tensor *forms) +#endif { // for each of the vertices, // compute the alternating form @@ -1715,7 +1721,7 @@ alternating_form_at_vertices (const Point (&vertices)[vertices_per_cel for (unsigned int i=0; i derivatives[dim]; - + for (unsigned int j=0; j grad_phi_j @@ -1738,33 +1744,68 @@ template class GeometryInfo<4>; template void GeometryInfo<1>:: -alternating_form_at_vertices (const Point<1> (&vertices)[vertices_per_cell], - Tensor<1-1,1> (&forms)[vertices_per_cell]); +alternating_form_at_vertices +#ifndef DEAL_II_ARRAY_ARG_BUG +(const Point<1> (&vertices)[vertices_per_cell], + Tensor<1-1,1> (&forms)[vertices_per_cell]) +#else + (const Point<1> *vertices, + Tensor<1-1,1> *forms) +#endif + ; template void GeometryInfo<1>:: -alternating_form_at_vertices (const Point<2> (&vertices)[vertices_per_cell], - Tensor<2-1,2> (&forms)[vertices_per_cell]); +alternating_form_at_vertices +#ifndef DEAL_II_ARRAY_ARG_BUG +(const Point<2> (&vertices)[vertices_per_cell], + Tensor<2-1,2> (&forms)[vertices_per_cell]) +#else + (const Point<2> *vertices, + Tensor<2-1,2> *forms) +#endif + ; template void GeometryInfo<2>:: -alternating_form_at_vertices (const Point<2> (&vertices)[vertices_per_cell], - Tensor<2-2,2> (&forms)[vertices_per_cell]); +alternating_form_at_vertices +#ifndef DEAL_II_ARRAY_ARG_BUG +(const Point<2> (&vertices)[vertices_per_cell], + Tensor<2-2,2> (&forms)[vertices_per_cell]) +#else + (const Point<2> *vertices, + Tensor<2-2,2> *forms) +#endif + ; template void GeometryInfo<2>:: -alternating_form_at_vertices (const Point<3> (&vertices)[vertices_per_cell], - Tensor<3-2,3> (&forms)[vertices_per_cell]); +alternating_form_at_vertices +#ifndef DEAL_II_ARRAY_ARG_BUG +(const Point<3> (&vertices)[vertices_per_cell], + Tensor<3-2,3> (&forms)[vertices_per_cell]) +#else +(const Point<3> *vertices, + Tensor<3-2,3> *forms) +#endif + ; + template void GeometryInfo<3>:: -alternating_form_at_vertices (const Point<3> (&vertices)[vertices_per_cell], - Tensor<3-3,3> (&forms)[vertices_per_cell]); - +alternating_form_at_vertices +#ifndef DEAL_II_ARRAY_ARG_BUG +(const Point<3> (&vertices)[vertices_per_cell], + Tensor<3-3,3> (&forms)[vertices_per_cell]) +#else +(const Point<3> *vertices, + Tensor<3-3,3> *forms) +#endif + ; DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/configure b/deal.II/configure index bab1d145b2..9d9912ec41 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 19028 . +# From configure.in Revision: 19175 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for deal.II 6.3.pre. # @@ -8015,6 +8015,77 @@ cat >>confdefs.h <<\_ACEOF _ACEOF +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + { echo "$as_me:$LINENO: checking for array argument bug" >&5 +echo $ECHO_N "checking for array argument bug... $ECHO_C" >&6; } + ac_ext=cpp +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="-W -Wall -Werror" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + template struct X { + static const unsigned int N = 1< void X::f(int (&)[N]) {} + +int +main () +{ + + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; 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_ARRAY_ARG_BUG 1 +_ACEOF + + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext diff --git a/deal.II/configure.in b/deal.II/configure.in index 96c93d3f85..8b2f316c64 100644 --- a/deal.II/configure.in +++ b/deal.II/configure.in @@ -19,7 +19,7 @@ dnl ------------------------------------------------------------- dnl switch off caching, since that leads to insurmountable trouble if dnl you call ./configure subsequently on different systems without -dnl clearing the cache +dnl clearing the cache define([AC_CACHE_LOAD], )dnl define([AC_CACHE_SAVE], )dnl @@ -50,9 +50,9 @@ DEAL_II_PATH=`pwd` dnl Split version number in major and minor DEAL_II_MAJOR=`echo $PACKAGE_VERSION | perl -pi -e 's/^(\d+)\..*/$1/;'` DEAL_II_MINOR=`echo $PACKAGE_VERSION | perl -pi -e 's/^\d+\.(\d+).*/$1/;'` -AC_DEFINE_UNQUOTED(DEAL_II_MAJOR, $DEAL_II_MAJOR, +AC_DEFINE_UNQUOTED(DEAL_II_MAJOR, $DEAL_II_MAJOR, [Major version number of deal.II]) -AC_DEFINE_UNQUOTED(DEAL_II_MINOR, $DEAL_II_MINOR, +AC_DEFINE_UNQUOTED(DEAL_II_MINOR, $DEAL_II_MINOR, [Minor version number of deal.II]) AC_DEFINE_UNQUOTED(DEAL_II_PATH, "$DEAL_II_PATH", [Path to the deal.II directory]) @@ -87,7 +87,7 @@ dnl Find a C compiler. This modifies the variable CC. dnl In order to get the absolute path of the compiler, use the dnl second line dnl -dnl Likewise, find the right C++ compiler. Note that for historical +dnl Likewise, find the right C++ compiler. Note that for historical dnl reasons, the compiler name and version is in the name GXX_VERSION, dnl even if the compiler is not GCC. dnl @@ -102,7 +102,7 @@ DEAL_II_PATH_PROG(CC,$CC) OLDCXXFLAGS="$CXXFLAGS" AC_PROG_CXX CXXFLAGS="$OLDCXXFLAGS" -DEAL_II_PATH_PROG(CXX,$CXX) +DEAL_II_PATH_PROG(CXX,$CXX) dnl Next determine which C++ compiler we have here and set compilation dnl flags accordingly. Note that for historical reasons the name and @@ -155,14 +155,14 @@ dnl Kludges and C++ compatibility dnl -------------------------------------------------------------- dnl Various kludges for various systems: some systems need special -dnl treatment for some things. Since they sometimes depend on +dnl treatment for some things. Since they sometimes depend on dnl whether other flags are set (e.g. the need for defining dnl -D__EXTENSIONS__ depends on whether we use/not use threading dnl options), this is done after checking for multithreading -DEAL_II_CHECK_ASSERT_THROW(debug, $CXXFLAGSG, +DEAL_II_CHECK_ASSERT_THROW(debug, $CXXFLAGSG, [CXXFLAGSG="-DDISABLE_ASSERT_THROW $CXXFLAGSG"]) -DEAL_II_CHECK_ASSERT_THROW(optimized, $CXXFLAGSO, +DEAL_II_CHECK_ASSERT_THROW(optimized, $CXXFLAGSO, [CXXFLAGSO="-DDISABLE_ASSERT_THROW $CXXFLAGSO"]) DEAL_II_CHECK_LOCAL_TYPEDEF_COMP DEAL_II_CHECK_TEMPLATE_SPEC_ACCESS @@ -186,6 +186,7 @@ DEAL_II_CHECK_WEAK_LINKAGE_BUG DEAL_II_CHECK_SFINAE_BUG DEAL_II_CHECK_TEMPL_OP_DISAMBIGUATION_BUG DEAL_II_CHECK_ARRAY_CONDITIONAL_DECAY_BUG +DEAL_II_CHECK_ARRAY_ARG_BUG DEAL_II_CHECK_EXPLICIT_CONSTRUCTOR_BUG DEAL_II_CHECK_CONST_MEMBER_DEDUCTION_BUG DEAL_II_CHECK_TYPE_QUALIFIER_BUG @@ -271,16 +272,16 @@ AC_ARG_ENABLE(shared, enableshared="$enableval", enableshared=yes) -dnl On AIX 4.x and alpha, shared libs don't work for us at present, so +dnl On AIX 4.x and alpha, shared libs don't work for us at present, so dnl disable them (we should probably use libtool there). Likewise on dnl a few other systems. dnl -dnl For Cygwin Windows systems, the shared library suffix becomes ".dll", +dnl For Cygwin Windows systems, the shared library suffix becomes ".dll", dnl on Mac OS X it is .dylib. case "$target" in *-aix4* | alpha*-linux* | alpha*-osf[45]* | hppa64-unknown-linux-gnu ) AC_MSG_WARN(Shared libraries not supported on $target. Using static libs instead) - enableshared=no + enableshared=no ;; *cygwin ) shared_lib_suffix=".dll" @@ -294,7 +295,7 @@ case "$target" in shared_lib_suffix=".so" static_lib_suffix=".a" ;; -esac +esac if test "x$enableshared" = "xyes" ; then CFLAGS="$CFLAGS $CFLAGSPIC" @@ -325,7 +326,7 @@ AC_SUBST(static_lib_suffix) AC_SUBST(shared_lib_suffix) dnl Also look for RANLIB, since some rather old systems (ah, and MAC OS X!) -dnl still require it for statically linked libraries. On other systems, +dnl still require it for statically linked libraries. On other systems, dnl RANLIB is not available, so skip the second check that tries to get dnl the full path for the executable that was found in the first one. dnl We also check for AR, since on some systems we will want to pass different @@ -489,7 +490,7 @@ dnl ------------------------------------------------------------- dnl Check for blas. AC_ARG_WITH(blas, [ --with-blas=blaslib Use the blas library blaslib. Make sure the path - to the libary is searched by ld, since it is + to the libary is searched by ld, since it is included by the argument -lblaslib. If no argument is given, use -lblas. Default is to use -lblas only if required by other libraries.], @@ -519,9 +520,9 @@ if test "x$with_zlib" = "x" ; then fi AC_ARG_WITH(zlib, - [ --with-zlib=zlib Use the compression library zlib for gzipped - input and output and link it with -lzlib (the - default is -lz). Make sure the library is in the + [ --with-zlib=zlib Use the compression library zlib for gzipped + input and output and link it with -lzlib (the + default is -lz). Make sure the library is in the search path of ld], DEAL_II_WITH_ZLIB($withval)) @@ -543,12 +544,12 @@ AC_SUBST(USE_CONTRIB_UMFPACK) dnl Check for LAPACK AC_ARG_WITH(lapack, - [ --with-lapack=lapacklib Use the lapack library lapacklib. Make sure the - path to the libary is searched by ld, since it is + [ --with-lapack=lapacklib Use the lapack library lapacklib. Make sure the + path to the libary is searched by ld, since it is included by the argument -llapacklib. If no argument - is given, use -llapack. Default is not to use + is given, use -llapack. Default is not to use -llapack.], - + DEAL_II_WITH_LAPACK($withval)) dnl Finally check if BLAS is really there. We have to do it this way, since @@ -704,11 +705,11 @@ AC_SUBST(LDFLAGSPIC) dnl Write output to the global options file and modify other files as well dnl that need some information -process_files="common/Make.global_options - common/Makefile.template +process_files="common/Make.global_options + common/Makefile.template common/scripts/make_dependencies.pl Version - doc/Makefile + doc/Makefile doc/doxygen/Makefile doc/doxygen/options.dox doc/doxygen/options.136