Skip to content

Commit

Permalink
configure: detect when a patched libtool was used
Browse files Browse the repository at this point in the history
Some libtool are now available with a Big Sur patch.
Detect both versions of the patch before trying to patch.

Thanks to Jeff Squyres for the report.
Closes #447

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
(cherry picked from commit 73c5688)
  • Loading branch information
bgoglin committed Feb 2, 2021
1 parent 3e8d5b8 commit 9a785da
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions autogen.sh
Expand Up @@ -8,10 +8,17 @@ fi

autoreconf ${autoreconf_args:-"-ivf"}

echo "Trying to patching configure for MacOS Big Sur libtool.m4 bug"
if patch -p1 --dry-run < config/libtool-big-sur-fixup.patch; then
echo "Patching for real now"
patch -p1 < config/libtool-big-sur-fixup.patch
echo -n "Checking whether configure needs patching for MacOS Big Sur libtool.m4 bug... "
if grep -A1 MACOSX_DEPLOYMENT_TARGET configure | grep powerpc >/dev/null \
|| grep -A1 MACOSX_DEPLOYMENT_TARGET configure | grep 'darwin\[912' >/dev/null; then
echo "no"
else
echo "WARNING: Couldn't apply Big Sur libtool.m4 bug fix."
echo "yes"
echo "Trying to patch configure..."
if patch -p1 --dry-run < config/libtool-big-sur-fixup.patch; then
echo "Patching for real now"
patch -p1 < config/libtool-big-sur-fixup.patch
else
echo "WARNING: Couldn't apply Big Sur libtool.m4 bug fix."
fi
fi

0 comments on commit 9a785da

Please sign in to comment.