]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Use `${top_build_prefix}' for better compatibility with non-GNU make.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 16 Nov 2007 07:08:34 +0000 (07:08 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 16 Nov 2007 07:08:34 +0000 (07:08 +0000)
* 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.

ChangeLog
doc/libtool.texi
libltdl/m4/ltdl.m4

index 1a18dfd12cedc233303547883d0eb73687bad17a..18b6f4ef3aae68a889f589762ea44e9792e31973 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2007-11-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       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.
+
 2007-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        Avoid warnings about conftest.dSYM directories on Mac OS X Leopard.
index e5a58b8f848f2d010edf024fa4b1e9cc2f2a6a9b..26f5f4cc80412a49c32450a7de48be69396a6d75 100644 (file)
@@ -4526,9 +4526,9 @@ point into an included version of @code{libltdl}, and install that.
 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
-@code{top_srcdir} in your makefile so that @code{LIBLTDL} and
-@code{LTDLINCL} are expanded properly.
+using automake, you will need to define @code{top_build_prefix},
+@code{top_builddir}, and @code{top_srcdir} in your makefile so that
+@code{LIBLTDL} 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 @@ you want.
 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
-@code{top_srcdir} in your makefile so that @code{LIBLTDL} and
-@code{LTDLINCL} are expanded properly.
+using automake, you will need to define @code{top_build_prefix},
+@code{top_builddir} and @code{top_srcdir} in your makefile so that
+@code{LIBLTDL} and @code{LTDLINCL} are expanded properly.
 
 @code{AC_LIBLTDL_CONVENIENCE} is a deprecated alias for
 @code{LTDL_CONVENIENCE}.
@@ -4594,7 +4594,8 @@ use to compile with programs that include @file{ltdl.h}.
 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 @samp{$@{top_builddir@}/} and @samp{$@{top_srcdir@}/} respectively.
+with @samp{$@{top_build_prefix@}} if available, otherwise with
+@samp{$@{top_builddir@}/}, and @samp{$@{top_srcdir@}/} respectively.
 
 If you request an installed version of libltdl and one is
 found@footnote{@c
@@ -4608,7 +4609,8 @@ install libltdl.
 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 @samp{$@{top_builddir@}/}, will be stored in
+starting with @samp{$@{top_build_prefix@}} if available, otherwise
+@samp{$@{top_builddir@}/}, 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 6158005069215befe5ff3e7501ac073c9e307599..3ae4f2ff66908784ddb05b76e0285a41cfabb81f 100644 (file)
@@ -45,16 +45,32 @@ m4_define([_LTDL_DIR], [])
 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], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX],
+                         [${top_build_prefix}],
+                         [${top_builddir}/])],
+         [${top_build_prefix}])],
+   [${top_builddir}/])[]dnl
+])
+
+
 # LTDL_CONVENIENCE
 # ----------------
 # sets LIBLTDL to the link flags for the libltdl convenience library and
 # LTDLINCL to the include flags for the libltdl header and adds
 # --enable-ltdl-convenience to the configure arguments.  Note that
 # AC_CONFIG_SUBDIRS is not called here.  LIBLTDL will be prefixed with
-# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
-# (note the single quotes!).  If your package is not flat and you're not
-# using automake, define top_builddir and top_srcdir appropriately in
-# your Makefiles.
+# '${top_build_prefix}' if available, otherwise with '${top_builddir}/',
+# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
+# quotes!).  If your package is not flat and you're not using automake,
+# define top_build_prefix, top_builddir, and top_srcdir appropriately
+# in your Makefiles.
 AC_DEFUN([LTDL_CONVENIENCE],
 [AC_BEFORE([$0], [LT_WITH_LTDL])dnl
 dnl Although the argument is deprecated and no longer documented,
@@ -69,7 +85,8 @@ case $enable_ltdl_convenience in
   "") enable_ltdl_convenience=yes
       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
   esac
-LIBLTDL='${top_builddir}'"${lt_ltdl_dir+/$lt_ltdl_dir}/libltdlc.la"
+
+LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
 LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
 
 AC_SUBST([LIBLTDL])
@@ -96,10 +113,11 @@ dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [])
 # and LTDLINCL to the include flags for the libltdl header and adds
 # --enable-ltdl-install to the configure arguments.  Note that
 # AC_CONFIG_SUBDIRS is not called from here.  If an installed libltdl
-# is not found, LIBLTDL will be prefixed with '${top_builddir}/'
-# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
-# quotes!).  If your package is not flat and you're not using automake,
-# define top_builddir and top_srcdir appropriately in your Makefiles.
+# is not found, LIBLTDL will be prefixed with '${top_build_prefix}' if
+# available, otherwise with '${top_builddir}/', and LTDLINCL will be
+# prefixed with '${top_srcdir}/' (note the single quotes!).  If your
+# package is not flat and you're not using automake, define top_build_prefix,
+# top_builddir, and top_srcdir appropriately in your Makefiles.
 # In the future, this macro may have to be called after LT_INIT.
 AC_DEFUN([LTDL_INSTALLABLE],
 [AC_BEFORE([$0], [LT_WITH_LTDL])dnl
@@ -120,7 +138,7 @@ AC_CHECK_LIB([ltdl], [lt_dlinit],
   ])
 if test x"$enable_ltdl_install" = x"yes"; then
   ac_configure_args="$ac_configure_args --enable-ltdl-install"
-  LIBLTDL='${top_builddir}'"${lt_ltdl_dir+/$lt_ltdl_dir}/libltdl.la"
+  LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la"
   LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
 else
   ac_configure_args="$ac_configure_args --enable-ltdl-install=no"