From: Matthias Maier Date: Mon, 29 Dec 2014 18:35:58 +0000 (+0100) Subject: Guard HAVE_* variables and definitions with DEALI_II prefix X-Git-Tag: v8.3.0-rc1~574^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=babf1def6a0d1c1a94d441d90523a9de5fd0d622;p=dealii.git Guard HAVE_* variables and definitions with DEALI_II prefix This commits renames every HAVE_* definitions to DEAL_II_HAVE_*. This is done to avoid name clashes with external projects also exporting HAVE_* definitions. --- diff --git a/cmake/checks/check_01_compiler_features.cmake b/cmake/checks/check_01_compiler_features.cmake index a1fc8c1ac3..b6fa9c0227 100644 --- a/cmake/checks/check_01_compiler_features.cmake +++ b/cmake/checks/check_01_compiler_features.cmake @@ -24,10 +24,10 @@ # # DEAL_II_COMPILER_USE_VECTOR_ARITHMETICS # DEAL_II_VECTOR_ITERATOR_IS_POINTER -# HAVE_BUILTIN_EXPECT -# HAVE_VERBOSE_TERMINATE -# HAVE_GLIBC_STACKTRACE -# HAVE_LIBSTDCXX_DEMANGLER +# DEAL_II_HAVE_BUILTIN_EXPECT +# DEAL_II_HAVE_VERBOSE_TERMINATE +# DEAL_II_HAVE_GLIBC_STACKTRACE +# DEAL_II_HAVE_LIBSTDCXX_DEMANGLER # DEAL_II_COMPILER_HAS_ATTRIBUTE_PRETTY_FUNCTION # DEAL_II_COMPILER_HAS_ATTRIBUTE_DEPRECATED # DEAL_II_DEPRECATED @@ -93,7 +93,7 @@ CHECK_CXX_SOURCE_COMPILES( bool f() {} int main(){ if (__builtin_expect(f(),false)) ; } " - HAVE_BUILTIN_EXPECT) + DEAL_II_HAVE_BUILTIN_EXPECT) # @@ -128,7 +128,7 @@ CHECK_CXX_SOURCE_COMPILES( static preload_terminate_dummy dummy; int main() { throw 1; return 0; } " - HAVE_VERBOSE_TERMINATE) + DEAL_II_HAVE_VERBOSE_TERMINATE) # @@ -149,9 +149,9 @@ CHECK_CXX_SOURCE_COMPILES( char ** symbols = backtrace_symbols(array, nSize); int main(){ free(symbols); return 0; } " - HAVE_GLIBC_STACKTRACE) + DEAL_II_HAVE_GLIBC_STACKTRACE) -IF(HAVE_GLIBC_STACKTRACE AND NOT DEAL_II_STATIC_EXECUTABLE) +IF(DEAL_II_HAVE_GLIBC_STACKTRACE AND NOT DEAL_II_STATIC_EXECUTABLE) ENABLE_IF_LINKS(DEAL_II_LINKER_FLAGS "-rdynamic") ENDIF() @@ -200,7 +200,7 @@ CHECK_CXX_SOURCE_COMPILES( return 0; } " - HAVE_LIBSTDCXX_DEMANGLER) + DEAL_II_HAVE_LIBSTDCXX_DEMANGLER) # diff --git a/cmake/checks/check_01_cxx_features.cmake b/cmake/checks/check_01_cxx_features.cmake index bc428093d8..9241110bc2 100644 --- a/cmake/checks/check_01_cxx_features.cmake +++ b/cmake/checks/check_01_cxx_features.cmake @@ -20,8 +20,8 @@ # # DEAL_II_WITH_CXX11 # -# HAVE_ISNAN -# HAVE_UNDERSCORE_ISNAN +# DEAL_II_HAVE_ISNAN +# DEAL_II_HAVE_UNDERSCORE_ISNAN # DEAL_II_HAVE_ISFINITE # @@ -290,7 +290,7 @@ CHECK_CXX_SOURCE_COMPILES( #include int main(){ double d=0; isnan (d); return 0; } " - HAVE_ISNAN) + DEAL_II_HAVE_ISNAN) CHECK_CXX_SOURCE_COMPILES( @@ -298,7 +298,7 @@ CHECK_CXX_SOURCE_COMPILES( #include int main(){ double d=0; _isnan (d); return 0; } " - HAVE_UNDERSCORE_ISNAN) + DEAL_II_HAVE_UNDERSCORE_ISNAN) CHECK_CXX_SOURCE_COMPILES( diff --git a/cmake/checks/check_02_system_features.cmake b/cmake/checks/check_02_system_features.cmake index fe621d4855..0182fa22ae 100644 --- a/cmake/checks/check_02_system_features.cmake +++ b/cmake/checks/check_02_system_features.cmake @@ -16,16 +16,16 @@ # # This file sets up: # -# HAVE_GETHOSTNAME -# HAVE_GETPID -# HAVE_JN -# HAVE_RAND_R -# HAVE_SYS_RESOURCE_H -# HAVE_SYS_TIME_H -# HAVE_SYS_TIMES_H -# HAVE_SYS_TYPES_H -# HAVE_TIMES -# HAVE_UNISTD_H +# DEAL_II_HAVE_GETHOSTNAME +# DEAL_II_HAVE_GETPID +# DEAL_II_HAVE_JN +# DEAL_II_HAVE_RAND_R +# DEAL_II_HAVE_SYS_RESOURCE_H +# DEAL_II_HAVE_SYS_TIME_H +# DEAL_II_HAVE_SYS_TIMES_H +# DEAL_II_HAVE_SYS_TYPES_H +# DEAL_II_HAVE_TIMES +# DEAL_II_HAVE_UNISTD_H # DEAL_II_MSVC # @@ -39,20 +39,20 @@ # # Check for various posix (and linux) specific header files and symbols # -CHECK_INCLUDE_FILE_CXX("sys/resource.h" HAVE_SYS_RESOURCE_H) +CHECK_INCLUDE_FILE_CXX("sys/resource.h" DEAL_II_HAVE_SYS_RESOURCE_H) -CHECK_INCLUDE_FILE_CXX("sys/time.h" HAVE_SYS_TIME_H) +CHECK_INCLUDE_FILE_CXX("sys/time.h" DEAL_II_HAVE_SYS_TIME_H) -CHECK_INCLUDE_FILE_CXX("sys/times.h" HAVE_SYS_TIMES_H) -CHECK_CXX_SYMBOL_EXISTS("times" "sys/times.h" HAVE_TIMES) +CHECK_INCLUDE_FILE_CXX("sys/times.h" DEAL_II_HAVE_SYS_TIMES_H) +CHECK_CXX_SYMBOL_EXISTS("times" "sys/times.h" DEAL_II_HAVE_TIMES) -CHECK_INCLUDE_FILE_CXX("sys/types.h" HAVE_SYS_TYPES_H) +CHECK_INCLUDE_FILE_CXX("sys/types.h" DEAL_II_HAVE_SYS_TYPES_H) -CHECK_INCLUDE_FILE_CXX("unistd.h" HAVE_UNISTD_H) -CHECK_CXX_SYMBOL_EXISTS("gethostname" "unistd.h" HAVE_GETHOSTNAME) -CHECK_CXX_SYMBOL_EXISTS("getpid" "unistd.h" HAVE_GETPID) +CHECK_INCLUDE_FILE_CXX("unistd.h" DEAL_II_HAVE_UNISTD_H) +CHECK_CXX_SYMBOL_EXISTS("gethostname" "unistd.h" DEAL_II_HAVE_GETHOSTNAME) +CHECK_CXX_SYMBOL_EXISTS("getpid" "unistd.h" DEAL_II_HAVE_GETPID) -CHECK_CXX_SYMBOL_EXISTS("rand_r" "stdlib.h" HAVE_RAND_R) +CHECK_CXX_SYMBOL_EXISTS("rand_r" "stdlib.h" DEAL_II_HAVE_RAND_R) # # Do we have the Bessel function jn? @@ -62,9 +62,9 @@ MARK_AS_ADVANCED(m_LIBRARY) IF(NOT m_LIBRARY MATCHES "-NOTFOUND") LIST(APPEND CMAKE_REQUIRED_LIBRARIES ${m_LIBRARY}) - CHECK_CXX_SYMBOL_EXISTS("jn" "math.h" HAVE_JN) + CHECK_CXX_SYMBOL_EXISTS("jn" "math.h" DEAL_II_HAVE_JN) RESET_CMAKE_REQUIRED() - IF(HAVE_JN) + IF(DEAL_II_HAVE_JN) LIST(APPEND DEAL_II_LIBRARIES ${m_LIBRARY}) ENDIF() ENDIF() diff --git a/include/deal.II/base/config.h.in b/include/deal.II/base/config.h.in index 8fa54ae9a5..9a6028e65f 100644 --- a/include/deal.II/base/config.h.in +++ b/include/deal.II/base/config.h.in @@ -69,20 +69,20 @@ #cmakedefine DEAL_II_VECTOR_ITERATOR_IS_POINTER /** Define if the compiler provides __builtin_expect */ -#cmakedefine HAVE_BUILTIN_EXPECT +#cmakedefine DEAL_II_HAVE_BUILTIN_EXPECT /** Define if the compiler provides __verbose_terminate_handler */ -#cmakedefine HAVE_VERBOSE_TERMINATE +#cmakedefine DEAL_II_HAVE_VERBOSE_TERMINATE /** Define if deal.II is linked against a libc that provides stacktrace * debug information that can be printed out in the exception class * */ -#cmakedefine HAVE_GLIBC_STACKTRACE +#cmakedefine DEAL_II_HAVE_GLIBC_STACKTRACE /** Defined if the std c++ library provides a demangler conforming to the * GCC libstdc++ interface. */ -#cmakedefine HAVE_LIBSTDCXX_DEMANGLER +#cmakedefine DEAL_II_HAVE_LIBSTDCXX_DEMANGLER /** If already available, do not define at all. Otherwise, define to * __func__ if that is available. In all other cases, indicate that no @@ -139,10 +139,10 @@ #cmakedefine DEAL_II_HAVE_CXX11_IS_TRIVIALLY_COPYABLE /** Defined if isnan is available */ -#cmakedefine HAVE_ISNAN +#cmakedefine DEAL_II_HAVE_ISNAN /** Defined if _isnan is available */ -#cmakedefine HAVE_UNDERSCORE_ISNAN +#cmakedefine DEAL_II_HAVE_UNDERSCORE_ISNAN /** Defined if std::isfinite is available */ #cmakedefine DEAL_II_HAVE_ISFINITE @@ -153,34 +153,34 @@ ******************************************/ /** Defined if you have the header file */ -#cmakedefine HAVE_SYS_RESOURCE_H +#cmakedefine DEAL_II_HAVE_SYS_RESOURCE_H /** Defined if you have the header file. */ -#cmakedefine HAVE_SYS_TIME_H +#cmakedefine DEAL_II_HAVE_SYS_TIME_H /** Defined if you have the header file. */ -#cmakedefine HAVE_SYS_TIMES_H +#cmakedefine DEAL_II_HAVE_SYS_TIMES_H /** Defined if you have the header file. */ -#cmakedefine HAVE_SYS_TYPES_H +#cmakedefine DEAL_II_HAVE_SYS_TYPES_H /** Defined if you have the header file. */ -#cmakedefine HAVE_UNISTD_H +#cmakedefine DEAL_II_HAVE_UNISTD_H /** Defined if you have the "gethostname" function. */ -#cmakedefine HAVE_GETHOSTNAME +#cmakedefine DEAL_II_HAVE_GETHOSTNAME /** Defined if you have the "getpid' function. */ -#cmakedefine HAVE_GETPID +#cmakedefine DEAL_II_HAVE_GETPID /** Defined if you have the "rand_r" function */ -#cmakedefine HAVE_RAND_R +#cmakedefine DEAL_II_HAVE_RAND_R /** Defined if you have the "times" function. */ -#cmakedefine HAVE_TIMES +#cmakedefine DEAL_II_HAVE_TIMES /** Defined if you have the "jn" function. */ -#cmakedefine HAVE_JN +#cmakedefine DEAL_II_HAVE_JN /** Defined if deal.II was configured on a native Windows platform. */ #cmakedefine DEAL_II_MSVC @@ -267,15 +267,13 @@ #endif + /*************************************** * Configured in configure_hdf5.cmake: * ***************************************/ #cmakedefine DEAL_II_WITH_HDF5 -#ifdef DEAL_II_WITH_HDF5 -/** Compatibility definition (with naming from deal.II < 8.0): */ -# define DEAL_II_HAVE_HDF5 -#endif + /***************************************** @@ -283,49 +281,6 @@ *****************************************/ #cmakedefine DEAL_II_WITH_LAPACK -#ifdef DEAL_II_WITH_LAPACK -/** Compatibility definition (with naming from deal.II < 8.0): */ -# define HAVE_LIBLAPACK -# define HAVE_DAXPY_ -# define HAVE_DGEEVX_ -# define HAVE_DGEEV_ -# define HAVE_DGELSD_ -# define HAVE_DGEMM_ -# define HAVE_DGEMV_ -# define HAVE_DGEQRF_ -# define HAVE_DGESDD_ -# define HAVE_DGESVD_ -# define HAVE_DGETRF_ -# define HAVE_DGETRI_ -# define HAVE_DGETRS_ -# define HAVE_DORGQR_ -# define HAVE_DORMQR_ -# define HAVE_DSTEV_ -# define HAVE_DSYEVX_ -# define HAVE_DSYGV_ -# define HAVE_DSYGVX_ -# define HAVE_DTRTRS_ -# define HAVE_SAXPY_ -# define HAVE_SGEEVX_ -# define HAVE_SGEEV_ -# define HAVE_SGELSD_ -# define HAVE_SGEMM_ -# define HAVE_SGEMV_ -# define HAVE_SGEQRF_ -# define HAVE_SGESDD_ -# define HAVE_SGESVD_ -# define HAVE_SGETRF_ -# define HAVE_SGETRI_ -# define HAVE_SGETRS_ -# define HAVE_SORGQR_ -# define HAVE_SORMQR_ -# define HAVE_SSTEV_ -# define HAVE_SSYEVX_ -# define HAVE_SSYGV_ -# define HAVE_SSYGVX_ -# define HAVE_STRTRS_ -#endif - /**************************************** @@ -373,10 +328,6 @@ *****************************************/ #cmakedefine DEAL_II_WITH_NETCDF -#ifdef DEAL_II_WITH_NETCDF -/** Compatibility definition (with naming from deal.II < 8.0): */ -# define HAVE_LIBNETCDF -#endif /**************************************** @@ -520,10 +471,6 @@ *****************************************/ #cmakedefine DEAL_II_WITH_ZLIB -#ifdef DEAL_II_WITH_ZLIB -/** Compatibility definition (with naming from deal.II < 8.0): */ -# define HAVE_LIBZ -#endif /******************************************* @@ -553,10 +500,6 @@ ******************************************/ #cmakedefine DEAL_II_WITH_UMFPACK -#ifdef DEAL_II_WITH_UMFPACK -/** Compatibility definition (with naming from deal.II < 8.0): */ -# define HAVE_LIBUMFPACK -#endif /********************************************** diff --git a/include/deal.II/base/exceptions.h b/include/deal.II/base/exceptions.h index 00de2c0bc1..205ef0ce64 100644 --- a/include/deal.II/base/exceptions.h +++ b/include/deal.II/base/exceptions.h @@ -134,7 +134,7 @@ protected: */ int n_stacktrace_frames; -#ifdef HAVE_GLIBC_STACKTRACE +#ifdef DEAL_II_HAVE_GLIBC_STACKTRACE /** * array of pointers that contains the raw stack trace */ @@ -344,7 +344,7 @@ namespace deal_II_exceptions * @ingroup Exceptions * @author Wolfgang Bangerth, 1997, 1998, Matthias Maier, 2013 */ -#ifdef HAVE_BUILTIN_EXPECT +#ifdef DEAL_II_HAVE_BUILTIN_EXPECT #define AssertThrow(cond, exc) \ { \ if (__builtin_expect(!(cond), false)) \ @@ -352,7 +352,7 @@ namespace deal_II_exceptions issue_error(::dealii::deal_II_exceptions::internals::throw_on_exception,\ __FILE__, __LINE__, __PRETTY_FUNCTION__, #cond, #exc, exc); \ } -#else /*ifdef HAVE_BUILTIN_EXPECT*/ +#else /*ifdef DEAL_II_HAVE_BUILTIN_EXPECT*/ #define AssertThrow(cond, exc) \ { \ if (!(cond)) \ @@ -360,7 +360,7 @@ namespace deal_II_exceptions issue_error(::dealii::deal_II_exceptions::internals::throw_on_exception,\ __FILE__, __LINE__, __PRETTY_FUNCTION__, #cond, #exc, exc); \ } -#endif /*ifdef HAVE_BUILTIN_EXPECT*/ +#endif /*ifdef DEAL_II_HAVE_BUILTIN_EXPECT*/ diff --git a/include/deal.II/base/logstream.h b/include/deal.II/base/logstream.h index f3fabdc4bd..427b8b6a62 100644 --- a/include/deal.II/base/logstream.h +++ b/include/deal.II/base/logstream.h @@ -28,7 +28,7 @@ #include #include -#ifdef HAVE_SYS_TIMES_H +#ifdef DEAL_II_HAVE_SYS_TIMES_H # include #else struct tms diff --git a/include/deal.II/lac/full_matrix.templates.h b/include/deal.II/lac/full_matrix.templates.h index 1f85e1a18e..5b12d82212 100644 --- a/include/deal.II/lac/full_matrix.templates.h +++ b/include/deal.II/lac/full_matrix.templates.h @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 1999 - 2013 by the deal.II authors +// Copyright (C) 1999 - 2014 by the deal.II authors // // This file is part of the deal.II library. // @@ -546,7 +546,7 @@ void FullMatrix::mmult (FullMatrix &dst, // see if we can use BLAS algorithms for this and if the type for 'number' // works for us (it is usually not efficient to use BLAS for very small // matrices): -#if defined(HAVE_DGEMM_) && defined (HAVE_SGEMM_) +#if DEAL_II_WITH_LAPACK if ((types_are_equal::value || types_are_equal::value) @@ -616,7 +616,7 @@ void FullMatrix::Tmmult (FullMatrix &dst, // see if we can use BLAS algorithms for this and if the type for 'number' // works for us (it is usually not efficient to use BLAS for very small // matrices): -#if defined(HAVE_DGEMM_) && defined (HAVE_SGEMM_) +#if DEAL_II_WITH_LAPACK if ((types_are_equal::value || types_are_equal::value) @@ -706,7 +706,7 @@ void FullMatrix::mTmult (FullMatrix &dst, // see if we can use BLAS algorithms for this and if the type for 'number' // works for us (it is usually not efficient to use BLAS for very small // matrices): -#if defined(HAVE_DGEMM_) && defined (HAVE_SGEMM_) +#if DEAL_II_WITH_LAPACK if ((types_are_equal::value || types_are_equal::value) @@ -794,7 +794,7 @@ void FullMatrix::TmTmult (FullMatrix &dst, // see if we can use BLAS algorithms for this and if the type for 'number' // works for us (it is usually not efficient to use BLAS for very small // matrices): -#if defined(HAVE_DGEMM_) && defined (HAVE_SGEMM_) +#if DEAL_II_WITH_LAPACK if ((types_are_equal::value || types_are_equal::value) @@ -1713,8 +1713,7 @@ FullMatrix::gauss_jordan () // works for us (it is usually not // efficient to use Lapack for very small // matrices): -#if defined(HAVE_DGETRF_) && defined (HAVE_SGETRF_) && \ - defined(HAVE_DGETRI_) && defined (HAVE_SGETRI_) +#if DEAL_II_WITH_LAPACK if (types_are_equal::value || types_are_equal::value) diff --git a/include/deal.II/lac/lapack_templates.h b/include/deal.II/lac/lapack_templates.h index f23bc7071b..2762c7da65 100644 --- a/include/deal.II/lac/lapack_templates.h +++ b/include/deal.II/lac/lapack_templates.h @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2005 - 2013 by the deal.II authors +// Copyright (C) 2005 - 2014 by the deal.II authors // // This file is part of the deal.II library. // @@ -259,7 +259,7 @@ axpy (const int *, const number1 *, const number2 *, const int *, number3 *, con Assert (false, ExcNotImplemented()); } -#ifdef HAVE_DAXPY_ +#ifdef DEAL_II_WITH_LAPACK inline void axpy (const int *n, const double *alpha, const double *x, const int *incx, double *y, const int *incy) { @@ -274,7 +274,7 @@ axpy (const int *, const double *, const double *, const int *, double *, const #endif -#ifdef HAVE_SAXPY_ +#ifdef DEAL_II_WITH_LAPACK inline void axpy (const int *n, const float *alpha, const float *x, const int *incx, float *y, const int *incy) { @@ -297,7 +297,7 @@ gemv (const char *, const int *, const int *, const number1 *, const number2 *, Assert (false, ExcNotImplemented()); } -#ifdef HAVE_DGEMV_ +#ifdef DEAL_II_WITH_LAPACK inline void gemv (const char *trans, const int *m, const int *n, const double *alpha, const double *A, const int *lda, const double *x, const int *incx, const double *b, double *y, const int *incy) { @@ -312,7 +312,7 @@ gemv (const char *, const int *, const int *, const double *, const double *, co #endif -#ifdef HAVE_SGEMV_ +#ifdef DEAL_II_WITH_LAPACK inline void gemv (const char *trans, const int *m, const int *n, const float *alpha, const float *A, const int *lda, const float *x, const int *incx, const float *b, float *y, const int *incy) { @@ -335,7 +335,7 @@ gemm (const char *, const char *, const int *, const int *, const int *, const n Assert (false, ExcNotImplemented()); } -#ifdef HAVE_DGEMM_ +#ifdef DEAL_II_WITH_LAPACK inline void gemm (const char *transa, const char *transb, const int *m, const int *n, const int *k, const double *alpha, const double *A, const int *lda, const double *B, const int *ldb, const double *beta, double *C, const int *ldc) { @@ -350,7 +350,7 @@ gemm (const char *, const char *, const int *, const int *, const int *, const d #endif -#ifdef HAVE_SGEMM_ +#ifdef DEAL_II_WITH_LAPACK inline void gemm (const char *transa, const char *transb, const int *m, const int *n, const int *k, const float *alpha, const float *A, const int *lda, const float *B, const int *ldb, const float *beta, float *C, const int *ldc) { @@ -373,7 +373,7 @@ getrf (const int *, const int *, number1 *, const int *, int *, int *) Assert (false, ExcNotImplemented()); } -#ifdef HAVE_DGETRF_ +#ifdef DEAL_II_WITH_LAPACK inline void getrf (const int *m, const int *n, double *A, const int *lda, int *ipiv, int *info) { @@ -388,7 +388,7 @@ getrf (const int *, const int *, double *, const int *, int *, int *) #endif -#ifdef HAVE_SGETRF_ +#ifdef DEAL_II_WITH_LAPACK inline void getrf (const int *m, const int *n, float *A, const int *lda, int *ipiv, int *info) { @@ -411,7 +411,7 @@ getrs (const char *, const int *, const int *, const number1 *, const int *, con Assert (false, ExcNotImplemented()); } -#ifdef HAVE_DGETRS_ +#ifdef DEAL_II_WITH_LAPACK inline void getrs (const char *trans, const int *n, const int *nrhs, const double *A, const int *lda, const int *ipiv, double *b, const int *ldb, int *info) { @@ -426,7 +426,7 @@ getrs (const char *, const int *, const int *, const double *, const int *, cons #endif -#ifdef HAVE_SGETRS_ +#ifdef DEAL_II_WITH_LAPACK inline void getrs (const char *trans, const int *n, const int *nrhs, const float *A, const int *lda, const int *ipiv, float *b, const int *ldb, int *info) { @@ -449,7 +449,7 @@ getri (const int *, number1 *, const int *, int *, number2 *, const int *, int * Assert (false, ExcNotImplemented()); } -#ifdef HAVE_DGETRI_ +#ifdef DEAL_II_WITH_LAPACK inline void getri (const int *n, double *A, const int *lda, int *ipiv, double *inv_work, const int *lwork, int *info) { @@ -464,7 +464,7 @@ getri (const int *, double *, const int *, int *, double *, const int *, int *) #endif -#ifdef HAVE_SGETRI_ +#ifdef DEAL_II_WITH_LAPACK inline void getri (const int *n, float *A, const int *lda, int *ipiv, float *inv_work, const int *lwork, int *info) { @@ -487,7 +487,7 @@ geqrf (const int *, const int *, number1 *, const int *, number2 *, number3 *, c Assert (false, ExcNotImplemented()); } -#ifdef HAVE_DGEQRF_ +#ifdef DEAL_II_WITH_LAPACK inline void geqrf (const int *m, const int *n, double *A, const int *lda, double *tau, double *work, const int *lwork, int *info) { @@ -502,7 +502,7 @@ geqrf (const int *, const int *, double *, const int *, double *, double *, cons #endif -#ifdef HAVE_SGEQRF_ +#ifdef DEAL_II_WITH_LAPACK inline void geqrf (const int *m, const int *n, float *A, const int *lda, float *tau, float *work, const int *lwork, int *info) { @@ -525,7 +525,7 @@ ormqr (const char *, const char *, const int *, const int *, const int *, const Assert (false, ExcNotImplemented()); } -#ifdef HAVE_DORMQR_ +#ifdef DEAL_II_WITH_LAPACK inline void ormqr (const char *side, const char *trans, const int *m, const int *n, const int *k, const double *A, const int *lda, const double *tau, double *B, const int *ldb, double *work, const int *lwork, int *info) { @@ -540,7 +540,7 @@ ormqr (const char *, const char *, const int *, const int *, const int *, const #endif -#ifdef HAVE_SORMQR_ +#ifdef DEAL_II_WITH_LAPACK inline void ormqr (const char *side, const char *trans, const int *m, const int *n, const int *k, const float *A, const int *lda, const float *tau, float *B, const int *ldb, float *work, const int *lwork, int *info) { @@ -563,7 +563,7 @@ orgqr (const int *, const int *, const int *, const number1 *, const int *, cons Assert (false, ExcNotImplemented()); } -#ifdef HAVE_DORGQR_ +#ifdef DEAL_II_WITH_LAPACK inline void orgqr (const int *m, const int *n, const int *k, const double *A, const int *lda, const double *tau, double *work, const int *lwork, int *info) { @@ -578,7 +578,7 @@ orgqr (const int *, const int *, const int *, const double *, const int *, const #endif -#ifdef HAVE_SORGQR_ +#ifdef DEAL_II_WITH_LAPACK inline void orgqr (const int *m, const int *n, const int *k, const float *A, const int *lda, const float *tau, float *work, const int *lwork, int *info) { @@ -601,7 +601,7 @@ trtrs (const char *, const char *, const char *, const int *, const int *, const Assert (false, ExcNotImplemented()); } -#ifdef HAVE_DTRTRS_ +#ifdef DEAL_II_WITH_LAPACK inline void trtrs (const char *uplo, const char *trans, const char *diag, const int *n, const int *n_rhs, const double *A, const int *lda, double *B, const int *ldb, int *info) { @@ -616,7 +616,7 @@ trtrs (const char *, const char *, const char *, const int *, const int *, const #endif -#ifdef HAVE_STRTRS_ +#ifdef DEAL_II_WITH_LAPACK inline void trtrs (const char *uplo, const char *trans, const char *diag, const int *n, const int *n_rhs, const float *A, const int *lda, float *B, const int *ldb, int *info) { @@ -639,7 +639,7 @@ geev (const char *, const char *, const int *, number1 *, const int *, number2 * Assert (false, ExcNotImplemented()); } -#ifdef HAVE_DGEEV_ +#ifdef DEAL_II_WITH_LAPACK inline void geev (const char *jobvl, const char *jobvr, const int *n, double *A, const int *lda, double *lambda_re, double *lambda_im, double *vl, const int *ldvl, double *vr, const int *ldva, double *work, const int *lwork, int *info) { @@ -654,7 +654,7 @@ geev (const char *, const char *, const int *, double *, const int *, double *, #endif -#ifdef HAVE_SGEEV_ +#ifdef DEAL_II_WITH_LAPACK inline void geev (const char *jobvl, const char *jobvr, const int *n, float *A, const int *lda, float *lambda_re, float *lambda_im, float *vl, const int *ldvl, float *vr, const int *ldva, float *work, const int *lwork, int *info) { @@ -677,7 +677,7 @@ geevx (const char *, const char *, const char *, const char *, const int *, numb Assert (false, ExcNotImplemented()); } -#ifdef HAVE_DGEEVX_ +#ifdef DEAL_II_WITH_LAPACK inline void geevx (const char *balanc, const char *jobvl, const char *jobvr, const char *sense, const int *n, double *A, const int *lda, double *lambda_re, double *lambda_im, double *vl, const int *ldvl, double *vr, const int *ldvr, int *ilo, int *ihi, double *scale, double *abnrm, double *rconde, double *rcondv, double *work, const int *lwork, int *iwork, int *info) { @@ -692,7 +692,7 @@ geevx (const char *, const char *, const char *, const char *, const int *, doub #endif -#ifdef HAVE_SGEEVX_ +#ifdef DEAL_II_WITH_LAPACK inline void geevx (const char *balanc, const char *jobvl, const char *jobvr, const char *sense, const int *n, float *A, const int *lda, float *lambda_re, float *lambda_im, float *vl, const int *ldvl, float *vr, const int *ldvr, int *ilo, int *ihi, float *scale, float *abnrm, float *rconde, float *rcondv, float *work, const int *lwork, int *iwork, int *info) { @@ -715,7 +715,7 @@ syev (const char *, const char *, const int *, number1 *, const int *, number2 * Assert (false, ExcNotImplemented()); } -#ifdef HAVE_DSYEV_ +#ifdef DEAL_II_WITH_LAPACK inline void syev (const char *jobz, const char *uplo, const int *n, double *A, const int *lda, double *w, double *work, const int *lwork, int *info) { @@ -730,7 +730,7 @@ syev (const char *, const char *, const int *, double *, const int *, double *, #endif -#ifdef HAVE_SSYEV_ +#ifdef DEAL_II_WITH_LAPACK inline void syev (const char *jobz, const char *uplo, const int *n, float *A, const int *lda, float *w, float *work, const int *lwork, int *info) { @@ -753,7 +753,7 @@ syevx (const char *, const char *, const char *, const int *, number1 *, const i Assert (false, ExcNotImplemented()); } -#ifdef HAVE_DSYEVX_ +#ifdef DEAL_II_WITH_LAPACK inline void syevx (const char *jobz, const char *range, const char *uplo, const int *n, double *A, const int *lda, const double *vl, const double *vu, const int *il, const int *iu, const double *abstol, int *m, double *w, double *z, const int *ldz, double *work, const int *lwork, int *iwork, int *ifail, int *info) { @@ -768,7 +768,7 @@ syevx (const char *, const char *, const char *, const int *, double *, const in #endif -#ifdef HAVE_SSYEVX_ +#ifdef DEAL_II_WITH_LAPACK inline void syevx (const char *jobz, const char *range, const char *uplo, const int *n, float *A, const int *lda, const float *vl, const float *vu, const int *il, const int *iu, const float *abstol, int *m, float *w, float *z, const int *ldz, float *work, const int *lwork, int *iwork, int *ifail, int *info) { @@ -791,7 +791,7 @@ sygv (const int *, const char *, const char *, const int *, number1 *, const int Assert (false, ExcNotImplemented()); } -#ifdef HAVE_DSYGV_ +#ifdef DEAL_II_WITH_LAPACK inline void sygv (const int *itype, const char *jobz, const char *uplo, const int *n, double *A, const int *lda, double *B, const int *ldb, double *w, double *work, const int *lwork, int *info) { @@ -806,7 +806,7 @@ sygv (const int *, const char *, const char *, const int *, double *, const int #endif -#ifdef HAVE_SSYGV_ +#ifdef DEAL_II_WITH_LAPACK inline void sygv (const int *itype, const char *jobz, const char *uplo, const int *n, float *A, const int *lda, float *B, const int *ldb, float *w, float *work, const int *lwork, int *info) { @@ -829,7 +829,7 @@ sygvx (const int *, const char *, const char *, const char *, const int *, numbe Assert (false, ExcNotImplemented()); } -#ifdef HAVE_DSYGVX_ +#ifdef DEAL_II_WITH_LAPACK inline void sygvx (const int *itype, const char *jobz, const char *range, const char *uplo, const int *n, double *A, const int *lda, double *B, const int *ldb, const double *vl, const double *vu, const int *il, const int *iu, const double *abstol, int *m, double *w, double *z, const int *ldz, double *work, const int *lwork, int *iwork, int *ifail, int *info) { @@ -844,7 +844,7 @@ sygvx (const int *, const char *, const char *, const char *, const int *, doubl #endif -#ifdef HAVE_SSYGVX_ +#ifdef DEAL_II_WITH_LAPACK inline void sygvx (const int *itype, const char *jobz, const char *range, const char *uplo, const int *n, float *A, const int *lda, float *B, const int *ldb, const float *vl, const float *vu, const int *il, const int *iu, const float *abstol, int *m, float *w, float *z, const int *ldz, float *work, const int *lwork, int *iwork, int *ifail, int *info) { @@ -867,7 +867,7 @@ gesdd (const char *, const int *, const int *, number1 *, const int *, number2 * Assert (false, ExcNotImplemented()); } -#ifdef HAVE_DGESDD_ +#ifdef DEAL_II_WITH_LAPACK inline void gesdd (const char *jobz, const int *m, const int *n, double *A, const int *lda, double *s, double *u, const int *ldu, double *vt, const int *ldvt, double *work, const int *lwork, int *iwork, int *info) { @@ -882,7 +882,7 @@ gesdd (const char *, const int *, const int *, double *, const int *, double *, #endif -#ifdef HAVE_SGESDD_ +#ifdef DEAL_II_WITH_LAPACK inline void gesdd (const char *jobz, const int *m, const int *n, float *A, const int *lda, float *s, float *u, const int *ldu, float *vt, const int *ldvt, float *work, const int *lwork, int *iwork, int *info) { @@ -905,7 +905,7 @@ gesvd (int *, int *, const int *, const int *, number1 *, const int *, number2 * Assert (false, ExcNotImplemented()); } -#ifdef HAVE_DGESVD_ +#ifdef DEAL_II_WITH_LAPACK inline void gesvd (int *jobu, int *jobvt, const int *n, const int *m, double *A, const int *lda, double *s, double *u, const int *ldu, double *vt, const int *ldvt, double *work, const int *lwork, int *info) { @@ -920,7 +920,7 @@ gesvd (int *, int *, const int *, const int *, double *, const int *, double *, #endif -#ifdef HAVE_SGESVD_ +#ifdef DEAL_II_WITH_LAPACK inline void gesvd (int *jobu, int *jobvt, const int *n, const int *m, float *A, const int *lda, float *s, float *u, const int *ldu, float *vt, const int *ldvt, float *work, const int *lwork, int *info) { @@ -943,7 +943,7 @@ gelsd (const int *, const int *, const int *, const number1 *, const int *, numb Assert (false, ExcNotImplemented()); } -#ifdef HAVE_DGELSD_ +#ifdef DEAL_II_WITH_LAPACK inline void gelsd (const int *m, const int *n, const int *nrhs, const double *A, const int *lda, double *B, const int *ldb, double *s, const double *rcond, int *rank, double *work, const int *lwork, int *iwork, int *info) { @@ -958,7 +958,7 @@ gelsd (const int *, const int *, const int *, const double *, const int *, doubl #endif -#ifdef HAVE_SGELSD_ +#ifdef DEAL_II_WITH_LAPACK inline void gelsd (const int *m, const int *n, const int *nrhs, const float *A, const int *lda, float *B, const int *ldb, float *s, const float *rcond, int *rank, float *work, const int *lwork, int *iwork, int *info) { @@ -981,7 +981,7 @@ stev (const char *, const int *, number1 *, number2 *, number3 *, const int *, n Assert (false, ExcNotImplemented()); } -#ifdef HAVE_DSTEV_ +#ifdef DEAL_II_WITH_LAPACK inline void stev (const char *jobz, const int *n, double *d, double *e, double *z, const int *ldz, double *work, int *info) { @@ -996,7 +996,7 @@ stev (const char *, const int *, double *, double *, double *, const int *, doub #endif -#ifdef HAVE_SSTEV_ +#ifdef DEAL_II_WITH_LAPACK inline void stev (const char *jobz, const int *n, float *d, float *e, float *z, const int *ldz, float *work, int *info) { diff --git a/include/deal.II/lac/solver_control.h b/include/deal.II/lac/solver_control.h index b094be17a9..c93b81a560 100644 --- a/include/deal.II/lac/solver_control.h +++ b/include/deal.II/lac/solver_control.h @@ -179,7 +179,7 @@ public: * value (@p NaN). Note, however, that this check is only performed if the * @p isnan function is provided by the operating system, which is not * always true. The @p configure scripts checks for this and sets the flag - * @p HAVE_ISNAN in the file Make.global_options if this function + * @p DEAL_II_HAVE_ISNAN in the file Make.global_options if this function * was found. * * check() additionally preserves @p step and @p check_value. These diff --git a/include/deal.II/opencascade/boundary_lib.h b/include/deal.II/opencascade/boundary_lib.h index af936c0574..0a62904f63 100644 --- a/include/deal.II/opencascade/boundary_lib.h +++ b/include/deal.II/opencascade/boundary_lib.h @@ -25,16 +25,8 @@ #include #include -// We have to clean up certain name clashes prior to any opencascade header -// inclusion. Unfortunately, this is clumsy and should be resolved by -// renaming our very own includes someday... -// --Maier, 2014 +// opencascade needs "HAVE_CONFIG_H" to be exported... #define HAVE_CONFIG_H -#undef HAVE_SYS_TYPES_H -#undef HAVE_SYS_TIMES_H -#undef HAVE_SYS_TIME_H -#undef HAVE_UNISTD_H -#undef HAVE_GETHOSTNAME #include #include #undef HAVE_CONFIG_H diff --git a/include/deal.II/opencascade/utilities.h b/include/deal.II/opencascade/utilities.h index d01cc623eb..cc7b18e45d 100644 --- a/include/deal.II/opencascade/utilities.h +++ b/include/deal.II/opencascade/utilities.h @@ -27,16 +27,8 @@ #include -// We have to clean up certain name clashes prior to any opencascade header -// inclusion. Unfortunately, this is clumsy and should be resolved by -// renaming our very own includes someday... -// --Maier, 2014 +// opencascade needs "HAVE_CONFIG_H" to be exported... #define HAVE_CONFIG_H -#undef HAVE_SYS_TYPES_H -#undef HAVE_SYS_TIMES_H -#undef HAVE_SYS_TIME_H -#undef HAVE_UNISTD_H -#undef HAVE_GETHOSTNAME #include #include #include diff --git a/source/base/exceptions.cc b/source/base/exceptions.cc index bb7ec98f49..aa141cce19 100644 --- a/source/base/exceptions.cc +++ b/source/base/exceptions.cc @@ -20,11 +20,11 @@ #include #include -#ifdef HAVE_GLIBC_STACKTRACE +#ifdef DEAL_II_HAVE_GLIBC_STACKTRACE # include #endif -#ifdef HAVE_LIBSTDCXX_DEMANGLER +#ifdef DEAL_II_HAVE_LIBSTDCXX_DEMANGLER # include #endif @@ -112,7 +112,7 @@ void ExceptionBase::set_fields (const char *f, // to when we need it (see what() below). This is for performance // reasons, as this requires loading libraries and can take in the // order of seconds on some machines. -#ifdef HAVE_GLIBC_STACKTRACE +#ifdef DEAL_II_HAVE_GLIBC_STACKTRACE n_stacktrace_frames = backtrace(raw_stacktrace, 25); #endif } @@ -122,7 +122,7 @@ const char *ExceptionBase::what() const throw() // If no error c_string was generated so far, do it now: if (what_str == "") { -#ifdef HAVE_GLIBC_STACKTRACE +#ifdef DEAL_II_HAVE_GLIBC_STACKTRACE // We have deferred the symbol lookup to this point to avoid costly // runtime penalties due to linkage of external libraries by // backtrace_symbols. @@ -213,7 +213,7 @@ void ExceptionBase::print_stack_trace (std::ostream &out) const // unmangled one (skipping address and offset). treat "main" // differently, since it is apparently demangled as "unsigned int" // for unknown reasons :-) if we can, demangle the function name -#ifdef HAVE_LIBSTDCXX_DEMANGLER +#ifdef DEAL_II_HAVE_LIBSTDCXX_DEMANGLER int status; char *p = abi::__cxa_demangle(functionname.c_str(), 0, 0, &status); @@ -354,7 +354,7 @@ DEAL_II_NAMESPACE_CLOSE // catch clause in main(), they wonder where that abort may be coming from. // The terminate handler then at least says what is missing in their // program. -#ifdef HAVE_VERBOSE_TERMINATE +#ifdef DEAL_II_HAVE_VERBOSE_TERMINATE namespace __gnu_cxx { extern void __verbose_terminate_handler (); diff --git a/source/base/function_lib.cc b/source/base/function_lib.cc index 3d2dcef91c..0f8e0cdec6 100644 --- a/source/base/function_lib.cc +++ b/source/base/function_lib.cc @@ -2177,7 +2177,7 @@ namespace Functions { Assert(dim==2, ExcNotImplemented()); const double r = p.distance(center); -#ifdef HAVE_JN +#ifdef DEAL_II_HAVE_JN return jn(order, r*wave_number); #else Assert(false, ExcMessage("Bessel function jn was not found by configure")); @@ -2197,7 +2197,7 @@ namespace Functions AssertDimension(points.size(), values.size()); for (unsigned int k=0; k #include -#ifdef HAVE_UNISTD_H +#ifdef DEAL_II_HAVE_UNISTD_H # include #endif @@ -35,7 +35,7 @@ JobIdentifier::JobIdentifier() time_t t = std::time(0); id = std::string("JobId "); -#if defined(HAVE_UNISTD_H) && defined(HAVE_GETHOSTNAME) +#if defined(DEAL_II_HAVE_UNISTD_H) && defined(DEAL_II_HAVE_GETHOSTNAME) char name[100]; gethostname(name,99); id += std::string(name) + std::string(" "); diff --git a/source/base/logstream.cc b/source/base/logstream.cc index 140711022a..2b301dd26d 100644 --- a/source/base/logstream.cc +++ b/source/base/logstream.cc @@ -18,11 +18,11 @@ #include #include -#ifdef HAVE_SYS_RESOURCE_H +#ifdef DEAL_II_HAVE_SYS_RESOURCE_H # include #endif -#ifdef HAVE_UNISTD_H +#ifdef DEAL_II_HAVE_UNISTD_H # include #endif @@ -62,7 +62,7 @@ LogStream::LogStream() { get_prefixes().push("DEAL:"); -#if defined(HAVE_UNISTD_H) && defined(HAVE_TIMES) +#if defined(DEAL_II_HAVE_UNISTD_H) && defined(DEAL_II_HAVE_TIMES) reference_time_val = 1./sysconf(_SC_CLK_TCK) * times(&reference_tms); #endif @@ -426,7 +426,7 @@ LogStream::get_prefixes() const void LogStream::print_line_head() { -#ifdef HAVE_SYS_RESOURCE_H +#ifdef DEAL_II_HAVE_SYS_RESOURCE_H rusage usage; double utime = 0.; if (print_utime) @@ -521,7 +521,7 @@ void LogStream::timestamp () { struct tms current_tms; -#if defined(HAVE_UNISTD_H) && defined(HAVE_TIMES) +#if defined(DEAL_II_HAVE_UNISTD_H) && defined(DEAL_II_HAVE_TIMES) const clock_t tick = sysconf(_SC_CLK_TCK); const double time = 1./tick * times(¤t_tms); #else diff --git a/source/base/multithread_info.cc b/source/base/multithread_info.cc index 787ba9cd56..0c162e16bc 100644 --- a/source/base/multithread_info.cc +++ b/source/base/multithread_info.cc @@ -16,7 +16,7 @@ #include #include -#ifdef HAVE_UNISTD_H +#ifdef DEAL_II_HAVE_UNISTD_H # include #endif diff --git a/source/base/thread_management.cc b/source/base/thread_management.cc index 381a8853b1..d6a614e651 100644 --- a/source/base/thread_management.cc +++ b/source/base/thread_management.cc @@ -20,7 +20,7 @@ #include #include -#ifdef HAVE_UNISTD_H +#ifdef DEAL_II_HAVE_UNISTD_H # include #endif @@ -137,7 +137,7 @@ namespace Threads { #ifdef SYS_gettid const pid_t this_id = syscall(SYS_gettid); -#elif defined(HAVE_UNISTD_H) && defined(HAVE_GETPID) +#elif defined(DEAL_II_HAVE_UNISTD_H) && defined(DEAL_II_HAVE_GETPID) const pid_t this_id = getpid(); #else const unsigned int this_id = 0; diff --git a/source/base/timer.cc b/source/base/timer.cc index e28a0b0146..a4ef54a23d 100644 --- a/source/base/timer.cc +++ b/source/base/timer.cc @@ -25,7 +25,7 @@ // these includes should probably be properly // ./configure'd using the AC_HEADER_TIME macro: -#if defined(HAVE_SYS_TIME_H) && defined(HAVE_SYS_RESOURCE_H) +#if defined(DEAL_II_HAVE_SYS_TIME_H) && defined(DEAL_II_HAVE_SYS_RESOURCE_H) # include # include #endif @@ -111,7 +111,7 @@ void Timer::start () MPI_Barrier(mpi_communicator); #endif -#if defined(HAVE_SYS_TIME_H) && defined(HAVE_SYS_RESOURCE_H) +#if defined(DEAL_II_HAVE_SYS_TIME_H) && defined(DEAL_II_HAVE_SYS_RESOURCE_H) //TODO: Break this out into a function like the functions in //namespace windows above @@ -144,7 +144,7 @@ double Timer::stop () { running = false; -#if defined(HAVE_SYS_TIME_H) && defined(HAVE_SYS_RESOURCE_H) +#if defined(DEAL_II_HAVE_SYS_TIME_H) && defined(DEAL_II_HAVE_SYS_RESOURCE_H) //TODO: Break this out into a function like the functions in //namespace windows above rusage usage; @@ -206,7 +206,7 @@ double Timer::operator() () const { if (running) { -#if defined(HAVE_SYS_TIME_H) && defined(HAVE_SYS_RESOURCE_H) +#if defined(DEAL_II_HAVE_SYS_TIME_H) && defined(DEAL_II_HAVE_SYS_RESOURCE_H) rusage usage; getrusage (RUSAGE_SELF, &usage); const double dtime = usage.ru_utime.tv_sec + 1.e-6 * usage.ru_utime.tv_usec; @@ -251,7 +251,7 @@ double Timer::wall_time () const { if (running) { -#if defined(HAVE_SYS_TIME_H) && defined(HAVE_SYS_RESOURCE_H) +#if defined(DEAL_II_HAVE_SYS_TIME_H) && defined(DEAL_II_HAVE_SYS_RESOURCE_H) struct timeval wall_timer; gettimeofday(&wall_timer, NULL); return (wall_timer.tv_sec diff --git a/source/base/utilities.cc b/source/base/utilities.cc index 41582e8af7..5e26979285 100644 --- a/source/base/utilities.cc +++ b/source/base/utilities.cc @@ -416,7 +416,7 @@ namespace Utilities // between threads either, but at least it is reentrant. if you need // an exactly reproducible sequence even in multithreaded contexts, // then this is probably not the function to use. -#ifdef HAVE_RAND_R +#ifdef DEAL_II_HAVE_RAND_R static unsigned int seed = 0xabcd1234; const double y = 1.0*rand_r(&seed)/RAND_MAX; #else @@ -627,7 +627,7 @@ namespace Utilities std::string get_hostname () { -#if defined(HAVE_UNISTD_H) && defined(HAVE_GETHOSTNAME) +#if defined(DEAL_II_HAVE_UNISTD_H) && defined(DEAL_II_HAVE_GETHOSTNAME) const unsigned int N=1024; char hostname[N]; gethostname (&(hostname[0]), N-1); diff --git a/source/lac/solver_control.cc b/source/lac/solver_control.cc index 72949848bd..618ecf16c7 100644 --- a/source/lac/solver_control.cc +++ b/source/lac/solver_control.cc @@ -92,10 +92,10 @@ SolverControl::check (const unsigned int step, } if ((step >= maxsteps) || -#ifdef HAVE_ISNAN +#ifdef DEAL_II_HAVE_ISNAN isnan(check_value) || #else -# ifdef HAVE_UNDERSCORE_ISNAN +# ifdef DEAL_II_HAVE_UNDERSCORE_ISNAN // on Microsoft Windows, the // function is called _isnan _isnan(check_value) ||