From 6aa2106288f83645c1703d4c1cf76541392a4407 Mon Sep 17 00:00:00 2001 From: wolf Date: Mon, 9 Sep 2002 23:46:26 +0000 Subject: [PATCH] Export DEAL_II_PATH to programs through the preprocessor. git-svn-id: https://svn.dealii.org/trunk@6382 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/include/base/config.h.in | 3 ++ deal.II/configure | 51 ++++++++++++++------------- deal.II/configure.in | 10 ++++-- deal.II/doc/news/2002/c-3-4.html | 8 +++++ 4 files changed, 45 insertions(+), 27 deletions(-) diff --git a/deal.II/base/include/base/config.h.in b/deal.II/base/include/base/config.h.in index 2b2f43d6de..d7a8f74822 100644 --- a/deal.II/base/include/base/config.h.in +++ b/deal.II/base/include/base/config.h.in @@ -87,6 +87,9 @@ friends of the enclosing class. */ #undef DEAL_II_NESTED_CLASS_FRIEND_BUG +/* Path to the deal.II directory */ +#undef DEAL_II_PATH + /* Define if we have to work around a bug in Sun's Forte compiler. See the aclocal.m4 file in the top-level directory for a description of this bug. */ diff --git a/deal.II/configure b/deal.II/configure index 362f3b95da..51648cfd7f 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -1,9 +1,7 @@ #! /bin/sh -# From configure.in Revision: 1.117 . +# From configure.in Revision: 1.119 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.53a for deal.II $DEAL_II_VERSION. -# -# Report bugs to . +# Generated by GNU Autoconf 2.53a. # # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. @@ -269,12 +267,13 @@ SHELL=${CONFIG_SHELL-/bin/sh} : ${ac_max_here_lines=38} # Identity of this package. -PACKAGE_NAME='deal.II' -PACKAGE_TARNAME='deal-ii' -PACKAGE_VERSION='$DEAL_II_VERSION' -PACKAGE_STRING='deal.II $DEAL_II_VERSION' -PACKAGE_BUGREPORT='dealii@dealii.org' +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= +ac_unique_file="deal.II" ac_subdirs_all="$ac_subdirs_all contrib tests" # Initialize some variables set by options. @@ -744,7 +743,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures deal.II $DEAL_II_VERSION to adapt to many kinds of systems. +\`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -805,9 +804,7 @@ _ACEOF fi if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of deal.II $DEAL_II_VERSION:";; - esac + cat <<\_ACEOF Optional Features: @@ -842,7 +839,6 @@ Some influential environment variables: Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to . _ACEOF fi @@ -905,8 +901,6 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -deal.II configure $DEAL_II_VERSION -generated by GNU Autoconf 2.53a Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. @@ -920,7 +914,7 @@ cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by deal.II $as_me $DEAL_II_VERSION, which was +It was created by $as_me, which was generated by GNU Autoconf 2.53a. Invocation command line was $ $0 $@ @@ -1174,10 +1168,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - @@ -1216,8 +1206,9 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. -DEAL2_DIR=`pwd` +DEAL_II_PATH=`pwd` +DEAL_II_VERSION="`cat Version`" DEAL_II_MAJOR=`cat Version | perl -pi -e 's/^(\d+)\..*/$1/;'` DEAL_II_MINOR=`cat Version | perl -pi -e 's/^\d+\.(\d+).*/$1/;'` @@ -1231,12 +1222,21 @@ cat >>confdefs.h <<_ACEOF #define DEAL_II_MINOR $DEAL_II_MINOR _ACEOF + +cat >>confdefs.h <<_ACEOF +#define DEAL_II_PATH "$DEAL_II_PATH" +_ACEOF + echo "$as_me:$LINENO: result: Configuring deal.II version $DEAL_II_VERSION" >&5 echo "${ECHO_T}Configuring deal.II version $DEAL_II_VERSION" >&6 + +DEAL2_DIR=$DEAL_II_PATH + + # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 @@ -6867,7 +6867,7 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by deal.II $as_me $DEAL_II_VERSION, which was +This file was extended by $as_me, which was generated by GNU Autoconf 2.53a. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6926,7 +6926,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -deal.II config.status $DEAL_II_VERSION +config.status configured by $0, generated by GNU Autoconf 2.53a, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" @@ -7099,9 +7099,10 @@ s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t -s,@DEAL2_DIR@,$DEAL2_DIR,;t t s,@DEAL_II_MAJOR@,$DEAL_II_MAJOR,;t t s,@DEAL_II_MINOR@,$DEAL_II_MINOR,;t t +s,@DEAL_II_PATH@,$DEAL_II_PATH,;t t +s,@DEAL2_DIR@,$DEAL2_DIR,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t diff --git a/deal.II/configure.in b/deal.II/configure.in index 1ccd67dde6..e64f48b2f9 100644 --- a/deal.II/configure.in +++ b/deal.II/configure.in @@ -43,8 +43,7 @@ dnl Globals: Paths and versions dnl ------------------------------------------------------------- dnl Set the path to the deal.II libraries to `pwd` -DEAL2_DIR=`pwd` -AC_SUBST(DEAL2_DIR) +DEAL_II_PATH=`pwd` dnl Version numbers DEAL_II_VERSION="`cat Version`" @@ -57,10 +56,17 @@ 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 $DEAL_II_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_SYSTEM diff --git a/deal.II/doc/news/2002/c-3-4.html b/deal.II/doc/news/2002/c-3-4.html index 3284318ab0..2bc340c3a1 100644 --- a/deal.II/doc/news/2002/c-3-4.html +++ b/deal.II/doc/news/2002/c-3-4.html @@ -33,6 +33,14 @@ contributor's names are abbreviated by WB (Wolfgang Bangerth), GK

General

    +
  1. + New: base/config.h now exports the + deal.II base directory through the + DEAL_II_PATH preprocessor variable. +
    + (WB 2002/09/09) +

    +
  2. Removed: The forward declarations files have gone. We have never propagated their use in the example programs, but these files have been -- 2.39.5