libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to maintain compatibility with Automake.


From: Peter Rosin
Subject: Re: How to maintain compatibility with Automake.
Date: Tue, 10 Aug 2010 21:15:42 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2

Den 2010-08-10 20:27 skrev Ralf Wildenhues:
* Ralf Wildenhues wrote on Tue, Aug 10, 2010 at 11:15:21AM CEST:
* Gary V. Vaughan wrote on Tue, Aug 10, 2010 at 11:09:33AM CEST:
On 10 Aug 2010, at 15:19, Peter Rosin wrote:
m4_defun([AM_PROG_AR],
[AC_CHECK_TOOLS(AR, [ar], false)
: ${AR=ar}
AC_SUBST([AR])dnl
])# AM_PROG_AR
])

Just like that!

NAK.  I don't have time to explain now, but this should be completely
unnecessary.  Esp since Libtool already sets $AR.

Sorry for the short and harsh answer, here's a longer explanation:

No problem at all.

First, LT_INIT already causes AC_CHECK_TOOLS([AR], ...) to be invoked.

Which comes from the _LT_CMD_OLD_ARCHIVE macro, which according to my
original message needed modification, namely to remove that and use
AM_PROG_AR instead. I thought that was obvious, sorry for not spelling
it out...

Second, overrides of the form
   m4_ifndef([MACRO],
   [ AC_DEFUN([MACRO], [...]) ])

in public m4 files (installed in $datarootdir/aclocal) are very
problematic for third-party projects if MACRO does not come from
Autoconf itself: aclocal will pick it up and install libtool.m4 in
projects using MACRO even if the project otherwise doesn't use Libtool
at all!  Users were quite annoyed about that.

Now, in the above you don't use AC_DEFUN, so hopefully that particular
aclocal issue is lessened.  But still, I have had too much pain with
additions to lt~obsolete.m4[1] that I'd really prefer not adding macros
which belong to third parties to public Libtool macro files.

For macros that are otherwise present only in the Autoconf project, this
issue is not a problem: there is not an ordering problem between files
in $datarootdir/autoconf and $datarootdir/aclocal.  That's why Gary's
examples work fine.

I was worried about something like that and it was quite deliberate to
use m4_defun instead of AC_DEFUN, but I don't claim to be a guru so
I'll take your word for it being a bad idea. Just asking...

Back on topic, I'm writing a reply to
<http://thread.gmane.org/gmane.comp.gnu.libtool.general/10927/focus=4438>
that hopefully addresses the remaining questions around AM_PROG_AR.

Great, and big thanks!

Cheers,
Peter



reply via email to

[Prev in Thread] Current Thread [Next in Thread]