]> https://gitweb.dealii.org/ - candi.git/commitdiff
p4est: corrects zlib detection for user-installed zlib when only ZLIB_DIR is set 87/head
authorUwe Köcher <koecher@hsu-hamburg.de>
Fri, 29 Jun 2018 17:18:45 +0000 (19:18 +0200)
committerUwe Köcher <koecher@hsu-hamburg.de>
Fri, 29 Jun 2018 17:18:45 +0000 (19:18 +0200)
deal.II-toolchain/packages/p4est.package
deal.II-toolchain/packages/zlib.package

index 6653cd95897d7d5244c6166a2e42cb9d0aba3804..c200eb28d1589c6f75771789b391504aeedc9cfc 100644 (file)
@@ -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
index 5436c3a35f93c12d3f8c072ee4a8444c05a8580c..c1d4ad3b6ee720bc23636fcdf143566c065ba27f 100644 (file)
@@ -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

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.