Skip to content

Commit

Permalink
Enable libbtc compilation
Browse files Browse the repository at this point in the history
Also do a bit of random cleanup of Autotools files.
  • Loading branch information
droark committed Feb 14, 2018
1 parent 49a15b0 commit c084ef9
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 15 deletions.
35 changes: 23 additions & 12 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -178,17 +178,28 @@ if test "x$want_tests" = "xyes"; then
AC_CONFIG_FILES(cppForSwig/gtest/Makefile)
fi

dnl ac_configure_args can only be set once and affects all subdirs.
dnl Place all params here.
dnl FCGI - No customs
dnl Crypto++ - No customs
dnl libchacha20poly1305 - No customs
dnl libsecp256k1 (libbtc) - --disable-shared --with-pic --with-bignum=no --enable-experimental --enable-module-ecdh
ac_configure_args="${orig_config_args} --disable-shared --with-pic --with-bignum=no --enable-experimental --enable-module-ecdh"
AC_CONFIG_SUBDIRS([cppForSwig/fcgi cppForSwig/cryptopp cppForSwig/libbtc])

AC_OUTPUT

echo " CC = $CC"
echo " CFLAGS = $CFLAGS"
echo " CPP = $CPP"
echo " CPPFLAGS = $CPPFLAGS"
echo " CXX = $CXX"
echo " CXXFLAGS = $CXXFLAGS"
echo " LDFLAGS = $LDFLAGS"
echo " LD = $LD"
echo " with tests = $want_tests"
echo " with benchmarks = $want_benchmarks"
echo " debug symbols = $want_debug"
echo " with GUI = $with_gui"
echo " Armory Autotools flags"
echo " CC = $CC"
echo " CFLAGS = $CFLAGS"
echo " CPP = $CPP"
echo " CPPFLAGS = $CPPFLAGS"
echo " CXX = $CXX"
echo " CXXFLAGS = $CXXFLAGS"
echo " LDFLAGS = $LDFLAGS"
echo " LD = $LD"
echo " ac_configure_args = $ac_configure_args"
echo " with tests = $want_tests"
echo " with benchmarks = $want_benchmarks"
echo " debug symbols = $want_debug"
echo " with GUI = $with_gui"
8 changes: 5 additions & 3 deletions cppForSwig/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ noinst_PROGRAMS += chacha20poly1305/chacha20poly1305bench
BENCHMARKS += chacha20poly1305/chacha20poly1305bench
endif

DIST_SUBDIRS = lmdb fcgi cryptopp
SUBDIRS = lmdb fcgi cryptopp $(MAYBE_BUILD)
DIST_SUBDIRS = lmdb fcgi cryptopp libbtc
SUBDIRS = lmdb fcgi cryptopp libbtc $(MAYBE_BUILD)

SWIG_FLAGS = -c++ -python -threads
AM_CXXFLAGS = $(CXXFLAGS) -std=c++11
Expand Down Expand Up @@ -90,12 +90,14 @@ libCppBlockUtils_la_SOURCES = $(CPPBLOCKUTILS_SOURCE_FILES) \
libCppBlockUtils_la_CPPFLAGS = $(AM_CPPFLAGS) $(INCLUDE_FILES)
libCppBlockUtils_la_CXXFLAGS = $(AM_CXXFLAGS) -Ilmdb \
-Icryptopp \
-Ilibbtc/src/secp256k1/include \
$(AX_SWIG_PYTHON_CPPFLAGS) \
$(EXTRA_PYTHON_INCLUDES) \
-D__STDC_LIMIT_MACROS
libCppBlockUtils_la_LIBADD = -Llmdb -llmdb \
./cryptopp/libcryptopp.la \
-lpthread
./libbtc/src/secp256k1/libsecp256k1.la \
-lpthread
libCppBlockUtils_la_LDFLAGS = $(LDFLAGS)

# ChaCha20Poly1305 library
Expand Down
10 changes: 10 additions & 0 deletions cppForSwig/cryptopp/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,13 @@ AM_CONDITIONAL([IS_X86], [test x$HOST_MACHINE = xx86])

AC_CONFIG_FILES([Makefile])
AC_OUTPUT

echo " Crypto++ flags"
echo " CC = $CC"
echo " CFLAGS = $CFLAGS"
echo " CPP = $CPP"
echo " CPPFLAGS = $CPPFLAGS"
echo " CXX = $CXX"
echo " CXXFLAGS = $CXXFLAGS"
echo " LDFLAGS = $LDFLAGS"
echo " LD = $LD"

0 comments on commit c084ef9

Please sign in to comment.