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