bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_SUBST() confuses config.status creation


From: Stepan Kasal
Subject: Re: AC_SUBST() confuses config.status creation
Date: Mon, 11 Jun 2007 15:48:11 +0200
User-agent: Mutt/1.4.2.3i

Hello Noah,

one nit:

I generally prefer this style:

        if (!supposed_condition)
                fatal_failure_and_exit;
        normal code
        ...

to
        if (supposed_condition) {
                normal code
                ...
        } else
                fatal_failure_and_exit;

Applied to AC_SUBST, I'd prefer

m4_define([AC_SUBST],
[m4_bmatch(m4_bpatsubst([[$1]], [@&address@hidden), ^m4_defn([m4_re_word])$, [],
           [AC_FATAL([$0: `$1' is not a valid shell variable name])])
AC_SUBST_TRACE([$1])dnl
m4_pattern_allow([^$1$])dnl
m4_ifvaln([$2], [$1=$2])[]dnl
m4_append_uniq([_AC_SUBST_VARS], [$1], [
])dnl
])# AC_SUBST

What do you think?

Stepan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]