]>
Commit | Line | Data |
---|---|---|
be2a5f71 | 1 | sinclude(../../config/acx.m4) |
fdc59709 | 2 | sinclude(../../config/override.m4) |
6bc80edc TT |
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. | |
18 | AC_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 | |
22 | AC_SUBST([$1_TRUE]) | |
23 | AC_SUBST([$1_FALSE]) | |
24 | if $2; then | |
25 | $1_TRUE= | |
26 | $1_FALSE='#' | |
27 | else | |
28 | $1_TRUE='#' | |
29 | $1_FALSE= | |
30 | fi | |
31 | AC_CONFIG_COMMANDS_PRE( | |
32 | [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then | |
33 | AC_MSG_ERROR([[conditional "$1" was never defined. | |
34 | Usually this means the macro was only invoked conditionally.]]) | |
35 | fi])]) |