Skip to content

Commit 6bdb65e

Browse files
committed
Generated makefile.
1 parent cccc78d commit 6bdb65e

File tree

7 files changed

+210
-134
lines changed

7 files changed

+210
-134
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ script:
7474
# Download and build libbitcoin-server and all dependencies.
7575
- if [[ $OSX && $CLANG && $STATIC ]]; then ./install.sh --enable-testnet --disable-shared --build-boost --prefix=$HOME/my-prefix; fi
7676
- if [[ $LINUX && $CLANG && $STATIC ]]; then ./install.sh --disable-shared --build-boost --prefix=$HOME/my-prefix CXXFLAGS='-Os -stdlib=libstdc++' LDLIBS='-lstdc++'; fi
77-
- if [[ $LINUX && $GCC && $STATIC ]]; then ./install.sh --disable-ndebug --disable-shared --build-boost --prefix=$HOME/my-prefix --build-dir=my-build --with-bash-completion-dir CXXFLAGS='-Os -s'; fi
78-
- if [[ $OSX && $CLANG && $DYNAMIC ]]; then ./install.sh --with-bash-completion-dir; fi
77+
- if [[ $LINUX && $GCC && $STATIC ]]; then ./install.sh --disable-ndebug --disable-shared --build-boost --prefix=$HOME/my-prefix --build-dir=my-build --with-bash-completiondir CXXFLAGS='-Os -s'; fi
78+
- if [[ $OSX && $CLANG && $DYNAMIC ]]; then ./install.sh --with-bash-completiondir; fi
7979
- if [[ $LINUX && $CLANG && $DYNAMIC ]]; then sudo CXX=$CXX CC=$CC ./install.sh --disable-ndebug --disable-static CXXFLAGS='-Os -stdlib=libstdc++' LDLIBS='-lstdc++'; fi
80-
- if [[ $LINUX && $GCC && $DYNAMIC ]]; then sudo CXX=$CXX CC=$CC ./install.sh --disable-static --build-boost --with-bash-completion-dir CXXFLAGS='-Os -s'; fi
80+
- if [[ $LINUX && $GCC && $DYNAMIC ]]; then sudo CXX=$CXX CC=$CC ./install.sh --disable-static --build-boost --with-bash-completiondir CXXFLAGS='-Os -s'; fi

HACKING

Lines changed: 0 additions & 15 deletions
This file was deleted.

Makefile.am

Lines changed: 48 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,69 @@
1+
###############################################################################
2+
# Copyright (c) 2014-2015 libbitcoin-server developers (see COPYING).
13
#
2-
# documentation
4+
# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY
35
#
4-
doc_DATA = README INSTALL COPYING
5-
6-
#
7-
# pkg-config
8-
#
9-
pkgconfig_DATA = libbitcoin-server.pc
6+
###############################################################################
107

8+
# Standard declarations.
9+
#==============================================================================
1110
# look for macros in the m4 subdirectory
1211
ACLOCAL_AMFLAGS = -I m4
1312

14-
#
15-
# console application
16-
#
17-
#if WITH_CONSOLE
18-
19-
# bash completion
20-
if BASH_COMPLETION_DIR
21-
bashcompletiondir = ${bash_completion_dir}
22-
dist_bashcompletion_DATA = data/bitcoin_server
23-
endif
2413

25-
# configuration file
26-
#
27-
# TODO: coordinate this dir and file name with source code to keep in sync.
28-
# Note that in a prefix install this file is placed relative to the prefix but
29-
# execution of the server will default to reading in the system-wide directory.
30-
confdir="${sysconfdir}/libbitcoin"
31-
conf_DATA = data/server.cfg
14+
# Automake products.
15+
#==============================================================================
16+
# files => ${pkgconfigdir}
17+
#------------------------------------------------------------------------------
18+
pkgconfig_DATA = \
19+
libbitcoin-server.pc
3220

33-
bin_PROGRAMS = \
34-
bitcoin_server
21+
# files => ${docdir}
22+
#------------------------------------------------------------------------------
23+
doc_DATA = \
24+
AUTHORS \
25+
COPYING \
26+
ChangeLog \
27+
INSTALL \
28+
NEWS \
29+
README
3530

36-
bitcoin_server_CPPFLAGS = \
37-
-I${srcdir}/include \
38-
${sodium_CFLAGS} \
39-
${czmq___CFLAGS} \
40-
${bitcoin_node_CFLAGS} \
41-
-DSYSCONFDIR=\"${sysconfdir}\"
42-
43-
bitcoin_server_LDADD = \
44-
${sodium_LIBS} \
45-
${czmq___LIBS} \
46-
${bitcoin_node_LIBS}
47-
48-
bitcoin_server_SOURCES = \
49-
src/message.cpp \
31+
# src/bitcoin_server => ${bindir}
32+
#------------------------------------------------------------------------------
33+
bin_PROGRAMS = src/bitcoin_server
34+
src_bitcoin_server_CPPFLAGS = -I${srcdir}/include -DSYSCONFDIR=\"${sysconfdir}\" ${bitcoin_node_CPPFLAGS} ${sodium_CPPFLAGS} ${czmq___CPPFLAGS}
35+
src_bitcoin_server_LDADD = ${bitcoin_node_LIBS} ${sodium_LIBS} ${czmq___LIBS}
36+
src_bitcoin_server_SOURCES = \
5037
src/config.cpp \
5138
src/echo.cpp \
5239
src/endpoint.cpp \
5340
src/main.cpp \
54-
src/server.cpp \
55-
src/settings.cpp \
56-
src/worker.cpp \
41+
src/message.cpp \
5742
src/node_impl.cpp \
5843
src/publisher.cpp \
44+
src/server.cpp \
45+
src/settings.cpp \
5946
src/subscribe_manager.cpp \
47+
src/worker.cpp \
48+
src/service/blockchain.cpp \
6049
src/service/compat.cpp \
61-
src/service/fullnode.cpp \
6250
src/service/fetch_x.cpp \
63-
src/service/blockchain.cpp \
51+
src/service/fullnode.cpp \
6452
src/service/protocol.cpp \
6553
src/service/transaction_pool.cpp
6654

67-
#endif
55+
# files => ${bash_completiondir}
56+
#------------------------------------------------------------------------------
57+
if BASH_COMPLETIONDIR
58+
59+
dist_bash_completion_DATA = \
60+
data/bitcoin_server
61+
62+
endif BASH_COMPLETIONDIR
63+
64+
# files => ${sysconfdir}/libbitcoin
65+
#------------------------------------------------------------------------------
66+
sysconf_libbitcoindir = ${sysconfdir}/libbitcoin
67+
sysconf_libbitcoin_DATA = \
68+
data/server.cfg
69+

configure.ac

Lines changed: 73 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ AC_CONFIG_MACRO_DIR([m4])
2727
# specifically: AUTHORS, COPYING, INSTALL, NEWS, README and ChangeLog.
2828
AM_INIT_AUTOMAKE([subdir-objects])
2929

30-
# Enable C and Posix extensions that may be disabled on certain platforms.
30+
# Enable C and POSIX extensions that may be disabled on certain platforms.
3131
AC_USE_SYSTEM_EXTENSIONS
3232

3333
# Enable the archiver.
@@ -57,104 +57,139 @@ AC_ARG_VAR([CC], "C compiler to use, such as gcc or clang")
5757
AC_ARG_VAR([CXX], "C++ compiler to use, such as g++ or clang++")
5858
AC_ARG_VAR([PKG_CONFIG_PATH], "Additional directories for package discovery.")
5959

60+
# Check for baseline language coverage in the compiler for the C++11 standard.
61+
#------------------------------------------------------------------------------
62+
AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
63+
6064

6165
# Process options.
6266
#==============================================================================
63-
# Implement --with-bash-completion-dir and output ${bash_completion_dir} and declare BASH_COMPLETION_DIR.
67+
# Implement --with-bash-completiondir and output ${bash_completiondir} and declare BASH_COMPLETIONDIR.
6468
#------------------------------------------------------------------------------
65-
AC_MSG_CHECKING(--with-bash-completion-dir option)
66-
AC_ARG_WITH([bash-completion-dir],
67-
AS_HELP_STRING([--with-bash-completion-dir[=PATH]],
69+
AC_MSG_CHECKING([--with-bash-completiondir option])
70+
AC_ARG_WITH([bash-completiondir],
71+
AS_HELP_STRING([--with-bash-completiondir[=DIR]],
6872
[Install bash completion support, optionally specifying the directory. This option may require elevated permissions. @<:@default=no@:>@]),
69-
[bash_completion_dir=$withval],
70-
[bash_completion_dir=no])
71-
AC_MSG_RESULT([$bash_completion_dir])
72-
AC_SUBST([bash_completion_dir])
73-
AM_CONDITIONAL([BASH_COMPLETION_DIR], [test x$bash_completion_dir != xno])
73+
[bash_completiondir=$withval],
74+
[bash_completiondir=no])
75+
AC_MSG_RESULT([$bash_completiondir])
76+
AC_SUBST([bash_completiondir])
77+
AM_CONDITIONAL([BASH_COMPLETIONDIR], [test x$bash_completiondir != xno])
7478

7579
# Implement --with-pkgconfigdir and output ${pkgconfigdir}.
7680
#------------------------------------------------------------------------------
77-
AC_MSG_CHECKING(--with-pkgconfigdir option)
81+
AC_MSG_CHECKING([--with-pkgconfigdir option])
7882
AC_ARG_WITH([pkgconfigdir],
79-
AS_HELP_STRING([--with-pkgconfigdir=PATH],
83+
AS_HELP_STRING([--with-pkgconfigdir=DIR],
8084
[Path to pkgconfig directory. @<:@default=${libdir}/pkgconfig@:>@]),
8185
[pkgconfigdir=$withval],
8286
[pkgconfigdir=${libdir}/pkgconfig])
8387
AC_MSG_RESULT([$pkgconfigdir])
8488
AC_SUBST([pkgconfigdir])
8589

86-
# Implement --enable-ndebug option and define NDEBUG.
90+
# Implement --enable-ndebug and define NDEBUG.
8791
#------------------------------------------------------------------------------
88-
AC_MSG_CHECKING(--enable-ndebug option)
92+
AC_MSG_CHECKING([--enable-ndebug option])
8993
AC_ARG_ENABLE([ndebug],
9094
AS_HELP_STRING([--enable-ndebug],
9195
[Compile without debug assertions. @<:@default=yes@:>@]),
9296
[enable_ndebug=$enableval],
9397
[enable_ndebug=yes])
9498
AC_MSG_RESULT([$enable_ndebug])
95-
AS_IF([test x$enable_ndebug != xno], AC_DEFINE([NDEBUG]))
99+
AS_CASE([${enable_ndebug}], [yes], AC_DEFINE([NDEBUG]))
96100

97-
# Inherit --enable-shared option and define BOOST_TEST_DYN_LINK.
101+
# Inherit --enable-shared and define BOOST_TEST_DYN_LINK.
98102
#------------------------------------------------------------------------------
99-
AS_IF([test x$enable_shared != xno], AC_DEFINE([BOOST_TEST_DYN_LINK]))
103+
AS_CASE([${enable_shared}], [yes], AC_DEFINE([BOOST_TEST_DYN_LINK]))
100104

101105

102106
# Check dependencies.
103107
#==============================================================================
104-
# Require Boost of at least version 1.49.0 if in gcc.
108+
# Require Boost of at least version 1.50.0 if in gcc and output ${boost_CPPFLAGS/LDFLAGS}.
105109
#------------------------------------------------------------------------------
106110
AS_CASE([${CC}], [*gcc*],
107-
[AX_BOOST_BASE([1.49.0], [], [AC_MSG_ERROR(
108-
[Boost 1.49.0 or later is required but was not found.])])])
111+
[AX_BOOST_BASE([1.50.0],
112+
[AC_SUBST([boost_CPPFLAGS], [${BOOST_CPPFLAGS}])
113+
AC_SUBST([boost_LDFLAGS], [${BOOST_LDFLAGS}])
114+
AC_MSG_NOTICE([boost_CPPFLAGS : ${boost_CPPFLAGS}])
115+
AC_MSG_NOTICE([boost_LDFLAGS : ${boost_LDFLAGS}])],
116+
[AC_MSG_ERROR([Boost 1.50.0 or later is required but was not found.])])])
109117

110-
# Require Boost of at least version 1.54.0 if in clang.
118+
# Require Boost of at least version 1.54.0 if in clang and output ${boost_CPPFLAGS/LDFLAGS}.
111119
#------------------------------------------------------------------------------
112120
AS_CASE([${CC}], [*clang*],
113-
[AX_BOOST_BASE([1.54.0], [], [AC_MSG_ERROR(
114-
[Boost 1.54.0 or later is required but was not found.])])])
121+
[AX_BOOST_BASE([1.54.0],
122+
[AC_SUBST([boost_CPPFLAGS], [${BOOST_CPPFLAGS}])
123+
AC_SUBST([boost_LDFLAGS], [${BOOST_LDFLAGS}])
124+
AC_MSG_NOTICE([boost_CPPFLAGS : ${boost_CPPFLAGS}])
125+
AC_MSG_NOTICE([boost_LDFLAGS : ${boost_LDFLAGS}])],
126+
[AC_MSG_ERROR([Boost 1.54.0 or later is required but was not found.])])])
115127

116-
# Require bash-completion of at least version 2.0.0 and output ${bash_completion_CFLAGS} and ${bash_completion_LIBS}.
128+
# Require bash-completion of at least version 2.0.0 and output ${bash_completion_CFLAGS/LIBS/PKG}.
117129
#------------------------------------------------------------------------------
118-
AS_IF([test x$bash_completion_dir = xyes],
130+
AS_CASE([${bash_completiondir}], [yes],
119131
[PKG_CHECK_MODULES([bash_completion], [bash-completion >= 2.0.0],
120-
[bash_completion_dir="`pkg-config --variable=completionsdir bash-completion`"],
121-
[bash_completion_dir="${datadir}/bash-completion/completions"])])
132+
[bash_completiondir="`pkg-config --variable=completionsdir bash-completion`"],
133+
[bash_completiondir="${datadir}/bash-completion/completions"])
134+
AC_SUBST([bash_completion_PKG], ['bash-completion >= 2.0.0'])
135+
AC_SUBST([bash_completion_CPPFLAGS], [${bash_completion_CFLAGS}])
136+
AC_MSG_NOTICE([bash_completion_CPPFLAGS : ${bash_completion_CPPFLAGS}])
137+
AC_MSG_NOTICE([bash_completion_LIBS : ${bash_completion_LIBS}])],
138+
[AC_SUBST([bash_completion_PKG], [])])
122139

123-
# Require sodium of at least version 1.0.0 and output ${sodium_CFLAGS} and ${sodium_LIBS}.
140+
# Require sodium of at least version 1.0.0 and output ${sodium_CFLAGS/LIBS/PKG}.
124141
#------------------------------------------------------------------------------
125142
# The chained zmq dependency doesn't set a minimum version for sodium.
126143
PKG_CHECK_MODULES([sodium], [libsodium >= 1.0.0])
144+
AC_SUBST([sodium_PKG], ['libsodium >= 1.0.0'])
145+
AC_SUBST([sodium_CPPFLAGS], [${sodium_CFLAGS}])
146+
AC_MSG_NOTICE([sodium_CPPFLAGS : ${sodium_CPPFLAGS}])
147+
AC_MSG_NOTICE([sodium_LIBS : ${sodium_LIBS}])
127148

128-
# Require czmq++ of at least version 1.1.0 and output ${czmq___CFLAGS} and ${czmq___LIBS}.
149+
# Require czmq++ of at least version 1.1.0 and output ${czmq___CFLAGS/LIBS/PKG}.
129150
#------------------------------------------------------------------------------
130151
PKG_CHECK_MODULES([czmq__], [libczmq++ >= 1.1.0])
152+
AC_SUBST([czmq___PKG], ['libczmq++ >= 1.1.0'])
153+
AC_SUBST([czmq___CPPFLAGS], [${czmq___CFLAGS}])
154+
AC_MSG_NOTICE([czmq___CPPFLAGS : ${czmq___CPPFLAGS}])
155+
AC_MSG_NOTICE([czmq___LIBS : ${czmq___LIBS}])
131156

132-
# Require bitcoin-node of at least version 2.0.0 and output ${bitcoin_node_CFLAGS} and ${bitcoin_node_LIBS}.
157+
# Require bitcoin-node of at least version 2.0.0 and output ${bitcoin_node_CFLAGS/LIBS/PKG}.
133158
#------------------------------------------------------------------------------
134159
PKG_CHECK_MODULES([bitcoin_node], [libbitcoin-node >= 2.0.0])
160+
AC_SUBST([bitcoin_node_PKG], ['libbitcoin-node >= 2.0.0'])
161+
AC_SUBST([bitcoin_node_CPPFLAGS], [${bitcoin_node_CFLAGS}])
162+
AC_MSG_NOTICE([bitcoin_node_CPPFLAGS : ${bitcoin_node_CPPFLAGS}])
163+
AC_MSG_NOTICE([bitcoin_node_LIBS : ${bitcoin_node_LIBS}])
135164

136165

137166
# Set flags.
138167
#==============================================================================
168+
# Require c++11 for all c++ products.
169+
#------------------------------------------------------------------------------
170+
AS_CASE([${CC}], [*],
171+
[AX_CHECK_COMPILE_FLAG([-std=c++11],
172+
[CXXFLAGS="$CXXFLAGS -std=c++11"])])
173+
139174
# Warn on all stuff.
140175
#------------------------------------------------------------------------------
141176
AS_CASE([${CC}], [*],
142177
[AX_CHECK_COMPILE_FLAG([-Wall],
143-
[CXXFLAGS="$CXXFLAGS -Wall"])])
178+
[CFLAGS="$CFLAGS -Wall"])])
144179

145180
# Warn on extra stuff.
146181
#------------------------------------------------------------------------------
147182
AS_CASE([${CC}], [*],
148183
[AX_CHECK_COMPILE_FLAG([-Wextra],
149-
[CXXFLAGS="$CXXFLAGS -Wextra"])])
184+
[CFLAGS="$CFLAGS -Wextra"])])
150185

151186
# Be really annoying.
152187
#------------------------------------------------------------------------------
153188
AS_CASE([${CC}], [*],
154189
[AX_CHECK_COMPILE_FLAG([-Wpedantic],
155-
[CXXFLAGS="$CXXFLAGS -Wpedantic"],
190+
[CFLAGS="$CFLAGS -Wpedantic"],
156191
[AX_CHECK_COMPILE_FLAG([-pedantic],
157-
[CXXFLAGS="$CXXFLAGS -pedantic"])])])
192+
[CFLAGS="$CFLAGS -pedantic"])])])
158193

159194
# Conform to style.
160195
#------------------------------------------------------------------------------
@@ -180,37 +215,17 @@ AS_CASE([${CC}], [*gcc*],
180215
[AX_CHECK_COMPILE_FLAG([-Wno-unused-local-typedefs],
181216
[CXXFLAGS="$CXXFLAGS -Wno-unused-local-typedefs"])])
182217

183-
# Clean up boost 1.49 headers, static with no exceptions. Enabled in gcc only.
184-
#------------------------------------------------------------------------------
185-
AS_CASE([${CC}], [*gcc*],
186-
[AX_CHECK_COMPILE_FLAG([-Wno-maybe-uninitialized],
187-
[CXXFLAGS="$CXXFLAGS -Wno-maybe-uninitialized"])])
188-
189-
# Clean up boost 1.54 headers, static with no exceptions. Enabled in clang only.
190-
#------------------------------------------------------------------------------
191-
AS_CASE([${CC}], [*clang*],
192-
[AX_CHECK_COMPILE_FLAG([-Wno-sometimes-uninitialized],
193-
[CXXFLAGS="$CXXFLAGS -Wno-sometimes-uninitialized"])])
194-
195-
# Clean up boost property_tree headers, with no exceptions.
196-
#------------------------------------------------------------------------------
197-
AS_CASE([${CC}], [*],
198-
[AX_CHECK_COMPILE_FLAG([-Wno-return-type],
199-
[CXXFLAGS="$CXXFLAGS -Wno-return-type"])])
200-
201218
# Protect stack.
202219
#------------------------------------------------------------------------------
203220
AS_CASE([${CC}], [*],
204-
[AX_CHECK_COMPILE_FLAG([-fstack-protector],
205-
[AX_CHECK_LINK_FLAG([-fstack-protector],
206-
[CXXFLAGS="$CXXFLAGS -fstack-protector"])])])
221+
[AX_CHECK_LINK_FLAG([-fstack-protector],
222+
[LDFLAGS="$LDFLAGS -fstack-protector"])])
207223

208224
# Protect stack comprehensively.
209225
#------------------------------------------------------------------------------
210226
AS_CASE([${CC}], [*],
211-
[AX_CHECK_COMPILE_FLAG([-fstack-protector-all],
212-
[AX_CHECK_LINK_FLAG([-fstack-protector-all],
213-
[CXXFLAGS="$CXXFLAGS -fstack-protector-all"])])])
227+
[AX_CHECK_LINK_FLAG([-fstack-protector-all],
228+
[LDFLAGS="$LDFLAGS -fstack-protector-all"])])
214229

215230
# Hide internal functions from external libs. Enabled in gcc only.
216231
#------------------------------------------------------------------------------

0 commit comments

Comments
 (0)