You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Max Bowsher <ma...@ukf.net> on 2003/06/10 20:09:48 UTC

[Patch] Revised fallback libtool.m4 location in buildconf

Below are the patches, one to apr and one to apr-util, revised to use
PrintPath.

About people's automake worries:
I really don't think there is any danger of this being the "tip of the
iceberg".
As long as there is no Makefile.am, it is quite clear that apr isn't using
automake.



Max.



Index: buildconf
===================================================================
RCS file: /home/max/cvsmirror/misc-cvs/apr/buildconf,v
retrieving revision 1.25
diff -u -p -r1.25 buildconf
--- buildconf 1 Jan 2003 00:01:41 -0000 1.25
+++ buildconf 10 Jun 2003 17:58:42 -0000
@@ -83,9 +83,20 @@ $libtoolize --copy --automake
 ltpath=`dirname $libtoolize`
 ltfile=`cd $ltpath/../share/aclocal ; pwd`/libtool.m4

-if [ ! -f $ltfile ]; then
-    echo "$ltfile not found"
-    exit 1
+if [ ! -f "$ltfile" ]; then
+    ltfile2="$ltfile"
+    aclocal=`build/PrintPath aclocal`
+    if [ "x$aclocal" = "x" ]; then
+ ltfile="aclocal not available"
+    else
+ ltfile="`$aclocal --print-ac-dir`"/libtool.m4
+    fi
+    if [ "x$aclocal" = "x" -o ! -f "$ltfile" ]; then
+ echo "Unable to find libtool.m4 - tried these locations:"
+ echo "  Based on path of libtoolize: $ltfile2"
+ echo "  Via aclocal --print-ac-dir:  $ltfile"
+ exit 1
+    fi
 fi

 cat $ltfile | sed -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' >
build/libtool.m4

-------------------------------------------------------------------

Index: buildconf.sh
===================================================================
RCS file: /home/max/cvsmirror/misc-cvs/apr-util/xml/expat/buildconf.sh,v
retrieving revision 1.10
diff -u -p -r1.10 buildconf.sh
--- xml/expat/buildconf.sh 15 May 2002 16:51:52 -0000 1.10
+++ xml/expat/buildconf.sh 10 Jun 2003 18:05:24 -0000
@@ -10,6 +10,21 @@ if [ "x$libtoolize" = "x" ]; then
 fi
 ltpath=`dirname $libtoolize`
 ltfile=`cd $ltpath/../share/aclocal ; pwd`/libtool.m4
+if [ ! -f "$ltfile" ]; then
+    ltfile2="$ltfile"
+    aclocal=`build/PrintPath aclocal`
+    if [ "x$aclocal" = "x" ]; then
+ ltfile="aclocal not available"
+    else
+ ltfile="`$aclocal --print-ac-dir`"/libtool.m4
+    fi
+    if [ "x$aclocal" = "x" -o ! -f "$ltfile" ]; then
+ echo "Unable to find libtool.m4 - tried these locations:"
+ echo "  Based on path of libtoolize: $ltfile2"
+ echo "  Via aclocal --print-ac-dir:  $ltfile"
+ exit 1
+    fi
+fi
 echo "Incorporating $ltfile into aclocal.m4 ..."
 echo "dnl THIS FILE IS AUTOMATICALLY GENERATED BY buildconf.sh" >
aclocal.m4
 echo "dnl edits here will be lost" >> aclocal.m4


Re: [Patch] Revised fallback libtool.m4 location in buildconf

Posted by Greg Stein <gs...@lyra.org>.
On Tue, Jun 17, 2003 at 10:36:11PM +0100, Max Bowsher wrote:
>...
> > I don't care strongly either way about the aclocal patch either way, so
> > I didn't commit it.  If someone else wants to commit it they don't need
> > my approval. :)
> 
> OK, but it will clash with the patch you just committed.
> 
> I will wait for some feedback on the last iteration of my patch, and then if
> it is favourable, rebuild it to incorporate the LIBTOOL_M4 change.

I would prefer automated ways of finding the thing. If we can find it
through another mechanism, then great. Let's go with it.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Re: [Patch] Revised fallback libtool.m4 location in buildconf

Posted by Max Bowsher <ma...@ukf.net>.
Joe Orton wrote:
> On Tue, Jun 17, 2003 at 10:15:32PM +0100, Max Bowsher wrote:
>> Joe Orton wrote:
>>> Hi Max,
>>>
>>> On Tue, Jun 10, 2003 at 07:09:48PM +0100, Max Bowsher wrote:
>>>> Below are the patches, one to apr and one to apr-util, revised to use
>>>> PrintPath.
>>>
>>> I think it's useful to allow finding libtool.m4 in odd places without
>>> requiring an aclocal installation - since this can be done with a very
>>> simply change I've committed it rather than your patch. Hope this works
>>> for you: just set $LIBTOOL_M4 appropriately.
>>
>> It's a slight improvement, but not by much.
>>
>> This means that every user of any distribution using
auto-version-selecting
>> autotool wrappers will need to set an environment variable.
>
> Ah, does CygWin use an autoconf wrapper which tries to guess whether it
> should use 2.5x or 2.13 like Debian do/did?

Yes.

>> This is like configure asking you to manually set things which it could
test
>> for.
>>
>> Shall I redo my patch to incorporate use of the LIBTOOL_M4 variable, or
is
>> the idea of using aclocal, even only optionally, simply not acceptable
for
>> some reason?
>
> I don't care strongly either way about the aclocal patch either way, so
> I didn't commit it.  If someone else wants to commit it they don't need
> my approval. :)

OK, but it will clash with the patch you just committed.

I will wait for some feedback on the last iteration of my patch, and then if
it is favourable, rebuild it to incorporate the LIBTOOL_M4 change.

Max.


Re: [Patch] Revised fallback libtool.m4 location in buildconf

Posted by Joe Orton <jo...@manyfish.co.uk>.
On Tue, Jun 17, 2003 at 10:15:32PM +0100, Max Bowsher wrote:
> Joe Orton wrote:
> > Hi Max,
> >
> > On Tue, Jun 10, 2003 at 07:09:48PM +0100, Max Bowsher wrote:
> >> Below are the patches, one to apr and one to apr-util, revised to use
> >> PrintPath.
> >
> > I think it's useful to allow finding libtool.m4 in odd places without
> > requiring an aclocal installation - since this can be done with a very
> > simply change I've committed it rather than your patch. Hope this works
> > for you: just set $LIBTOOL_M4 appropriately.
> 
> It's a slight improvement, but not by much.
> 
> This means that every user of any distribution using auto-version-selecting
> autotool wrappers will need to set an environment variable.

Ah, does CygWin use an autoconf wrapper which tries to guess whether it
should use 2.5x or 2.13 like Debian do/did? 

> This is like configure asking you to manually set things which it could test
> for.
>
> Shall I redo my patch to incorporate use of the LIBTOOL_M4 variable, or is
> the idea of using aclocal, even only optionally, simply not acceptable for
> some reason?

I don't care strongly either way about the aclocal patch either way, so
I didn't commit it.  If someone else wants to commit it they don't need
my approval. :)

Regards,

joe

Re: [Patch] Revised fallback libtool.m4 location in buildconf

Posted by Max Bowsher <ma...@ukf.net>.
Joe Orton wrote:
> Hi Max,
>
> On Tue, Jun 10, 2003 at 07:09:48PM +0100, Max Bowsher wrote:
>> Below are the patches, one to apr and one to apr-util, revised to use
>> PrintPath.
>
> I think it's useful to allow finding libtool.m4 in odd places without
> requiring an aclocal installation - since this can be done with a very
> simply change I've committed it rather than your patch. Hope this works
> for you: just set $LIBTOOL_M4 appropriately.

It's a slight improvement, but not by much.

This means that every user of any distribution using auto-version-selecting
autotool wrappers will need to set an environment variable.

This is like configure asking you to manually set things which it could test
for.

Shall I redo my patch to incorporate use of the LIBTOOL_M4 variable, or is
the idea of using aclocal, even only optionally, simply not acceptable for
some reason?


Max.


Re: [Patch] Revised fallback libtool.m4 location in buildconf

Posted by Joe Orton <jo...@manyfish.co.uk>.
Hi Max,

On Tue, Jun 10, 2003 at 07:09:48PM +0100, Max Bowsher wrote:
> Below are the patches, one to apr and one to apr-util, revised to use
> PrintPath.

I think it's useful to allow finding libtool.m4 in odd places without
requiring an aclocal installation - since this can be done with a very
simply change I've committed it rather than your patch. Hope this works
for you: just set $LIBTOOL_M4 appropriately.

Regards,

joe