From: Uwe Köcher Date: Fri, 29 Jun 2018 17:18:45 +0000 (+0200) Subject: p4est: corrects zlib detection for user-installed zlib when only ZLIB_DIR is set X-Git-Tag: v9.0.0~5^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13867e45d8ef0d7faad16b10eb2dcecc3ed06b7d;p=candi.git p4est: corrects zlib detection for user-installed zlib when only ZLIB_DIR is set --- diff --git a/deal.II-toolchain/packages/p4est.package b/deal.II-toolchain/packages/p4est.package index 6653cd9..c200eb2 100644 --- a/deal.II-toolchain/packages/p4est.package +++ b/deal.II-toolchain/packages/p4est.package @@ -16,8 +16,15 @@ package_specific_setup () { # export zlib if we installed it ourselves if [ ! -z "${ZLIB_DIR}" ]; then - LIBS="-L${ZLIB_LIBPATH}" - CFLAGS="$CFLAGS -I${ZLIB_INCLUDE}" + if [ -z "${ZLIB_LIBPATH}" ]; then + ZLIB_LIBPATH=${ZLIB_DIR}/lib + fi + LIBS="-L${ZLIB_LIBPATH}" + + if [ -z "${ZLIB_INCLUDE}" ]; then + ZLIB_INCLUDE=${ZLIB_DIR}/include + fi + CFLAGS="$CFLAGS -I${ZLIB_INCLUDE}" fi if test -z "$CFLAGS" -a -z "$P4EST_CFLAGS_FAST" ; then diff --git a/deal.II-toolchain/packages/zlib.package b/deal.II-toolchain/packages/zlib.package index 5436c3a..c1d4ad3 100644 --- a/deal.II-toolchain/packages/zlib.package +++ b/deal.II-toolchain/packages/zlib.package @@ -17,7 +17,7 @@ package_specific_build () { } package_specific_register () { - export ZLIB_DIR=${INSTALL_PATH}/ + export ZLIB_DIR=${INSTALL_PATH} export ZLIB_INCLUDE=${INSTALL_PATH}/include export ZLIB_LIBPATH=${INSTALL_PATH}/lib } @@ -27,7 +27,7 @@ package_specific_conf () { CONFIG_FILE=${CONFIGURATION_PATH}/${NAME} rm -f $CONFIG_FILE echo " -export ZLIB_DIR=${INSTALL_PATH}/ +export ZLIB_DIR=${INSTALL_PATH} export ZLIB_INCLUDE=${INSTALL_PATH}/include export ZLIB_LIBPATH=${INSTALL_PATH}/lib " >> $CONFIG_FILE