[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: m4: use AC_SUBST with two arguments when applicable
From: |
Bruno Haible |
Subject: |
Re: m4: use AC_SUBST with two arguments when applicable |
Date: |
Sun, 10 May 2020 14:17:49 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-177-generic; KDE/5.18.0; x86_64; ; ) |
Hi Akim,
> gl_SUBSTS([
> GNULIB_ISWBLANK=0
> GNULIB_ISWDIGIT=0
> GNULIB_ISWXDIGIT=0
> GNULIB_WCTYPE=0
> GNULIB_ISWCTYPE=0
> GNULIB_WCTRANS=0
> GNULIB_TOWCTRANS=0
> ])
>
> which does not, to my eyes, suffer from all the defects you see.
Yes, it does not degrade the ability to search for assignments.
But it goes against the general processing of Autoconf:
For an Autoconf macro, the input consists of identifier and shell statements.
The output is shell, and the shell statements given as arguments appear
in the output, unmodified except for m4 substitutions. Instead of a simple
shell statement, I can always use a complex shell statement instead. E.g.
AM_CONDITIONAL([WINDOWS_NATIVE], [test $is_windows_native = yes])
gl_SUBSTS would analyze its shell statement arguments. Other Autoconf
macros don't do this. It is not clear what would be the result of
gl_SUBSTS([
if test $use_ctype_modules = yes; then
GNULIB_ISBLANK=0
fi
if test $use_wctype_modules = yes; then
GNULIB_ISWBLANK=0
fi
])
Bruno