Skip to content

Commit

Permalink
Fix setup script for p4est>=2.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
marcfehling committed Jun 9, 2021
1 parent 0d9ca93 commit 00fa708
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions doc/external-libs/p4est-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ else
fi
fi

# extract version number from file name
VERSION=`echo $TGZ | sed 's/^p4est-\(.*\).tar.gz$/\1/g'`
VERSION_MAJOR=`echo $VERSION | cut -d. -f1`
VERSION_MINOR=`echo $VERSION | cut -d. -f2`

# choose names for fast and debug installation directories
INSTALL_DIR="$1"; shift
if test -z "$INSTALL_DIR" ; then
Expand Down Expand Up @@ -122,8 +127,14 @@ cd "$BUILD_FAST"
make -C sc -j 8 > make.output || bdie "Error in make sc"
make -j 8 >> make.output || bdie "Error in make p4est"
# ensure that we built p4est with zlib
grep -q 'P4EST_HAVE_ZLIB *1' "$BUILD_FAST/src/p4est_config.h" \
|| bdie "$MISSING_ZLIB_MESSAGE"
if test "$VERSION_MAJOR" -gt 2 || \
( test "$VERSION_MAJOR" -eq 2 && test "$VERSION_MINOR" -gt 2 ) ; then
grep -q 'P4EST_HAVE_ZLIB *1' "$BUILD_FAST/config/p4est_config.h" \
|| bdie "$MISSING_ZLIB_MESSAGE"
else
grep -q 'P4EST_HAVE_ZLIB *1' "$BUILD_FAST/src/p4est_config.h" \
|| bdie "$MISSING_ZLIB_MESSAGE"
fi
make install >> make.output || bdie "Error in make install"
echo "FAST version installed in $INSTALL_FAST"

Expand All @@ -139,8 +150,14 @@ cd "$BUILD_DEBUG"
make -C sc -j 8 > make.output || bdie "Error in make sc"
make -j 8 >> make.output || bdie "Error in make p4est"
# ensure that we built p4est with zlib
grep -q 'P4EST_HAVE_ZLIB *1' "$BUILD_DEBUG/src/p4est_config.h" \
|| bdie "$MISSING_ZLIB_MESSAGE"
if test "$VERSION_MAJOR" -gt 2 || \
( test "$VERSION_MAJOR" -eq 2 && test "$VERSION_MINOR" -gt 2 ) ; then
grep -q 'P4EST_HAVE_ZLIB *1' "$BUILD_FAST/config/p4est_config.h" \
|| bdie "$MISSING_ZLIB_MESSAGE"
else
grep -q 'P4EST_HAVE_ZLIB *1' "$BUILD_FAST/src/p4est_config.h" \
|| bdie "$MISSING_ZLIB_MESSAGE"
fi
make install >> make.output || bdie "Error in make install"
echo "DEBUG version installed in $INSTALL_DEBUG"
echo

0 comments on commit 00fa708

Please sign in to comment.