aboutsummaryrefslogtreecommitdiff
path: root/src/secp256k1/build-aux/m4/bitcoin_secp.m4
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2015-11-13 00:12:43 +0100
committerPieter Wuille <pieter.wuille@gmail.com>2015-11-13 00:12:43 +0100
commit9e475d5a4d169e758cfb0c9f0633ed476e176b0e (patch)
tree356207f0a2f3f2fff39f71a342cb224c8062aa05 /src/secp256k1/build-aux/m4/bitcoin_secp.m4
parent38ed190eefccf8865d984e08f4dfe4063ed8a55b (diff)
parent1d84107924ab36e38092cae43f6ad50dd5ead9ed (diff)
Update libsecp256k1
Diffstat (limited to 'src/secp256k1/build-aux/m4/bitcoin_secp.m4')
-rw-r--r--src/secp256k1/build-aux/m4/bitcoin_secp.m418
1 files changed, 11 insertions, 7 deletions
diff --git a/src/secp256k1/build-aux/m4/bitcoin_secp.m4 b/src/secp256k1/build-aux/m4/bitcoin_secp.m4
index 4a398d6c93..d41bbb6487 100644
--- a/src/secp256k1/build-aux/m4/bitcoin_secp.m4
+++ b/src/secp256k1/build-aux/m4/bitcoin_secp.m4
@@ -16,8 +16,7 @@ AC_MSG_RESULT([$has_64bit_asm])
dnl
AC_DEFUN([SECP_OPENSSL_CHECK],[
-if test x"$use_pkgconfig" = x"yes"; then
- : #NOP
+ has_libcrypto=no
m4_ifdef([PKG_CHECK_MODULES],[
PKG_CHECK_MODULES([CRYPTO], [libcrypto], [has_libcrypto=yes],[has_libcrypto=no])
if test x"$has_libcrypto" = x"yes"; then
@@ -27,11 +26,16 @@ if test x"$use_pkgconfig" = x"yes"; then
LIBS="$TEMP_LIBS"
fi
])
-else
- AC_CHECK_HEADER(openssl/crypto.h,[AC_CHECK_LIB(crypto, main,[has_libcrypto=yes; CRYPTO_LIBS=-lcrypto; AC_DEFINE(HAVE_LIBCRYPTO,1,[Define this symbol if libcrypto is installed])]
-)])
- LIBS=
-fi
+ if test x$has_libcrypto = xno; then
+ AC_CHECK_HEADER(openssl/crypto.h,[
+ AC_CHECK_LIB(crypto, main,[
+ has_libcrypto=yes
+ CRYPTO_LIBS=-lcrypto
+ AC_DEFINE(HAVE_LIBCRYPTO,1,[Define this symbol if libcrypto is installed])
+ ])
+ ])
+ LIBS=
+ fi
if test x"$has_libcrypto" = x"yes" && test x"$has_openssl_ec" = x; then
AC_MSG_CHECKING(for EC functions in libcrypto)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[