xref: /netbsd-src/external/gpl3/gdb.old/dist/gdb/testsuite/aclocal.m4 (revision e89934bbf778a6d6d6894877c4da59d0c7835b0f)
1sinclude(../../config/acx.m4)
2sinclude(../../config/override.m4)
3sinclude(../transform.m4)
4
5# AM_CONDITIONAL                                            -*- Autoconf -*-
6
7# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
8# Free Software Foundation, Inc.
9#
10# This file is free software; the Free Software Foundation
11# gives unlimited permission to copy and/or distribute it,
12# with or without modifications, as long as this notice is preserved.
13
14# serial 7
15
16# AM_CONDITIONAL(NAME, SHELL-CONDITION)
17# -------------------------------------
18# Define a conditional.
19AC_DEFUN([AM_CONDITIONAL],
20[AC_PREREQ(2.52)dnl
21 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
22	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
23AC_SUBST([$1_TRUE])
24AC_SUBST([$1_FALSE])
25if $2; then
26  $1_TRUE=
27  $1_FALSE='#'
28else
29  $1_TRUE='#'
30  $1_FALSE=
31fi
32AC_CONFIG_COMMANDS_PRE(
33[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
34  AC_MSG_ERROR([[conditional "$1" was never defined.
35Usually this means the macro was only invoked conditionally.]])
36fi])])
37