Re: New substitution: top_build_prefix

2007-11-10 Thread Ralf Wildenhues
* Ralf Wildenhues wrote on Thu, Nov 08, 2007 at 09:05:24PM CET:
 
   LIBLTDL = ${top_builddir}/ltdl/libltdl.la
[...]
 New config files output variable `top_build_prefix'.

Thanks to Paul and Benoit for reviewing my Autoconf patch.

Here's what I could think of for Libtool.  It's a bit ugly in that it
depends on the Autoconf version, and thus will fix the issue for AIX
make only once Autoconf 2.62 is used.

Hmm, do you think I could make the version comparison be against
`2.61a.265'?  Do you see a more straightforward way to find out whether
Autoconf substitutes top_build_prefix, i.e., can I access `autom4te
--trace' results from within macro files?  I could define a helper macro
in Autoconf, but that wouldn't feel much nicer either.

I'll wait for comments a couple of days before applying.

Thanks,
Ralf

2007-11-10  Ralf Wildenhues  [EMAIL PROTECTED]

Use `${top_build_prefix}' for better compatibility with non-GNU make.
* libltdl/m4/ltdl.m4 (_LT_BUILD_PREFIX): New macro.
If the Autoconf version used is = 2.62, then expand to
`${top_build_prefix}', otherwise to `${top_builddir}/'.
(LTDL_CONVENIENCE, LTDL_INSTALLABLE): Use it for defining
LIBLTDL.  Fixes a build failure with AIX make in a package
using convenience libltdl in nonrecursive mode.
* doc/libtool.texi (Distributing libltdl): Document requirements
to define `top_build_prefix' if Automake is not used.
Report by Bob Friesenhahn.

Index: doc/libtool.texi
===
RCS file: /cvsroot/libtool/libtool/doc/libtool.texi,v
retrieving revision 1.231
diff -u -r1.231 libtool.texi
--- doc/libtool.texi4 Sep 2007 18:01:32 -   1.231
+++ doc/libtool.texi10 Nov 2007 10:59:49 -
@@ -4526,9 +4526,9 @@
 By default, this macro will pass options to the @file{configure}
 script in the subdirectory named by @code{LT_CONFIG_LTDL_DIR} in order
 to cause it to be built as an installable library.  If you're not
-using automake, you will need to define @code{top_builddir} and
[EMAIL PROTECTED] in your makefile so that @code{LIBLTDL} and
[EMAIL PROTECTED] are expanded properly.
+using automake, you will need to define @code{top_build_prefix},
[EMAIL PROTECTED], and @code{top_srcdir} in your makefile so that
[EMAIL PROTECTED] and @code{LTDLINCL} are expanded properly.
 
 If used in conjunction with @code{LT_WITH_LTDL}, this macro must
 appear @strong{before} the call to @code{LT_WITH_LTDL}.  If you are
@@ -4549,9 +4549,9 @@
 By default, this macro will pass options to the @file{configure}
 script in the subdirectory named by @code{LT_CONFIG_LTDL_DIR} in order
 to cause it to be built as a convenience library.  If you're not
-using automake, you will need to define @code{top_builddir} and
[EMAIL PROTECTED] in your makefile so that @code{LIBLTDL} and
[EMAIL PROTECTED] are expanded properly.
+using automake, you will need to define @code{top_build_prefix},
[EMAIL PROTECTED] and @code{top_srcdir} in your makefile so that
[EMAIL PROTECTED] and @code{LTDLINCL} are expanded properly.
 
 @code{AC_LIBLTDL_CONVENIENCE} is a deprecated alias for
 @code{LTDL_CONVENIENCE}.
@@ -4594,7 +4594,8 @@
 If you're using the convenience libltdl, @var{LIBLTDL} will be the
 pathname for the convenience version of libltdl and @var{LTDLINCL} will be
 @option{-I} followed by the directory that contains libltdl, starting
-with @[EMAIL PROTECTED]@}/} and @[EMAIL PROTECTED]@}/} respectively.
+with @[EMAIL PROTECTED]@}} if available, otherwise with
[EMAIL PROTECTED]@[EMAIL PROTECTED]/}, and @[EMAIL PROTECTED]@}/} respectively.
 
 If you request an installed version of libltdl and one is
 [EMAIL PROTECTED]@c
@@ -4608,7 +4609,8 @@
 be empty (this is just a blind assumption that @file{ltdl.h} is
 somewhere in the include path if libltdl is in the library path).  If
 an installable version of libltdl must be built, its pathname,
-starting with @[EMAIL PROTECTED]@}/}, will be stored in
+starting with @[EMAIL PROTECTED]@}} if available, otherwise
[EMAIL PROTECTED]@[EMAIL PROTECTED]/}, will be stored in
 @var{LIBLTDL}, and @var{LTDLINCL} will be set just like in the case of
 convenience library.  So, when you want to link a program with
 libltdl, be it a convenience, installed or installable library, just
Index: libltdl/m4/ltdl.m4
===
RCS file: /cvsroot/libtool/libtool/libltdl/m4/ltdl.m4,v
retrieving revision 1.33
diff -u -r1.33 ltdl.m4
--- libltdl/m4/ltdl.m4  25 Mar 2007 12:12:43 -  1.33
+++ libltdl/m4/ltdl.m4  10 Nov 2007 10:59:54 -
@@ -45,16 +45,30 @@
 m4_define([_LTDL_MODE], [])
 
 
+# _LT_BUILD_PREFIX
+# 
+# If Autoconf is new enough, expand to `${top_build_prefix}', otherwise
+# to `${top_builddir}/'.
+m4_define([_LT_BUILD_PREFIX],
+[m4_ifdef([AC_AUTOCONF_VERSION],
+   [m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]),
+ [-1], 

Re: New substitution: top_build_prefix

2007-11-10 Thread Benoit Sigoure


On Nov 10, 2007, at 12:00 PM, Ralf Wildenhues wrote:


* Ralf Wildenhues wrote on Thu, Nov 08, 2007 at 09:05:24PM CET:


  LIBLTDL = ${top_builddir}/ltdl/libltdl.la

[...]

New config files output variable `top_build_prefix'.


Thanks to Paul and Benoit for reviewing my Autoconf patch.

Here's what I could think of for Libtool.  It's a bit ugly in that it
depends on the Autoconf version, and thus will fix the issue for AIX
make only once Autoconf 2.62 is used.

Hmm, do you think I could make the version comparison be against
`2.61a.265'?  Do you see a more straightforward way to find out  
whether

Autoconf substitutes top_build_prefix, i.e., can I access `autom4te
--trace' results from within macro files?  I could define a helper  
macro

in Autoconf, but that wouldn't feel much nicer either.

I'll wait for comments a couple of days before applying.


Hi Ralf,
thanks for addressing this.  I must admit that I can't think of  
anything better than this (that is, doing the version comparison).  I  
don't know whether you can access the trace result from within a  
macro, I don't think that's possible.


Your last solution has a very small advantage.  Correct me if I'm  
wrong but basically the idea is to have some sort of witness macro in  
autoconf (_AC_HAVE_TOP_BUILD_PREFIX, or whatever) and libtool would  
try to expand it (if it expands = you can use ${top_build_prefix} /  
otherwise = fall back on ${top_builddir}) is that right?  Well, this  
has the advantage that if this patch is backported by some  
distribution to an older version, libtool will correctly guess that $ 
{top_build_prefix} is usable even though you have an older autoconf.   
I think it might also help people that still deal with CVS autoconf  
(where the version number might be inaccurate or unreliable, as we  
have seen in Patrick's report yesterday).


All in all, either solution is sort of kludgy, but I have a slight  
preference for the helper macro in Autoconf.



2007-11-10  Ralf Wildenhues  [EMAIL PROTECTED]

Use `${top_build_prefix}' for better compatibility with non-GNU make.
* libltdl/m4/ltdl.m4 (_LT_BUILD_PREFIX): New macro.
If the Autoconf version used is = 2.62, then expand to
`${top_build_prefix}', otherwise to `${top_builddir}/'.
(LTDL_CONVENIENCE, LTDL_INSTALLABLE): Use it for defining
LIBLTDL.  Fixes a build failure with AIX make in a package
using convenience libltdl in nonrecursive mode.
* doc/libtool.texi (Distributing libltdl): Document requirements
to define `top_build_prefix' if Automake is not used.
Report by Bob Friesenhahn.


Yeah, otherwise this also looks fine by me.

--
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory




PGP.sig
Description: This is a digitally signed message part
___
Bug-libtool mailing list
Bug-libtool@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-libtool


Re: New substitution: top_build_prefix

2007-11-08 Thread Benoit Sigoure

On Nov 8, 2007, at 10:18 PM, Ralf Wildenhues wrote:


* Ralf Wildenhues wrote on Thu, Nov 08, 2007 at 09:05:24PM CET:


New config files output variable `top_build_prefix'.

* lib/autoconf/status.m4 (_AC_OUTPUT_FILE): Substitute
`top_build_prefix'.
* doc/autoconf.texi (Preset Output Variables): Document it.
* NEWS: Update.
Report by Bob Friesenhahn.


BTW, this was meant as OK to apply?.


Yeah, that's fine by me.

--
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory




PGP.sig
Description: This is a digitally signed message part
___
Bug-libtool mailing list
Bug-libtool@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-libtool


Re: New substitution: top_build_prefix

2007-11-08 Thread Ralf Wildenhues
* Ralf Wildenhues wrote on Thu, Nov 08, 2007 at 09:05:24PM CET:
 
 New config files output variable `top_build_prefix'.
 
 * lib/autoconf/status.m4 (_AC_OUTPUT_FILE): Substitute
 `top_build_prefix'.
 * doc/autoconf.texi (Preset Output Variables): Document it.
 * NEWS: Update.
 Report by Bob Friesenhahn.

BTW, this was meant as OK to apply?.

Cheers,
Ralf


___
Bug-libtool mailing list
Bug-libtool@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-libtool