]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Fix config header generation with AIX awk.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 21 Oct 2007 17:41:00 +0000 (19:41 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 21 Oct 2007 17:41:00 +0000 (19:41 +0200)
* lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS_PREPARE): In awk
script, use helper array D_is_set, as `" 0"' does not evaluate
to true for AIX awk.

ChangeLog
lib/autoconf/status.m4

index d524f8c4c3d64f5c0d44b78916dda40e9fcc1cc6..f07684e644269e11526fd34c6168d005eca86333 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-10-21  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Fix config header generation with AIX awk.
+       * lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS_PREPARE): In awk
+       script, use helper array D_is_set, as `" 0"' does not evaluate
+       to true for AIX awk.
+
 2007-10-21  Eric Blake  <ebb9@byu.net>
 
        * tests/autotest.at (Banners): Reinstate test, with typo
index 1511aae2d4edce3d333862b332bceda99e81fc95..e7de715249a5ab9a43e90be6e619546ae6c50c74 100644 (file)
@@ -775,6 +775,7 @@ s/'"$ac_delim"'/"\\\
 "/g' >>$CONFIG_STATUS
 
 cat >>$CONFIG_STATUS <<_ACEOF
+  for (key in D) D_is_set[key] = 1
   FS = "\a"
 }
 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
@@ -789,11 +790,10 @@ cat >>$CONFIG_STATUS <<_ACEOF
   }
   split(mac1, mac2, "(") #)
   macro = mac2[1]
-  definiens = D[macro]
-  if (definiens) {
+  if (D_is_set[macro]) {
     # Preserve the white space surrounding the "#".
     prefix = substr(line, 1, index(line, defundef) - 1)
-    print prefix "define", macro P[macro] definiens
+    print prefix "define", macro P[macro] D[macro]
     next
   } else {
     # Replace #undef with comments.  This is necessary, for example,