]>
Commit | Line | Data |
---|---|---|
763d7a89 SB |
1 | # SYNOPSIS |
2 | # | |
3 | # AX_CHECK_DEFINE(includefile, define, [ACTION-SUCCESS], [ACTION-FAILURE]) | |
4 | # | |
5 | # DESCRIPTION | |
6 | # | |
7 | # Check whether the given #define is available in the given #include file | |
8 | # | |
9 | # LICENSE | |
10 | # | |
11 | # See the root directory of the libtpms project for the LICENSE | |
12 | # | |
13 | AC_DEFUN([AX_CHECK_DEFINE], | |
a60df6fe | 14 | [AC_PREREQ(2.63) |
763d7a89 SB |
15 | AC_MSG_CHECKING(whether $2 is defined in $1) |
16 | AC_COMPILE_IFELSE( | |
17 | [AC_LANG_PROGRAM([[#include $1]], | |
18 | [[#ifndef $2 | |
19 | #error $2 not defined | |
20 | #endif]])], | |
21 | [ | |
22 | AC_MSG_RESULT([yes]) | |
23 | [$3] | |
24 | ], | |
25 | [ | |
26 | AC_MSG_RESULT([no]) | |
27 | [$4] | |
28 | ] | |
29 | ) | |
30 | ] | |
31 | ) |