+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 '' \| ''"
@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
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}
# _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],
# 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])