From 915f969c892b996f7e9b36588290d1e377934698 Mon Sep 17 00:00:00 2001 From: ayk Date: Sat, 11 Jun 2022 13:57:18 -0400 Subject: [PATCH] changed way to search for libgmp - from AC_CHECK_LIB to PKG_CHECK_MODULES --- configure.ac | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index bd048d527..d9414b599 100644 --- a/configure.ac +++ b/configure.ac @@ -646,6 +646,7 @@ AC_MSG_NOTICE([Using boost linker options: [$BOOST_LIBS]]) fi if test x$use_pkgconfig = xyes; then +echo "test x$use_pkgconfig = xyes" : dnl m4_ifdef( [PKG_CHECK_MODULES], @@ -668,9 +669,12 @@ if test x$use_pkgconfig = xyes; then else AC_DEFINE_UNQUOTED([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions]) fi + PKG_CHECK_MODULES([GMP], [gmp],, [AC_MSG_ERROR(gmp not found.)]) + PKG_CHECK_MODULES([GMPXX], [gmpxx],, [AC_MSG_ERROR(gmpxx not found.)]) ] ) else +echo "test x$use_pkgconfig = xyes" # BUG: Fix this: echo 'BUG: configure does not yet check for the following dependencies if pkg-config is not on the system: libcrypto++, libgmp' @@ -714,11 +718,11 @@ fi # These packages don't provide pkgconfig config files across all # platforms, so we use older autoconf detection mechanisms: -AC_CHECK_HEADER([gmp.h],,AC_MSG_ERROR(libgmp headers missing)) -AC_CHECK_LIB([gmp],[[__gmpn_sub_n]],GMP_LIBS=-lgmp, [AC_MSG_ERROR(libgmp missing)]) +# AC_CHECK_HEADER([gmp.h],,AC_MSG_ERROR(libgmp headers missing)) +# AC_CHECK_LIB([gmp],[[__gmpn_sub_n]],GMP_LIBS=-lgmp, [AC_MSG_ERROR(libgmp missing)]) -AC_CHECK_HEADER([gmpxx.h],,AC_MSG_ERROR(libgmpxx headers missing)) -AC_CHECK_LIB([gmpxx],[main],GMPXX_LIBS=-lgmpxx, [AC_MSG_ERROR(libgmpxx missing)]) +# AC_CHECK_HEADER([gmpxx.h],,AC_MSG_ERROR(libgmpxx headers missing)) +# AC_CHECK_LIB([gmpxx],[main],GMPXX_LIBS=-lgmpxx, [AC_MSG_ERROR(libgmpxx missing)]) RUST_LIBS="-lrustzcash" case $host in