# HG changeset patch # User Eric Blake # Date 1190725895 21600 # Node ID 01d4e199e19f49e2049747098e88d0473d3463ad # Parent fca4f828f7a254382de0a2921f5c8b6593548591 Enforce that AC_REPLACE_FUNCS files exist. * gnulib-tool (func_emit_initmacro_done): Make AC_LIBSOURCES override check for typos. Signed-off-by: Eric Blake diff -r fca4f828f7a2 -r 01d4e199e19f ChangeLog --- a/ChangeLog Fri Sep 28 07:16:44 2007 -0600 +++ b/ChangeLog Tue Sep 25 07:11:35 2007 -0600 @@ -1,5 +1,9 @@ 2007-09-28 Eric Blake + Enforce that AC_REPLACE_FUNCS files exist. + * gnulib-tool (func_emit_initmacro_done): Make AC_LIBSOURCES + override check for typos. + Fix test-closein on Solaris 10. * tests/test-closein.c (main): Don't assume stdin can be inherited closed on all systems. diff -r fca4f828f7a2 -r 01d4e199e19f gnulib-tool --- a/gnulib-tool Fri Sep 28 07:16:44 2007 -0600 +++ b/gnulib-tool Tue Sep 25 07:11:35 2007 -0600 @@ -1932,23 +1932,29 @@ # func_emit_initmacro_done # emits a few statements after the gl_INIT macro to standard output. # - macro_prefix prefix of gl_EARLY, gl_INIT macros to use +# - sourcebase directory relative to destdir where to place source code func_emit_initmacro_done () { echo echo "# Like AC_LIBOBJ, except that the module name goes" echo "# into ${macro_prefix}_LIBOBJS instead of into LIBOBJS." echo "AC_DEFUN([${macro_prefix}_LIBOBJ]," - echo " [${macro_prefix}_LIBOBJS=\"\$${macro_prefix}_LIBOBJS \$1.\$ac_objext\"])" + echo " [AS_LITERAL_IF([\$1], [${macro_prefix}_LIBSOURCES([\$1.c])])dnl" + echo " ${macro_prefix}_LIBOBJS=\"\$${macro_prefix}_LIBOBJS \$1.\$ac_objext\"])" echo echo "# Like AC_REPLACE_FUNCS, except that the module name goes" echo "# into ${macro_prefix}_LIBOBJS instead of into LIBOBJS." echo "AC_DEFUN([${macro_prefix}_REPLACE_FUNCS]," - echo " [AC_CHECK_FUNCS([\$1], , [${macro_prefix}_LIBOBJ(\$ac_func)])])" + echo " [m4_foreach_w([gl_NAME], [\$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl" + echo " AC_CHECK_FUNCS([\$1], , [${macro_prefix}_LIBOBJ(\$ac_func)])])" echo - echo "# Like AC_LIBSOURCES, except that it does nothing." + echo "# Like AC_LIBSOURCES, except check for typos now." echo "# We rely on EXTRA_lib..._SOURCES instead." echo "AC_DEFUN([${macro_prefix}_LIBSOURCES]," - echo " [])" + echo " [m4_foreach([_gl_NAME], [\$1]," + echo " [m4_syscmd([test -r $sourcebase/]_gl_NAME[ || test ! -d $sourcebase])dnl" + echo " m4_if(m4_sysval, [0], []," + echo " [AC_FATAL([missing $sourcebase/]_gl_NAME)])])])" } # func_import modules