Hello Autoconf patchers, We have hit another bug in HEAD Libtool, for which we could use help from Autoconf.
This is the setting: a third-party package (GraphicsMagick) that uses libltdl in nonrecursive mode in a nonrecursive Makefile[1]. In this Makefile, the library is given as noinst_LTLIBRARIES = ltdl/libltdlc.la however the dependency is given upon LIBLTDL = ${top_builddir}/ltdl/libltdl.la and in this case, top_builddir is `.'. LIBLTDL is computed as a substitution of @LIBLTDL@ at configure time. Now, AIX make (and others) fail to identify `./file' with `file' so the build fails. It would be nice if Autoconf also substituted a variable top_build_prefix that contained of zero or more runs of `../' and otherwise behaved like top_builddir. The naming is not coincidental: config.status already computes this value, it just doesn't make it available. This would make writing these kinds of things much easier also in Automake, which has lots of special-cases of the kind if ($directory ne '') { $object = $directory . '/' . $object; } Note that top_build_prefix cannot replace top_builddir: the former requires the user _not_ to add a slash as separator. [1] Yes, this is yet another instance where nonrecursive makefiles are more difficult to realize for non-GNU makes. Cheers, Ralf 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. diff --git a/NEWS b/NEWS index 77cd6f5..854c54a 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,8 @@ GNU Autoconf NEWS - User visible changes. Further, for config headers, the total size of values is not limited by the POSIX length limit of text lines any more, only each single line. +** New config variable `top_build_prefix'. + ** Autoconf is now licensed under the General Public License version 3 or later (GPLv3+). As with earlier versions, the license includes an exception clause so that you may release a configure script diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 9025359..421056e 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -2436,6 +2436,16 @@ The relative name of the top level of the current build tree. In the top-level directory, this is the same as @code{builddir}. @end defvar [EMAIL PROTECTED] top_build_prefix [EMAIL PROTECTED] top_build_prefix +The relative name of the top level of the current build tree with final +slash if nonemtpy. This is the same as @code{top_builddir}, except that +it contains of zero of more runs of @code{../}, so it should not be +appended with a slash for concatenation. This helps for @command{make} +implementations that otherwise do not treat @file{./file} and @file{file} +as equal in the toplevel build directory. [EMAIL PROTECTED] defvar + @defvar abs_top_builddir @ovindex abs_top_builddir Absolute name of @code{top_builddir}. diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4 index 350d370..4412df0 100644 --- a/lib/autoconf/status.m4 +++ b/lib/autoconf/status.m4 @@ -622,6 +622,7 @@ dnl configure_input is a somewhat special, so we don't call AC_SUBST_TRACE. s&@configure_input@&$configure_input&;t t dnl During the transition period, this is a special case: s&@top_builddir@&$ac_top_builddir_sub&;t t[]AC_SUBST_TRACE([top_builddir]) +s&@top_build_prefix@&$ac_top_build_prefix&;t t[]AC_SUBST_TRACE([top_build_prefix]) m4_foreach([_AC_Var], [srcdir, abs_srcdir, top_srcdir, abs_top_srcdir, builddir, abs_builddir, abs_top_builddir]AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [[, INSTALL]])AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P], [[, MKDIR_P]]), _______________________________________________ Bug-libtool mailing list Bug-libtool@gnu.org http://lists.gnu.org/mailman/listinfo/bug-libtool