Skip to content

Commit

Permalink
changed way to search for libgmp - from AC_CHECK_LIB to PKG_CHECK_MOD…
Browse files Browse the repository at this point in the history
…ULES
  • Loading branch information
a-ok123 committed Jul 19, 2022
1 parent 981c687 commit 915f969
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand All @@ -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'

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 915f969

Please sign in to comment.