]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/general.m4 (_AC_LIBOBJS_NORMALIZE): Prepend each
authorGary V. Vaughan <gary@gnu.org>
Mon, 2 May 2005 20:14:49 +0000 (20:14 +0000)
committerGary V. Vaughan <gary@gnu.org>
Mon, 2 May 2005 20:14:49 +0000 (20:14 +0000)
object named in LIBOBJS and LTLIBOBJS with the ${LIBOBJDIR}, as
set by latest automake.

ChangeLog
doc/autoconf.texi
lib/autoconf/general.m4

index bd82eb46302383f561248820896647729a24ba06..2d9631c497a5d15b3e4ab046f6d1048f7717e172 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-05-02  Gary V. Vaughan  <gary@gnu.org>
+
+       * lib/autoconf/general.m4 (_AC_LIBOBJS_NORMALIZE): Prepend each
+       object named in LIBOBJS and LTLIBOBJS with the ${LIBOBJDIR}, as
+       set by latest automake.
+
 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
 
        * doc/autoconf.texi (Limitations of Usual Tools): "expr '' \| ''"
index 4e01a029b4b2d8485087b5371784331b7664acc1..e0d945bfef68bfd4df842256247b49d5ce6b3a21 100644 (file)
@@ -4616,7 +4616,10 @@ to @samp{AC_CONFIG_LIBOBJ_DIR(lib)}.
 @command{configure} might need to know the replacement directory for the
 following reasons: (i) some checks use the replacement files, (ii) some
 macros bypass broken system headers by installing links to the
-replacement headers, etc.
+replacement headers (iii) when used in conjunction with Automake,
+within each @file{Makefile}, @var{directory} is used as a relative path
+from @code{$(top_srcdir)} to each object named in @code(LIBOBJS) and
+@code(LTLIBOBJS), etc.
 @end defmac
 
 @sp 1
@@ -15501,6 +15504,13 @@ cannot handle this task, since this is not a macro).
 
 Note that @code{U} must not be used in your Makefiles.
 
+@ovindex LIBOBJDIR
+When used with Automake 1.10 or newer, a suitable value for
+@code{LIBOBJDIR} is set so that the @code{LIBOBJS} and @code{LTLIBOBJS}
+can be referenced from any @file{Makefile.am}.  Even without Automake,
+arranging for @code{LIBOBJDIR} to be set correctly will enable
+referencing @code{LIBOBJS} and @code{LTLIBOBJS} in another directory.
+
 
 @node AC_FOO_IFELSE vs AC_TRY_FOO
 @subsection @code{AC_FOO_IFELSE} vs.@: @code{AC_TRY_FOO}
index 5f761e2ea3fb9fa81820f22265698fbf89a67bfe..2ff9df35ea55dda4ff2215ab9f16145240d8d5f5 100644 (file)
@@ -2550,7 +2550,7 @@ m4_define([AC_LIBOBJ],
 
 # _AC_LIBOBJS_NORMALIZE
 # ---------------------
-# Clean up LIBOBJS abd LTLIBOBJS so that they work with 1. ac_objext,
+# Clean up LIBOBJS and LTLIBOBJS so that they work with 1. ac_objext,
 # 2. Automake's ANSI2KNR, 3. Libtool, 4. combination of the three.
 # Used with AC_CONFIG_COMMANDS_PRE.
 AC_DEFUN([_AC_LIBOBJS_NORMALIZE],
@@ -2560,9 +2560,10 @@ for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
   # 1. Remove the extension, and $U if already installed.
   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
   ac_i=`echo "$ac_i" | sed "$ac_script"`
-  # 2. Add them.
-  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
-  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
 done
 AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
 AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])