diff options
author | Pieter Wuille <pieter@wuille.net> | 2021-07-14 10:02:02 -0700 |
---|---|---|
committer | Pieter Wuille <pieter@wuille.net> | 2021-07-14 14:43:45 -0700 |
commit | e4ffb44716bb7a7b9f0a5d70ac07058632234370 (patch) | |
tree | b658b1afefbcbe30b42d819c59dd5172f64dc79b /src/secp256k1/build-aux | |
parent | 531c2b7c04898f5a2097f44e8c12bfb2f53aaf9b (diff) | |
parent | c020cbaa5c8e9e61b2b8efd8dc09be743fcd4273 (diff) |
Update secp256k1 subtree to latest upstream + adapt API
The new schnorrsig API requires changing a few arguments.
Diffstat (limited to 'src/secp256k1/build-aux')
-rw-r--r-- | src/secp256k1/build-aux/m4/bitcoin_secp.m4 | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/secp256k1/build-aux/m4/bitcoin_secp.m4 b/src/secp256k1/build-aux/m4/bitcoin_secp.m4 index e57888ca18..8245b2b863 100644 --- a/src/secp256k1/build-aux/m4/bitcoin_secp.m4 +++ b/src/secp256k1/build-aux/m4/bitcoin_secp.m4 @@ -82,3 +82,19 @@ if test x"$has_valgrind" != x"yes"; then AC_CHECK_HEADER([valgrind/memcheck.h], [has_valgrind=yes; AC_DEFINE(HAVE_VALGRIND,1,[Define this symbol if valgrind is installed])]) fi ]) + +dnl SECP_TRY_APPEND_CFLAGS(flags, VAR) +dnl Append flags to VAR if CC accepts them. +AC_DEFUN([SECP_TRY_APPEND_CFLAGS], [ + AC_MSG_CHECKING([if ${CC} supports $1]) + SECP_TRY_APPEND_CFLAGS_saved_CFLAGS="$CFLAGS" + CFLAGS="$1 $CFLAGS" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])], [flag_works=yes], [flag_works=no]) + AC_MSG_RESULT($flag_works) + CFLAGS="$SECP_TRY_APPEND_CFLAGS_saved_CFLAGS" + if test x"$flag_works" = x"yes"; then + $2="$$2 $1" + fi + unset flag_works + AC_SUBST($2) +]) |