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