From a938d73cf1b5fcdc89183a1cc4ed2c39e534cc12 Mon Sep 17 00:00:00 2001 From: Richard Boulton Date: Wed, 30 May 2001 12:56:25 +0000 Subject: [PATCH] Deal more gracefully with being either unable to check that automake is or finding that automake definitely isn't pat... Original commit message from CVS: Deal more gracefully with being either unable to check that automake is patched (will now just give a small warning), or finding that automake definitely isn't patched (will give a big loud warning recommend stopping the build and sleep briefly to give the user a chance to read the message). Will eventually try to do the build anyway though. Also, don't abort if autoconf or automake return error codes: they both seem able to do so even when having produced viable results. --- autogen.sh | 46 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/autogen.sh b/autogen.sh index a2b30f5..9431963 100755 --- a/autogen.sh +++ b/autogen.sh @@ -31,7 +31,7 @@ if test "x$automakevermin" != "x1 4"; then DIE=1 else if test "x$automakevergood" != "x1 4f"; then -echo "Checking for patched automake" +echo -n "Checking for patched automake..." # version is less than 1.4f, the version with the patch applied # check that patch is applied cat > autogen.patch.tmp < autogen.patch.tmp </dev/null 2>&1; + then + # Patch succeeded: appropriately patched. + echo " found." + else + # Patch failed: either unpatched or incompatibly patched. + if patch -R -s -f --dry-run `which automake` /dev/null 2>&1; + then + # Reversed patch succeeded: not patched. + echo " not found." + echo + echo "Detected automake version 1.4 (or near) without patch." + echo "Your version of automake needs a patch applied in order to operate correctly." + echo + echo "***************************************************************************" + echo "You should abort the build now and read the README file for an explanation." + echo "***************************************************************************" + echo + # Give user time to respond + sleep 5; + echo "continuing anyway: I recommend keeping a check on the amount of memory used" + echo "while running automake - it is likely to grow extremely large." + echo + else + # Reversed patch failed: incompatibly patched. + echo + echo + echo "Unable to check whether automake is appropriately patched." + echo "Your version of automake may need to have a patch applied." + echo "Read the README file for more explanation." + echo + fi + fi rm autogen.patch.tmp fi fi + (libtool --version) < /dev/null > /dev/null 2>&1 || { echo echo "You must have libtool installed to compile $package." @@ -123,12 +151,12 @@ autoheader || { autoconf || { echo echo "autoconf failed" - exit 1 + #exit 1 } automake --add-missing || { echo echo "automake failed" - exit 1 + #exit 1 } # now remove the cache, because it can be considered dangerous in this case -- 2.7.4