Remove libsnark from depends system and integrate it into build system.
This commit is contained in:
20
configure.ac
20
configure.ac
@@ -757,28 +757,12 @@ 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)])
|
||||
|
||||
# libsnark header layout is broken unless cpp's -I is passed with the
|
||||
# libsnark directory, so for now we use this hideous workaround:
|
||||
echo 'Hunting for libsnark include directory...'
|
||||
[LIBSNARK_INCDIR="$(echo "$CPPFLAGS" | sed 's,^.*-I\([^ ]*/include\).*$,\1/libsnark,')"]
|
||||
if test -d "$LIBSNARK_INCDIR"; then
|
||||
echo "Found libsnark include directory: $LIBSNARK_INCDIR"
|
||||
else
|
||||
AC_MSG_ERROR(libsnark include directory not found)
|
||||
fi
|
||||
|
||||
CPPFLAGS="-I$LIBSNARK_INCDIR $CPPFLAGS"
|
||||
|
||||
# Now check for libsnark compilability using traditional autoconf tests:
|
||||
AC_CHECK_HEADER([libsnark/gadgetlib1/gadget.hpp],,AC_MSG_ERROR(libsnark headers missing))
|
||||
AC_CHECK_LIB([snark],[main],LIBSNARK_LIBS=-lsnark, [AC_MSG_ERROR(libsnark missing)], [-lgmpxx])
|
||||
|
||||
RUST_LIBS=""
|
||||
if test x$enable_rust != xno; then
|
||||
RUST_LIBS="-lrustzcash"
|
||||
fi
|
||||
|
||||
LIBZCASH_LIBS="-lsnark -lgmp -lgmpxx -lboost_system-mt -lcrypto -lsodium -fopenmp $RUST_LIBS"
|
||||
LIBZCASH_LIBS="-lgmp -lgmpxx -lboost_system-mt -lcrypto -lsodium -fopenmp $RUST_LIBS"
|
||||
|
||||
CXXFLAGS_TEMP="$CXXFLAGS"
|
||||
LIBS_TEMP="$LIBS"
|
||||
@@ -944,7 +928,7 @@ unset PKG_CONFIG_LIBDIR
|
||||
PKG_CONFIG_LIBDIR="$PKGCONFIG_LIBDIR_TEMP"
|
||||
|
||||
ac_configure_args="${ac_configure_args} --disable-shared --with-pic --with-bignum=no --enable-module-recovery"
|
||||
AC_CONFIG_SUBDIRS([src/secp256k1 src/univalue])
|
||||
AC_CONFIG_SUBDIRS([src/secp256k1 src/snark src/univalue])
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user