From: Eric Blake Date: Tue, 25 Sep 2007 13:11:35 +0000 (-0600) Subject: Enforce that AC_REPLACE_FUNCS files exist. X-Git-Tag: v0.0~192 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=2770108c4ac824e04367c336b520da21e595f1fe;p=gnulib.git 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 --git a/ChangeLog b/ChangeLog index 9bfa63c1b..80a715933 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 --git a/gnulib-tool b/gnulib-tool index f6c4a1716..593b8f13e 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -1932,23 +1932,29 @@ func_emit_initmacro_end () # 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