From dc4ed75f6e8cc87929c5feec09dad1800047325b Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 8 Apr 2009 12:18:46 +0000 Subject: [PATCH] Detect gcc 4.5. git-svn-id: https://svn.dealii.org/trunk@18566 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/aclocal.m4 | 13 ++ deal.II/configure | 300 ++++++++++++++++++++++++++------------------- 2 files changed, 186 insertions(+), 127 deletions(-) diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index 76225db0bc..7b99f54de5 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -226,6 +226,15 @@ AC_DEFUN(DEAL_II_DETERMINE_CXX_BRAND, dnl *) GXX_VERSION_DETAILED=gcc4.4.x ;; esac ;; + *version\ 4.5*) + GXX_VERSION=gcc4.5 + case "$GXX_VERSION_STRING" in + *version\ 4.5.0*) GXX_VERSION_DETAILED=gcc4.5.0 ;; + *version\ 4.5.1*) GXX_VERSION_DETAILED=gcc4.5.1 ;; + *version\ 4.5.2*) GXX_VERSION_DETAILED=gcc4.5.2 ;; + *) GXX_VERSION_DETAILED=gcc4.5.x ;; + esac + ;; *2.4* | *2.5* | *2.6* | *2.7* | *2.8*) dnl These compilers are too old to support a useful subset dnl of modern C++, so we don't support them @@ -1282,6 +1291,10 @@ AC_DEFUN(DEAL_II_DETERMINE_CC_BRAND, dnl AC_MSG_RESULT(C compiler is gcc-4.4) CC_VERSION=gcc4.4 ;; + *version\ 4.5*) + AC_MSG_RESULT(C compiler is gcc-4.5) + CC_VERSION=gcc4.5 + ;; *2.4* | *2.5* | *2.6* | *2.7* | *2.8*) AC_MSG_RESULT(C compiler is $CC_VERSION_STRING) AC_MSG_ERROR(C compiler is not supported) diff --git a/deal.II/configure b/deal.II/configure index 783843e852..b525461e7b 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 18282 . +# From configure.in Revision: 18546 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for deal.II 6.2.pre. # @@ -1347,95 +1347,115 @@ if test -n "$ac_init_help"; then Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-multithreading set compiler flags to allow for - multithreaded programs - --enable-shared set compiler flags to generate shared libraries + --enable-multithreading Set compiler flags to allow for multithreaded + programs + --enable-shared Set compiler flags to generate shared libraries --enable-parser While switched on by default, this option allows to switch off support for the function parser in the contrib directory. - --enable-compat-blocker=mapping block functions that implicitely - assume a Q1 mapping + --enable-compat-blocker=mapping + Block functions that implicitely assume a Q1 mapping Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-multithreading=name If name==posix, or no name given, then use - POSIX threads. - --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. - --with-petsc=/path/to/petsc Specify the path to the PETSc installation, - of which the include and library directories - are subdirs; use this if you want to override - the PETSC_DIR environment variable. - --with-petsc-arch=architecture Specify the architecture for your PETSc - installation; use this if you want to override - the PETSC_ARCH environment variable. - --with-slepc=/path/to/slepc Specify the path to the SLEPc installation, - of which the include and library directories - are subdirs; use this if you want to override - the SLEPC_DIR environment variable. - --with-slepc-arch=architecture Specify the architecture for your SLEPc - installation; use this if you want to override - the SLEPC_ARCH environment variable. - --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 environment variable. - --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. - --with-trilinos-libs=/path/to/trilinos Specify the path to the Trilinos libraries; - use this if you want to override - the TRILINOS_LIBDIR environment variable. - --with-blas=blaslib use the blas library blaslib. Make sure - the path 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. - --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. - --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 environment variable. - --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. - --with-netcdf-libs=/path/to/netcdf Specify the path to the NetCDF libraries; - use this if you want to override the - NETCDF_LIBDIR environment variable. - --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. - --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. - --with-metis-libs=/path/to/metis Specify the path to the METIS libraries; - use this if you want to override the - METIS_LIBDIR environment variable. - --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. - --with-umfpack-include=/path/to/UMFPACK Specify the path to the UMFPACK headers file; - use this if you want to override the - UMFPACK_INCDIR environment variable. - --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. - --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 -llapack. + --with-multithreading=name + If name==posix, or no name given, then use POSIX + threads. + --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. + --with-petsc=/path/to/petsc + Specify the path to the PETSc installation, of which + the include and library directories are subdirs; use + this if you want to override the PETSC_DIR environment + variable. + --with-petsc-arch=architecture + Specify the architecture for your PETSc installation; + use this if you want to override the PETSC_ARCH + environment variable. + --with-slepc=/path/to/slepc + Specify the path to the SLEPc installation, for which + the include directory is a subdir; use this if you + want to override the SLEPC_DIR environment variable. + --with-slepc-arch=architecture + Specify the architecture for your SLEPc installation; + use this if you want to override the SLEPC_ARCH + environment variable. + --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 + environment variable. + --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. + --with-trilinos-libs=/path/to/trilinos + Specify the path to the Trilinos libraries; use this + if you want to override the TRILINOS_LIBDIR + environment variable. + --with-blas=blaslib Use the blas library blaslib. Make sure the path + 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. + --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 + --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 + environment variable. + --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. + --with-netcdf-libs=/path/to/netcdf + Specify the path to the NetCDF libraries; use this if + you want to override the NETCDF_LIBDIR environment + variable. + --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. + --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. + --with-metis-libs=/path/to/metis + Specify the path to the METIS libraries; use this if + you want to override the METIS_LIBDIR + environment variable. + --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. + --with-umfpack-include=/path/to/UMFPACK + Specify the path to the UMFPACK headers file; use this + if you want to override the UMFPACK_INCDIR + environment variable. + --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. + --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 + -llapack. --with-cpu=cpu Optimize specifically for the given CPU type, - rather than just generating code for this - processor family. - --with-doxygen=filename use 'filename' for doxygen + rather than just generating code for this processor + family. + --with-doxygen=filename Use 'filename' for doxygen. + Some influential environment variables: CC C compiler command @@ -3629,6 +3649,15 @@ echo "${ECHO_T}C++ compiler is gcc-2.97" >&6; } *) GXX_VERSION_DETAILED=gcc4.4.x ;; esac ;; + *version\ 4.5*) + GXX_VERSION=gcc4.5 + case "$GXX_VERSION_STRING" in + *version\ 4.5.0*) GXX_VERSION_DETAILED=gcc4.5.0 ;; + *version\ 4.5.1*) GXX_VERSION_DETAILED=gcc4.5.1 ;; + *version\ 4.5.2*) GXX_VERSION_DETAILED=gcc4.5.2 ;; + *) GXX_VERSION_DETAILED=gcc4.5.x ;; + esac + ;; *2.4* | *2.5* | *2.6* | *2.7* | *2.8*) { echo "$as_me:$LINENO: result: C++ compiler is $GXX_VERSION_STRING" >&5 echo "${ECHO_T}C++ compiler is $GXX_VERSION_STRING" >&6; } @@ -5200,6 +5229,11 @@ echo "${ECHO_T}C compiler is gcc-4.3" >&6; } echo "${ECHO_T}C compiler is gcc-4.4" >&6; } CC_VERSION=gcc4.4 ;; + *version\ 4.5*) + { echo "$as_me:$LINENO: result: C compiler is gcc-4.5" >&5 +echo "${ECHO_T}C compiler is gcc-4.5" >&6; } + CC_VERSION=gcc4.5 + ;; *2.4* | *2.5* | *2.6* | *2.7* | *2.8*) { echo "$as_me:$LINENO: result: C compiler is $CC_VERSION_STRING" >&5 echo "${ECHO_T}C compiler is $CC_VERSION_STRING" >&6; } @@ -12469,7 +12503,7 @@ echo "${ECHO_T}explicitly disabled" >&6; } echo "${ECHO_T}$DEAL_II_PETSC_DIR" >&6; } if test ! -d $DEAL_II_PETSC_DIR/include \ - -o ! -d $DEAL_II_PETSC_DIR/lib ; then + ; then { { echo "$as_me:$LINENO: error: Path to PETSc specified with --with-petsc does not point to a complete PETSc installation" >&5 echo "$as_me: error: Path to PETSc specified with --with-petsc does not @@ -12487,7 +12521,7 @@ else echo "${ECHO_T}$DEAL_II_PETSC_DIR" >&6; } if test ! -d $DEAL_II_PETSC_DIR/include \ - -o ! -d $DEAL_II_PETSC_DIR/lib ; then + ; then { { echo "$as_me:$LINENO: error: The path to PETSc specified in the PETSC_DIR environment variable does not point to a complete PETSc installation" >&5 @@ -12605,6 +12639,17 @@ echo "$as_me: error: PETSc has not been compiled for the architecture fi ;; + 3.*) + if test ! -d $DEAL_II_PETSC_DIR/$DEAL_II_PETSC_ARCH/lib \ + ; then + { { echo "$as_me:$LINENO: error: PETSc has not been compiled for the architecture + specified with --with-petsc-arch" >&5 +echo "$as_me: error: PETSc has not been compiled for the architecture + specified with --with-petsc-arch" >&2;} + { (exit 1); exit 1; }; } + fi + ;; + *) { { echo "$as_me:$LINENO: error: Unknown PETSc version" >&5 echo "$as_me: error: Unknown PETSc version" >&2;} @@ -12652,8 +12697,8 @@ echo "${ECHO_T}$DEAL_II_PETSC_MPIUNI_LIB" >&6; } - { echo "$as_me:$LINENO: checking for SLEPc library directory" >&5 -echo $ECHO_N "checking for SLEPc library directory... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: checking for SLEPc include directory" >&5 +echo $ECHO_N "checking for SLEPc include directory... $ECHO_C" >&6; } # Check whether --with-slepc was given. @@ -12669,8 +12714,9 @@ echo "${ECHO_T}explicitly disabled" >&6; } { echo "$as_me:$LINENO: result: $DEAL_II_SLEPC_DIR" >&5 echo "${ECHO_T}$DEAL_II_SLEPC_DIR" >&6; } - if test ! -d $DEAL_II_SLEPC_DIR/include \ - -o ! -d $DEAL_II_SLEPC_DIR/lib ; then + if test ! -d $DEAL_II_SLEPC_DIR \ + -o ! -d $DEAL_II_SLEPC_DIR/include \ + ; then { { echo "$as_me:$LINENO: error: Path to SLEPc specified with --with-slepc does not point to a complete SLEPc installation" >&5 echo "$as_me: error: Path to SLEPc specified with --with-slepc does not @@ -12687,14 +12733,15 @@ else { echo "$as_me:$LINENO: result: $DEAL_II_SLEPC_DIR" >&5 echo "${ECHO_T}$DEAL_II_SLEPC_DIR" >&6; } - if test ! -d $DEAL_II_SLEPC_DIR/include \ - -o ! -d $DEAL_II_SLEPC_DIR/lib ; then + if test ! -d $DEAL_II_SLEPC_DIR \ + -o ! -d $DEAL_II_SLEPC_DIR/include \ + ; then { { echo "$as_me:$LINENO: error: The path to SLEPc specified in the SLEPC_DIR - environment variable does not - point to a complete SLEPc installation" >&5 + environment variable does not point to a + complete SLEPc installation" >&5 echo "$as_me: error: The path to SLEPc specified in the SLEPC_DIR - environment variable does not - point to a complete SLEPc installation" >&2;} + environment variable does not point to a + complete SLEPc installation" >&2;} { (exit 1); exit 1; }; } fi else @@ -12714,38 +12761,10 @@ _ACEOF DEAL_II_DEFINE_DEAL_II_USE_SLEPC=DEAL_II_USE_SLEPC - - fi - - - if test "$USE_CONTRIB_SLEPC" = "yes" ; then - - { echo "$as_me:$LINENO: checking for SLEPc version" >&5 -echo $ECHO_N "checking for SLEPc version... $ECHO_C" >&6; } - - DEAL_II_SLEPC_VERSION_MAJOR=`cat $DEAL_II_SLEPC_DIR/include/slepcversion.h \ - | grep "#define SLEPC_VERSION_MAJOR" \ - | perl -pi -e 's/.*MAJOR\s+//g;'` - DEAL_II_SLEPC_VERSION_MINOR=`cat $DEAL_II_SLEPC_DIR/include/slepcversion.h \ - | grep "#define SLEPC_VERSION_MINOR" \ - | perl -pi -e 's/.*MINOR\s+//g;'` - DEAL_II_SLEPC_VERSION_SUBMINOR=`cat $DEAL_II_SLEPC_DIR/include/slepcversion.h \ - | grep "#define SLEPC_VERSION_SUBMINOR" \ - | perl -pi -e 's/.*MINOR\s+//g;'` - SLEPC_VERSION="$DEAL_II_SLEPC_VERSION_MAJOR.$DEAL_II_SLEPC_VERSION_MINOR.$DEAL_II_SLEPC_VERSION_SUBMINOR" - { echo "$as_me:$LINENO: result: $SLEPC_VERSION" >&5 -echo "${ECHO_T}$SLEPC_VERSION" >&6; } - - if test "${DEAL_II_PETSC_VERSION_MAJOR}" != "${DEAL_II_SLEPC_VERSION_MAJOR}" \ - -o "${DEAL_II_PETSC_VERSION_MINOR}" != "${DEAL_II_SLEPC_VERSION_MINOR}" \ - -o "${DEAL_II_PETSC_VERSION_SUBMINOR}" != "${DEAL_II_SLEPC_VERSION_SUBMINOR}" ; then - { { echo "$as_me:$LINENO: error: If SLEPc is used, you must use the same version - number as your PETSc Installation" >&5 -echo "$as_me: error: If SLEPc is used, you must use the same version - number as your PETSc Installation" >&2;} - { (exit 1); exit 1; }; } fi + if test "$USE_CONTRIB_SLEPC" = "yes" \ + ; then { echo "$as_me:$LINENO: checking for SLEPc library architecture" >&5 echo $ECHO_N "checking for SLEPc library architecture... $ECHO_C" >&6; } @@ -12777,9 +12796,9 @@ echo "$as_me: error: If SLEPc is used, you must specify the architecture fi - if test "x$SLEPC_ARCH" != "x" ; then - if test ! -d $DEAL_II_SLEPC_DIR/lib/$DEAL_II_SLEPC_ARCH \ + if test ! -d $DEAL_II_SLEPC_DIR/$DEAL_II_SLEPC_ARCH \ + -o ! -d $DEAL_II_SLEPC_DIR/$DEAL_II_SLEPC_ARCH/lib \ ; then { { echo "$as_me:$LINENO: error: SLEPc has not been compiled for the architecture specified with --with-slepc-arch" >&5 @@ -12789,7 +12808,8 @@ echo "$as_me: error: SLEPc has not been compiled for the architecture fi fi - if test "$DEAL_II_SLEPC_ARCH" != "$DEAL_II_PETSC_ARCH" ; then + if test "$DEAL_II_SLEPC_ARCH" != "$DEAL_II_PETSC_ARCH" \ + ; then { { echo "$as_me:$LINENO: error: If SLEPc is used, you must specify the same architecture as your PETSc Installation either through the SLEPC_ARCH environment variable, @@ -12802,6 +12822,32 @@ echo "$as_me: error: If SLEPc is used, you must specify the same fi + { echo "$as_me:$LINENO: checking for SLEPc version" >&5 +echo $ECHO_N "checking for SLEPc version... $ECHO_C" >&6; } + + DEAL_II_SLEPC_VERSION_MAJOR=`cat $DEAL_II_SLEPC_DIR/include/slepcversion.h \ + | grep "#define SLEPC_VERSION_MAJOR" \ + | perl -pi -e 's/.*MAJOR\s+//g;'` + DEAL_II_SLEPC_VERSION_MINOR=`cat $DEAL_II_SLEPC_DIR/include/slepcversion.h \ + | grep "#define SLEPC_VERSION_MINOR" \ + | perl -pi -e 's/.*MINOR\s+//g;'` + DEAL_II_SLEPC_VERSION_SUBMINOR=`cat $DEAL_II_SLEPC_DIR/include/slepcversion.h \ + | grep "#define SLEPC_VERSION_SUBMINOR" \ + | perl -pi -e 's/.*MINOR\s+//g;'` + SLEPC_VERSION="$DEAL_II_SLEPC_VERSION_MAJOR.$DEAL_II_SLEPC_VERSION_MINOR.$DEAL_II_SLEPC_VERSION_SUBMINOR" + { echo "$as_me:$LINENO: result: $SLEPC_VERSION" >&5 +echo "${ECHO_T}$SLEPC_VERSION" >&6; } + + if test "${PETSC_VERSION}" != "${SLEPC_VERSION}" \ + ; then + { { echo "$as_me:$LINENO: error: If SLEPc is used, you must use the same version + number as your PETSc Installation" >&5 +echo "$as_me: error: If SLEPc is used, you must use the same version + number as your PETSc Installation" >&2;} + { (exit 1); exit 1; }; } + fi + + if test "x$with_slepc" = "x" ; then with_slepc="yes" fi -- 2.39.5