Skip to content

Commit

Permalink
Regenerate artifacts.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmienk committed Jul 2, 2018
1 parent dc9d7cf commit 5129fed
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 25 deletions.
6 changes: 3 additions & 3 deletions Makefile.am
Expand Up @@ -32,7 +32,7 @@ doc_DATA = \
# src/libbitcoin-server.la => ${libdir}
#------------------------------------------------------------------------------
lib_LTLIBRARIES = src/libbitcoin-server.la
src_libbitcoin_server_la_CPPFLAGS = -I${srcdir}/include -DSYSCONFDIR=\"${sysconfdir}\" ${bitcoin_protocol_CPPFLAGS} ${bitcoin_node_CPPFLAGS}
src_libbitcoin_server_la_CPPFLAGS = -I${srcdir}/include -DSYSCONFDIR=\"${sysconfdir}\" ${bitcoin_protocol_BUILD_CPPFLAGS} ${bitcoin_node_BUILD_CPPFLAGS}
src_libbitcoin_server_la_LIBADD = ${bitcoin_protocol_LIBS} ${bitcoin_node_LIBS}
src_libbitcoin_server_la_SOURCES = \
src/configuration.cpp \
Expand Down Expand Up @@ -61,7 +61,7 @@ if WITH_TESTS
TESTS = libbitcoin-server-test_runner.sh

check_PROGRAMS = test/libbitcoin-server-test
test_libbitcoin_server_test_CPPFLAGS = -I${srcdir}/include ${bitcoin_protocol_CPPFLAGS} ${bitcoin_node_CPPFLAGS}
test_libbitcoin_server_test_CPPFLAGS = -I${srcdir}/include ${bitcoin_protocol_BUILD_CPPFLAGS} ${bitcoin_node_BUILD_CPPFLAGS}
test_libbitcoin_server_test_LDADD = src/libbitcoin-server.la ${boost_unit_test_framework_LIBS} ${bitcoin_protocol_LIBS} ${bitcoin_node_LIBS}
test_libbitcoin_server_test_SOURCES = \
test/main.cpp \
Expand All @@ -75,7 +75,7 @@ endif WITH_TESTS
if WITH_CONSOLE

bin_PROGRAMS = console/bs
console_bs_CPPFLAGS = -I${srcdir}/include ${bitcoin_protocol_CPPFLAGS} ${bitcoin_node_CPPFLAGS}
console_bs_CPPFLAGS = -I${srcdir}/include ${bitcoin_protocol_BUILD_CPPFLAGS} ${bitcoin_node_BUILD_CPPFLAGS}
console_bs_LDADD = src/libbitcoin-server.la ${bitcoin_protocol_LIBS} ${bitcoin_node_LIBS}
console_bs_SOURCES = \
console/executor.cpp \
Expand Down
119 changes: 97 additions & 22 deletions configure.ac
Expand Up @@ -44,6 +44,9 @@ AC_PROG_CXX
# Enable shared libraries if available, and static if they don't conflict.
AC_PROG_LIBTOOL

# Enable sed for substitution.
AC_PROG_SED

# Compute the canonical host-system type variable host, including host_os.
AC_CANONICAL_HOST

Expand All @@ -52,6 +55,9 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

# Check for pkg-config.
PKG_PROG_PKG_CONFIG
AS_IF([test -n "$PKG_CONFIG"], [],
[AC_MSG_ERROR([pkg-config is required but was not found.])])


# Declare environment variables that affect the build.
#------------------------------------------------------------------------------
Expand Down Expand Up @@ -126,6 +132,16 @@ AS_CASE([${enable_ndebug}], [yes], AC_DEFINE([NDEBUG]))
#------------------------------------------------------------------------------
AS_CASE([${enable_shared}], [yes], AC_DEFINE([BOOST_ALL_DYN_LINK]))

# Implement --enable-isystem.
#------------------------------------------------------------------------------
AC_MSG_CHECKING([--enable-isystem option])
AC_ARG_ENABLE([isystem],
AS_HELP_STRING([--enable-isystem],
[Substitute -isystem for -I in dependencies. @<:@default=no@:>@]),
[enable_isystem=$enableval],
[enable_isystem=no])
AC_MSG_RESULT([$enable_isystem])


# Check dependencies.
#==============================================================================
Expand All @@ -139,6 +155,12 @@ AS_CASE([${CC}], [*],
AC_MSG_NOTICE([boost_LDFLAGS : ${boost_LDFLAGS}])],
[AC_MSG_ERROR([Boost 1.62.0 or later is required but was not found.])])])

AS_CASE([${enable_isystem}],[yes],
[AC_SUBST([boost_BUILD_CPPFLAGS], [${boost_ISYS_CPPFLAGS}])],
[AC_SUBST([boost_BUILD_CPPFLAGS], [${boost_CPPFLAGS}])])

AC_MSG_NOTICE([boost_BUILD_CPPFLAGS : ${boost_BUILD_CPPFLAGS}])

AS_CASE([${with_tests}], [yes],
[AX_BOOST_UNIT_TEST_FRAMEWORK
AC_SUBST([boost_unit_test_framework_LIBS], [${BOOST_UNIT_TEST_FRAMEWORK_LIB}])
Expand All @@ -149,30 +171,69 @@ AS_CASE([${with_tests}], [yes],
#------------------------------------------------------------------------------
AS_CASE([${bash_completiondir}], [yes],
[PKG_CHECK_MODULES([bash_completion], [bash-completion >= 2.0.0],
[bash_completiondir="`pkg-config --variable=completionsdir bash-completion`"],
[bash_completiondir="${datadir}/bash-completion/completions"])
[bash_completion_INCLUDEDIR="`$PKG_CONFIG --variable=includedir "bash-completion >= 2.0.0" 2>/dev/null`"
bash_completion_OTHER_CFLAGS="`$PKG_CONFIG --cflags-only-other "bash-completion >= 2.0.0" 2>/dev/null`"
bash_completiondir="`$PKG_CONFIG --variable=completionsdir "bash-completion >= 2.0.0" 2>/dev/null`"],
[bash_completion_INCLUDEDIR=""
bash_completion_OTHER_CFLAGS=""
bash_completiondir="${datadir}/bash-completion/completions"])
AC_SUBST([bash_completion_PKG], ['bash-completion >= 2.0.0'])
AC_SUBST([bash_completion_CPPFLAGS], [${bash_completion_CFLAGS}])
AS_IF([test x${bash_completion_INCLUDEDIR} != "x"],
[AC_SUBST([bash_completion_ISYS_CPPFLAGS], [-isystem${bash_completion_INCLUDEDIR} ${bash_completion_OTHER_CFLAGS}])],
[AC_SUBST([bash_completion_ISYS_CPPFLAGS], [${bash_completion_OTHER_CFLAGS}])])
AC_MSG_NOTICE([bash_completion_CPPFLAGS : ${bash_completion_CPPFLAGS}])
AC_MSG_NOTICE([bash_completion_LIBS : ${bash_completion_LIBS}])],
[AC_SUBST([bash_completion_PKG], [])])

AS_CASE([${enable_isystem}],[yes],
[AC_SUBST([bash_completion_BUILD_CPPFLAGS], [${bash_completion_ISYS_CPPFLAGS}])],
[AC_SUBST([bash_completion_BUILD_CPPFLAGS], [${bash_completion_CPPFLAGS}])])

AC_MSG_NOTICE([bash_completion_BUILD_CPPFLAGS : ${bash_completion_BUILD_CPPFLAGS}])

# Require bitcoin-node of at least version 4.0.0 and output ${bitcoin_node_CPPFLAGS/LIBS/PKG}.
#------------------------------------------------------------------------------
PKG_CHECK_MODULES([bitcoin_node], [libbitcoin-node >= 4.0.0])
PKG_CHECK_MODULES([bitcoin_node], [libbitcoin-node >= 4.0.0],
[bitcoin_node_INCLUDEDIR="`$PKG_CONFIG --variable=includedir "libbitcoin-node >= 4.0.0" 2>/dev/null`"
bitcoin_node_OTHER_CFLAGS="`$PKG_CONFIG --cflags-only-other "libbitcoin-node >= 4.0.0" 2>/dev/null`"],
[bitcoin_node_INCLUDEDIR=""
bitcoin_node_OTHER_CFLAGS=""])
AC_SUBST([bitcoin_node_PKG], ['libbitcoin-node >= 4.0.0'])
AC_SUBST([bitcoin_node_CPPFLAGS], [${bitcoin_node_CFLAGS}])
AS_IF([test x${bitcoin_node_INCLUDEDIR} != "x"],
[AC_SUBST([bitcoin_node_ISYS_CPPFLAGS], [-isystem${bitcoin_node_INCLUDEDIR} ${bitcoin_node_OTHER_CFLAGS}])],
[AC_SUBST([bitcoin_node_ISYS_CPPFLAGS], [${bitcoin_node_OTHER_CFLAGS}])])
AC_MSG_NOTICE([bitcoin_node_CPPFLAGS : ${bitcoin_node_CPPFLAGS}])
AC_MSG_NOTICE([bitcoin_node_LIBS : ${bitcoin_node_LIBS}])

AS_CASE([${enable_isystem}],[yes],
[AC_SUBST([bitcoin_node_BUILD_CPPFLAGS], [${bitcoin_node_ISYS_CPPFLAGS}])],
[AC_SUBST([bitcoin_node_BUILD_CPPFLAGS], [${bitcoin_node_CPPFLAGS}])])

AC_MSG_NOTICE([bitcoin_node_BUILD_CPPFLAGS : ${bitcoin_node_BUILD_CPPFLAGS}])

# Require bitcoin-protocol of at least version 4.0.0 and output ${bitcoin_protocol_CPPFLAGS/LIBS/PKG}.
#------------------------------------------------------------------------------
PKG_CHECK_MODULES([bitcoin_protocol], [libbitcoin-protocol >= 4.0.0])
PKG_CHECK_MODULES([bitcoin_protocol], [libbitcoin-protocol >= 4.0.0],
[bitcoin_protocol_INCLUDEDIR="`$PKG_CONFIG --variable=includedir "libbitcoin-protocol >= 4.0.0" 2>/dev/null`"
bitcoin_protocol_OTHER_CFLAGS="`$PKG_CONFIG --cflags-only-other "libbitcoin-protocol >= 4.0.0" 2>/dev/null`"],
[bitcoin_protocol_INCLUDEDIR=""
bitcoin_protocol_OTHER_CFLAGS=""])
AC_SUBST([bitcoin_protocol_PKG], ['libbitcoin-protocol >= 4.0.0'])
AC_SUBST([bitcoin_protocol_CPPFLAGS], [${bitcoin_protocol_CFLAGS}])
AS_IF([test x${bitcoin_protocol_INCLUDEDIR} != "x"],
[AC_SUBST([bitcoin_protocol_ISYS_CPPFLAGS], [-isystem${bitcoin_protocol_INCLUDEDIR} ${bitcoin_protocol_OTHER_CFLAGS}])],
[AC_SUBST([bitcoin_protocol_ISYS_CPPFLAGS], [${bitcoin_protocol_OTHER_CFLAGS}])])
AC_MSG_NOTICE([bitcoin_protocol_CPPFLAGS : ${bitcoin_protocol_CPPFLAGS}])
AC_MSG_NOTICE([bitcoin_protocol_LIBS : ${bitcoin_protocol_LIBS}])

AS_CASE([${enable_isystem}],[yes],
[AC_SUBST([bitcoin_protocol_BUILD_CPPFLAGS], [${bitcoin_protocol_ISYS_CPPFLAGS}])],
[AC_SUBST([bitcoin_protocol_BUILD_CPPFLAGS], [${bitcoin_protocol_CPPFLAGS}])])

AC_MSG_NOTICE([bitcoin_protocol_BUILD_CPPFLAGS : ${bitcoin_protocol_BUILD_CPPFLAGS}])


# Set flags.
#==============================================================================
Expand All @@ -188,12 +249,24 @@ AS_CASE([${CC}], [*],
[AX_CHECK_COMPILE_FLAG([-Wall],
[CFLAGS="$CFLAGS -Wall"])])

# Warn on all stuff.
#------------------------------------------------------------------------------
AS_CASE([${CC}], [*],
[AX_CHECK_COMPILE_FLAG([-Wall],
[CXXFLAGS="$CXXFLAGS -Wall"])])

# Warn on extra stuff.
#------------------------------------------------------------------------------
AS_CASE([${CC}], [*],
[AX_CHECK_COMPILE_FLAG([-Wextra],
[CFLAGS="$CFLAGS -Wextra"])])

# Warn on extra stuff.
#------------------------------------------------------------------------------
AS_CASE([${CC}], [*],
[AX_CHECK_COMPILE_FLAG([-Wextra],
[CXXFLAGS="$CXXFLAGS -Wextra"])])

# Be really annoying.
#------------------------------------------------------------------------------
AS_CASE([${CC}], [*],
Expand All @@ -202,6 +275,26 @@ AS_CASE([${CC}], [*],
[AX_CHECK_COMPILE_FLAG([-pedantic],
[CFLAGS="$CFLAGS -pedantic"])])])

# Be really annoying.
#------------------------------------------------------------------------------
AS_CASE([${CC}], [*],
[AX_CHECK_COMPILE_FLAG([-Wpedantic],
[CXXFLAGS="$CXXFLAGS -Wpedantic"],
[AX_CHECK_COMPILE_FLAG([-pedantic],
[CXXFLAGS="$CXXFLAGS -pedantic"])])])

# Disallow warning on style order of declarations.
#------------------------------------------------------------------------------
AS_CASE([${CC}], [*],
[AX_CHECK_COMPILE_FLAG([-Wno-reorder],
[CXXFLAGS="$CXXFLAGS -Wno-reorder"])])

# Suppress warning for incomplete field initialization.
#------------------------------------------------------------------------------
AS_CASE([${CC}], [*],
[AX_CHECK_COMPILE_FLAG([-Wno-missing-field-initializers],
[CXXFLAGS="$CXXFLAGS -Wno-missing-field-initializers"])])

# Conform to style.
#------------------------------------------------------------------------------
AS_CASE([${CC}], [*],
Expand All @@ -214,18 +307,6 @@ AS_CASE([${CC}], [*clang*],
[AX_CHECK_COMPILE_FLAG([-Wno-mismatched-tags],
[CXXFLAGS="$CXXFLAGS -Wno-mismatched-tags"])])

# Clean up boost 1.55 headers. Enabled in gcc only.
#------------------------------------------------------------------------------
AS_CASE([${CC}], [*gcc*],
[AX_CHECK_COMPILE_FLAG([-Wno-deprecated-declarations],
[CXXFLAGS="$CXXFLAGS -Wno-deprecated-declarations"])])

# Clean up boost 1.55 headers. Enabled in clang only.
#------------------------------------------------------------------------------
AS_CASE([${CC}], [*clang*],
[AX_CHECK_COMPILE_FLAG([-Wno-redeclared-class-member],
[CXXFLAGS="$CXXFLAGS -Wno-redeclared-class-member"])])

# Protect stack.
#------------------------------------------------------------------------------
AS_CASE([${CC}], [*],
Expand All @@ -238,12 +319,6 @@ AS_CASE([${CC}], [*],
[AX_CHECK_LINK_FLAG([-fstack-protector-all],
[LDFLAGS="$LDFLAGS -fstack-protector-all"])])

# Hide internal functions from external libs. Enabled in gcc only.
#------------------------------------------------------------------------------
AS_CASE([${CC}], [*gcc*],
[AX_CHECK_COMPILE_FLAG([-fvisibility-hidden],
[CXXFLAGS="$CXXFLAGS -fvisibility-hidden"])])

# Hide inlines from external libs. Enabled in gcc only.
#------------------------------------------------------------------------------
AS_CASE([${CC}], [*gcc*],
Expand Down

0 comments on commit 5129fed

Please sign in to comment.