From: Akim Demaille Date: Thu, 23 Oct 2003 07:49:15 +0000 (+0000) Subject: * lib/autoconf/general.m4 (_AC_LIBOBJ): Don't insert twice the X-Git-Tag: AUTOCONF-2.57g~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77c5d244446eb2497499989afaed9a289e1a26aa;p=thirdparty%2Fautoconf.git * lib/autoconf/general.m4 (_AC_LIBOBJ): Don't insert twice the same object file in $LIBOBJS. Reported by Alexandre Duret-Lutz & Derek Robert Price. * doc/autoconf.texi (Generic Functions): Adjust. --- diff --git a/ChangeLog b/ChangeLog index 8a414fe9..504354c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-10-23 Akim Demaille + + * lib/autoconf/general.m4 (_AC_LIBOBJ): Don't insert twice the + same object file in $LIBOBJS. + Reported by Alexandre Duret-Lutz & Derek Robert Price. + * doc/autoconf.texi (Generic Functions): Adjust. + 2003-10-20 Paul Eggert * lib/m4sugar/m4sh.m4 (_AS_TR_SH_PREPARE, _AS_TR_CPP_PREPARE): @@ -27,7 +34,7 @@ Mention /usr/dt/bin/dtksh on Solaris. (Shell Substitutions): Warn about $((...)). (Parentheses): New section. - + 2003-10-15 Kevin Ryde * doc/autoconf.texi (Function Portability): Add @prindex for exit. diff --git a/NEWS b/NEWS index 2a8508fe..fb66b82f 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,10 @@ ** New macros AC_LANG_WERROR +** AC_LIBOBJS + No longer includes twice the same file in LIBOBJS if invoked + multiple times. + * Major changes in Autoconf 2.57f Released 2003-10-01, by Akim Demaille. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index b018c55b..4d3a2076 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -4261,9 +4261,9 @@ Specify that @samp{@var{function}.c} must be included in the executables to replace a missing or broken implementation of @var{function}. Technically, it adds @samp{@var{function}.$ac_objext} to the output -variable @code{LIBOBJS} and calls @code{AC_LIBSOURCE} for -@samp{@var{function}.c}. You should not directly change @code{LIBOBJS}, -since this is not traceable. +variable @code{LIBOBJS} if it is not already in, and calls +@code{AC_LIBSOURCE} for @samp{@var{function}.c}. You should not +directly change @code{LIBOBJS}, since this is not traceable. @end defmac @defmac AC_LIBSOURCE (@var{file}) diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 9202ad0c..592f292b 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -2409,7 +2409,14 @@ m4_define([_AC_LIBOBJ], [AC_LIBSOURCE([$1.c])], [$2])dnl AC_SUBST([LIB@&t@OBJS])dnl -LIB@&t@OBJS="$LIB@&t@OBJS $1.$ac_objext"]) +case $LIB@&t@OBJS in + "$1.$ac_objext" | \ + *" $1.$ac_objext" | \ + "$1.$ac_objext "* | \ + *" $1.$ac_objext "* ) ;; + *) LIB@&t@OBJS="$LIB@&t@OBJS $1.$ac_objext" ;; +esac +])