]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool: Improve suggestion where to put gl_EARLY invocation.
authorBruno Haible <bruno@clisp.org>
Fri, 30 Sep 2011 10:10:27 +0000 (12:10 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 30 Sep 2011 10:10:27 +0000 (12:10 +0200)
* 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 <gary@gnu.org>.

ChangeLog
gnulib-tool

index 5bf69f17fdd8ad3b1fb7c86fe33121949cc7729c..9e0f7143b0cb0a5dcd50dc47d10c7fdd03fb5512 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-09-30  Bruno Haible  <bruno@clisp.org>
+
+       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 <gary@gnu.org>.
+
 2011-09-30  Bruno Haible  <bruno@clisp.org>
 
        Centralize C99 requirement.
index 36135e6a33374fca8f6b3d7f67000428bcf188e4..60d99cde5030163534d6d3ce17c79622122376fc 100755 (executable)
@@ -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."
 }