[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
config headers with awk broke AC_CHECK_DECLS on AIX
From: |
Ralf Wildenhues |
Subject: |
config headers with awk broke AC_CHECK_DECLS on AIX |
Date: |
Sun, 21 Oct 2007 19:41:26 +0200 |
User-agent: |
Mutt/1.5.16 (2007-10-11) |
echo | awk '
BEGIN {
D["HAVE_DECL_NO"]=" 0"
}
{
if (D["HAVE_DECL_NO"]) print "yes"
}'
prints "yes" with most awk implementations, but not with AIX 5.3 awk.
So it seems we really need D_is_set in the config headers awk script.
I've pushed this fix.
Cheers,
Ralf
2007-10-21 Ralf Wildenhues <address@hidden>
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.
diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4
index 1511aae..e7de715 100644
--- a/lib/autoconf/status.m4
+++ b/lib/autoconf/status.m4
@@ -775,6 +775,7 @@ s/'"$ac_delim"'/"\\\
"/g' >>$CONFIG_STATUS
cat >>$CONFIG_STATUS <<_ACEOF
+ for (key in D) D_is_set[key] = 1
FS = ""
}
/^[\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,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- config headers with awk broke AC_CHECK_DECLS on AIX,
Ralf Wildenhues <=