mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-15 11:36:00 -05:00
Use pkg-config always when possible, with failover to manual checks for libcrypto
This commit is contained in:
parent
7b2fc1cac6
commit
2b4cf416e7
2 changed files with 11 additions and 16 deletions
|
@ -16,8 +16,7 @@ AC_MSG_RESULT([$has_64bit_asm])
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
AC_DEFUN([SECP_OPENSSL_CHECK],[
|
AC_DEFUN([SECP_OPENSSL_CHECK],[
|
||||||
if test x"$use_pkgconfig" = x"yes"; then
|
has_libcrypto=no
|
||||||
: #NOP
|
|
||||||
m4_ifdef([PKG_CHECK_MODULES],[
|
m4_ifdef([PKG_CHECK_MODULES],[
|
||||||
PKG_CHECK_MODULES([CRYPTO], [libcrypto], [has_libcrypto=yes],[has_libcrypto=no])
|
PKG_CHECK_MODULES([CRYPTO], [libcrypto], [has_libcrypto=yes],[has_libcrypto=no])
|
||||||
if test x"$has_libcrypto" = x"yes"; then
|
if test x"$has_libcrypto" = x"yes"; then
|
||||||
|
@ -27,11 +26,16 @@ if test x"$use_pkgconfig" = x"yes"; then
|
||||||
LIBS="$TEMP_LIBS"
|
LIBS="$TEMP_LIBS"
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
else
|
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])]
|
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=
|
LIBS=
|
||||||
fi
|
fi
|
||||||
if test x"$has_libcrypto" = x"yes" && test x"$has_openssl_ec" = x; then
|
if test x"$has_libcrypto" = x"yes" && test x"$has_openssl_ec" = x; then
|
||||||
AC_MSG_CHECKING(for EC functions in libcrypto)
|
AC_MSG_CHECKING(for EC functions in libcrypto)
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||||
|
|
|
@ -27,15 +27,6 @@ if test x"$ac_cv_prog_cc_c89" = x"no"; then
|
||||||
AC_MSG_ERROR([c89 compiler support required])
|
AC_MSG_ERROR([c89 compiler support required])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case $host in
|
|
||||||
*mingw*)
|
|
||||||
use_pkgconfig=no
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
use_pkgconfig=yes
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case $host_os in
|
case $host_os in
|
||||||
*darwin*)
|
*darwin*)
|
||||||
if test x$cross_compiling != xyes; then
|
if test x$cross_compiling != xyes; then
|
||||||
|
|
Loading…
Add table
Reference in a new issue