]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Link the umfpack routines directly into liblac, instead of into a separate shared...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 19 Jan 2006 21:50:12 +0000 (21:50 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 19 Jan 2006 21:50:12 +0000 (21:50 +0000)
git-svn-id: https://svn.dealii.org/trunk@12101 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/aclocal.m4
deal.II/common/Make.global_options.in
deal.II/configure
deal.II/doc/news/changes.html
deal.II/lac/Makefile

index f99407ae61ceffcbfdeb108155019b8a3c6783bb..8f866d6ff3136e772d362fdbc812aa7126b1a13c 100644 (file)
@@ -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)
index 47892c6fa180c23bdb3d93593fabaaa0211fab24..979fb62ddca2375949f5e008364252c9aeada94b 100644 (file)
@@ -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) 
index d02b1b6c51920caab577b9fbeb15c0f2a58fe700..1f07455c3554fd7b482253680ed7fe9b15321b75 100755 (executable)
@@ -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
 
 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
index 005d61cef99df57e51a45c802b391ef577237aec..0fc8b4eb0b0ec4f01a0e9a148efc3743ed99145c 100644 (file)
@@ -104,6 +104,16 @@ inconvenience this causes.
 <h3>General</h3>
 
 <ol>
+  <li> <p>
+       Changed: Previously, the UMFPACK code was linked into its own
+       library, <code>liblac_umfpack.*</code>. Instead, it is now
+       directly linked into the <code>liblac.*</code> libraries. This
+       makes further linking simpler than before and also simplified
+       the link process.
+       <br>
+       (WB 2006/01/19)
+       </p>
+
   <li> <p>
        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
index cada0f0beac3932d615af665d7fa5b988b365ead..081ae9beea3fcae622446cb07c49ed44e4c68730 100644 (file)
@@ -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)

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.