[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: more autoconf patch questions, for Mo DeJong again

From: Mo DeJong <supermo_at_bayarea.net>
Date: 2001-10-09 03:01:27 CEST

On Fri, 5 Oct 2001 14:31:07 -0700
Greg Stein <gstein@lyra.org> wrote:

> On Fri, Oct 05, 2001 at 11:02:16AM -0700, Mo DeJong wrote:
> >...
> > That said, there was a portion of your previous patch that I
> > did deliberately leave out, but you seem to have added anyway.
> > The following change in configure.in is incorrect.
> >
> > --- OLD/trunk/configure.in Fri Oct 5 06:04:23 2001
> > +++ NEW/trunk/configure.in Fri Oct 5 06:04:23 2001
> > @@ -120,6 +124,10 @@
> > else
> > args="--disable-shared"
> > fi
> > +
> > + # neon uses an old autoconf which does not understand the -C and
> > + # --config-cache arguments. strip them from the args passed down.
> > + ac_configure_args="`echo $ac_configure_args | sed 's/-C//' | sed 's/--config-cache//'`"
> > APR_SUBDIR_CONFIG(neon, $args --with-expat="$abs_srcdir/expat-lite/libexpat.la")
> >
> > AC_MSG_CHECKING([for any extra libraries neon needs])
> >
> >
> > The above change would have been needed with neon 1.15.3. We
> > now use 1.17.0 and run the neon/autogen.sh in subversion's autogen.sh,
> > so it is no longer needed.
>
> Per my log message, the above code *is* still needed unless/until Joe will
> be guaranteeing that Neon is distributed using Autoconf 2.50 or later.
>
> If somebody downloads an SVN tarball, then fetchs Neon, and then runs
> "./configure" ... the Neon configure will *not* have been rebuilt using
> autoconf 2.50. The user did not run any autogen.sh scripts.

It seems the real problem here is that we need to do the version check
for neon twice. Once at ./autogen.sh time and once at ./configure time.
We also need to upgrade to neon 0.17.1 which includes autoconf 2.50
configure scripts. The following patch implements this change.

cheers
Mo

2001-10-08 Mo DeJong <supermo@bayarea.net>

        Check for apr and neon directories in the srcdir when
        a release is configured and again when ./configure is run.
        Upgrade to neon 0.17.1.

        * ac-helpers/check-apr-ver.sh: Add new script to check
        for apr subdir.
        * ac-helpers/check-neon-ver.sh: Add new scripts to check
        for neon subdir along with correct version of neon. The
        version check was grabbed from ac-helpers/get-neon-ver.sh.
        Upgrade to neon 0.17.1.
        * ac-helpers/get-neon-ver.sh: Remove file.
        * autogen.sh: Use new scripts to check for apr and neon.
        * configure.in: Use new scripts to check for apr and neon.
        Fix typo in include line. Remove workaround for autoconf
        version incompatibility between subversion and neon.

Index: ac-helpers/check-apr-ver.sh
===================================================================
--- ac-helpers/.svn/text-base/check-apr-ver.sh Mon Oct 8 17:48:29 2001
+++ ac-helpers/check-apr-ver.sh Mon Oct 8 17:41:26 2001
@@ -0,0 +1,23 @@
+#! /bin/sh
+#
+# USAGE: check-apr-ver.sh TOP_SRCDIR
+#
+
+top_srcdir=$1
+apr_dir=${top_srcdir}/apr
+
+if test ! -d ${apr_dir} ; then
+ echo "You don't have an apr/ subdirectory in ${top_srcdir}."
+ echo ""
+ echo " cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic login"
+ echo " (password 'anoncvs')"
+ echo ""
+ echo " cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic co apr"
+ echo ""
+ echo "Run that right here in the top-level of the Subversion tree."
+ echo ""
+ exit 1
+fi
+
+echo "found apr/ (ok)"
+exit 0
Index: ac-helpers/check-neon-ver.sh
===================================================================
--- ac-helpers/.svn/text-base/check-neon-ver.sh Mon Oct 8 17:48:29 2001
+++ ac-helpers/check-neon-ver.sh Mon Oct 8 17:41:25 2001
@@ -0,0 +1,48 @@
+#! /bin/sh
+#
+# USAGE: check-neon-ver.sh TOP_SRCDIR
+#
+
+NEON_WANTED=0.17.1
+NEON_URL="http://www.webdav.org/neon/neon-${NEON_WANTED}.tar.gz"
+
+top_srcdir=$1
+neon_dir=${top_srcdir}/neon
+
+if test ! -d ${neon_dir} ; then
+ echo "You don't have a neon/ subdirectory in ${top_srcdir}."
+ echo "Please get neon ${NEON_WANTED} from:"
+ echo " ${NEON_URL}"
+ echo ""
+ echo "Unpack the archive using tar/gunzip and rename the resulting"
+ echo "directory from neon-${NEON_WANTED}/ to neon/"
+ echo ""
+ exit 1
+fi
+
+conf=${neon_dir}/macros/neon.m4
+if test ! -f $conf ; then
+ echo "neon files not found in $1"
+ exit 1
+fi
+
+major=`sed -n '/NEON_VERSION_MAJOR=/s/.*=//p' $conf`
+minor=`sed -n '/NEON_VERSION_MINOR=/s/.*=//p' $conf`
+release=`sed -n '/NEON_VERSION_RELEASE=/s/.*=//p' $conf`
+
+NEON_VERSION="$major.$minor.$release"
+
+if test "$NEON_WANTED" != "$NEON_VERSION"; then
+ echo "You have a ${neon_dir} subdir containing version $NEON_VERSION,"
+ echo "but Subversion needs neon ${NEON_WANTED}."
+ echo "Please get neon ${NEON_WANTED} from:"
+ echo " ${NEON_URL}"
+ echo ""
+ echo "Unpack the archive using tar/gunzip and rename the resulting"
+ echo "directory from neon-${NEON_WANTED}/ to neon/"
+ echo ""
+ exit 1
+fi
+
+echo "found neon/ version ${NEON_VERSION} (ok)"
+exit 0
Index: autogen.sh
===================================================================
--- .svn/text-base/autogen.sh Fri Oct 5 10:10:40 2001
+++ autogen.sh Mon Oct 8 17:16:40 2001
@@ -14,56 +14,10 @@
 done
 
 # Make sure the APR directory is present
-if [ ! -d apr ]; then
- echo "You don't have an apr/ subdirectory here. Please get one:"
- echo ""
- echo " cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic login"
- echo " (password 'anoncvs')"
- echo ""
- echo " cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic co apr"
- echo ""
- echo "Run that right here in the top-level of the Subversion tree."
- echo ""
- PREREQ_FAILED="yes"
-fi
-
-# Make sure the Neon directory is present
-NEON_WANTED=0.17.0
-NEON_URL="http://www.webdav.org/neon/neon-${NEON_WANTED}.tar.gz"
-
-if [ ! -d neon ]; then
- echo "You don't have a neon/ subdirectory here."
- echo "Please get neon ${NEON_WANTED} from:"
- echo " ${NEON_URL}"
- echo ""
- echo "Unpack the archive using tar/gunzip and rename the resulting"
- echo "directory from ./neon-${NEON_WANTED}/ to ./neon/"
- echo ""
- PREREQ_FAILED="yes"
-else
- NEON_VERSION=`ac-helpers/get-neon-ver.sh neon`
- if test "$NEON_WANTED" != "$NEON_VERSION"; then
- echo "You have a neon/ subdir containing version $NEON_VERSION,"
- echo "but Subversion needs neon ${NEON_WANTED}."
- echo "Please get neon ${NEON_WANTED} from:"
- echo " ${NEON_URL}"
- echo ""
- echo "Unpack the archive using tar/gunzip and rename the resulting"
- echo "directory from ./neon-${NEON_WANTED}/ to ./neon/"
- echo ""
- PREREQ_FAILED="yes"
- fi
-fi
-
-
-#
-# If PREREQ_FAILED == "yes", then one or more required packages could
-# not be found in-tree, so exit now.
-#
-if [ "${PREREQ_FAILED}" = "yes" ]; then
- exit 1
-fi
+./ac-helpers/check-apr-ver.sh . || exit 1
 
+# Make sure the proper version of neon is in the srcdir
+./ac-helpers/check-neon-ver.sh . || exit 1
 
 # Run a quick test to ensure that our autoconf and libtool verison are ok
 ./buildcheck.sh || exit 1
Index: configure.in
===================================================================
--- .svn/text-base/configure.in Fri Oct 5 10:10:38 2001
+++ configure.in Mon Oct 8 17:46:24 2001
@@ -15,6 +15,12 @@
 abs_srcdir="`cd $srcdir && pwd`"
 abs_builddir="`pwd`"
 
+# Make sure the APR directory is present
+${abs_srcdir}/ac-helpers/check-apr-ver.sh $abs_srcdir || exit 1
+
+# Make sure the proper version of neon is in the srcdir
+${abs_srcdir}/ac-helpers/check-neon-ver.sh $abs_srcdir || exit 1
+
 dnl $MKDIR is required for configuring apr and neon in a vpath build
 MKDIR="$abs_srcdir/apr/build/mkdir.sh"
 
@@ -95,7 +101,7 @@
 AC_SUBST(SVN_EXPAT_INCLUDES)
 
 dnl Neon
-SVN_NEON_INCLUDES=-'I$(top_srcdir)/neon/src'
+SVN_NEON_INCLUDES='-I$(top_srcdir)/neon/src'
 AC_SUBST(SVN_NEON_INCLUDES)
 
 
@@ -125,9 +131,6 @@
      args="--disable-shared"
   fi
 
- # neon uses an old autoconf which does not understand the -C and
- # --config-cache arguments. strip them from the args passed down.
- ac_configure_args="`echo $ac_configure_args | sed 's/-C//' | sed 's/--config-cache//'`"
   APR_SUBDIR_CONFIG(neon, $args --with-expat="$abs_srcdir/expat-lite/libexpat.la")
 
   AC_MSG_CHECKING([for any extra libraries neon needs])

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:44 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.