From: Gary V. Vaughan Date: Mon, 2 May 2005 20:14:49 +0000 (+0000) Subject: * lib/autoconf/general.m4 (_AC_LIBOBJS_NORMALIZE): Prepend each X-Git-Tag: AUTOCONF-2.59c~399 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1dab064d21c65437ce8428484a3e9f052d345248;p=thirdparty%2Fautoconf.git * lib/autoconf/general.m4 (_AC_LIBOBJS_NORMALIZE): Prepend each object named in LIBOBJS and LTLIBOBJS with the ${LIBOBJDIR}, as set by latest automake. --- diff --git a/ChangeLog b/ChangeLog index bd82eb463..2d9631c49 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-05-02 Gary V. Vaughan + + * 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 * doc/autoconf.texi (Limitations of Usual Tools): "expr '' \| ''" diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 4e01a029b..e0d945bfe 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -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} diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 5f761e2ea..2ff9df35e 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -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])