From: Bruno Haible Date: Fri, 30 Sep 2011 10:10:27 +0000 (+0200) Subject: gnulib-tool: Improve suggestion where to put gl_EARLY invocation. X-Git-Tag: v0.1~1725 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=a34348c397c19cfb1526fab594f720c7011bc790;p=gnulib.git gnulib-tool: Improve suggestion where to put gl_EARLY invocation. * gnulib-tool (func_import): If the configure.ac has an AC_PROG_CC_STDC invocation, say "right after AC_PROG_CC_STDC", not "right after AC_PROG_CC". Reported by Gary V. Vaughan . --- diff --git a/ChangeLog b/ChangeLog index 5bf69f17f..9e0f7143b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2011-09-30 Bruno Haible + gnulib-tool: Improve suggestion where to put gl_EARLY invocation. + * gnulib-tool (func_import): If the configure.ac has an AC_PROG_CC_STDC + invocation, say "right after AC_PROG_CC_STDC", not "right after + AC_PROG_CC". + Reported by Gary V. Vaughan . + +2011-09-30 Bruno Haible + Centralize C99 requirement. * m4/gnulib-common.m4 (gl_PROG_CC_C99): New macro. * modules/stdarg (configure.ac-early): Invoke it instead of diff --git a/gnulib-tool b/gnulib-tool index 36135e6a3..60d99cde5 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -5460,7 +5460,16 @@ s,//*$,/,' echo " - mention \"${val}\" in ${var} in ${dir}Makefile.am," fi done - echo " - invoke ${macro_prefix}_EARLY in $configure_ac, right after AC_PROG_CC," + if grep '^ *AC_PROG_CC_STDC' "$configure_ac" > /dev/null; then + position_early_after=AC_PROG_CC_STDC + else + if grep '^ *AC_PROG_CC_C99' "$configure_ac" > /dev/null; then + position_early_after=AC_PROG_CC_C99 + else + position_early_after=AC_PROG_CC + fi + fi + echo " - invoke ${macro_prefix}_EARLY in $configure_ac, right after $position_early_after," echo " - invoke ${macro_prefix}_INIT in $configure_ac." }