Debian Codegraph @

m4/acx_botan_eddsa.m4

raw
1 AC_DEFUN([ACX_BOTAN_EDDSA],[
2 AC_MSG_CHECKING(for Botan EDDSA 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_eddsa_support],[
12 acx_cv_lib_botan_eddsa_support=no
13 AC_RUN_IFELSE([
14 AC_LANG_SOURCE([[
15 #include <botan/ed25519.h>
16 #include <botan/version.h>
17 int main()
18 {
19 Botan::secure_vector<uint8_t> k(32);
20 try {
21 Botan::Ed25519_PrivateKey* key =
22 new Botan::Ed25519_PrivateKey(k);
23 } catch(...) {
24 return 1;
25 }
26 return 0;
27 }
28 ]])
29 ],[
30 AC_MSG_RESULT([Found Ed25519])
31 acx_cv_lib_botan_eddsa_support=yes
32 ],[
33 AC_MSG_RESULT([Cannot find Ed25519])
34 acx_cv_lib_botan_eddsa_support=no
35 ],[
36 AC_MSG_WARN([Cannot test, assuming EDDSA])
37 acx_cv_lib_botan_eddsa_support=yes
38 ])
39 ])
40 AC_LANG_POP([C++])
41
42 CPPFLAGS=$tmp_CPPFLAGS
43 LIBS=$tmp_LIBS
44 have_lib_botan_eddsa_support="${acx_cv_lib_botan_eddsa_support}"
45 ])