]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/status.m4 (_AC_OUTPUT_HEADER): Simplify ac_dA and
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 23 May 2006 08:27:32 +0000 (08:27 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 23 May 2006 08:27:32 +0000 (08:27 +0000)
ac_dB slightly, to save bytes in the script.
Max out at 50 lines, rather than 96; this is more likely
(though not guaranteed) to avoid obscure 'sed' failures.

ChangeLog
lib/autoconf/status.m4

index e058c72f6461004ac9e1d4dbb682f4e25a8444b6..debfa027a09e28c4fa8896870631874d8f9ee153 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-05-23  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * lib/autoconf/status.m4 (_AC_OUTPUT_HEADER): Simplify ac_dA and
+       ac_dB slightly, to save bytes in the script.
+       Max out at 50 lines, rather than 96; this is more likely
+       (though not guaranteed) to avoid obscure 'sed' failures.
+
 2006-05-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * lib/autotest/general.m4 (AT_INIT): UnixWare `tr' may interpret
index 4c9f423eef0ddca34a3334dfe1dce4d663406936..8e2fe06c3f3831fd0c9edf056004ac01f71a4f60 100644 (file)
@@ -608,8 +608,8 @@ m4_define([_AC_OUTPUT_HEADER],
   # just an empty string.
   #
 dnl Quote, for the `[ ]' and `define'.
-[  ac_dA='s,^\([        ]*#[    ]*\)[^  ]*\([   ][      ]*'
-  ac_dB='\)[    (].*$,\1define\2'
+[  ac_dA='s,^\([        #]*\)[^         ]*\([   ]*'
+  ac_dB='\)[    (].*,\1define\2'
   ac_dC=' '
   ac_dD=' ,']
 dnl ac_dD used to contain `;t' at the end, but that was both slow and incorrect.
@@ -660,7 +660,15 @@ echo 's/ $//
 [s,^[   #]*u.*,/* & */,]' >>conftest.defines
 
 # Break up conftest.defines:
-ac_max_sed_lines=m4_eval(_AC_SED_CMD_LIMIT - 3)
+dnl If we cared only about not exceeding line count limits, we would use this:
+dnl ac_max_sed_lines=m4_eval(_AC_SED_CMD_LIMIT - 3)
+dnl But in practice this can generate scripts that contain too many bytes;
+dnl and this can cause obscure 'sed' failures, e.g.,
+dnl http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00127.html
+dnl So instead, we use the following, which is about half the size we'd like:
+ac_max_sed_lines=50
+dnl In the future, let's use awk or sh instead of sed to do substitutions,
+dnl since we have so many problems with sed.
 
 # First sed command is:         sed -f defines.sed $ac_file_inputs >"$tmp/out1"
 # Second one is:        sed -f defines.sed "$tmp/out1" >"$tmp/out2"