1 # AM_CONDITIONAL -*- Autoconf -*-
3 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
10 # -------------------------------------
11 # Define a conditional.
12 AC_DEFUN([AM_CONDITIONAL],
14 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
15 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
16 AC_SUBST([$1_TRUE])dnl
17 AC_SUBST([$1_FALSE])dnl
18 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
19 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
20 m4_define([_AM_COND_VALUE_$1], [$2])dnl
28 AC_CONFIG_COMMANDS_PRE(
29 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
30 AC_MSG_ERROR([[conditional "$1" was never defined.
31 Usually this means the macro was only invoked conditionally.]])