From: Wolfgang Bangerth Date: Mon, 18 Sep 2000 07:52:52 +0000 (+0000) Subject: Also export version numbers to Makefiles. X-Git-Tag: v8.0.0~20101 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d69e5940a744f43bd81ed34e1999c2ffaca8c461;p=dealii.git Also export version numbers to Makefiles. git-svn-id: https://svn.dealii.org/trunk@3328 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/configure b/deal.II/configure index c62bf4385b..f976ec7c22 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -1,6 +1,6 @@ #! /bin/sh -# From configure.in Revision: 1.31 +# From configure.in Revision: 1.32 @@ -562,6 +562,20 @@ fi DEAL2_DIR=`pwd` +DEAL_2_MAJOR=`cat Version | perl -pi -e 's/^(\d+)\..*/$1/;'` +DEAL_2_MINOR=`cat Version | perl -pi -e 's/^\d+\.(\d+).*/$1/;'` +cat >> confdefs.h <> confdefs.h <&6 + + + ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do @@ -610,7 +624,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:614: checking host system type" >&5 +echo "configure:628: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -631,7 +645,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:635: checking target system type" >&5 +echo "configure:649: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -649,7 +663,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:653: checking build system type" >&5 +echo "configure:667: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -726,7 +740,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:730: checking for $ac_word" >&5 +echo "configure:744: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -756,7 +770,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:760: checking for $ac_word" >&5 +echo "configure:774: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -807,7 +821,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:811: checking for $ac_word" >&5 +echo "configure:825: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -839,7 +853,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:843: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:857: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -850,12 +864,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 854 "configure" +#line 868 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -881,12 +895,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:885: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:899: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:890: checking whether we are using GNU C" >&5 +echo "configure:904: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -895,7 +909,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -914,7 +928,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:918: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:932: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -948,7 +962,7 @@ fi # Extract the first word of "$CC", so it can be a program name with args. set dummy $CC; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:952: checking for $ac_word" >&5 +echo "configure:966: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -988,7 +1002,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:992: checking for $ac_word" >&5 +echo "configure:1006: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1020,7 +1034,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1024: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:1038: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1031,12 +1045,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 1035 "configure" +#line 1049 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:1040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1062,12 +1076,12 @@ if test $ac_cv_prog_cxx_works = no; then { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1066: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1080: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:1071: checking whether we are using GNU C++" >&5 +echo "configure:1085: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1076,7 +1090,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -1095,7 +1109,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:1099: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:1113: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1129,7 +1143,7 @@ fi # Extract the first word of "$CXX", so it can be a program name with args. set dummy $CXX; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1133: checking for $ac_word" >&5 +echo "configure:1147: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1194,7 +1208,7 @@ fi # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1198: checking for $ac_word" >&5 +echo "configure:1212: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1279,7 +1293,7 @@ fi if test $enablemultithreading = yes ; then echo $ac_n "checking for platform specific thread flags""... $ac_c" 1>&6 -echo "configure:1283: checking for platform specific thread flags" >&5 +echo "configure:1297: checking for platform specific thread flags" >&5 for i in threads mt pthread pthreads mthreads Kthread kthread invalid_last_entry; do CXXFLAGS="$CXXFLAGSG -$i" @@ -1315,10 +1329,10 @@ echo "configure:1283: checking for platform specific thread flags" >&5 echo $ac_n "checking for platform specific multi-threading defines""... $ac_c" 1>&6 -echo "configure:1319: checking for platform specific multi-threading defines" >&5 +echo "configure:1333: checking for platform specific multi-threading defines" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""not necessary"" 1>&6 @@ -1370,7 +1384,7 @@ fi if test $withmultithreading != no ; then echo $ac_n "checking for ACE""... $ac_c" 1>&6 -echo "configure:1374: checking for ACE" >&5 +echo "configure:1388: checking for ACE" >&5 if test -d $withmultithreading ; then echo "$ac_t""found" 1>&6 else @@ -1390,7 +1404,7 @@ if test "${with_blas+set}" = set; then withval="$with_blas" if test $withval != no ; then echo $ac_n "checking for BLAS""... $ac_c" 1>&6 -echo "configure:1394: checking for BLAS" >&5 +echo "configure:1408: checking for BLAS" >&5 if test -r $withval ; then echo "$ac_t""found" 1>&6 else @@ -1406,7 +1420,7 @@ EOF else echo $ac_n "checking for main in -lblas""... $ac_c" 1>&6 -echo "configure:1410: checking for main in -lblas" >&5 +echo "configure:1424: checking for main in -lblas" >&5 ac_lib_var=`echo blas'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1414,14 +1428,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lblas $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1453,7 +1467,7 @@ if test "${with_lapack+set}" = set; then withval="$with_lapack" if test $withval != no ; then echo $ac_n "checking for LAPACK""... $ac_c" 1>&6 -echo "configure:1457: checking for LAPACK" >&5 +echo "configure:1471: checking for LAPACK" >&5 if test -r $withval ; then echo "$ac_t""found" 1>&6 else @@ -1469,7 +1483,7 @@ EOF else echo $ac_n "checking for dgels_ in -llapack""... $ac_c" 1>&6 -echo "configure:1473: checking for dgels_ in -llapack" >&5 +echo "configure:1487: checking for dgels_ in -llapack" >&5 ac_lib_var=`echo lapack'_'dgels_ | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1477,7 +1491,7 @@ else ac_save_LIBS="$LIBS" LIBS="-llapack $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1558,7 +1572,7 @@ else fi echo $ac_n "checking for kdoc""... $ac_c" 1>&6 -echo "configure:1562: checking for kdoc" >&5 +echo "configure:1576: checking for kdoc" >&5 if test $kdocdir != ${DEAL2_DIR}/contrib/kdoc/bin ; then if test -r $kdocdir/kdoc ; then echo "$ac_t""found" 1>&6 @@ -1594,7 +1608,7 @@ if test "$docxx" = to-be-determined ; then # Extract the first word of ""doc++"", so it can be a program name with args. set dummy "doc++"; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1598: checking for $ac_word" >&5 +echo "configure:1612: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_docxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1628,7 +1642,7 @@ fi else echo $ac_n "checking for doc++""... $ac_c" 1>&6 -echo "configure:1632: checking for doc++" >&5 +echo "configure:1646: checking for doc++" >&5 if test -x "$docxx" ; then echo "$ac_t""yes" 1>&6 else @@ -1643,7 +1657,7 @@ fi echo $ac_n "checking whether getrusage is properly declared""... $ac_c" 1>&6 -echo "configure:1647: checking whether getrusage is properly declared" >&5 +echo "configure:1661: checking whether getrusage is properly declared" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' @@ -1653,7 +1667,7 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext < @@ -1665,7 +1679,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""yes"" 1>&6 @@ -1683,11 +1697,11 @@ fi rm -f conftest* echo $ac_n "checking whether isnan is declared with debug flags""... $ac_c" 1>&6 -echo "configure:1687: checking whether isnan is declared with debug flags" >&5 +echo "configure:1701: checking whether isnan is declared with debug flags" >&5 CXXFLAGS=$CXXFLAGSG cat > conftest.$ac_ext < @@ -1699,7 +1713,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""yes"" 1>&6 @@ -1715,7 +1729,7 @@ else for testflag in -D_ISOC99_SOURCE -D__EXTENSIONS__ ; do CXXFLAGS="$CXXFLAGSG $testflag" cat > conftest.$ac_ext < @@ -1727,7 +1741,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* deal_II_isnan_flag="-DHAVE_ISNAN $testflag" @@ -1755,11 +1769,11 @@ fi rm -f conftest* echo $ac_n "checking whether isnan is declared with optimized flags""... $ac_c" 1>&6 -echo "configure:1759: checking whether isnan is declared with optimized flags" >&5 +echo "configure:1773: checking whether isnan is declared with optimized flags" >&5 CXXFLAGS=$CXXFLAGSO cat > conftest.$ac_ext < @@ -1771,7 +1785,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t"""yes"" 1>&6 @@ -1787,7 +1801,7 @@ else for testflag in -D_ISOC99_SOURCE -D__EXTENSIONS__ ; do CXXFLAGS="$CXXFLAGSO $testflag" cat > conftest.$ac_ext < @@ -1799,7 +1813,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* deal_II_isnan_flag="-DHAVE_ISNAN $testflag" @@ -1845,16 +1859,16 @@ esac CXXFLAGS="$CXXFLAGSG" echo $ac_n "checking for consistency of CXXFLAGSG flags""... $ac_c" 1>&6 -echo "configure:1849: checking for consistency of CXXFLAGSG flags" >&5 +echo "configure:1863: checking for consistency of CXXFLAGSG flags" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -1872,16 +1886,16 @@ rm -f conftest* CXXFLAGS="$CXXFLAGSO" echo $ac_n "checking for consistency of CXXFLAGSO flags""... $ac_c" 1>&6 -echo "configure:1876: checking for consistency of CXXFLAGSO flags" >&5 +echo "configure:1890: checking for consistency of CXXFLAGSO flags" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -2007,6 +2021,8 @@ s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g s%@DEAL2_DIR@%$DEAL2_DIR%g +s%@DEAL_2_MAJOR@%$DEAL_2_MAJOR%g +s%@DEAL_2_MINOR@%$DEAL_2_MINOR%g s%@host@%$host%g s%@host_alias@%$host_alias%g s%@host_cpu@%$host_cpu%g diff --git a/deal.II/configure.in b/deal.II/configure.in index 59ac495a45..3624f383c1 100644 --- a/deal.II/configure.in +++ b/deal.II/configure.in @@ -22,12 +22,15 @@ dnl Set the path to the deal.II libraries to `pwd` DEAL2_DIR=`pwd` AC_SUBST(DEAL2_DIR) -dnl Set major and minor version numbers of the deal.II library +dnl Set major and minor version numbers of the deal.II library, +dnl both as preprocessor variables and in Makefiles DEAL_2_MAJOR=`cat Version | perl -pi -e 's/^(\d+)\..*/$1/;'` DEAL_2_MINOR=`cat Version | perl -pi -e 's/^\d+\.(\d+).*/$1/;'` AC_DEFINE_UNQUOTED(DEAL_2_MAJOR, $DEAL_2_MAJOR) AC_DEFINE_UNQUOTED(DEAL_2_MINOR, $DEAL_2_MINOR) AC_MSG_RESULT(Configuring deal.II version `cat Version`) +AC_SUBST(DEAL_2_MAJOR) +AC_SUBST(DEAL_2_MINOR) dnl Check for machine type operating system