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