]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add support for zlib
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 11 Sep 2012 14:44:59 +0000 (14:44 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 11 Sep 2012 14:44:59 +0000 (14:44 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@26285 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/CMakeLists.txt
deal.II/aclocal.m4
deal.II/contrib/cmake/configure/configure_zlib.cmake [new file with mode: 0644]
deal.II/include/deal.II/base/config.h.in
deal.II/include/deal.II/base/config.h.in.old

index 899fa2ebef759af8849adeac97230e3a640b51ea..0f860033b08a436ad22d57c028fd362f611156b9 100644 (file)
@@ -57,7 +57,7 @@ OPTION(DEAL_II_WITH_FUNCTIONPARSER
 
 OPTION(DEAL_II_WITH_METIS
   "Build deal.II with support for Metis."
-  OFF)
+  ON)
 
 OPTION(DEAL_II_WITH_MPI
   "Build deal.II with support for mpi."
@@ -75,6 +75,10 @@ OPTION(DEAL_II_WITH_UMFPACK
   "Build deal.II with support for UMFPACK, BLAS and LAPACK."
   ON)
 
+OPTION(DEAL_II_WITH_ZLIB
+  "Build deal.II with support for zlib."
+  ON)
+
 
 
 OPTION(DEAL_II_ALLOW_CONTRIB
@@ -146,6 +150,10 @@ IF(DEAL_II_WITH_UMFPACK)
   INCLUDE(configure_umfpack)
 ENDIF()
 
+IF(DEAL_II_WITH_ZLIB)
+  INCLUDE(configure_zlib)
+ENDIF()
+
 
 
 
index a1ba3574781e6b677d4fadf6a8317f7cfc678c6b..ccbdaec7bdaaf207fb049be60efa8eb2b068a765 100644 (file)
@@ -6877,31 +6877,6 @@ AC_DEFUN(DEAL_II_CHECK_BLAS_FRAMEWORK, dnl
 ])
 
 
-dnl --------------------------------------------------
-dnl Include the GSL library
-dnl --------------------------------------------------
-AC_DEFUN(DEAL_II_WITH_ZLIB, dnl
-[
-  if test "x$1" != "xyes" ; then
-    zlib=$1
-  else
-    zlib=z
-  fi
-
-  dnl See if we can find the function crc32 in libz.so
-  AC_CHECK_LIB($zlib, crc32,
-    [
-      dnl Yes, we can. Now also check whether we can do
-      dnl #include <zlib.h>
-      AC_CHECK_HEADER(zlib.h,
-        [
-          DEAL_II_ADD_EXTERNAL_LIBS_AT_FRONT(-l$zlib)
-          AC_DEFINE(HAVE_LIBZ,[],"")
-        ])
-    ])
-])
-
-
 
 
 dnl ------------------------------------------------------------
diff --git a/deal.II/contrib/cmake/configure/configure_zlib.cmake b/deal.II/contrib/cmake/configure/configure_zlib.cmake
new file mode 100644 (file)
index 0000000..2bb0cd4
--- /dev/null
@@ -0,0 +1,10 @@
+FIND_PACKAGE(Netcdf REQUIRED)
+
+FIND_PACKAGE(ZLIB REQUIRED)
+
+INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS})
+
+LIST(APPEND deal_ii_external_libraries ${ZLIB_LIBRARIES})
+LIST(APPEND deal_ii_external_debug_libraries ${ZLIB_LIBRARIES})
+
+SET(HAVE_LIBZ TRUE)
index 7ad180e13cfbe9f63f81254a25cfba43e0488870..3780aa197f9053a349f7842ef6e069af29209998 100644 (file)
 
 
 
+/*
+ * Configured in configure_umfpack.cmake:
+ */
+
+
+/* Defined if deal.II was configure with zlib support */
+#cmakedefine HAVE_LIBZ 1
+
+
+
+
 /*
  * Configured in check_for_cxx_features:
  */
index 8abe716edfb0e4952df40006e89adb77bd73768a..f4c943252b85bc06afcfcdce542fb1885a8878a3 100644 (file)
    libstdc++ interface. */
 #cmakedefine HAVE_LIBSTDCXX_DEMANGLER
 
-/* "" */
-#cmakedefine HAVE_LIBZ
 
 /* Define to 1 if you have the <memory.h> header file. */
 #cmakedefine HAVE_MEMORY_H

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.