automake
[Top][All Lists]
Advanced

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

Re: Plan: Wednesday


From: Akim Demaille
Subject: Re: Plan: Wednesday
Date: 22 Aug 2001 16:41:09 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence)

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



reply via email to

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