]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
new library support in configure
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 30 Jun 2000 20:41:17 +0000 (20:41 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 30 Jun 2000 20:41:17 +0000 (20:41 +0000)
git-svn-id: https://svn.dealii.org/trunk@3113 0785d39b-7218-0410-832d-ea1e28bc413d

24 files changed:
deal.II/common/Make.global_options.in
deal.II/common/Makefile.template [deleted file]
deal.II/common/Makefile.template.in [new file with mode: 0644]
deal.II/configure
deal.II/configure.in
deal.II/doc/development/Makefile
deal.II/doc/development/Makefile.large
deal.II/doc/development/Makefile.small
deal.II/doc/development/makefiles.1.html
deal.II/doc/development/makefiles.2.html
deal.II/doc/glossary/glossary.data
tests/base/reference.cc
tests/big-tests/convergence/Makefile
tests/big-tests/dof/Makefile
tests/big-tests/error-estimation/Makefile
tests/big-tests/grid/Makefile
tests/big-tests/multigrid/Makefile
tests/big-tests/nonlinear/fixed-point-iteration/Makefile
tests/big-tests/poisson/Makefile
tests/deal.II/Makefile.in
tests/fe/Makefile.in
tests/lac/Makefile.in
tests/lac/mg.cc
tests/lac/solver.cc

index 7bff1b27a707af6c7b8255bc57fabb7cefab716b..e483bc598b0fd2724c70a39edeac1cd6b5b539cc 100644 (file)
@@ -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 (file)
index 5e69286..0000000
+++ /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 (file)
index 0000000..dd4c4ea
--- /dev/null
@@ -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
+
+
+
index bc8051c57b38afeae4fc7fe402d4e3d4235953ff..4c13e769feae0ead9b9247556324ad9bd3eee18d 100755 (executable)
 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 <<EOF
-#line 1236 "configure"
+#line 1279 "configure"
 #include "confdefs.h"
 
 int main() {
 ;
 ; return 0; }
 EOF
-if { (eval echo configure:1243: \"$ac_compile\") 1>&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 <<EOF
-#line 1265 "configure"
+#line 1308 "configure"
 #include "confdefs.h"
 
 #if !defined (_REENTRANT) && !defined (_THREAD_SAFE)
@@ -1275,7 +1318,7 @@ int main() {
    
 ; return 0; }
 EOF
-if { (eval echo configure:1279: \"$ac_compile\") 1>&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 <<EOF
+#line 1404 "configure"
+#include "confdefs.h"
 
-# Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  enableshared=$enableval
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:1411: \"$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
-  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 <<EOF
+#line 1467 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char dgels_();
 
-  lib_suffix=.a;
+int main() {
+dgels_()
+; return 0; }
+EOF
+if { (eval echo configure:1481: \"$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
+  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 <<EOF
+#define $ac_tr_lib 1
+EOF
 
+  LIBS="-llapack $LIBS"
 
+else
+  echo "$ac_t""no" 1>&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 <<EOF
-#line 1496 "configure"
+#line 1643 "configure"
 #include "confdefs.h"
 
 #include <sys/resource.h>
@@ -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 <<EOF
-#line 1530 "configure"
+#line 1677 "configure"
 #include "confdefs.h"
 
 #include <cmath>
@@ -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 <<EOF
-#line 1556 "configure"
+#line 1703 "configure"
 #include "confdefs.h"
 
 #include <cmath>
@@ -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 <<EOF
-#line 1600 "configure"
+#line 1747 "configure"
 #include "confdefs.h"
 
 #include <cmath>
@@ -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 <<EOF
-#line 1626 "configure"
+#line 1773 "configure"
 #include "confdefs.h"
 
 #include <cmath>
@@ -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 <<EOF
-#line 1684 "configure"
+#line 1833 "configure"
 #include "confdefs.h"
 
 int main() {
 ;
 ; return 0; }
 EOF
-if { (eval echo configure:1691: \"$ac_compile\") 1>&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 <<EOF
-#line 1711 "configure"
+#line 1860 "configure"
 #include "confdefs.h"
 
 int main() {
 ;
 ; return 0; }
 EOF
-if { (eval echo configure:1718: \"$ac_compile\") 1>&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 <<EOF
 
@@ -1859,6 +2004,8 @@ s%@build_alias@%$build_alias%g
 s%@build_cpu@%$build_cpu%g
 s%@build_vendor@%$build_vendor%g
 s%@build_os@%$build_os%g
+s%@enableshared@%$enableshared%g
+s%@lib_suffix@%$lib_suffix%g
 s%@CC@%$CC%g
 s%@CXX@%$CXX%g
 s%@GXX_VERSION@%$GXX_VERSION%g
@@ -1867,8 +2014,6 @@ s%@CXXFLAGSG@%$CXXFLAGSG%g
 s%@CXXFLAGSO@%$CXXFLAGSO%g
 s%@enablemultithreading@%$enablemultithreading%g
 s%@withmultithreading@%$withmultithreading%g
-s%@enableshared@%$enableshared%g
-s%@lib_suffix@%$lib_suffix%g
 s%@enablemultigrid@%$enablemultigrid%g
 s%@kdocdir@%$kdocdir%g
 s%@kdocversion@%$kdocversion%g
@@ -1915,7 +2060,7 @@ EOF
 
 cat >> $CONFIG_STATUS <<EOF
 
-CONFIG_FILES=\${CONFIG_FILES-"common/Make.global_options doc/Makefile doc/auto/Makefile doc/auto/kdoc/Makefile"}
+CONFIG_FILES=\${CONFIG_FILES-"common/Make.global_options common/Makefile.template doc/Makefile doc/auto/Makefile doc/auto/kdoc/Makefile"}
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
index 506c52d378b9cd28a0d334c87941d2c3b48dcc8f..c71461881d0726473017bcad16544de8dcf49695 100644 (file)
@@ -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)
index ad44877a9daacb572a5e51ab3c9923223a92596a..cb069fe1d623973b9ad8118064005351deffad78 100644 (file)
@@ -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 '<li><code>INCLUDE=$(INCLUDE)</code>' >> $@
        @echo '<li><code>CXXFLAGS.g=$(CXXFLAGS.g)</code>' >> $@
        @echo '<li><code>CXXFLAGS.o=$(CXXFLAGS.o)</code>' >> $@
+       @echo '<li><code>LDFLAGS=$(LDFLAGS)</code>' >> $@
+       @echo '<li><code>LIBS=$(LIBS)</code>' >> $@
        @echo '<li><code>ACE_ROOT=$(ACE_ROOT)</code>' >> $@
        @echo '<li><code>lib-ACE=$(lib-ACE)</code>' >> $@
        @echo '<li><code>with-multithreading=$(with-multithreading)</code>' >> $@
@@ -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 \
index aadaca4a33bb7cf0dc720118f4ef432726c837e3..c4cde446bcbdd41e0edc661d5ada1371c4452037 100644 (file)
@@ -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)
 
 
 
index 716b6d9107297705be5cc7214a4cd80e0869922b..b68864a0a45ea9b4a2e96fc2529d459613b134e3 100644 (file)
@@ -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
index eb7eb6fef0f07b35614a98aeaee4e60cd69411f4..45c9213e7aaea7803bc87cd233535654c1cc96d5 100644 (file)
@@ -19,7 +19,7 @@
     your project to use the same compiler flags and to access the pathes
     to libraries. This page documents <a href="#flags">available
     flags</a>, documents the <a href="#values">values which are used
-    in your local installation</a>, and shows two 
+    in your local installation</a>, and shows 
     <a href="#generic">generic Makefiles</a> which you may want to use
     in your own projects.
     </p>
 
 
 
+    <li><h4>Linker flags</h4>
+
+    <dl>
+      <dt> <code>LDFLAGS</code> </dt>
+      <dd> <p>
+           General linker flags
+           </p>
+      </dd>
+
+      <dt> <code>LIBS</code> </dt>
+      <dd> <p>
+           Additional libraries found by configure
+           </p>
+      </dd>
+    </dl>
+
     <li><h4>Variables in multithreading mode</h4>
  
     <p>
index 3cee9e004df0b8b8bb5c363e4d37bcdeb1ec4eb5..af5015ac0f561f2101a2f30a5082d0d5f248a97a 100644 (file)
     </p>
 
     <p>
-    At present, we have two Makefiles, one for 
-    <a href="makefile.small.html" target="body">small projects</a>
-    consisting of only one C++ file, and one for 
-    <a href="makefile.large.html" target="body">large projects</a>.
-    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 <a
+    href="makefile.small.html" target="body">small projects</a>
+    consisting of only one C++ file, and one for <a
+    href="makefile.large.html" target="body">large projects</a>.
+    Furthermore, there is a Makefile in a <a
+    href="makefile.rules.html" target="body">different style</a>. 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.
 
     <ul>
       <li> <p>
           You can find this Makefile
           <a href="Makefile.large" target="_top">here</a>.
           </p>
-    </ul> 
+      <li> <p>
+
+           The <a href="makefile.rules.html" target="body">third
+           Makefile</a> is <code>common/Makefile.template</code> in
+           the <acronum>deal.II</acronym> directory tree.
+
+          It was designed for several targets in one directory and
+          makes use of the compilation rules in
+          <code>common/Make.rules</code>. All object files and
+          executables will be in the same directory.
+    </ul>
 
     <hr>
     
index 3164bc2d074ce96dd53137ea96db3ec8ee97d037..45bb0b26311313c33e33bcbc48d1e0861c84302e 100644 (file)
@@ -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 <<boundary
 condition>>
@@ -13,6 +10,17 @@ differential equation
 boundary indicator: data of lower dimensional <<triangulation
 object>>s, indicating the number of a <<boundary component>>
 
+cell: element of a subdivision, being of the same dimension as the
+domain of computation
+
+DG: see <<Discontinuous Galerkin>>
+
+DGFEM: <<Discontinuous Galerkin>> 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 <<active cell>>s, i.e. the finest cell at each
index 6337a05f36cbd451770184c6610435c76d996249..6c02a005c752a583d4f2c1f8091e111e637abd8d 100644 (file)
@@ -17,6 +17,9 @@
 #include <base/smartpointer.h>
 #include <base/logstream.h>
 
+void abort()
+{}
+
 class Test : public Subscriptor
 {
   const char* name;
@@ -79,5 +82,3 @@ deallog << "a ";
   }
 }
 
-void abort()
-{}
index 76355788732dc1963f55ed4840c3cd854cdb6022..90a506661a98b014ef21de4ee09c180e24c34bea 100644 (file)
@@ -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
index dd72340acfd8e726d9d091adad6727027e0eff76..1ddc3b6d21d179ad03d613e73fae160da45e7268 100644 (file)
@@ -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
index e02b77c0e367350f7fd52ff06f6186e257a0d387..a3cf5fb3819dc810ec6b74d1ced09726072c8726 100644 (file)
@@ -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
index e4480a990dc835daf0461379d4d9f2a98a147c86..eb60e99baa2b6668a06a5ec24286bfdb6c50ee7a 100644 (file)
@@ -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
index bc775f2f7d59813651d841e1fccad6bacbf63210..d7a6c9c035614691e7d6f4a0350cc8fdb1a97daf 100644 (file)
@@ -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
index 3a525b71d3fded5f23168a074d1312a8b42285f0..5322c80ace0f3399c9be9d6ca11122ba98880b21 100644 (file)
@@ -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
 
 
index 9cc2eaa036149ed7b427e1a1f74675f26ef845f6..4613ca74f75cabcd18cef53ec0107d1302468bbf 100644 (file)
@@ -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
 
 
index 4737954f2a040d1983b99924f88636c551261fd7..2546e5bd234deb65987374b59b7cf26cee92750d 100644 (file)
@@ -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
index 10a3e4754adc2659ed4f59f86ef235b4d753b723..ba9c3dd571f10ba5a14ac12a605d6e957c5b44ee 100644 (file)
@@ -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
index 416e1bf73b904c1d4621991861edc081967f8c32..0514db3413033c2c8742607726145eddeb288fb4 100644 (file)
@@ -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)
 
 
 ############################################################
index e7cb4d3b23aab1f5f1634450f55f86bc1b690b97..fdf03630acf604b39befbfc76002b48694a5ef02 100644 (file)
@@ -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<double> ::template precondition_SSOR<double>, 1.);
+  PreconditionSSOR<> prec;
+  prec.initialize((*matrices)[level], 1.);
 
   rich.solve((*matrices)[level], u, rhs, prec);
 }
index a00dc2e5615168f50b706f272c287451bccd0cfa..9897d30cde5f0189d3fde96391a2ebba49cba943 100644 (file)
@@ -69,12 +69,11 @@ int main()
       SparseMatrix<double>  A(structure);
       testproblem.laplacian(A);
 
-      PreconditionIdentity
-       prec_no;
-      PreconditionRelaxation<>
-       prec_sor(A, &SparseMatrix<double>::template precondition_SOR<double>, 1.2);
-      PreconditionRelaxation<>
-       prec_ssor(A, &SparseMatrix<double>::template precondition_SSOR<double>, 1.2);
+      PreconditionIdentity prec_no;
+      PreconditionSOR<> prec_sor;
+      prec_sor.initialize(A, 1.2);
+      PreconditionSSOR<> prec_ssor;
+      prec_ssor.initialize(A, 1.2);
       
       Vector<double>  f(dim);
       Vector<double>  u(dim);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.