Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 44169 invoked by uid 500); 8 Feb 2002 22:25:30 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 44158 invoked from network); 8 Feb 2002 22:25:29 -0000 Message-ID: <3C64505A.E8456744@orcaware.com> Date: Fri, 08 Feb 2002 14:25:30 -0800 From: Blair Zajac X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) X-Accept-Language: en,x-ns1rfacHe4WNh5,x-ns2U100btwUq5f MIME-Version: 1.0 To: Apache APR Development Subject: [PATCH] build/buildcheck.sh: Do not accept autoconf 2.52f or greater Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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