From 07e0d51e24e59b24b9bd21a99ae2155e7e4c29cf Mon Sep 17 00:00:00 2001 From: bangerth Date: Fri, 10 Nov 2006 21:50:24 +0000 Subject: [PATCH] Don't use PACKAGE_NAME, etc. Rather, use DEAL_II_PACKAGE_NAME and similar. git-svn-id: https://svn.dealii.org/trunk@14184 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/source/data_out_base.cc | 4 +-- deal.II/configure | 28 +++++++++++++------- deal.II/configure.in | 35 ++++++++++++++++++------- deal.II/doc/news/changes.html | 39 +++++++++++++++++++++------- 4 files changed, 74 insertions(+), 32 deletions(-) diff --git a/deal.II/base/source/data_out_base.cc b/deal.II/base/source/data_out_base.cc index e0ae7a6b0a..8eeff0851b 100644 --- a/deal.II/base/source/data_out_base.cc +++ b/deal.II/base/source/data_out_base.cc @@ -3425,7 +3425,7 @@ write_deal_II_intermediate (const std::vector > &patches, // then write a header out << "[deal.II intermediate format graphics data]" << '\n' - << "[written by " << PACKAGE_STRING << "]" << '\n'; + << "[written by " << DEAL_II_PACKAGE_STRING << "]" << '\n'; out << data_names.size() << '\n'; for (unsigned int i=0; i::read (std::istream &in) getline (in, header); std::ostringstream s; - s << "[written by " << PACKAGE_STRING << "]"; + s << "[written by " << DEAL_II_PACKAGE_STRING << "]"; Assert (header == s.str(), ExcUnexpectedInput(s.str(),header)); } diff --git a/deal.II/configure b/deal.II/configure index 0225e17f75..d8428ae863 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -1399,6 +1399,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. DEAL_II_PATH=`pwd` + 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/;'` @@ -12659,7 +12660,16 @@ LDFLAGS="-L$DEAL_II_PATH/lib $LDFLAGS" - ac_config_files="$ac_config_files common/Make.global_options common/Makefile.template common/scripts/make_dependencies.pl Version doc/Makefile doc/doxygen/Makefile doc/doxygen/options.dox doc/doxygen/header.html doc/doxygen/header.tex" +process_files="common/Make.global_options + common/Makefile.template + common/scripts/make_dependencies.pl + Version + doc/Makefile + doc/doxygen/Makefile + doc/doxygen/options.dox + doc/doxygen/header.html + doc/doxygen/header.tex" + ac_config_files="$ac_config_files $process_files" test "x$prefix" = xNONE && prefix=$ac_default_prefix @@ -13131,15 +13141,7 @@ for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. - "common/Make.global_options" ) CONFIG_FILES="$CONFIG_FILES common/Make.global_options" ;; - "common/Makefile.template" ) CONFIG_FILES="$CONFIG_FILES common/Makefile.template" ;; - "common/scripts/make_dependencies.pl" ) CONFIG_FILES="$CONFIG_FILES common/scripts/make_dependencies.pl" ;; - "Version" ) CONFIG_FILES="$CONFIG_FILES Version" ;; - "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - "doc/doxygen/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/doxygen/Makefile" ;; - "doc/doxygen/options.dox" ) CONFIG_FILES="$CONFIG_FILES doc/doxygen/options.dox" ;; - "doc/doxygen/header.html" ) CONFIG_FILES="$CONFIG_FILES doc/doxygen/header.html" ;; - "doc/doxygen/header.tex" ) CONFIG_FILES="$CONFIG_FILES doc/doxygen/header.tex" ;; + "$process_files" ) CONFIG_FILES="$CONFIG_FILES $process_files" ;; "base/include/base/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS base/include/base/config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} @@ -13968,6 +13970,12 @@ echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;} fi +$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 base/include/base/config.h echo echo diff --git a/deal.II/configure.in b/deal.II/configure.in index f2310818ee..d5daacf2d5 100644 --- a/deal.II/configure.in +++ b/deal.II/configure.in @@ -46,6 +46,7 @@ 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/;'` @@ -645,16 +646,30 @@ AC_SUBST(LDFLAGSPIC) dnl Write output to the global options file and modify other files as well dnl that need some information -AC_OUTPUT([common/Make.global_options - common/Makefile.template - common/scripts/make_dependencies.pl - Version - doc/Makefile - doc/doxygen/Makefile - doc/doxygen/options.dox - doc/doxygen/header.html - doc/doxygen/header.tex]) - +process_files="common/Make.global_options + common/Makefile.template + common/scripts/make_dependencies.pl + Version + doc/Makefile + doc/doxygen/Makefile + doc/doxygen/options.dox + doc/doxygen/header.html + doc/doxygen/header.tex" +AC_OUTPUT($process_files) + +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 base/include/base/config.h echo echo diff --git a/deal.II/doc/news/changes.html b/deal.II/doc/news/changes.html index 8be1c82903..7130190b1e 100644 --- a/deal.II/doc/news/changes.html +++ b/deal.II/doc/news/changes.html @@ -397,18 +397,37 @@ inconvenience this causes.

base

    -
  1. Extended: The QGaussLobatto quadrature rule computes - Legendre-Gauss-Lobatto nodes and quadrature weights. -
    - (F. Prill 2006/11/02) +

  2. Changed: We used to set preprocessor variables + PACKAGE_NAME, PACKAGE_TARNAME, + PACKAGE_VERSION, PACKAGE_STRING, + PACKAGE_BUGREPORT in the file + <base/config.h>. These variables were automatically + set by the autoconf package, with which we generate the + ./configure script. However, these variables would conflict + if someone were to use a different package that also uses autoconf, + since that package would have the same variables, just set to different + values. The preprocessor warns about these cases. +
    + We now avoid this conflict by not using these names any more. Instead, + we use the preprocessor names as above, prefixed with + DEAL_II_. +
    + (WB 2006/11/10)

    + +
  3. Extended: The QGaussLobatto quadrature + rule computes Legendre-Gauss-Lobatto nodes and quadrature weights. +
    + (F. Prill 2006/11/02) +

    +
  4. Extended: The contract function family contracts two - tensors. There is now a new version of this function, that contracts a - tensor of rank three with a second one of rank two over given indices - index1 and index2 of the first and second tensor, - respectively, resulting in a tensor of rank three. -
    - (Tobias Leicht 2006/09/27) + tensors. There is now a new version of this function, that contracts a + tensor of rank three with a second one of rank two over given indices + index1 and index2 of the first and second tensor, + respectively, resulting in a tensor of rank three. +
    + (Tobias Leicht 2006/09/27)

  5. Fixed: The -- 2.39.5