From bd840bde762b7c8852c560abcce82ce7096209e2 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 19 Jan 2006 21:50:12 +0000 Subject: [PATCH] Link the umfpack routines directly into liblac, instead of into a separate shared library. git-svn-id: https://svn.dealii.org/trunk@12101 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/aclocal.m4 | 1 - deal.II/common/Make.global_options.in | 4 +- deal.II/configure | 170 +++++++++++++++++++++++++- deal.II/doc/news/changes.html | 10 ++ deal.II/lac/Makefile | 25 ++-- 5 files changed, 194 insertions(+), 16 deletions(-) diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index f99407ae61..8f866d6ff3 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -4927,7 +4927,6 @@ AC_DEFUN(DEAL_II_WITH_UMFPACK, dnl grep "UMFPACK v" $1/README else AC_MSG_CHECKING(UmfPack library) - UMFPACK_LIB='$(LIBDIR)/liblac_umfpack$(lib-suffix)' UMFPACK_INCLUDE_DIR='-I$D/contrib/umfpack/UMFPACK/Include' USE_CONTRIB_UMFPACK='yes' AC_MSG_RESULT(using included version) diff --git a/deal.II/common/Make.global_options.in b/deal.II/common/Make.global_options.in index 47892c6fa1..979fb62ddc 100644 --- a/deal.II/common/Make.global_options.in +++ b/deal.II/common/Make.global_options.in @@ -89,8 +89,8 @@ EXEEXT = @EXEEXT@ lib-base.o = $(LIBDIR)/libbase$(lib-suffix) lib-base.g = $(LIBDIR)/libbase.g$(lib-suffix) -lib-lac.o = $(LIBDIR)/liblac$(lib-suffix) @UMFPACK_LIB@ -lib-lac.g = $(LIBDIR)/liblac.g$(lib-suffix) @UMFPACK_LIB@ +lib-lac.o = $(LIBDIR)/liblac$(lib-suffix) +lib-lac.g = $(LIBDIR)/liblac.g$(lib-suffix) ifeq ($(USE_CONTRIB_HSL),yes) lib-lac.o += $(LIBDIR)/libhsl$(lib-suffix) diff --git a/deal.II/configure b/deal.II/configure index d02b1b6c51..1f07455c35 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.218 . +# From configure.in Revision: 1.219 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for deal.II 5.3.pre. # @@ -862,6 +862,9 @@ Optional Packages: is included by the argument -llapacklib. If no argument is given, use -llapack. Default is not to use -llapack. + --with-zlib=zlib use the compression library zlib for gzipped input and output + and link it with -lzlib (the default is -lz). + Make sure the library is in the search path of ld. --with-cpu=cpu Optimize specifically for the given CPU type, rather than just generating code for this processor family. @@ -10163,7 +10166,6 @@ fi else echo "$as_me:$LINENO: checking UmfPack library" >&5 echo $ECHO_N "checking UmfPack library... $ECHO_C" >&6 - UMFPACK_LIB='$(LIBDIR)/liblac_umfpack$(lib-suffix)' UMFPACK_INCLUDE_DIR='-I$D/contrib/umfpack/UMFPACK/Include' USE_CONTRIB_UMFPACK='yes' echo "$as_me:$LINENO: result: using included version" >&5 @@ -10339,6 +10341,170 @@ fi fi; +if test "x$with_zlib" = "x" ; then + with_zlib="yes" +fi + + +# Check whether --with-zlib or --without-zlib was given. +if test "${with_zlib+set}" = set; then + withval="$with_zlib" + + if test "x$withval" != "xyes" ; then + as_ac_Lib=`echo "ac_cv_lib_$withval''_crc32" | $as_tr_sh` +echo "$as_me:$LINENO: checking for crc32 in -l$withval" >&5 +echo $ECHO_N "checking for crc32 in -l$withval... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Lib+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-l$withval $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end 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 crc32 (); +int +main () +{ +crc32 (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Lib=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Lib=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6 +if test `eval echo '${'$as_ac_Lib'}'` = yes; then + LIBS="-l$withval $LIBS" + cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBZ 1 +_ACEOF + + +fi + + else + +echo "$as_me:$LINENO: checking for crc32 in -lz" >&5 +echo $ECHO_N "checking for crc32 in -lz... $ECHO_C" >&6 +if test "${ac_cv_lib_z_crc32+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end 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 crc32 (); +int +main () +{ +crc32 (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_z_crc32=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_z_crc32=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_z_crc32" >&5 +echo "${ECHO_T}$ac_cv_lib_z_crc32" >&6 +if test $ac_cv_lib_z_crc32 = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBZ 1 +_ACEOF + + LIBS="-lz $LIBS" + +fi + + fi + +fi; + + echo "$as_me:$LINENO: result: " >&5 echo "${ECHO_T}" >&6 diff --git a/deal.II/doc/news/changes.html b/deal.II/doc/news/changes.html index 005d61cef9..0fc8b4eb0b 100644 --- a/deal.II/doc/news/changes.html +++ b/deal.II/doc/news/changes.html @@ -104,6 +104,16 @@ inconvenience this causes.

General

    +
  1. + Changed: Previously, the UMFPACK code was linked into its own + library, liblac_umfpack.*. Instead, it is now + directly linked into the liblac.* libraries. This + makes further linking simpler than before and also simplified + the link process. +
    + (WB 2006/01/19) +

    +
  2. Improved: The order of quadrature points is now x fastest, z slowest, as well as the vertices of cells. Also, the nodes and subcells of patches diff --git a/deal.II/lac/Makefile b/deal.II/lac/Makefile index cada0f0bea..081ae9beea 100644 --- a/deal.II/lac/Makefile +++ b/deal.II/lac/Makefile @@ -5,16 +5,25 @@ # deal.II top level directory D=.. +# get options which hold for all files of the project +include $D/common/Make.global_options + # create lists of file names cc-files = $(shell echo source/*.cc) -o-files-base = $(addprefix $(LIBDIR)/lac/, $(patsubst source/%,%,$(cc-files:.cc=.$(OBJEXT)))) -o-files = $(sort $(o-files-base)) -go-files = $(o-files:.$(OBJEXT)=.g.$(OBJEXT)) +o-files-base = $(sort $(addprefix $(LIBDIR)/lac/, $(patsubst source/%,%,$(cc-files:.cc=.$(OBJEXT))))) +o-files = $(o-files-base) +go-files = $(o-files-base:.$(OBJEXT)=.g.$(OBJEXT)) h-files = $(sort $(shell echo include/lac/*.h)) -# get options which hold for all files of the project -include $D/common/Make.global_options +# if umfpack was configured, simply link all the umfpack files into liblac. +# these object files should have been generated before we got to the present +# directory +ifeq ($(USE_CONTRIB_UMFPACK),yes) + umfpack-files = $(sort $(shell echo $(LIBDIR)/contrib/umfpack/*.$(OBJEXT))) + o-files += $(umfpack-files) + go-files += $(umfpack-files) +endif # production rules @@ -57,12 +66,6 @@ ifneq ($(GXX-VERSION),compaq_cxx) deplibs.o += $(lib-contrib-petsc.o) endif - # and UMFPACK - ifeq ($(USE_CONTRIB_UMFPACK),yes) - deplibs.g += $(LIBDIR)/liblac_umfpack$(lib-suffix) - deplibs.o += $(LIBDIR)/liblac_umfpack$(lib-suffix) - endif - # for cygwin, also llapack and such are necessary # we better link all libraries mentioned in $(libs) ifeq ($(findstring cygwin,$(TARGET)),cygwin) -- 2.39.5