[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Autoconf-patches] Support for nested AT_DATA
From: |
Akim Demaille |
Subject: |
Re: [Autoconf-patches] Support for nested AT_DATA |
Date: |
19 Sep 2000 12:16:42 +0200 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands) |
| Hello!
| Currently it's impossible to use AT_DATA in the configure.in scripts used
| in AT_TEST_MACRO. The problem is that AT_DATA always uses the same file
| delimiter - EOF.
|
| This patch makes AT_DATA generate the delimiter based on the file being
| created, so that the shell doesn't get confused by overlapping EOF's. Now
| I can e.g. create a "mycpp" script in AT_TEST_MACRO using AT_DATA.
Hi Pavel,
I think your patch is wrong. There is no reason to embed AT_DATA
within AT_DATA (or I missed something). The real problem is your
willing to use AT_TEST_MACRO, or, if you prefer, the fact that
AT_TEST_MACRO is attractive, but does not suit your needs. In this
case, you'd better use the primitive AT_CHECK macro.
More in the answer about the test for CPP.
Thanks!
Akim
PS/ BTW, in cases like this where you need to use twice the same
code, the coding style of Autoconf prefers that you
AT_DEFINE([_AT_DATA],
[AT_DEFINE([AT_data_files], AT_data_files[ ]$1)
cat > $1 <<'$3[]EOF'
$2[]$3[]EOF
])
and
AT_DEFINE([AT_DATA],
[_AT_DATA([$1], [$2], [patsubst([$1], [[^a-zA-Z0-9_]], [_])])])