mirror of
git://git.sv.gnu.org/autoconf
synced 2024-12-09 02:10:22 +08:00
d7089440fc
* config/: here.
46 lines
1.3 KiB
Plaintext
46 lines
1.3 KiB
Plaintext
# AM_CONDITIONAL
|
|
|
|
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 2, or (at your option)
|
|
# any later version.
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, write to the Free Software
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
# 02111-1307, USA.
|
|
|
|
# serial 3
|
|
|
|
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
|
# -------------------------------------
|
|
# Define a conditional.
|
|
#
|
|
# FIXME: Once using 2.50, use this:
|
|
# m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
|
|
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])
|