]> https://gitweb.dealii.org/ - candi.git/commitdiff
p4est: enforce zlib and pass over arguments 20/head
authorTimo Heister <timo.heister@gmail.com>
Wed, 5 Apr 2017 22:28:13 +0000 (18:28 -0400)
committerTimo Heister <timo.heister@gmail.com>
Wed, 5 Apr 2017 22:28:53 +0000 (18:28 -0400)
If zlib is installed as part of candi (or manually by setting ZLIB_*),
pass this info to p4est. It turns out p4est won't work (at least in
debug mode) without having access to zlib. So enforce that too.

deal.II-toolchain/packages/p4est.package

index 3af2a5214b6186e663af2028b5c837ed51cd20a3..6e522740de77300c9e81bc289a579b73f0eed6e1 100644 (file)
@@ -14,6 +14,12 @@ package_specific_setup () {
         exit 1
     }
 
+    # export zlib if we installed it ourselves
+    if [ ! -z "${ZLIB_DIR}" ]; then
+      LIBS="-L${ZLIB_LIBPATH}"
+      CFLAGS="$CFLAGS -I${ZLIB_INCLUDE}"
+    fi
+
     if test -z "$CFLAGS" -a -z "$P4EST_CFLAGS_FAST" ; then
         export CFLAGS_FAST="-O2"
     else
@@ -81,6 +87,7 @@ package_specific_setup () {
     make -C sc -j${PROCS} > make.output || bdie "Error in make sc"
     make -j${PROCS} >> make.output || bdie "Error in make p4est"
     make install >> make.output || bdie "Error in make install"
+    grep -q "#define P4EST_HAVE_ZLIB" $INSTALL_DEBUG/include/p4est_config.h || bdie "Error: p4est couldn't find zlib"
     echo "DEBUG version installed in $INSTALL_DEBUG"
     echo
     

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.