]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/general.m4 (_AC_LIBOBJ): Don't insert twice the
authorAkim Demaille <akim@epita.fr>
Thu, 23 Oct 2003 07:49:15 +0000 (07:49 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 23 Oct 2003 07:49:15 +0000 (07:49 +0000)
same object file in $LIBOBJS.
Reported by Alexandre Duret-Lutz & Derek Robert Price.
* doc/autoconf.texi (Generic Functions): Adjust.

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

index 8a414fe9130f65ddab0c985f73255e7b180330b1..504354c1c4f561122664a01348a909bc6ac15856 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-10-23  Akim Demaille  <akim@epita.fr>
+
+       * 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  <eggert@twinsun.com>
 
        * 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  <user42@zip.com.au>
 
        * doc/autoconf.texi (Function Portability): Add @prindex for exit.
diff --git a/NEWS b/NEWS
index 2a8508fe98017b1fa66eb5c4263c54e1ca34ea15..fb66b82f91573950364be22ca21c24f27f29dab8 100644 (file)
--- a/NEWS
+++ b/NEWS
 ** 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.
index b018c55bf34b23b2fc9731793cd92cf95b77602f..4d3a207656fd853ecadd33eccb41697743a1a98f 100644 (file)
@@ -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})
index 9202ad0c5ba97ace73224f1d77f8f926fe0c73ff..592f292bd587fee672c8481082a04bcc66725545 100644 (file)
@@ -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
+])