Jim Meyering <[EMAIL PROTECTED]> wrote: > I discovered that gnulib-tool requires autoconf-2.59c or newer > for autoconf's m4_foreach_w macro. This change lets > gnulib-tool work also with autoconf-2.59. > > This was necessary for libvirt, when running their ./autogen.sh > script on a RHEL5 system, which has autoconf-2.59: > http://thread.gmane.org/gmane.comp.emulators.libvirt/4115 > > Here's the patch: > > Support versions of autoconf prior to 2.59c. > * gnulib-tool (func_emit_initmacro_done): Define m4_foreach_w > if it is not already defined.
Sorry about that. There was a syntax error (missing close-quote) in my first patch. diff --git a/gnulib-tool b/gnulib-tool index 5d3a785..f071d73 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -1963,6 +1963,13 @@ func_emit_initmacro_done () echo " AS_LITERAL_IF([\$1], [${macro_prefix}_LIBSOURCES([\$1.c])])dnl" echo " ${macro_prefix}_LIBOBJS=\"\$${macro_prefix}_LIBOBJS \$1.\$ac_objext\"" echo "])" + + echo "# m4_foreach_w is provided by autoconf-2.59c and later." + echo "# This definition is to accommodate developers using versions" + echo "# of autoconf older than that." + echo "m4_ifndef([m4_foreach_w]," + echo " [m4_define([m4_foreach_w]," + echo " [m4_foreach([\$1], m4_split(m4_normalize([\$2]), [ ]), [\$3])])])" echo echo "# Like AC_REPLACE_FUNCS, except that the module name goes" echo "# into ${macro_prefix}_LIBOBJS instead of into LIBOBJS." -- 1.5.3.7.1006.g8c6a6