You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Blair Zajac <bl...@orcaware.com> on 2002/02/08 23:25:30 UTC

[PATCH] build/buildcheck.sh: Do not accept autoconf 2.52f or greater

Here's a patch to build/buildcheck.sh to not accept autoconf 2.52X where X
is not {"",a,b,c,d} to build with, since newer versions of autoconf set a
bogus value for apr_builddir.  In my autoconf 2.52f build of APR, I get
apr_builddir=../ which causes the compile to fail in file_io/unix since it
can't find libtool using the relative path in a second level directory.

I tested this patch on Solaris and Linux.

Hopefully, this will help people stop wondering why their CVS APRs build
fail with newer autoconf's.

The only issue with this patch is that the last sed uses & to match the
last [a-z] in the autoconf version.  This works on Linux and Solaris and IRIX,
but don't know about other OSes.

This script also uses 3 spaces per indent, which I didn't fix in this patch
since it would clutter it.

Best,
Blair



Index: build/buildcheck.sh
===================================================================
RCS file: /home/cvspublic/apr/build/buildcheck.sh,v
retrieving revision 1.5
diff -u -r1.5 buildcheck.sh
--- build/buildcheck.sh	12 Jul 2001 07:52:25 -0000	1.5
+++ build/buildcheck.sh	8 Feb 2002 22:09:30 -0000
@@ -2,32 +2,42 @@
 
 echo "buildconf: checking installation..."
 
-# autoconf 2.13 or newer
-ac_version=`autoconf --version 2>/dev/null|head -1|sed -e 's/^[^0-9]*//' -e
's/[a-z]* *$//'`
+autoconf_failure() {
+    echo "buildconf: $1"
+    echo "           You need autoconf between version 2.13 and 2.52d
inclusive"
+    echo "           to build APR from CVS."
+    exit 1
+}
+
+# autoconf 2.13 to 2.52d inclusive
+ac_version=`autoconf --version 2>/dev/null|head -1|sed -e 's/^[^0-9]*//' -e 's/
*$//'`
 if test -z "$ac_version"; then
-echo "buildconf: autoconf not found."
-echo "           You need autoconf version 2.13 or newer installed"
-echo "           to build Apache from CVS."
-exit 1
+    autoconf_failure "autoconf not found"
 fi
-IFS=.; set $ac_version; IFS=' '
+dotted_ac_version=`echo $ac_version | sed -e 's/[a-z]*$/.&/'`
+IFS=.; set $dotted_ac_version; IFS=' '
 if test "$1" = "2" -a "$2" -lt "13" || test "$1" -lt "2"; then
-echo "buildconf: autoconf version $ac_version found."
-echo "           You need autoconf version 2.13 or newer installed"
-echo "           to build Apache from CVS."
-exit 1
-else
-echo "buildconf: autoconf version $ac_version (ok)"
+    autoconf_failure "autoconf version $ac_version found."
+fi
+if test "$1" = "2" -a "$2" = "52"; then
+    case "$3" in
+        ""|a|b|c|d)
+            ;;
+        *)
+            autoconf_failure "autoconf version $ac_version found."
+            ;;
+    esac
 fi
+echo "buildconf: autoconf version $ac_version (ok)"
 
 # libtool 1.3.3 or newer
 libtool=`build/PrintPath glibtool libtool`
 lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/^[^0-9]*//' -e 's/[-
].*//'`
 if test -z "$lt_pversion"; then
-echo "buildconf: libtool not found."
-echo "           You need libtool version 1.3.3 or newer installed"
-echo "           to build Apache from CVS."
-exit 1
+    echo "buildconf: libtool not found."
+    echo "           You need libtool version 1.3.3 or newer installed"
+    echo "           to build APR from CVS."
+    exit 1
 fi
 lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
 IFS=.; set $lt_version; IFS=' '
@@ -50,6 +60,6 @@
 
 echo "buildconf: libtool version $lt_pversion found."
 echo "           You need libtool version 1.3.3 or newer installed"
-echo "           to build Apache from CVS."
+echo "           to build APR from CVS."
 
 exit 1