| 1 |
AC_DEFUN([ACX_BOTAN_RAWPSS],[ |
| 2 |
AC_MSG_CHECKING(for Botan raw PSS support) |
| 3 |
|
| 4 |
tmp_CPPFLAGS=$CPPFLAGS |
| 5 |
tmp_LIBS=$LIBS |
| 6 |
|
| 7 |
CPPFLAGS="$CPPFLAGS $CRYPTO_INCLUDES" |
| 8 |
LIBS="$CRYPTO_LIBS $LIBS" |
| 9 |
|
| 10 |
AC_LANG_PUSH([C++]) |
| 11 |
AC_CACHE_VAL([acx_cv_lib_botan_raw_pss_support],[ |
| 12 |
acx_cv_lib_botan_raw_pss_support=no |
| 13 |
AC_COMPILE_IFELSE([ |
| 14 |
AC_LANG_SOURCE([[ |
| 15 |
#include <botan/version.h> |
| 16 |
int main() |
| 17 |
{ |
| 18 |
using namespace Botan; |
| 19 |
|
| 20 |
#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(2,3,0) |
| 21 |
return 0; |
| 22 |
#else |
| 23 |
#error "Botan too old" |
| 24 |
#endif |
| 25 |
} |
| 26 |
]]) |
| 27 |
],[ |
| 28 |
AC_MSG_RESULT([Found raw PSS]) |
| 29 |
acx_cv_lib_botan_raw_pss_support=yes |
| 30 |
],[ |
| 31 |
AC_MSG_RESULT([Cannot find raw PSS support, upgrade to Botan >= v2.3.0]) |
| 32 |
]) |
| 33 |
]) |
| 34 |
AC_LANG_POP([C++]) |
| 35 |
if test "x$acx_cv_lib_botan_raw_pss_support" = xyes; then |
| 36 |
AC_DEFINE([WITH_RAW_PSS], [1], |
| 37 |
[Compile with raw RSA PKCS PSS]) |
| 38 |
fi |
| 39 |
|
| 40 |
CPPFLAGS=$tmp_CPPFLAGS |
| 41 |
LIBS=$tmp_LIBS |
| 42 |
]) |