[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Plan: Wednesday
From: |
Robert Collins |
Subject: |
Re: Plan: Wednesday |
Date: |
23 Aug 2001 10:57:27 +1000 |
On 22 Aug 2001 16:41:09 +0200, Akim Demaille wrote:
> This is what I would advise. It *has* to be done by Sh, M4 cannot.
>
> # 2.13 compatibility
> ifndef([m4_wrap],
> [define([m4_wrap], [defn([m4wrap])])])
>
> AC_DEFUN([AM_CONDITIONAL],
> [ifelse([$1], [TRUE],
> [errprint(__file__:__line__: [$0: invalid condition: $1
> ])dnl
> m4exit(1)])dnl
> ifelse([$1], [FALSE],
> [errprint(__file__:__line__: [$0: invalid condition: $1
> ])dnl
> m4exit(1)])dnl
> AC_SUBST([$1_TRUE], ['#'])
> AC_SUBST([$1_FALSE], ['#'])
> if $2; then
> $1_TRUE=
> $1_FALSE='#'
> else
> $1_TRUE='#'
> $1_FALSE=
> fi
>
> m4_wrap([test "${$1_TRUE}${$1_FALSE}" = '#' ||
> AC_MSG_ERROR([yeeeks: the condition $1 was not properly set!])
> ])
> ])
>
> AC_INIT
> AM_CONDITIONAL([FOO], [true])
> if false; then
> AM_CONDITIONAL([BAR], [true])
> fi
Cool... expect for 1 last bug. with ac 2.13 AC_MSG_ERROR doesn't seem to
be defined :].
Rob
- Plan: Wednesday, Tom Tromey, 2001/08/21
- Re: Plan: Wednesday, Akim Demaille, 2001/08/22
- Re: Plan: Wednesday, Robert Collins, 2001/08/22
- Re: Plan: Wednesday, Akim Demaille, 2001/08/22
- Re: Plan: Wednesday, Robert Collins, 2001/08/22
- Re: Plan: Wednesday, Akim Demaille, 2001/08/22
- Re: Plan: Wednesday, Akim Demaille, 2001/08/22
- Re: Plan: Wednesday,
Robert Collins <=
- Re: Plan: Wednesday, Robert Collins, 2001/08/22