source: trunk/essentials/sys-devel/automake-1.10/m4/cond.m4

Last change on this file was 3147, checked in by bird, 18 years ago

automake 1.10

File size: 1.0 KB
Line 
1# AM_CONDITIONAL -*- Autoconf -*-
2
3# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
4# Free Software Foundation, Inc.
5#
6# This file is free software; the Free Software Foundation
7# gives unlimited permission to copy and/or distribute it,
8# with or without modifications, as long as this notice is preserved.
9
10# serial 8
11
12# AM_CONDITIONAL(NAME, SHELL-CONDITION)
13# -------------------------------------
14# Define a conditional.
15AC_DEFUN([AM_CONDITIONAL],
16[AC_PREREQ(2.52)dnl
17 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
18 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
19AC_SUBST([$1_TRUE])dnl
20AC_SUBST([$1_FALSE])dnl
21_AM_SUBST_NOTMAKE([$1_TRUE])dnl
22_AM_SUBST_NOTMAKE([$1_FALSE])dnl
23if $2; then
24 $1_TRUE=
25 $1_FALSE='#'
26else
27 $1_TRUE='#'
28 $1_FALSE=
29fi
30AC_CONFIG_COMMANDS_PRE(
31[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
32 AC_MSG_ERROR([[conditional "$1" was never defined.
33Usually this means the macro was only invoked conditionally.]])
34fi])])
Note: See TracBrowser for help on using the repository browser.