From: Guido Kanschat
Date: Fri, 30 Jun 2000 20:41:17 +0000 (+0000)
Subject: new library support in configure
X-Git-Tag: v8.0.0~20310
X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51933f2da2db34457e8469bb6b3cef005cda9c17;p=dealii.git
new library support in configure
git-svn-id: https://svn.dealii.org/trunk@3113 0785d39b-7218-0410-832d-ea1e28bc413d
---
diff --git a/deal.II/common/Make.global_options.in b/deal.II/common/Make.global_options.in
index 7bff1b27a7..e483bc598b 100644
--- a/deal.II/common/Make.global_options.in
+++ b/deal.II/common/Make.global_options.in
@@ -22,6 +22,8 @@ D = @DEAL2_DIR@
CC = @CC@
CXX = @CXX@
GXX-VERSION = @GXX_VERSION@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
PERL = @PERL@
enable-multithreading= @enablemultithreading@
with-multithreading = @withmultithreading@
@@ -39,6 +41,8 @@ lib-path-deal2 = $D/deal.II/lib
LIBPATH += $(addprefix -L,$(lib-path-base) $(lib-path-lac) $(lib-path-deal2))
+# DEAL.II libraries are found by the Makefile, so no -L option is needed
+#LIBS += $(LIBPATH)
# add search path for libraries for make dependencies
@@ -73,8 +77,8 @@ INCLUDE += $(addprefix -I, $(include-path-base) \
$(include-path-deal2))
# compiler flags for debug and optimized mode
-CXXFLAGS.g = @DEFS@ @CXXFLAGSG@ $(INCLUDE) $(LIBPATH)
-CXXFLAGS.o = @DEFS@ @CXXFLAGSO@ $(INCLUDE) $(LIBPATH)
+CXXFLAGS.g = @DEFS@ @CXXFLAGSG@ $(INCLUDE)
+CXXFLAGS.o = @DEFS@ @CXXFLAGSO@ $(INCLUDE)
# if multithread support in the library is requested, then set the
diff --git a/deal.II/common/Makefile.template b/deal.II/common/Makefile.template
deleted file mode 100644
index 5e692866c9..0000000000
--- a/deal.II/common/Makefile.template
+++ /dev/null
@@ -1,97 +0,0 @@
-############################################################
-# Directory with the DEAL distribution
-############################################################
-
-D = please/enter/here/path/to/newdeal
-
-
-############################################################
-# Include general settings for including DEAL libraries
-############################################################
-
-include $D/common/Make.global_options
-
-
-############################################################
-# Set debug-mode as a default
-############################################################
-
-debug-mode = on
-
-
-############################################################
-# Define library names
-############################################################
-
-libs = -ldeal_II_2d -llac -lbase
-libs.g = -ldeal_II_2d.g -llac.g -lbase.g
-
-
-############################################################
-# Select compiler flags according to debug-mode
-############################################################
-
-ifeq ($(debug-mode),on)
-libraries = $(libs.g)
-flags = $(CXXFLAGS.g)
-endif
-
-ifeq ($(debug-mode),off)
-libraries = $(libs)
-flags = $(CXXFLAGS.o)
-endif
-
-
-############################################################
-# Typical block for building a running program
-#
-# 1. provide a list of source files in ...-cc-files
-#
-# 2. generate the list of object files according to debug-mode
-#
-# 3. make executable
-#
-# 4. Explicit dependencies of object files (will be automatic soon)
-#
-############################################################
-
-target1-cc-files = t1.cc t2.cc t3.cc
-
-ifeq ($(debug-mode),on)
-target1-o-files = $(target1-cc-files:.cc=.go)
-else
-target1-o-files = $(target1-cc-files:.cc=.o)
-endif
-
-target1: $(target1-o-files) $(libraries)
- $(CXX) $(CXXFLAGS) $(flags) -o $@ $^
-
-############################################################
-# Continue with other targets if needed
-############################################################
-
-
-
-
-############################################################
-# Cleanup targets
-############################################################
-
-clean:
- rm -f *.o *.go
-
-veryclean: clean
- rm -f target1 *.inp *.gpl *.eps *.gnuplot
-
-############################################################
-# Automatic generation of dependencies
-############################################################
-
-all-cc-files = $(target1-cc-files) # $(target2-cc-files) ...
-
-Make.depend: $(all-cc-files)
- @echo =====Dependecies=== Make.depend
- @$(CXX) $(flags) $^ -M > $@
- @perl -pi~ -e 's/(^[^.]+)\.o:/\1.o \1.go:/;' $@
-
-include Make.depend
diff --git a/deal.II/common/Makefile.template.in b/deal.II/common/Makefile.template.in
new file mode 100644
index 0000000000..dd4c4eabce
--- /dev/null
+++ b/deal.II/common/Makefile.template.in
@@ -0,0 +1,75 @@
+# Directory with the DEAL distribution
+
+D = @DEAL2_DIR@
+
+
+# Include general rules for making deal.II object files
+
+include $D/common/Make.rules
+
+# Set debug-mode as a default.
+# You may replace this by by a command line argument debug-mode=off
+
+debug-mode = on
+
+
+# Define library names. Using these variables automatically selects
+# the proper names for shared or static libraries.
+#
+# Here, the version for 2d. Replace 2d by 3d or add $(lib-deal2-3d.o)
+# when needed.
+
+libs = $(lib-deal2-2d.o) $(lib-lac.o) $(lib-base.o)
+libs.g = $(lib-deal2-2d.g) $(lib-lac.g) $(lib-base.g)
+
+# Select compiler flags according to debug-mode
+# and allow for additional CXXFLAGS.
+
+
+ifeq ($(debug-mode),on)
+libraries = $(libs.g)
+flags = $(CXXFLAGS.g) $(CXXFLAGS)
+endif
+
+ifeq ($(debug-mode),off)
+libraries = $(libs)
+flags = $(CXXFLAGS.o) $(CXXFLAGS)
+endif
+
+
+# Typical block for building a running program called target1
+#
+# 1. provide a list of source files in ...-cc-files
+# If you have several targets in one directory, replace
+# the shell command by an explicit list of .cc-files.
+
+target1-cc-files = $(shell echo *.cc)
+
+# 2. generate the list of object files according to debug-mode
+
+ifeq ($(debug-mode),on)
+target1-o-files = $(target1-cc-files:.cc=.g.o)
+else
+target1-o-files = $(target1-cc-files:.cc=.o)
+endif
+
+# 3. make executable
+# Use extra libraries and linker flags as configured. We
+# always add -g to keep debug symbols. Use strip for smaller
+# executables.
+
+target1: $(target1-o-files) $(libraries)
+ $(CXX) $(LDFLAGS) -g -o $@ $^ $(LIBS)
+
+# Copy this block for all your targets and replace "target1" by a proper name.
+
+# Cleanup targets
+
+clean:
+ rm -f *.o *.go
+
+veryclean: clean
+ rm -f target1 *.inp *.gpl *.eps *.gnuplot
+
+
+
diff --git a/deal.II/configure b/deal.II/configure
index bc8051c57b..4c13e769fe 100755
--- a/deal.II/configure
+++ b/deal.II/configure
@@ -35,12 +35,16 @@
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
+ac_help="$ac_help
+ --enable-shared Set compiler flags to generate shared libraries"
ac_help="$ac_help
--enable-multithreading Set compiler flags to allow for multithreaded programs"
ac_help="$ac_help
--with-multithreading=DIR use DIR as path to the ACE library"
ac_help="$ac_help
- --enable-shared Set compiler flags to generate shared libraries"
+ --with-blas=LIB use the BLAS-library file LIB"
+ac_help="$ac_help
+ --with-lapack=LIB use the LAPACK-library file LIB"
ac_help="$ac_help
--enable-multigrid Include multigrid code in library"
ac_help="$ac_help
@@ -603,7 +607,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:607: checking host system type" >&5
+echo "configure:611: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -624,7 +628,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:628: checking target system type" >&5
+echo "configure:632: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -642,7 +646,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:646: checking build system type" >&5
+echo "configure:650: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -677,11 +681,49 @@ cross_compiling=$ac_cv_prog_cxx_cross
+# Check whether --enable-shared or --disable-shared was given.
+if test "${enable_shared+set}" = set; then
+ enableval="$enable_shared"
+ enableshared=$enableval
+else
+ enableshared=yes
+fi
+
+
+case "$target" in
+ *-aix* | alpha*-linux* )
+ echo "configure: warning: Shared libraries not supported on $target. Using static libs instead" 1>&2
+ enableshared=no
+ ;;
+esac
+
+
+if test $enableshared = yes ; then
+ echo "$ac_t""Configuring for shared libraries" 1>&6
+ CFLAGS="$CFLAGS -fPIC"
+ CXXFLAGS="$CXXFLAGS -fPIC"
+ LDFLAGS="$LDFLAGS -fPIC"
+
+ lib_suffix=.so;
+else
+ echo "$ac_t""Configuring for static libraries" 1>&6
+ CFLAGS="$CFLAGS "
+ CXXFLAGS="$CXXFLAGS "
+ LDFLAGS="$LDFLAGS "
+
+ lib_suffix=.a;
+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:685: checking for $ac_word" >&5
+echo "configure:727: 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
@@ -711,7 +753,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:715: checking for $ac_word" >&5
+echo "configure:757: 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
@@ -762,7 +804,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:766: checking for $ac_word" >&5
+echo "configure:808: 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
@@ -794,7 +836,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:798: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:840: 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.
@@ -805,12 +847,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 809 "configure"
+#line 851 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:856: \"$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
@@ -836,12 +878,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:840: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:882: 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:845: checking whether we are using GNU C" >&5
+echo "configure:887: 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
@@ -850,7 +892,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:854: \"$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:896: \"$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
@@ -869,7 +911,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:873: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:915: 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
@@ -903,7 +945,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:907: checking for $ac_word" >&5
+echo "configure:949: 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
@@ -937,12 +979,13 @@ fi
+
for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
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:946: checking for $ac_word" >&5
+echo "configure:989: 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
@@ -974,7 +1017,7 @@ test -n "$CXX" || CXX="gcc"
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:978: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:1021: 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.
@@ -985,12 +1028,12 @@ cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext << EOF
-#line 989 "configure"
+#line 1032 "configure"
#include "confdefs.h"
int main(){return(0);}
EOF
-if { (eval echo configure:994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1037: \"$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
@@ -1016,12 +1059,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:1020: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1063: 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:1025: checking whether we are using GNU C++" >&5
+echo "configure:1068: 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
@@ -1030,7 +1073,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1034: \"$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:1077: \"$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
@@ -1049,7 +1092,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:1053: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:1096: 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
@@ -1083,7 +1126,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:1087: checking for $ac_word" >&5
+echo "configure:1130: 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
@@ -1142,7 +1185,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:1146: checking for $ac_word" >&5
+echo "configure:1189: 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
@@ -1179,8 +1222,8 @@ fi
if test $GXX = yes ; then
- CXXFLAGSO="-O2 -Wuninitialized -felide-constructors -fnonnull-objects -ftemplate-depth-32"
- CXXFLAGSG="-DDEBUG -ggdb -ansi -pedantic -Wall -W -Wtraditional -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Woverloaded-virtual -Wstrict-prototypes -Wsynth -Wsign-compare -Wconversion -ftemplate-depth-32"
+ CXXFLAGSO="$CXXFLAGS -O2 -Wuninitialized -felide-constructors -fnonnull-objects -ftemplate-depth-32"
+ CXXFLAGSG="$CXXFLAGS -DDEBUG -ggdb -ansi -pedantic -Wall -W -Wtraditional -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Woverloaded-virtual -Wstrict-prototypes -Wsynth -Wsign-compare -Wconversion -ftemplate-depth-32"
case "$GXXVERSION" in
@@ -1227,19 +1270,19 @@ fi
if test $enablemultithreading = yes ; then
echo $ac_n "checking for platform specific thread flags""... $ac_c" 1>&6
-echo "configure:1231: checking for platform specific thread flags" >&5
+echo "configure:1274: checking for platform specific thread flags" >&5
for i in threads mt pthread pthreads mthreads Kthread kthread; do
CXXFLAGS="$CXXFLAGSG -$i"
cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
thread_flag=$i
@@ -1258,10 +1301,10 @@ rm -f conftest*
echo $ac_n "checking for platform specific multi-threading defines""... $ac_c" 1>&6
-echo "configure:1262: checking for platform specific multi-threading defines" >&5
+echo "configure:1305: checking for platform specific multi-threading defines" >&5
cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t"""not necessary"" 1>&6
@@ -1293,8 +1336,10 @@ fi
rm -f conftest*
- CXXFLAGSG="$CXXFLAGSG -D__USE_MALLOC"
- CXXFLAGSO="$CXXFLAGSO -D__USE_MALLOC"
+ cat >> confdefs.h <<\EOF
+#define __USE_MALLOC 1
+EOF
+
CXXFLAGSG="`echo $CXXFLAGSG | perl -pi -e 's/-ansi//g;'`"
fi
@@ -1311,7 +1356,7 @@ fi
if test $withmultithreading != no ; then
echo $ac_n "checking for ACE""... $ac_c" 1>&6
-echo "configure:1315: checking for ACE" >&5
+echo "configure:1360: checking for ACE" >&5
if test -d $withmultithreading ; then
echo "$ac_t""found" 1>&6
else
@@ -1319,47 +1364,149 @@ echo "configure:1315: checking for ACE" >&5
{ echo "configure: error: Invalid ACE path" 1>&2; exit 1; }
fi
- CXXFLAGSG="$CXXFLAGSG -DDEAL_II_USE_MT"
- CXXFLAGSO="$CXXFLAGSO -DDEAL_II_USE_MT"
+ cat >> confdefs.h <<\EOF
+#define DEAL_II_USE_MT 1
+EOF
+
fi
+# Check whether --with-blas or --without-blas was given.
+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:1380: checking for BLAS" >&5
+ if test -r $withval ; then
+ echo "$ac_t""found" 1>&6
+ else
+ echo "$ac_t""not found" 1>&6
+ { echo "configure: error: BLAS library $withval not readable" 1>&2; exit 1; }
+ fi
+ cat >> confdefs.h <<\EOF
+#define HAVE_LIBBLAS 1
+EOF
+ LIBS="$withval -lg2c $LIBS";
+ fi
+
+else
+ echo $ac_n "checking for main in -lblas""... $ac_c" 1>&6
+echo "configure:1396: 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
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lblas $LIBS"
+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
else
- enableshared=yes
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ LIBS="-lblas -lg2c $LIBS" ; cat >> confdefs.h <<\EOF
+#define HAVE_LIBBLAS 1
+EOF
-case "$target" in
- *-aix* | alpha*-linux* )
- echo "configure: warning: Shared libraries not supported on $target. Using static libs instead" 1>&2
- enableshared=no
- ;;
-esac
+else
+ echo "$ac_t""no" 1>&6
+fi
-if test $enableshared = yes ; then
- echo "$ac_t""Configuring for shared libraries" 1>&6
- CXXFLAGSG="$CXXFLAGSG -fPIC"
- CXXFLAGSO="$CXXFLAGSO -fPIC"
+fi
- lib_suffix=.so;
+
+# Check whether --with-lapack or --without-lapack was given.
+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:1443: checking for LAPACK" >&5
+ if test -r $withval ; then
+ echo "$ac_t""found" 1>&6
+ else
+ echo "$ac_t""not found" 1>&6
+ { echo "configure: error: LAPACK library $withval not readable" 1>&2; exit 1; }
+ fi
+ cat >> confdefs.h <<\EOF
+#define HAVE_LIBLAPACK 1
+EOF
+
+ LIBS="$withval $LIBS";
+ fi
+
else
- echo "$ac_t""Configuring for static libraries" 1>&6
+ echo $ac_n "checking for dgels_ in -llapack""... $ac_c" 1>&6
+echo "configure:1459: 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
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-llapack $LIBS"
+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo lapack | sed -e 's/^a-zA-Z0-9_/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <&6
+$LIBS
+fi
-
+fi
@@ -1397,7 +1544,7 @@ else
fi
echo $ac_n "checking for kdoc""... $ac_c" 1>&6
-echo "configure:1401: checking for kdoc" >&5
+echo "configure:1548: 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
@@ -1433,7 +1580,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:1437: checking for $ac_word" >&5
+echo "configure:1584: 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
@@ -1467,7 +1614,7 @@ fi
else
echo $ac_n "checking for doc++""... $ac_c" 1>&6
-echo "configure:1471: checking for doc++" >&5
+echo "configure:1618: checking for doc++" >&5
if test -x "$docxx" ; then
echo "$ac_t""yes" 1>&6
else
@@ -1482,7 +1629,7 @@ fi
echo $ac_n "checking whether getrusage is properly declared""... $ac_c" 1>&6
-echo "configure:1486: checking whether getrusage is properly declared" >&5
+echo "configure:1633: 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'
@@ -1492,7 +1639,7 @@ cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <
@@ -1504,7 +1651,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:1508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t"""yes"" 1>&6
@@ -1522,11 +1669,11 @@ fi
rm -f conftest*
echo $ac_n "checking whether isnan is declared with debug flags""... $ac_c" 1>&6
-echo "configure:1526: checking whether isnan is declared with debug flags" >&5
+echo "configure:1673: checking whether isnan is declared with debug flags" >&5
CXXFLAGS=$CXXFLAGSG
cat > conftest.$ac_ext <
@@ -1538,7 +1685,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:1542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t"""yes"" 1>&6
@@ -1552,7 +1699,7 @@ else
for testflag in -D_ISOC99_SOURCE -D__EXTENSIONS__ ; do
CXXFLAGS="$CXXFLAGSG $testflag"
cat > conftest.$ac_ext <
@@ -1564,7 +1711,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:1568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
deal_II_isnan_flag=$testflag
@@ -1592,11 +1739,11 @@ fi
rm -f conftest*
echo $ac_n "checking whether isnan is declared with optimized flags""... $ac_c" 1>&6
-echo "configure:1596: checking whether isnan is declared with optimized flags" >&5
+echo "configure:1743: checking whether isnan is declared with optimized flags" >&5
CXXFLAGS=$CXXFLAGSO
cat > conftest.$ac_ext <
@@ -1608,7 +1755,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:1612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t"""yes"" 1>&6
@@ -1622,7 +1769,7 @@ else
for testflag in -D_ISOC99_SOURCE -D__EXTENSIONS__ ; do
CXXFLAGS="$CXXFLAGSO $testflag"
cat > conftest.$ac_ext <
@@ -1634,7 +1781,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:1638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
deal_II_isnan_flag=$testflag
@@ -1665,8 +1812,10 @@ rm -f conftest*
case "$target" in
alpha*-linux*)
- CXXFLAGSG="$CXXFLAGSG -DNO_THROW"
- CXXFLAGSO="$CXXFLAGSO -DNO_THROW"
+ cat >> confdefs.h <<\EOF
+#define NO_THROW 1
+EOF
+
;;
esac
@@ -1676,18 +1825,18 @@ esac
-echo $ac_n "checking for consistency of CXXFLAGSG flags""... $ac_c" 1>&6
-echo "configure:1681: checking for consistency of CXXFLAGSG flags" >&5
CXXFLAGS="$CXXFLAGSG"
+echo $ac_n "checking for consistency of CXXFLAGSG flags""... $ac_c" 1>&6
+echo "configure:1831: checking for consistency of CXXFLAGSG flags" >&5
cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
@@ -1703,18 +1852,18 @@ else
fi
rm -f conftest*
-echo $ac_n "checking for consistency of CXXFLAGSO flags""... $ac_c" 1>&6
-echo "configure:1708: checking for consistency of CXXFLAGSO flags" >&5
CXXFLAGS="$CXXFLAGSO"
+echo $ac_n "checking for consistency of CXXFLAGSO flags""... $ac_c" 1>&6
+echo "configure:1858: checking for consistency of CXXFLAGSO flags" >&5
cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
@@ -1733,10 +1882,6 @@ rm -f conftest*
-
-
-
-
subdirs="tests contrib"
@@ -1811,7 +1956,7 @@ done
ac_given_srcdir=$srcdir
-trap 'rm -fr `echo "common/Make.global_options doc/Makefile doc/auto/Makefile doc/auto/kdoc/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "common/Make.global_options common/Makefile.template doc/Makefile doc/auto/Makefile doc/auto/kdoc/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
diff --git a/deal.II/configure.in b/deal.II/configure.in
index 506c52d378..c71461881d 100644
--- a/deal.II/configure.in
+++ b/deal.II/configure.in
@@ -35,6 +35,51 @@ AC_LANG_CPLUSPLUS
+dnl -------------------------------------------------------------
+dnl Test whether shared libraries support is requested.
+dnl Default is yes, but value will be adjusted to operating system
+dnl below.
+dnl This has been moved before the compiler section, so CXXFLAGS and
+dnl LDFLAGS can be set accordingly
+dnl -------------------------------------------------------------
+AC_ARG_ENABLE(shared,
+[ --enable-shared Set compiler flags to generate shared libraries],
+ enableshared=$enableval,
+ enableshared=yes)
+
+dnl On AIX and alpha, shared libs don't work for us at present, so
+dnl disable them (we should probably use libtool there)
+case "$target" in
+ *-aix* | alpha*-linux* )
+ AC_MSG_WARN(Shared libraries not supported on $target. Using static libs instead)
+ enableshared=no
+ ;;
+esac
+
+
+dnl Set compile flags accordingly
+if test $enableshared = yes ; then
+ AC_MSG_RESULT(Configuring for shared libraries)
+ CFLAGS="$CFLAGS -fPIC"
+ CXXFLAGS="$CXXFLAGS -fPIC"
+ LDFLAGS="$LDFLAGS -fPIC"
+
+ lib_suffix=.so;
+else
+ AC_MSG_RESULT(Configuring for static libraries)
+dnl Define these variables so they are not filled with default values later
+ CFLAGS="$CFLAGS "
+ CXXFLAGS="$CXXFLAGS "
+ LDFLAGS="$LDFLAGS "
+
+ lib_suffix=.a;
+fi
+
+
+AC_SUBST(enableshared)
+AC_SUBST(lib_suffix)
+
+
dnl -------------------------------------------------------------
dnl Find external programs
dnl -------------------------------------------------------------
@@ -47,6 +92,7 @@ AC_PROG_CC
AC_PATH_PROG(CC,$CC)
+
dnl Find the right C++ compiler. This modifies the following
dnl variables: CXX, GXX, CXXFLAGS
AC_PROG_CXX
@@ -89,8 +135,8 @@ dnl CXXFLAGSG are the flags for debug mode
dnl -------------------------------------------------------------
if test $GXX = yes ; then
- CXXFLAGSO="-O2 -Wuninitialized -felide-constructors -fnonnull-objects -ftemplate-depth-32"
- CXXFLAGSG="-DDEBUG -ggdb -ansi -pedantic -Wall -W -Wtraditional -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Woverloaded-virtual -Wstrict-prototypes -Wsynth -Wsign-compare -Wconversion -ftemplate-depth-32"
+ CXXFLAGSO="$CXXFLAGS -O2 -Wuninitialized -felide-constructors -fnonnull-objects -ftemplate-depth-32"
+ CXXFLAGSG="$CXXFLAGS -DDEBUG -ggdb -ansi -pedantic -Wall -W -Wtraditional -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Woverloaded-virtual -Wstrict-prototypes -Wsynth -Wsign-compare -Wconversion -ftemplate-depth-32"
dnl set some flags that are specific to some versions of the
dnl compiler:
@@ -159,8 +205,7 @@ if test $enablemultithreading = yes ; then
DEAL_II_GET_THREAD_FLAGS
DEAL_II_THREAD_CPPFLAGS
- CXXFLAGSG="$CXXFLAGSG -D__USE_MALLOC"
- CXXFLAGSO="$CXXFLAGSO -D__USE_MALLOC"
+ AC_DEFINE(__USE_MALLOC)
CXXFLAGSG="`echo $CXXFLAGSG | perl -pi -e 's/-ansi//g;'`"
fi
@@ -182,62 +227,56 @@ if test $withmultithreading != no ; then
AC_MSG_ERROR(Invalid ACE path)
fi
- CXXFLAGSG="$CXXFLAGSG -DDEAL_II_USE_MT"
- CXXFLAGSO="$CXXFLAGSO -DDEAL_II_USE_MT"
+ AC_DEFINE(DEAL_II_USE_MT)
fi
AC_SUBST(withmultithreading)
-
-
-dnl -------------------------------------------------------------
-dnl Test whether shared libraries support is requested.
-dnl Default is yes, but value will be adjusted to operating system
-dnl below.
-dnl -------------------------------------------------------------
-AC_ARG_ENABLE(shared,
-[ --enable-shared Set compiler flags to generate shared libraries],
- enableshared=$enableval,
- enableshared=yes)
-
-dnl On AIX and alpha, shared libs don't work for us at present, so
-dnl disable them (we should probably use libtool there)
-case "$target" in
- *-aix* | alpha*-linux* )
- AC_MSG_WARN(Shared libraries not supported on $target. Using static libs instead)
- enableshared=no
- ;;
-esac
-
-
-dnl Set compile flags accordingly
-if test $enableshared = yes ; then
- AC_MSG_RESULT(Configuring for shared libraries)
- CXXFLAGSG="$CXXFLAGSG -fPIC"
- CXXFLAGSO="$CXXFLAGSO -fPIC"
-
- lib_suffix=.so;
-else
- AC_MSG_RESULT(Configuring for static libraries)
-
- lib_suffix=.a;
-fi
-
-
-AC_SUBST(enableshared)
-AC_SUBST(lib_suffix)
-
-
-
+dnl ------------------------------------------------------------
+dnl Check for LAPACK and BLAS
+dnl Consider this part experimental!
+dnl ------------------------------------------------------------
+AC_ARG_WITH(blas,
+[ --with-blas=LIB use the BLAS-library file LIB],
+ if test $withval != no ; then
+ AC_MSG_CHECKING(for BLAS)
+ if test -r $withval ; then
+ AC_MSG_RESULT(found)
+ else
+ AC_MSG_RESULT(not found)
+ AC_MSG_ERROR(BLAS library $withval not readable)
+ fi
+ AC_DEFINE(HAVE_LIBBLAS)
+ LIBS="$withval -lg2c $LIBS";
+ fi
+ ,
+ AC_CHECK_LIB(blas,
+ main,
+ LIBS="-lblas -lg2c $LIBS" ; AC_DEFINE(HAVE_LIBBLAS))
+)
+
+AC_ARG_WITH(lapack,
+[ --with-lapack=LIB use the LAPACK-library file LIB],
+ if test $withval != no ; then
+ AC_MSG_CHECKING(for LAPACK)
+ if test -r $withval ; then
+ AC_MSG_RESULT(found)
+ else
+ AC_MSG_RESULT(not found)
+ AC_MSG_ERROR(LAPACK library $withval not readable)
+ fi
+ AC_DEFINE(HAVE_LIBLAPACK)
+ LIBS="$withval $LIBS";
+ fi
+ ,
+ AC_CHECK_LIB(lapack, dgels_,,$LIBS)
+)
dnl -------------------------------------------------------------
dnl Multigrid
dnl -------------------------------------------------------------
dnl Test if multigrid should be enabled
-dnl default is no
-dnl
-dnl ??Is this still the present state??
-dnl
+dnl default is yes if multigrid directory present
AC_ARG_ENABLE(multigrid,
[ --enable-multigrid Include multigrid code in library],
enablemultigrid=$enableval,
@@ -322,8 +361,7 @@ case "$target" in
dnl On Alpha, there was an internal compiler error in exceptions.h.
dnl Disable "throw" for this platform
alpha*-linux*)
- CXXFLAGSG="$CXXFLAGSG -DNO_THROW"
- CXXFLAGSO="$CXXFLAGSO -DNO_THROW"
+ AC_DEFINE(NO_THROW)
;;
esac
@@ -336,8 +374,8 @@ esac
dnl -------------------------------------------------------------
dnl Last check: test whether CXXFLAGS are ok
dnl -------------------------------------------------------------
-AC_MSG_CHECKING(for consistency of CXXFLAGSG flags)
CXXFLAGS="$CXXFLAGSG"
+AC_MSG_CHECKING(for consistency of CXXFLAGSG flags)
AC_TRY_COMPILE(
[],
[;],
@@ -349,8 +387,8 @@ AC_TRY_COMPILE(
exit 1;
])
-AC_MSG_CHECKING(for consistency of CXXFLAGSO flags)
CXXFLAGS="$CXXFLAGSO"
+AC_MSG_CHECKING(for consistency of CXXFLAGSO flags)
AC_TRY_COMPILE(
[],
[;],
@@ -364,10 +402,6 @@ AC_TRY_COMPILE(
-
-
-
-
dnl -------------------------------------------------------------
dnl Configure other packages
dnl -------------------------------------------------------------
@@ -385,4 +419,4 @@ dnl Output results
dnl -------------------------------------------------------------
dnl Write output to the global options file
-AC_OUTPUT(common/Make.global_options doc/Makefile doc/auto/Makefile doc/auto/kdoc/Makefile)
+AC_OUTPUT(common/Make.global_options common/Makefile.template doc/Makefile doc/auto/Makefile doc/auto/kdoc/Makefile)
diff --git a/deal.II/doc/development/Makefile b/deal.II/doc/development/Makefile
index ad44877a9d..cb069fe1d6 100644
--- a/deal.II/doc/development/Makefile
+++ b/deal.II/doc/development/Makefile
@@ -5,7 +5,7 @@ D = ../..
include $D/common/Make.global_options
-default: makefiles.html makefile.small.html makefile.large.html
+default: makefiles.html makefile.small.html makefile.large.html makefile.rules.html
makefiles.html: Makefile makefiles.1.html $D/common/Make.global_options makefiles.2.html
@@ -33,6 +33,8 @@ makefiles.html: Makefile makefiles.1.html $D/common/Make.global_options makefile
@echo 'INCLUDE=$(INCLUDE)
' >> $@
@echo 'CXXFLAGS.g=$(CXXFLAGS.g)
' >> $@
@echo 'CXXFLAGS.o=$(CXXFLAGS.o)
' >> $@
+ @echo 'LDFLAGS=$(LDFLAGS)
' >> $@
+ @echo 'LIBS=$(LIBS)
' >> $@
@echo 'ACE_ROOT=$(ACE_ROOT)
' >> $@
@echo 'lib-ACE=$(lib-ACE)
' >> $@
@echo 'with-multithreading=$(with-multithreading)
' >> $@
@@ -45,6 +47,8 @@ makefile.small.html: Makefile.small
makefile.large.html: Makefile.large
@$(PERL) makefile2html < $< > $@
+makefile.rules.html: $D/common/Makefile.template
+ @$(PERL) makefile2html < $< > $@
validate-xrefs:
$(PERL) $D/doc/auto/scripts/validate-xrefs.pl \
diff --git a/deal.II/doc/development/Makefile.large b/deal.II/doc/development/Makefile.large
index aadaca4a33..c4cde446bc 100644
--- a/deal.II/doc/development/Makefile.large
+++ b/deal.II/doc/development/Makefile.large
@@ -112,7 +112,7 @@ lib/$(deal_II_dimension)d/%.o :
# Next define how to link the executable
$(target) : $(libraries) Makefile
@echo =====waves=======$(deal_II_dimension)d==============$(MT)== Linking $(@F)
- @$(CXX) $(flags) -o $(target) $(libraries) $(user-libs)
+ @$(CXX) $(LDFLAGS) -o $(target) $(libraries) $(LIBS)
diff --git a/deal.II/doc/development/Makefile.small b/deal.II/doc/development/Makefile.small
index 716b6d9107..b68864a0a4 100644
--- a/deal.II/doc/development/Makefile.small
+++ b/deal.II/doc/development/Makefile.small
@@ -94,7 +94,7 @@ endif
# if you call it without arguments.
$(target) : $(libraries)
@echo ============================ Linking $@
- @$(CXX) $(flags) -o $@ $^
+ @$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS)
# To make running the application somewhat independent of the actual
diff --git a/deal.II/doc/development/makefiles.1.html b/deal.II/doc/development/makefiles.1.html
index eb7eb6fef0..45c9213e7a 100644
--- a/deal.II/doc/development/makefiles.1.html
+++ b/deal.II/doc/development/makefiles.1.html
@@ -19,7 +19,7 @@
your project to use the same compiler flags and to access the pathes
to libraries. This page documents available
flags, documents the values which are used
- in your local installation, and shows two
+ in your local installation, and shows
generic Makefiles which you may want to use
in your own projects.
@@ -193,6 +193,22 @@
+ Linker flags
+
+
+ -
LDFLAGS
+ -
+ General linker flags
+
+
+
+ -
LIBS
+ -
+ Additional libraries found by configure
+
+
+
+
Variables in multithreading mode
diff --git a/deal.II/doc/development/makefiles.2.html b/deal.II/doc/development/makefiles.2.html
index 3cee9e004d..af5015ac0f 100644
--- a/deal.II/doc/development/makefiles.2.html
+++ b/deal.II/doc/development/makefiles.2.html
@@ -11,12 +11,15 @@
- At present, we have two Makefiles, one for
- small projects
- consisting of only one C++ file, and one for
- large projects.
- Both Makefiles need slight modifications before they will work in
- your project. The places for modifications are marked.
+ At present, we have three Makefiles, one for small projects
+ consisting of only one C++ file, and one for large projects.
+ Furthermore, there is a Makefile in a different style. Have
+ a look at them and see what seem convenient to you. All Makefiles
+ need slight modifications before they will work in your
+ project. The places for modifications are marked.
+
+
+ The third
+ Makefile is common/Makefile.template
in
+ the deal.II directory tree.
+
+ It was designed for several targets in one directory and
+ makes use of the compilation rules in
+ common/Make.rules
. All object files and
+ executables will be in the same directory.
+
diff --git a/deal.II/doc/glossary/glossary.data b/deal.II/doc/glossary/glossary.data
index 3164bc2d07..45bb0b2631 100644
--- a/deal.II/doc/glossary/glossary.data
+++ b/deal.II/doc/glossary/glossary.data
@@ -1,8 +1,5 @@
active cell: a triangulation cell that is not refined further
-cell: element of a subdivision, being of the same dimension as the
-domain of computation
-
boundary component: part of the domain in physical space. Denotes
either function for a curved boundary or the selection of a <>
@@ -13,6 +10,17 @@ differential equation
boundary indicator: data of lower dimensional <>s, indicating the number of a <>
+cell: element of a subdivision, being of the same dimension as the
+domain of computation
+
+DG: see <>
+
+DGFEM: <> finite element method.
+
+Discontinuous Galerkin: A Galerkin discretization with all degrees of
+freedom in the interior of the grid cells. Continuity between grid
+cells is established by jump terms on the cell interfaces.
+
hex: hexahedron, mapping of the unit cube into the domain
locally finest level: all <>s, i.e. the finest cell at each
diff --git a/tests/base/reference.cc b/tests/base/reference.cc
index 6337a05f36..6c02a005c7 100644
--- a/tests/base/reference.cc
+++ b/tests/base/reference.cc
@@ -17,6 +17,9 @@
#include
#include
+void abort()
+{}
+
class Test : public Subscriptor
{
const char* name;
@@ -79,5 +82,3 @@ deallog << "a ";
}
}
-void abort()
-{}
diff --git a/tests/big-tests/convergence/Makefile b/tests/big-tests/convergence/Makefile
index 7635578873..90a506661a 100644
--- a/tests/big-tests/convergence/Makefile
+++ b/tests/big-tests/convergence/Makefile
@@ -91,7 +91,7 @@ endif
# if you call it without arguments.
$(target) : $(libraries)
@echo ============================ Linking $@
- @$(CXX) $(flags) -o $@ $^
+ @$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS)
# To make running the application somewhat independent of the actual
diff --git a/tests/big-tests/dof/Makefile b/tests/big-tests/dof/Makefile
index dd72340acf..1ddc3b6d21 100644
--- a/tests/big-tests/dof/Makefile
+++ b/tests/big-tests/dof/Makefile
@@ -93,7 +93,7 @@ endif
# if you call it without arguments.
$(target) : $(libraries)
@echo ============================ Linking $@
- @$(CXX) $(flags) -o $@ $^
+ @$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS)
# To make running the application somewhat independent of the actual
diff --git a/tests/big-tests/error-estimation/Makefile b/tests/big-tests/error-estimation/Makefile
index e02b77c0e3..a3cf5fb381 100644
--- a/tests/big-tests/error-estimation/Makefile
+++ b/tests/big-tests/error-estimation/Makefile
@@ -91,7 +91,7 @@ endif
# if you call it without arguments.
$(target) : $(libraries)
@echo ============================ Linking $@
- @$(CXX) $(flags) -o $@ $^
+ @$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS)
# To make running the application somewhat independent of the actual
diff --git a/tests/big-tests/grid/Makefile b/tests/big-tests/grid/Makefile
index e4480a990d..eb60e99baa 100644
--- a/tests/big-tests/grid/Makefile
+++ b/tests/big-tests/grid/Makefile
@@ -94,7 +94,7 @@ endif
# if you call it without arguments.
$(target) : $(libraries)
@echo ============================ Linking $@
- @$(CXX) $(flags) -o $@ $^
+ @$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS)
# To make running the application somewhat independent of the actual
diff --git a/tests/big-tests/multigrid/Makefile b/tests/big-tests/multigrid/Makefile
index bc775f2f7d..d7a6c9c035 100644
--- a/tests/big-tests/multigrid/Makefile
+++ b/tests/big-tests/multigrid/Makefile
@@ -91,7 +91,7 @@ endif
# if you call it without arguments.
$(target) : $(libraries)
@echo ============================ Linking $@
- @$(CXX) $(flags) -o $@ $^
+ @$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS)
# To make running the application somewhat independent of the actual
diff --git a/tests/big-tests/nonlinear/fixed-point-iteration/Makefile b/tests/big-tests/nonlinear/fixed-point-iteration/Makefile
index 3a525b71d3..5322c80ace 100644
--- a/tests/big-tests/nonlinear/fixed-point-iteration/Makefile
+++ b/tests/big-tests/nonlinear/fixed-point-iteration/Makefile
@@ -88,7 +88,7 @@ endif
# make rule for the target
$(target) : $(libraries)
@echo ============================ Linking $@
- @$(CXX) $(flags) -o $@ $^ $(user-libs)
+ @$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) $(user-libs)
# rule how to run the program
run: $(target)
@@ -130,7 +130,7 @@ clean:
#rather for libnumerics.a(tria.o)
Makefile.dep: $(cc-files) $(h-files) $(lib-h-files)
@echo ============================ Remaking Makefile
- @$(PERL) $D/common/scripts/Make_dep.pl ./Obj $(INCLUDE) $(cc-files) \
+ @$(PERL) $D/common/scripts/make_dependencies.pl ./Obj $(INCLUDE) $(cc-files) \
> Makefile.dep
diff --git a/tests/big-tests/poisson/Makefile b/tests/big-tests/poisson/Makefile
index 9cc2eaa036..4613ca74f7 100644
--- a/tests/big-tests/poisson/Makefile
+++ b/tests/big-tests/poisson/Makefile
@@ -85,7 +85,7 @@ endif
# make rule for the target
$(target) : $(libraries)
@echo ============================ Linking $@
- @$(CXX) $(flags) -o $@ $^ $(user-libs)
+ @$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) $(user-libs)
# rule how to run the program
run: $(target)
@@ -128,7 +128,7 @@ clean:
#rather for libnumerics.a(tria.o)
Makefile.dep: $(cc-files) $(h-files) $(lib-h-files)
@echo ============================ Remaking Makefile
- @perl $D/common/scripts/Make_dep.pl ./Obj $(INCLUDE) $(cc-files) \
+ @perl $D/common/scripts/make_dependencies.pl ./Obj $(INCLUDE) $(cc-files) \
> Makefile.dep
diff --git a/tests/deal.II/Makefile.in b/tests/deal.II/Makefile.in
index 4737954f2a..2546e5bd23 100644
--- a/tests/deal.II/Makefile.in
+++ b/tests/deal.II/Makefile.in
@@ -95,7 +95,7 @@ endif
template.testcase: $(template-o-files) $(libraries)
@echo =====linking======= $<
- @$(CXX) $(flags) -o $@ $^
+ @$(CXX) $(LDFLAGS) -g -o $@ $^ $(LIBS)
############################################################
@@ -110,7 +110,7 @@ endif
constraints.testcase: $(constraints-o-files) $(libdeal3d) $(libraries)
@echo =====linking======= $<
- @$(CXX) $(flags) -o $@ $^
+ @$(CXX) $(LDFLAGS) -g -o $@ $^ $(LIBS)
############################################################
@@ -125,7 +125,7 @@ endif
dof_test.testcase: $(dof_test-o-files) $(libdeal3d) $(libraries)
@echo =====linking======= $<
- @$(CXX) $(flags) -o $@ $^
+ @$(CXX) $(LDFLAGS) -g -o $@ $^ $(LIBS)
############################################################
@@ -140,7 +140,7 @@ endif
fe_tables.testcase: $(fe_tables-o-files) $(libraries)
@echo =====linking======= $<
- @$(CXX) $(flags) -o $@ $^
+ @$(CXX) $(LDFLAGS) -g -o $@ $^ $(LIBS)
############################################################
@@ -155,7 +155,7 @@ endif
gradients.testcase: $(gradients-o-files) $(libraries)
@echo =====linking======= $<
- @$(CXX) $(flags) -o $@ $^
+ @$(CXX) $(LDFLAGS) -g -o $@ $^ $(LIBS)
############################################################
@@ -170,7 +170,7 @@ endif
grid_test.testcase: $(grid_test-o-files) $(libdeal3d) $(libraries)
@echo =====linking======= $<
- @$(CXX) $(flags) -o $@ $^
+ @$(CXX) $(LDFLAGS) -g -o $@ $^ $(LIBS)
############################################################
@@ -185,7 +185,7 @@ endif
grid_generator.testcase: $(grid_generator-o-files) $(libdeal3d) $(libraries)
@echo =====linking======= $<
- @$(CXX) $(flags) -o $@ $^
+ @$(CXX) $(LDFLAGS) -g -o $@ $^ $(LIBS)
############################################################
@@ -200,7 +200,7 @@ endif
second_derivatives.testcase: $(second_derivatives-o-files) $(libraries)
@echo =====linking======= $<
- @$(CXX) $(flags) -o $@ $^
+ @$(CXX) $(LDFLAGS) -g -o $@ $^ $(LIBS)
############################################################
@@ -215,7 +215,7 @@ endif
wave-test-3.testcase: $(wave-test-3-o-files) $(libraries)
@echo =====linking======= $<
- @$(CXX) $(flags) -o $@ $^
+ @$(CXX) $(LDFLAGS) -g -o $@ $^ $(LIBS)
############################################################
@@ -231,7 +231,7 @@ endif
mglocal.testcase: $(mglocal-o-files) $(libraries)
@echo =====linking======= $<
- @$(CXX) $(flags) -o $@ $^
+ @$(CXX) $(LDFLAGS) -g -o $@ $^ $(LIBS)
@@ -248,7 +248,7 @@ endif
mg.testcase: $(mg-o-files) $(libraries)
@echo =====linking======= $<
- @$(CXX) $(flags) -o $@ $^
+ @$(CXX) $(LDFLAGS) -g -o $@ $^ $(LIBS)
@@ -265,7 +265,7 @@ endif
block_matrices.testcase: $(block_matrices-o-files) $(libraries)
@echo =====linking======= $<
- @$(CXX) $(flags) -o $@ $^
+ @$(CXX) $(LDFLAGS) -g -o $@ $^ $(LIBS)
@@ -283,7 +283,7 @@ benchmark-o-files = $(benchmark-cc-files:.cc=.o)
endif
benchmark.testcase: $(benchmark-o-files) $(libraries)
- $(CXX) $(flags) -o $@ $^
+ $(CXX) $(LDFLAGS) -g -o $@ $^ $(LIBS)
############################################################
# Continue with other targets if needed
@@ -299,7 +299,7 @@ target1-o-files = $(target1-cc-files:.cc=.o)
endif
target1: $(target1-o-files) $(libraries)
- $(CXX) $(flags) -o $@ $^
+ $(CXX) $(LDFLAGS) -g -o $@ $^ $(LIBS)
############################################################
@@ -341,7 +341,7 @@ all-cc-files = $(shell echo *.cc)
Make.depend: $(all-cc-files)
@echo =====Dependencies== Make.depend
- @$(CXX) $(flags) $^ -M > $@
+ @$(CXX) $(CXXFLAGS.g) $^ -M > $@
@perl -pi -e 's/(^[^.]+)\.o:/\1.o \1.go:/;' $@
include Make.depend
diff --git a/tests/fe/Makefile.in b/tests/fe/Makefile.in
index 10a3e4754a..ba9c3dd571 100644
--- a/tests/fe/Makefile.in
+++ b/tests/fe/Makefile.in
@@ -85,7 +85,7 @@ show_shapes-o-files = $(show_shapes-cc-files:.cc=.o)
endif
show_shapes: $(show_shapes-o-files) $(libraries)
- @$(CXX) $(flags) -o $@ $^
+ @$(CXX) $(LDFLAGS) -g -o $@ $^ $(LIBS)
############################################################
@@ -98,7 +98,7 @@ show_transform-o-files = $(show_transform-cc-files:.cc=.o)
endif
show_transform: $(show_transform-o-files) $(libraries)
- @$(CXX) $(flags) -o $@ $^
+ @$(CXX) $(LDFLAGS) -g -o $@ $^ $(LIBS)
############################################################
# Continue with other targets if needed
diff --git a/tests/lac/Makefile.in b/tests/lac/Makefile.in
index 416e1bf73b..0514db3413 100644
--- a/tests/lac/Makefile.in
+++ b/tests/lac/Makefile.in
@@ -89,7 +89,7 @@ endif
solver.testcase: $(solver-o-files) $(libraries)
@echo =====linking======= $<
- @$(CXX) $(flags) -o $@ $^
+ @$(CXX) $(LDFLAGS) -g -o $@ $^ $(LIBS)
############################################################
@@ -105,7 +105,7 @@ endif
full_matrix.testcase: $(full_matrix-o-files) $(libraries)
@echo =====linking======= $<
- @$(CXX) $(flags) -o $@ $^
+ @$(CXX) $(LDFLAGS) -g -o $@ $^ $(LIBS)
@@ -122,7 +122,7 @@ endif
mgbase.testcase: $(mgbase-o-files) $(libraries)
@echo =====linking======= $<
- @$(CXX) $(flags) -o $@ $^
+ @$(CXX) $(LDFLAGS) -g -o $@ $^ $(LIBS)
@@ -139,7 +139,7 @@ endif
mg.testcase: $(mg-o-files) $(libraries)
@echo =====linking======= $<
- @$(CXX) $(flags) -o $@ $^
+ @$(CXX) $(LDFLAGS) -g -o $@ $^ $(LIBS)
@@ -157,7 +157,7 @@ benchmark-o-files = $(benchmark-cc-files:.cc=.o)
endif
benchmark.testcase: $(benchmark-o-files) $(libraries)
- $(CXX) $(flags) -o $@ $^
+ $(CXX) $(LDFLAGS) -g -o $@ $^ $(LIBS)
############################################################
# Continue with other targets if needed
@@ -173,7 +173,7 @@ target1-o-files = $(target1-cc-files:.cc=.o)
endif
target1: $(target1-o-files) $(libraries)
- $(CXX) $(flags) -o $@ $^
+ $(CXX) $(LDFLAGS) -g -o $@ $^ $(LIBS)
############################################################
diff --git a/tests/lac/mg.cc b/tests/lac/mg.cc
index e7cb4d3b23..fdf03630ac 100644
--- a/tests/lac/mg.cc
+++ b/tests/lac/mg.cc
@@ -230,8 +230,8 @@ MGSmootherLAC::smooth (const unsigned int level,
SolverControl control(1,1.e-300,false,false);
PrimitiveVectorMemory<> mem;
SolverRichardson<> rich(control, mem);
- PreconditionRelaxation<>
- prec((*matrices)[level], &SparseMatrix ::template precondition_SSOR, 1.);
+ PreconditionSSOR<> prec;
+ prec.initialize((*matrices)[level], 1.);
rich.solve((*matrices)[level], u, rhs, prec);
}
diff --git a/tests/lac/solver.cc b/tests/lac/solver.cc
index a00dc2e561..9897d30cde 100644
--- a/tests/lac/solver.cc
+++ b/tests/lac/solver.cc
@@ -69,12 +69,11 @@ int main()
SparseMatrix A(structure);
testproblem.laplacian(A);
- PreconditionIdentity
- prec_no;
- PreconditionRelaxation<>
- prec_sor(A, &SparseMatrix::template precondition_SOR, 1.2);
- PreconditionRelaxation<>
- prec_ssor(A, &SparseMatrix::template precondition_SSOR, 1.2);
+ PreconditionIdentity prec_no;
+ PreconditionSOR<> prec_sor;
+ prec_sor.initialize(A, 1.2);
+ PreconditionSSOR<> prec_ssor;
+ prec_ssor.initialize(A, 1.2);
Vector f(dim);
Vector u(dim);