-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build-sys: Implemet AX_CHECK_DEFINE and use for OpenSSL #define's
Some of the functions that OpenSSL uses are #define's for which we need to check using a new AX_CHECK_DEFINE. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
- Loading branch information
1 parent
a047006
commit ac39b9d
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# SYNOPSIS | ||
# | ||
# AX_CHECK_DEFINE(includefile, define, [ACTION-SUCCESS], [ACTION-FAILURE]) | ||
# | ||
# DESCRIPTION | ||
# | ||
# Check whether the given #define is available in the given #include file | ||
# | ||
# LICENSE | ||
# | ||
# See the root directory of the libtpms project for the LICENSE | ||
# | ||
AC_DEFUN([AX_CHECK_DEFINE], | ||
[AC_PREREQ(2.64) | ||
AC_MSG_CHECKING(whether $2 is defined in $1) | ||
AC_COMPILE_IFELSE( | ||
[AC_LANG_PROGRAM([[#include $1]], | ||
[[#ifndef $2 | ||
#error $2 not defined | ||
#endif]])], | ||
[ | ||
AC_MSG_RESULT([yes]) | ||
[$3] | ||
], | ||
[ | ||
AC_MSG_RESULT([no]) | ||
[$4] | ||
]) | ||
] | ||
) |