Auto merge of #2652 - str4d:820-libsnark-subtree, r=str4d
Move libsnark in-repo as a git subtree This PR pulls in the libsnark subtree at the exact commit that we currently fetch via the depends system. To verify: ``` $ ./contrib/devtools/git-subtree-check.sh src/snark src/snark in HEAD was last updated to upstream commit 9ada3f84ab484c57b2247c2f41091fd6a0916573 (treec10a38c759) src/snark in HEAD currently refers to tree34e916d3f6:100644 100644427f4f4ce913e54da68bM Makefile :040000 04000042f29e42d1dd73536163M src FAIL: subtree directory tree doesn't match subtree commit tree ``` This shows that there are changes relative to what we currently use, due to the later commits in the PR. If we exclude them, we see that the code is identical: ``` $ git checkout26a8f68ea8$ ./contrib/devtools/git-subtree-check.sh src/snark src/snark in HEAD was last updated to upstream commit 9ada3f84ab484c57b2247c2f41091fd6a0916573 (treec10a38c759) src/snark in HEAD currently refers to treec10a38c759GOOD ``` Closes #820.
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