same object file in $LIBOBJS.
Reported by Alexandre Duret-Lutz & Derek Robert Price.
* doc/autoconf.texi (Generic Functions): Adjust.
+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):
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.
** 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.
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})
[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
+])