From: maier Date: Mon, 17 Sep 2012 16:00:10 +0000 (+0000) Subject: update X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88b5c017b2f9b5126fdacbfde97ce952c520440f;p=dealii-svn.git update git-svn-id: https://svn.dealii.org/branches/branch_cmake@26432 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake-TODO b/deal.II/cmake-TODO index ea79ebcbed..179f12bf46 100644 --- a/deal.II/cmake-TODO +++ b/deal.II/cmake-TODO @@ -8,8 +8,6 @@ Next steps: * PETSC -* TRILINOS - * P4EST * MUMPS diff --git a/deal.II/configure.in b/deal.II/configure.in deleted file mode 100644 index c7f7c4d868..0000000000 --- a/deal.II/configure.in +++ /dev/null @@ -1,1066 +0,0 @@ -dnl $Id$ -dnl -dnl This is the input for the ./configure script of the deal.II -dnl libraries. All options and paths are stored in -dnl the file common/Make.global_options. -dnl -dnl In doc/Makefile some information on the kind of documentation -dnl is stored. -dnl -dnl -dnl Copyright: The deal.II authors -dnl 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -dnl - - -dnl ------------------------------------------------------------- -dnl Administrativa -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 -define([AC_CACHE_LOAD], )dnl -define([AC_CACHE_SAVE], )dnl - -AC_INIT(deal.II, 7.3.pre, dealii@dealii.org, deal.II) - -AC_REVISION($Revision$) -AC_PREREQ(2.61) - - -dnl Where the output config file is located -AC_CONFIG_HEADER(include/deal.II/base/config.h) - -dnl Have the auxiliary tools like config.guess etc in contrib/config -AC_CONFIG_AUX_DIR(contrib/config) - - - - -dnl ------------------------------------------------------------- -dnl Globals: Paths and versions -dnl ------------------------------------------------------------- - -dnl Set the path to the deal.II libraries to `pwd` -AC_PREFIX_DEFAULT(`pwd`) -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, - [Major version number of deal.II]) -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]) -AC_MSG_RESULT(Configuring deal.II version $PACKAGE_VERSION) -AC_SUBST(DEAL_II_MAJOR) -AC_SUBST(DEAL_II_MINOR) -AC_SUBST(DEAL_II_PATH) - -dnl For backward compatibility, also have DEAL2_DIR alias DEAL_II_PATH -DEAL2_DIR="$DEAL_II_PATH" -AC_SUBST(DEAL2_DIR) - -dnl Check for machine type operating system -AC_CANONICAL_TARGET -AC_SUBST(target) - -dnl Set the language for which subsequent tests shall be -dnl performed to C++ -AC_LANG(C++) - - - - -dnl ------------------------------------------------------------- -dnl C/C++ compilers -dnl ------------------------------------------------------------- - -AC_MSG_RESULT() -AC_MSG_RESULT(---------------- configuring C/C++ compilers ----------------) - - -dnl See if the user has specified --enable-mpi. If so, and if $CXX and $CC have -dnl not been set to a particular value, then override them. -dnl -dnl While for the C compiler the issue is simple (it should be 'mpicc', the -dnl issue is not quite as trivial for the C++ compiler: 'mpiCC' should in -dnl principle work, but we've seen systems where that refers to the C -dnl compiler, so try 'mpic++' and 'mpicxx' first as these should really -dnl be unambiguous names although they may not be available on all systems. -AC_ARG_ENABLE(mpi, - AS_HELP_STRING([--enable-mpi], - [Select MPI-enabled compilers and MPI support in deal.II.]), - [ - AC_MSG_CHECKING(whether to explicitly use MPI) - if test "x$enableval" = "xyes" ; then - AC_MSG_RESULT(yes) - - if test "x$CXX" = "x" ; then - AC_CHECK_PROGS(CXX,[mpic++ mpicxx mpiCC]) - AC_MSG_CHECKING(for MPI C++ compiler) - if test "x$CXX" = "x" ; then - AC_MSG_ERROR(none found) - else - AC_MSG_RESULT([$CXX]) - fi - fi - - if test "x$CC" = "x" ; then - AC_MSG_CHECKING(for MPI C compiler) - if ((which mpicc 2>&1) > /dev/null) ; then - CC=mpicc ; - AC_MSG_RESULT(mpicc) - else - AC_MSG_ERROR(no MPI C compiler found) - fi - fi - - else - AC_MSG_RESULT(no) - fi]) - -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 reasons, the compiler name and version is in the name GXX_VERSION, -dnl even if the compiler is not GCC. -dnl -dnl Note that on MIPS systems, the AC_PROG_CXX call erroneously sets -dnl -g in CXXFLAGS, which is not exactly what we want, so we store -dnl the old value temporarily -OLDCFLAGS="$CFLAGS" -AC_PROG_CC -CFLAGS="$OLDCFLAGS" -DEAL_II_PATH_PROG(CC,$CC) - -OLDCXXFLAGS="$CXXFLAGS" -AC_PROG_CXX -CXXFLAGS="$OLDCXXFLAGS" -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 -dnl version of the compiler is written to the variable GXX_VERSION. -DEAL_II_DETERMINE_CXX_BRAND -DEAL_II_DETERMINE_IF_SUPPORTS_MPI -DEAL_II_SET_CXX_FLAGS -DEAL_II_SET_CXX_DEBUG_FLAG - -AC_SUBST(GXX_BRAND) -AC_SUBST(GXX_VERSION) -AC_SUBST(GXX_VERSION_DETAILED) -AC_SUBST(DEAL_II_COMPILER_SUPPORTS_MPI) -AC_SUBST(DEAL_II_USE_MPI) -AC_SUBST(CXXFLAGSG) -AC_SUBST(CXXFLAGSO) -AC_SUBST(CXXFLAGSPIC) -AC_SUBST(SHLIBLD) -AC_SUBST(SHLIBFLAGS) -AC_SUBST(OBJEXT) -AC_SUBST(EXEEXT) - - -dnl Do the same for the C compiler. we only use the C compiler for third-party -dnl code and only for things we optimize, so no need to determine debug flags -dnl and similar things -DEAL_II_DETERMINE_CC_BRAND -DEAL_II_SET_CC_FLAGS - -AC_SUBST(CC_VERSION) -AC_SUBST(CFLAGSO) -AC_SUBST(CFLAGSG) -AC_SUBST(CFLAGSPIC) - -dnl ------------------------------------------------------------- -dnl Multithreading -dnl ------------------------------------------------------------- - -dnl Test whether multithreading support is requested. This -dnl does not tell deal.II to actually use it, but the -dnl compiler flags are set to allow for it. -DEAL_II_CHECK_MULTITHREADING -DEAL_II_CHECK_PARTLY_BRACKETED_INITIALIZER -AC_SUBST(enablethreads) - - - -dnl -------------------------------------------------------------- -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 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, - [CXXFLAGSG="-DDISABLE_ASSERT_THROW $CXXFLAGSG"]) -DEAL_II_CHECK_ASSERT_THROW(optimized, $CXXFLAGSO, - [CXXFLAGSO="-DDISABLE_ASSERT_THROW $CXXFLAGSO"]) -DEAL_II_CHECK_LOCAL_TYPEDEF_COMP -DEAL_II_CHECK_TEMPLATE_SPEC_ACCESS -DEAL_II_CHECK_MEMBER_OP_TEMPLATE_INST -DEAL_II_CHECK_EXPLICIT_DESTRUCTOR_BUG -DEAL_II_CHECK_NAMESP_TEMPL_FRIEND_BUG -DEAL_II_CHECK_NAMESP_TEMPL_FRIEND_BUG2 -DEAL_II_CHECK_TEMPL_SPEC_FRIEND_BUG -DEAL_II_CHECK_IMPLEMENTED_PURE_FUNCTION_BUG -DEAL_II_CHECK_TEMPLATE_TEMPLATE_TYPEDEF_BUG -DEAL_II_CHECK_FUNPTR_TEMPLATE_TEMPLATE_BUG -DEAL_II_CHECK_NESTED_CLASS_FRIEND_BUG -DEAL_II_CHECK_NESTED_CLASS_TEMPL_FRIEND_BUG -DEAL_II_CHECK_MEMBER_VAR_SPECIALIZATION_BUG -DEAL_II_CHECK_MEMBER_ARRAY_SPECIALIZATION_BUG -DEAL_II_CHECK_MEMBER_TEMPLATE_SPECIALIZATION_BUG -DEAL_II_CHECK_LONG_DOUBLE_LOOP_BUG -DEAL_II_CHECK_ANON_NAMESPACE_BUG -DEAL_II_CHECK_ANON_NAMESPACE_BUG2 -DEAL_II_CHECK_ANON_NAMESPACE_BUG3 -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 -DEAL_II_CHECK_WSYNTH_AND_STD_COMPLEX -DEAL_II_CHECK_CTOR_DTOR_PRIVACY -DEAL_II_CHECK_VECTOR_ITERATOR_IS_POINTER -DEAL_II_HAVE_PRETTY_FUNCTION -DEAL_II_HAVE_STD_ITERATOR -DEAL_II_HAVE_STD_STRINGSTREAM -DEAL_II_HAVE_STD_NUMERIC_LIMITS -DEAL_II_HAVE_STD_OSTREAM_HEADER -DEAL_II_HAVE_STD_IOSFWD_HEADER -DEAL_II_HAVE_BUILTIN_EXPECT -DEAL_II_HAVE_VERBOSE_TERMINATE -DEAL_II_HAVE_GLIBC_STACKTRACE -DEAL_II_HAVE_DEMANGLER -DEAL_II_CHECK_MIN_VECTOR_CAPACITY -DEAL_II_CHECK_ABORT -DEAL_II_CHECK_GETRUSAGE -DEAL_II_CHECK_ISNAN -DEAL_II_CHECK_ISFINITE -DEAL_II_CHECK_RAND_R -DEAL_II_CHECK_QUAD_DEFINE -DEAL_II_CHECK_ERROR_CODES_DEFINITION -AC_CHECK_FUNCS_ONCE([gethostname getpid]) -AC_CHECK_HEADERS_ONCE([sys/syscall.h]) -AC_CHECK_HEADERS_ONCE([sys/times.h]) -AC_CHECK_FUNCS(times) -DEAL_II_CHECK_BROKEN_SOCKETS - - -dnl ------------------------------------------------------------- -dnl Fortran 77 compilers -dnl ------------------------------------------------------------- - -AC_MSG_RESULT() -AC_MSG_RESULT(---------------- configuring F77 compilers ------------------) - -dnl Find path to a Fortran 77 compiler. By default try to find a -dnl vendor compiler which is usually named `f77', and only if that could -dnl not be found, use `g77' instead. The reasoning is that usually vendor -dnl compilers are much better adapted to the system at hand, and since -dnl Fortran code is often used for efficiency reasons, this is -dnl important. Likewise, if external Fortran code is imported, it is -dnl usually code that is well tested and does not need much debugging, so -dnl good optimizations are helpful again. -dnl -dnl It is possible that no Fortran 77 compiler was found. Don't care, -dnl it may be that we don't need one (but we check below, when we must -dnl have it). -dnl -dnl Note: While the autoconf documentation says that the AC_PATH_PROG -dnl macro does nothing if the output variable (here: $F77) is already -dnl set, this doesn't appear to be the case: if you set $F77 on the -dnl command line, then it still finds /usr/bin/gfortran if gfortran -dnl is listed first in the square brackets. Confusingly, it doesn't -dnl find /usr/bin/gfortran if the order of things in square brackets -dnl does *not* list gfortran first. Thus, explicitly test whether F77 -dnl is set and then short-circuit the process. -if test "x$F77" = "x" ; then - AC_PATH_PROG(F77, [gfortran f77 g77]) -else - AC_PATH_PROG(F77, [$F77]) -fi - - -dnl Next determine which f77 compiler we have here and set compilation -dnl flags accordingly. Only do that if we have an F77 compiler at all. -if test "x$F77" != "x" ; then - DEAL_II_DETERMINE_F77_BRAND - DEAL_II_SET_F77_FLAGS -fi - -AC_SUBST(F77_VERSION) -AC_SUBST(F77FLAGSO) -AC_SUBST(F77FLAGSG) -AC_SUBST(F77FLAGSPIC) -AC_SUBST(F77LIBS) - - - - - -dnl -------------------------------------------------------------- -dnl Shared libraries -dnl -------------------------------------------------------------- - -AC_MSG_RESULT() -AC_MSG_RESULT(---------------- configuring shared/static libs -------------) - -AC_ARG_ENABLE(shared, -[ --enable-shared Set compiler flags to generate shared libraries], - enableshared="$enableval", - enableshared=yes) - -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 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) - static_lib_suffix=".a" - enableshared=no - ;; - *cygwin ) - shared_lib_suffix=".dll" - static_lib_suffix=".a" - cygwin_shared_lib="yes" - ;; - *-apple-darwin* ) - shared_lib_suffix=".dylib" - static_lib_suffix=".a" - darwin_shared_lib="yes" - ;; - * ) - shared_lib_suffix=".so" - static_lib_suffix=".a" - ;; -esac - -if test "x$enableshared" = "xyes" ; then - CFLAGSO="$CFLAGSO $CFLAGSPIC" - CFLAGSG="$CFLAGSG $CFLAGSPIC" - CXXFLAGSG="$CXXFLAGSG $CXXFLAGSPIC" - CXXFLAGSO="$CXXFLAGSO $CXXFLAGSPIC" - F77FLAGSG="$F77FLAGSG $F77FLAGSPIC" - F77FLAGSO="$F77FLAGSO $F77FLAGSPIC" - SHLIBFLAGS="-shared" - - case "$target" in - *-apple-darwin* ) - SHLIBFLAGS="-dynamiclib" - DEAL_II_CHECK_DYNAMIC_CAST_BUG - ;; - esac - - case "${GXX_VERSION}" in - ibm_xlc* ) - SHLIBFLAGS="-qmkshrobj" - ;; - - gcc*) - dnl When using GCC on PowerPC (e.g. on BlueGene systems) we - dnl get errors from the linker about relocations that have be - dnl truncated to fit. Passing --relax to the linker helps in - dnl these cases. - case "$target" in - *powerpc* ) - SHLIBFLAGS="$SHLIBFLAGS -Wl,--relax" - ;; - esac - ;; - esac - - dnl See if we can use -Wl,-soname,... for linking - DEAL_II_CHECK_LINK_SONAME -fi - -dnl Check if the linker supports -rpath. Do so independently whether we -dnl actually build deal.II as shared libs since, for example, the TBB -dnl library is always shared -DEAL_II_CHECK_RPATH - - -AC_SUBST(enableshared) -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 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 -dnl flags to AR if for example both 32- and 64-bit binaries are supported -AC_CHECK_PROG(AR,ar,ar) -AC_PATH_PROG(AR,$AR) -AC_PROG_RANLIB -if test "$RANLIB" != ":" ; then - AC_PATH_PROG(RANLIB,$RANLIB) -fi -AC_SUBST(AR) -AC_SUBST(RANLIB) - - -dnl -------------------------------------------------------------- -dnl Optional features -dnl -------------------------------------------------------------- - -AC_MSG_RESULT() -AC_MSG_RESULT(---------------- configuring optional features --------------) - -AC_ARG_ENABLE(parser, - AS_HELP_STRING([--enable-parser],[While switched on by default, this option allows to switch off support for the function parser in the contrib directory.]), - [ enableparser="$enableval" - if test "x$enableval" = "xno" ; then - AC_MSG_RESULT(Function parser disabled) - AC_DEFINE(DEAL_II_DISABLE_PARSER, 1, - [disable the function parser in contrib]) - else - AC_MSG_RESULT(Function parser enabled) - fi], - enableparser=yes) - - -AC_SUBST(enableparser) -AC_SUBST(DEAL_II_DISABLE_PARSER) - -AC_ARG_ENABLE(mgcompatibility, - AS_HELP_STRING([--enable-mgcompatibility], - [Use preconditioner interface in MGSmootherRelaxation instead of the new interface using the function step. Defaults to disabled.]), - [ if test "x$enableval" = "xyes" ; then - AC_MSG_RESULT(enable multigrid compatibility mode) - AC_DEFINE(DEAL_II_MULTIGRID_COMPATIBILITY, 1, [enable multigrid compatibility mode]) - fi]) - -dnl -------------------------------------------------------------- -dnl Backward compatibility functions -dnl -------------------------------------------------------------- -DEAL_II_CHECK_COMPAT_BLOCKER - - - - -dnl ------------------------------------------------------------- -dnl Additional libraries -dnl ------------------------------------------------------------- -dnl Do this in two steps: -dnl -dnl 1) For each library required by another, make sure -dnl --with-library is set -dnl -dnl 2) Then check for libraries in reverse order to have them -dnl included in LIBS -dnl -dnl ------------------------------------------------------------- - -AC_MSG_RESULT() -AC_MSG_RESULT(---------------- configuring additional libs ----------------) - -dnl Check for boost option and make sure we get all files. -dnl Since we may want to use an external boost installation -dnl this test needs to run after we determine whether -rpath -dnl works -BOOST_INCLUDE_DIR="-I$DEAL_II_PATH/contrib/boost-1.49.0/include" -DEAL_II_CHECK_BOOST -DEAL_II_CHECK_BOOST_BIND_COMPILER_BUG -DEAL_II_CHECK_BOOST_GRAPH_COMPILER_BUG -AC_SUBST(BOOST_INCLUDE_DIR) - -DEAL_II_CONFIGURE_PETSC -AC_SUBST(USE_CONTRIB_PETSC) -AC_SUBST(DEAL_II_PETSC_DIR) -AC_SUBST(DEAL_II_PETSC_ARCH) -AC_SUBST(DEAL_II_PETSC_VERSION_MAJOR) -AC_SUBST(DEAL_II_PETSC_VERSION_MINOR) -AC_SUBST(DEAL_II_PETSC_VERSION_SUBMINOR) -AC_SUBST(DEAL_II_PETSC_VERSION_DEV) -AC_SUBST(DEAL_II_PETSC_MPIUNI_LIB) -AC_SUBST(DEAL_II_DEFINE_DEAL_II_USE_PETSC) - -DEAL_II_CONFIGURE_SLEPC -AC_SUBST(USE_CONTRIB_SLEPC) -AC_SUBST(DEAL_II_SLEPC_DIR) -AC_SUBST(DEAL_II_SLEPC_VERSION_MAJOR) -AC_SUBST(DEAL_II_SLEPC_VERSION_MINOR) -AC_SUBST(DEAL_II_SLEPC_VERSION_SUBMINOR) -AC_SUBST(DEAL_II_DEFINE_DEAL_II_USE_SLEPC) - -DEAL_II_CONFIGURE_TRILINOS -AC_SUBST(USE_CONTRIB_TRILINOS) -AC_SUBST(DEAL_II_TRILINOS_INCDIR) -AC_SUBST(DEAL_II_TRILINOS_LIBDIR) -AC_SUBST(DEAL_II_TRILINOS_SHARED) -AC_SUBST(DEAL_II_TRILINOS_STATIC) - -DEAL_II_CONFIGURE_HDF5 -AC_SUBST(USE_CONTRIB_HDF5) -AC_SUBST(DEAL_II_HDF5_VERSION) -AC_SUBST(DEAL_II_HDF5_CFLAGS) -AC_SUBST(DEAL_II_HDF5_CPPFLAGS) -AC_SUBST(DEAL_II_HDF5_LDFLAGS) -AC_SUBST(DEAL_II_HDF5_INCDIR) - - -DEAL_II_CONFIGURE_ARPACK -AC_SUBST(USE_CONTRIB_ARPACK) -AC_SUBST(DEAL_II_ARPACK_DIR) -AC_SUBST(DEAL_II_ARPACK_ARCH) - -DEAL_II_CONFIGURE_MUMPS -AC_SUBST(USE_CONTRIB_MUMPS) -AC_SUBST(DEAL_II_MUMPS_DIR) -AC_SUBST(DEAL_II_SCALAPACK_DIR) dnl MUMPS dependency -AC_SUBST(DEAL_II_BLACS_DIR) dnl MUMPS dependency -AC_SUBST(DEAL_II_BLACS_ARCH) -AC_SUBST(DEAL_II_DEFINE_DEAL_II_USE_MUMPS) - -DEAL_II_CONFIGURE_P4EST -AC_SUBST(DEAL_II_USE_P4EST) -AC_SUBST(USE_CONTRIB_P4EST) -AC_SUBST(DEAL_II_P4EST_DIR) - - - - -dnl Make sure we configure for libraries used by other libraries. For -dnl example, UMFPACK needs blas, and so does LAPACK. -if test "x$with_umfpack" != "x" -a "x$with_umfpack" != "xno" ; then - if test "x$with_blas" = "x" -o "x$with_blas" = "xno"; then - with_blas="yes" - fi -fi - -if test "x$with_lapack" != "x" -a "x$with_lapack" != "xno" ; then - if test "x$with_blas" = "x" -o "x$with_blas" = "xno"; then - with_blas="yes" - fi -fi - - -dnl Likewise, if we use PETSc and link statically, we have to add blas to the -dnl linker line (if we use shared libs, then the PETSc libs already carry this -dnl dependence, but static archives do not have a method to list dependencies) -dnl -dnl On Mac OS X, when using PETSc, it appears as if we always need to link with -dnl blas and lapack, independently of whether we use static or shared libs -if test "x$with_petsc" != "x" -a "x$with_petsc" != "xno" ; then - if test "x$enableshared" = "xno" ; then - if test "x$with_blas" = "x" -o "x$with_blas" = "xno"; then - with_blas="yes" - fi - fi - - case "$target" in - *-apple-darwin* ) - if test "x$with_blas" = "x" -o "x$with_blas" = "xno"; then - with_blas="yes" - fi - if test "x$with_lapack" = "x" -o "x$with_lapack" = "xno"; then - with_lapack="yes" - fi - ;; - esac -fi - - -dnl The same holds for Trilinos, which needs not only BLAS but also LAPACK -if test "x$with_trilinos" != "x" -a "x$with_trilinos" != "xno" ; then - if test "x$enableshared" = "xno" ; then - if test "x$with_blas" = "x" -o "x$with_blas" = "xno"; then - with_blas="yes" - fi - if test "x$with_lapack" = "x" -o "x$with_lapack" = "xno"; then - with_lapack="yes" - fi - fi -fi - -dnl Strangely some Linux boxes (noteably OpenSuse) need to -dnl *explicitly* link with gfortran libraries. This is definately -dnl needed for ARPACk interfaces to work correctly; so we do that here: -if test "x$with_arpack" != "x" -a "x$with_arpack" != "xno" ; then - LDFLAGS="-lgfortran $LDFLAGS" -fi - - -dnl ------------------------------------------------------------- -dnl Actually include libraries here. Check for the libraries -dnl requiring FORTRAN support first. -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 - included by the argument -lblaslib. If no argument - is given, use -lblas. Default is to use -lblas only - if required by other libraries.], - DEAL_II_WITH_BLAS($withval)) -AC_SUBST(USE_CONTRIB_BLAS) -AC_SUBST(USE_CONTRIB_LAPACK) - -DEAL_II_CONFIGURE_HSL -AC_SUBST(USE_CONTRIB_HSL) - -dnl ------------------------------------------------------------- -dnl Now insert FORTRAN libs at the END of the library string if needed -dnl ------------------------------------------------------------- - -if test "x$NEEDS_F77LIBS" != "x" ; then - AC_MSG_RESULT(Adding FORTRAN libraries $F77LIBS) - LIBS="$LIBS $F77LIBS" - LDFLAGS="$F77FLAGS $LDFLAGS" -fi - -dnl ------------------------------------------------------------- -dnl These libraries are straight forward now -dnl ------------------------------------------------------------- - -dnl Check for the compression library zlib. -dnl First activate if no option given -if test "x$with_zlib" = "x" ; then - with_zlib="yes" -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 - search path of ld], - DEAL_II_WITH_ZLIB($withval)) - -dnl In the context of libz, we also need to know the endianness of the system -dnl (e.g. when encoding compressed XML-based VTK files) -AC_C_BIGENDIAN( - AC_DEFINE(DEAL_II_WORDS_BIGENDIAN, 1, - [Defined if the system stores words with the most - significant byte first]) -) - -DEAL_II_CONFIGURE_TECPLOT -AC_SUBST(TECPLOT_INCLUDE_DIR) - -DEAL_II_CONFIGURE_NETCDF - -DEAL_II_CONFIGURE_METIS -AC_SUBST(USE_CONTRIB_METIS) -AC_SUBST(DEAL_II_METIS_DIR) -AC_SUBST(DEAL_II_METIS_LIBDIR) -AC_SUBST(DEAL_II_METIS_INCDIR) - -dnl Check for UMFPack -DEAL_II_WITH_UMFPACK -AC_SUBST(UMFPACK_LIB) -AC_SUBST(UMFPACK_INCLUDE_DIR) -AC_SUBST(USE_CONTRIB_UMFPACK) - -dnl ------------------------------------------------------------- -dnl Check for LAPACK and the LAPACK functions being used -dnl ------------------------------------------------------------- -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 - included by the argument -llapacklib. If no argument - 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 -dnl MAC OSX links BLAS functions in a different way -if test "x$with_blas" != "x" -a "x$with_blas" != "xno" ; then - AC_CHECK_FUNC(daxpy_,,[AC_MSG_ERROR([BLAS library not installed correctly($with_blas)])]) -fi - -dnl Since we might have an incomplete LAPACK installation, check all -dnl the functions we may want to use. If any of them is missing, -dnl deal.II will not attempt to call it and rather throw an -dnl exception. - -AC_CHECK_FUNCS([daxpy_ saxpy_ dgemv_ sgemv_ dgeev_ sgeev_ dgeevx_ sgeevx_]) -AC_CHECK_FUNCS([dgemm_ sgemm_ dgetrf_ sgetrf_ dgetri_ sgetri_]) -AC_CHECK_FUNCS([dgeqrf_ sgeqrf_ dormqr_ sormqr_ dorgqr_ sorgqr_ dtrtrs_ strtrs_]) -AC_CHECK_FUNCS([dgetrs_ sgetrs_ dstev_ sstev_ dsygv_ ssygv_ dsygvx_ ssygvx_]) -AC_CHECK_FUNCS([dsyevx_ ssyevx_]) -dnl Singular value decomposition -AC_CHECK_FUNCS([dgesvd_ sgesvd_ dgesdd_ sgesdd_ dgelsd_ sgelsd_]) -dnl Check Bessel functions in GNU libc -AC_CHECK_FUNCS([jn]) - -dnl ------------------------------------------------------------- -dnl set include paths of several libraries -dnl ------------------------------------------------------------- - - -AC_SUBST(CPPFLAGS) - - - -dnl ------------------------------------------------------------- -dnl Optimizations and consistency of compiler flags -dnl ------------------------------------------------------------- - -AC_MSG_RESULT() -AC_MSG_RESULT(---------------- checking compiler flags --------------------) - -dnl Possibly add some flags if optimizations are requested -DEAL_II_CHECK_CPU_OPTIMIZATIONS - -dnl Test whether CXXFLAGS and F77FLAGS are ok -DEAL_II_CHECK_CXXFLAGS_CONSISTENCY -DEAL_II_CHECK_F77FLAGS_CONSISTENCY - -dnl Last check: check whether the compiler and host system allows for -dnl vectorization -DEAL_II_DETECT_VECTORIZATION_LEVEL -DEAL_II_CHECK_VECTOR_ARITHMETICS - -dnl ------------------------------------------------------------- -dnl Third party programs -dnl ------------------------------------------------------------- - -AC_MSG_RESULT() -AC_MSG_RESULT(---------------- configuring other programs -----------------) - -DEAL_II_CHECK_DOXYGEN -AC_SUBST(DOXYGEN) -AC_SUBST(DOXYGEN_OPTIONS) -AC_SUBST(DEAL_II_HAVE_DOT) - -AC_PATH_PROG(PERL, perl) -AC_SUBST(PERL) - - -dnl Check for the Qt library and associated programs. We need those for -dnl the parameter GUI program in contrib/parameter_gui -AC_CHECK_PROG(QMAKE,qmake,qmake) -if test -n "$QMAKE" ; then - AC_PATH_PROG(QMAKE,$QMAKE) - - dnl On Mac OS X, qmake's default is to generate XCode project files - dnl rather than Makefiles. Override this: - case "$target" in - *apple-darwin*) - QMAKE="$QMAKE -spec macx-g++" - ;; - esac - - - dnl Verify that Qt version is at least 4.3. Only consider the major - dnl and minor version number, don't care about the subminor - DEAL_II_QT_VERSION="`($QMAKE --version 2>&1) | grep -i version | grep -i qt | perl -pi -e 's/.*(\d+)\.(\d+)\.(\d+).*/\1.\2/g;'`" - - AC_MSG_CHECKING(whether Qt version is >= 4.3) - if (echo $DEAL_II_QT_VERSION | perl -e '$ver=<>; if ($ver < 4.3) { exit(1); }') ; then - AC_MSG_RESULT(yes) - else - dnl Version is too old. Simply forget about the location of qmake again - AC_MSG_RESULT(no) - QMAKE= - fi -fi -AC_SUBST(QMAKE) - - -dnl ------------------------------------------------------------- -dnl Configure subdirectories -dnl ------------------------------------------------------------- - -dnl Configure the `tests' directory, if that is installed. also -dnl configure the programs in the contrib directory -AC_CONFIG_SUBDIRS(contrib tests) - - - - -dnl ------------------------------------------------------------- -dnl Output results -dnl ------------------------------------------------------------- - -AC_MSG_RESULT() -AC_MSG_RESULT(---------------- generating output --------------------------) - -dnl First set the templates for config.h -AH_TOP( -[ -//---------------------------- config.h --------------------------- -// $Id$ -// Version: $Name$ -// -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by the deal.II authors -// -// This file is subject to QPL and may not be distributed -// without copyright and license information. Please refer -// to the file deal.II/doc/license.html for the text and -// further information on this license. -// -//---------------------------- config.h --------------------------- -#ifndef __deal2__config_h -#define __deal2__config_h - -// Note: you should not usually have to change this file, as it is -// automatically generated from the ./configure file in the top level -// directory. If there are problems with the contents of this file, -// rather than changing it, try to modify the mechanisms in -// configure.in that generated this output. The reason is that you -// would have to make these changes each time you compile a new -// version of the library, or on a different computer. Furthermore, it -// is important not to build different parts of the library with -// different versions of this file. -// -// In case of problems in autodetection of features of your build -// environment, contact the authors of the library. - - -/** - * Two macro names that we put at the top and bottom of all deal.II files - * and that will be expanded to "namespace dealii {" and "}". - */ -#define DEAL_II_NAMESPACE_OPEN namespace dealii { -#define DEAL_II_NAMESPACE_CLOSE } - -]) - - -AH_BOTTOM( -[ -/** - * Depending on the use of threads, we will have to make some variables - * volatile. We do this here in a very old-fashioned C-style, but still - * convenient way. - */ -#if DEAL_II_USE_MT != 0 -# define DEAL_VOLATILE volatile -#else -# define DEAL_VOLATILE -#endif - - -/** - * A #define that indicates whether we are using the Microsoft - * Windows Visual C/C++ compiler. We currently do not run ./configure - * on MS Windows, so the detection for this compiler happens via - * the appropriate #ifdef, not through a configuration testcase. - */ -#ifdef _MSC_VER -# define DEAL_II_MSVC -#endif - -/** - * Using pthreads under windows as a non-static library requires the following - * preprocessor switch to be undefined. - */ -#ifdef DEAL_II_MSVC -# if defined(PTW32_STATIC_LIB) -# undef PTW32_STATIC_LIB -# endif -#endif - -/* - * There is an annoying problem in the Trilinos header ml_config.h: It - * #define's HAVE_INTTYPES_H but doesn't give the symbol a value. This - * conflicts with the result of running deal.II's ./configure which - * #define's it and gives it the value "1". The result is a compiler - * warning. So if we use Trilinos and if the symbol is already - * #define'd, then #undef it again here. deal.II doesn't use the - * #define anyway and this way if we include any of the Trilinos - * headers they can feel free to set it again to whatever they wish. - * - * The form of the #undef with the comment in the middle is necessary - * to avoid that the pattern substitution of ./configure turns the - * #undef into a #define again. - */ -#if defined(DEAL_II_USE_TRILINOS) && defined(HAVE_INTTYPES_H) -# undef /* */ HAVE_INTTYPES_H -#endif - -/** - * These macros are defined to make testing for PETSc versions within - * the deal.II main code as simple as possible. In brief they are used - * like this: (i) DEAL_II_PETSC_VERSION_LT is used to advance the - * PETScWrappers to newer versions of PETSc while preserving backward - * compatibility; and (ii) DEAL_II_PETSC_VERSION_GTE is used to add - * functionality to the PETScWrappers that does not exist in previous - * versions of PETSc. Examples of usage can be found in - * lac/source/petsc_matrix_base.h. Note: SLEPcWrappers do not need - * their own analogical macros, since SLEPc and PETSc must have - * identical version numbers anyways. - */ -#define DEAL_II_PETSC_VERSION_LT(major,minor,subminor) \ - ((PETSC_VERSION_MAJOR * 10000 + \ - PETSC_VERSION_MINOR * 100 + \ - PETSC_VERSION_SUBMINOR) \ - < \ - (major)*10000 + (minor)*100 + (subminor)) - -#define DEAL_II_PETSC_VERSION_GTE(major,minor,subminor) \ - ((PETSC_VERSION_MAJOR * 10000 + \ - PETSC_VERSION_MINOR * 100 + \ - PETSC_VERSION_SUBMINOR) \ - >= \ - (major)*10000 + (minor)*100 + (subminor)) - -#include -#include - -// Disable a bunch of warnings for Microsoft Visual C++. We should -// work on reducing this list over time to those that are truly -// harmless and not indicative of actual problems -#ifdef DEAL_II_MSVC -# pragma warning( disable : 4244 ) // implied downcasting from double to float -# pragma warning( disable : 4267 ) // implied downcasting from size_t to unsigned int -# pragma warning( disable : 4996 ) // unsafe functions, such as strcat and sprintf -# pragma warning( disable : 4355 ) // 'this' : used in base member initializer list -# pragma warning( disable : 4661 ) // no suitable definition provided for explicit template instantiation request -# pragma warning( disable : 4800 ) // forcing value to bool 'true' or 'false' (performance warning) -# pragma warning( disable : 4146 ) // unary minus operator applied to unsigned type, result still unsigned -# pragma warning( disable : 4667 ) // no function template defined that matches forced instantiation -# pragma warning( disable : 4520 ) // multiple default constructors specified -# pragma warning( disable : 4700 ) // uninitialized local variable -# pragma warning( disable : 4789 ) // destination of memory copy is too small -# pragma warning( disable : 4808 ) // case 'value' is not a valid value for switch condition of type 'bool -#endif // DEAL_II_MSVC - -#endif -]) - - -dnl Add the deal.II library path to LDFLAGS -LDFLAGS="-L$DEAL_II_PATH/lib $LDFLAGS" - - -AC_SUBST(LIBS) -AC_SUBST(LDFLAGS) -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/scripts/make_dependencies.pl - common/scripts/make_todo.pl - Version - common/template-arguments - common/dealiitemplates.pm" - -dnl Also replace stuff in the doc/ files, but we can't rely on -dnl their presence because we package the .nodoc.tar.gz files -dnl that omit the entire doc/ directory. -if test -d doc ; then - process_files="${process_files} - doc/Makefile - doc/title.html - doc/doxygen/Makefile - doc/doxygen/options.dox - doc/doxygen/options.136 - doc/doxygen/header.html - doc/doxygen/header.136 - doc/doxygen/header.tex" -fi - -AC_CONFIG_FILES([$process_files]) -AC_OUTPUT - -dnl Autoconf has the annoying habit to simply define PACKAGE_NAME in -dnl AC_INIT and put this name into config.h, irrespective of the fact -dnl that other packages that we may use or that users may use with -dnl deal.II might have their own config.h and conflicting #defines for -dnl this variable. What we do is to simply rename these variables. -dnl However, there appears to be no way to do this in some sort of -dnl proper fashion, so all we can do is to run perl on the output files. -$PERL -pi -e 's/PACKAGE_NAME/DEAL_II_PACKAGE_NAME/g; - s/PACKAGE_TARNAME/DEAL_II_PACKAGE_TARNAME/g; - s/PACKAGE_STRING/DEAL_II_PACKAGE_STRING/g; - s/PACKAGE_BUGREPORT/DEAL_II_PACKAGE_BUGREPORT/g; - s/PACKAGE_VERSION/DEAL_II_PACKAGE_VERSION/g;' \ - $process_files include/deal.II/base/config.h - -echo -echo -echo ------------------------------------------------------------- -echo -echo " The deal.II library is now configured. In order to" -echo " compile it and to generate the documentation, just" -echo " call 'make' without arguments for a list of options." -echo " For more information, see the doc/readme.html file." -echo -echo ------------------------------------------------------------- -echo - -if test "x$cygwin_shared_lib" = "xyes" ; then - echo " Please add the line" - echo " export PATH=\$PATH:$DEAL2_DIR/lib" - echo " to your .bash_profile file so that windows will be" - echo " able to find the deal.II shared libraries when" - echo " executing your programs." - echo -fi - -if test "x$darwin_shared_lib" = "xyes" ; then - echo " Please add the line" - echo " export DYLD_LIBRARY_PATH=\$DYLD_LIBRARY_PATH:$DEAL2_DIR/lib" - echo " to your .bash_profile file so that OSX will be" - echo " able to find the deal.II shared libraries when" - echo " executing your programs." - echo - - if test "x${USE_CONTRIB_TRILINOS}" = "xyes" ; then - echo " You will also need to add the path to the Trilinos libraries" - echo " to DYLIB_LIBRARY_PATH." - echo - fi - - if test "x$DARWIN_GCC_WEAK_LINKAGE_BUG" = "xyes" ; then - echo " WARNING: The installed compiler version seems to be " - echo " WARNING: Apple gcc3.3, build 1666, which does not" - echo " WARNING: work properly for building dynamics libs" - echo " WARNING: Please install Apple's November 2004 patch" - echo " WARNING: for gcc, which can be found on:" - echo " WARNING: http://www.apple.com/developer" - echo - fi -fi - - -if test "x$doxygen_not_found" = "xyes" ; then - echo " WARNING: During configuration, no version of the doxygen" - echo " WARNING: documentation generation program could be found." - echo " WARNING: You can still use the library, but you won't be" - echo " WARNING: able to generate API documentation locally on" - echo " WARNING: your machine. It is available for download," - echo " WARNING: however." - echo -fi - -if test "x$CC_VERSION" = "xunknown_cc" ; then - echo ---------------------------------------------------------------------- - echo " WARNING: The C compiler used for configuration is unknown!" - echo " WARNING: configure has used a generic set of parameters." - echo " WARNING: Still, you have to expect trouble during compilation." - echo " WARNING: If so, report to dealii@dealii.org!" - echo -fi - -if test "x$GXX_VERSION" = "xunknown_cc" ; then - echo ---------------------------------------------------------------------- - echo " WARNING: The C++ compiler used for configuration is unknown!" - echo " WARNING: configure has used a generic set of parameters." - echo " WARNING: Still, you have to expect trouble during compilation." - echo " WARNING: If so, report to dealii@dealii.org!" - echo -fi -