Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,41 @@ src_bitcoin_server_CPPFLAGS = -I${srcdir}/include -DSYSCONFDIR=\"${sysconfdir}\"
src_bitcoin_server_LDADD = ${bitcoin_node_LIBS} ${sodium_LIBS} ${czmq___LIBS}
src_bitcoin_server_SOURCES = \
src/config.cpp \
src/config.hpp \
src/echo.cpp \
src/echo.hpp \
src/endpoint.cpp \
src/endpoint.hpp \
src/main.cpp \
src/message.cpp \
src/message.hpp \
src/node_impl.cpp \
src/node_impl.hpp \
src/publisher.cpp \
src/publisher.hpp \
src/server.cpp \
src/server.hpp \
src/settings.cpp \
src/settings.hpp \
src/subscribe_manager.cpp \
src/subscribe_manager.hpp \
src/version.hpp \
src/worker-output.sh \
src/worker.cpp \
src/worker.hpp \
src/service/blockchain.cpp \
src/service/blockchain.hpp \
src/service/compat.cpp \
src/service/compat.hpp \
src/service/fetch_x.cpp \
src/service/fetch_x.hpp \
src/service/fullnode.cpp \
src/service/fullnode.hpp \
src/service/protocol.cpp \
src/service/transaction_pool.cpp
src/service/protocol.hpp \
src/service/transaction_pool.cpp \
src/service/transaction_pool.hpp \
src/service/util.hpp

# files => ${bash_completiondir}
#------------------------------------------------------------------------------
Expand Down
10 changes: 8 additions & 2 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#!/bin/bash
autoreconf -i
#!/bin/sh
###############################################################################
# Copyright (c) 2014-2015 libbitcoin-server developers (see COPYING).
#
# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY
#
###############################################################################

autoreconf -i
2 changes: 1 addition & 1 deletion builds/msvc/properties/ReleaseDEXE.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<ItemDefinitionGroup>
<ClCompile>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
</ClCompile>
</ItemDefinitionGroup>

Expand Down
8 changes: 4 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ AS_CASE([${CC}], [*clang*],
AC_MSG_NOTICE([boost_LDFLAGS : ${boost_LDFLAGS}])],
[AC_MSG_ERROR([Boost 1.54.0 or later is required but was not found.])])])

# Require bash-completion of at least version 2.0.0 and output ${bash_completion_CFLAGS/LIBS/PKG}.
# Require bash-completion of at least version 2.0.0 and output ${bash_completion_CPPFLAGS/LIBS/PKG}.
#------------------------------------------------------------------------------
AS_CASE([${bash_completiondir}], [yes],
[PKG_CHECK_MODULES([bash_completion], [bash-completion >= 2.0.0],
Expand All @@ -137,7 +137,7 @@ AS_CASE([${bash_completiondir}], [yes],
AC_MSG_NOTICE([bash_completion_LIBS : ${bash_completion_LIBS}])],
[AC_SUBST([bash_completion_PKG], [])])

# Require sodium of at least version 1.0.0 and output ${sodium_CFLAGS/LIBS/PKG}.
# Require sodium of at least version 1.0.0 and output ${sodium_CPPFLAGS/LIBS/PKG}.
#------------------------------------------------------------------------------
# The chained zmq dependency doesn't set a minimum version for sodium.
PKG_CHECK_MODULES([sodium], [libsodium >= 1.0.0])
Expand All @@ -146,15 +146,15 @@ AC_SUBST([sodium_CPPFLAGS], [${sodium_CFLAGS}])
AC_MSG_NOTICE([sodium_CPPFLAGS : ${sodium_CPPFLAGS}])
AC_MSG_NOTICE([sodium_LIBS : ${sodium_LIBS}])

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

# Require bitcoin-node of at least version 2.0.0 and output ${bitcoin_node_CFLAGS/LIBS/PKG}.
# Require bitcoin-node of at least version 2.0.0 and output ${bitcoin_node_CPPFLAGS/LIBS/PKG}.
#------------------------------------------------------------------------------
PKG_CHECK_MODULES([bitcoin_node], [libbitcoin-node >= 2.0.0])
AC_SUBST([bitcoin_node_PKG], ['libbitcoin-node >= 2.0.0'])
Expand Down
2 changes: 2 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ echo " with_pkgconfigdir: $with_pkgconfigdir"
BOOST_OPTIONS_GCC=\
"threading=multi "\
"variant=release "\
"--with-chrono "\
"--with-date_time "\
"--with-filesystem "\
"--with-locale "\
Expand All @@ -192,6 +193,7 @@ BOOST_OPTIONS_CLANG=\
"linkflags=-stdlib=${boost_stdlib} "\
"threading=multi "\
"variant=release "\
"--with-chrono "\
"--with-date_time "\
"--with-filesystem "\
"--with-locale "\
Expand Down
57 changes: 57 additions & 0 deletions m4/ax_java_devel.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Java discovery wrapper, defines JAVA_CPPFLAGS.

AC_DEFUN([AX_JAVA_DEVEL], [

AX_PROG_JAVAC
AX_PROG_JAVA
AX_PROG_JAR
AX_JNI_INCLUDE_DIR
AC_PROG_MKDIR_P

JAVA_CPPFLAGS=
for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS; do
JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$JNI_INCLUDE_DIR"
done

# Set CPP compile flags.
AC_SUBST([JAVA_CPPFLAGS])

# Install .class files to ${datadir}/java.
AC_SUBST([javaexecdir], [${datadir}/java])

# Install .jar files to ${datadir}/java (also).
AC_SUBST([jarexecdir], [${datadir}/java])

# Build .class files in hidden directory.
AC_SUBST([java_builddir], [.class])
$MKDIR_P $java_builddir

# Build .jar files in hidden directory.
AC_SUBST([jar_builddir], [.jar])
$MKDIR_P $jar_builddir

# Instruct Automake to build .class files in ${java_builddir}.
AC_SUBST([JAVAROOT], [${java_builddir}])

## Automake doesn't clean the modified JAVAROOT or jar builds,
## so add following pattern in Makefile.am instead:
#
# dist_noinst_JAVA = \
# [java files listed here]
#
# CLEANFILES = ${java_builddir}/*.class
#
# distclean-local:
# rm -rf ${java_builddir} ${jar_builddir}
#
## Automake doesn't build .jar files,
## so use following pattern in Makefile.am instead:
#
# nodist_jarexec_DATA = \
# ${jar_builddir}/[jar name here]-${VERSION}.jar
#
# ${nodist_jarexec_DATA}: classnoinst.stamp
# ${JAR} cf ${JARFLAGS} ${nodist_jarexec_DATA} -C ${java_builddir} .
#
# CLEANFILES += ${jar_builddir}/*.jar
])
126 changes: 126 additions & 0 deletions m4/ax_jni_include_dir.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_jni_include_dir.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_JNI_INCLUDE_DIR
#
# DESCRIPTION
#
# AX_JNI_INCLUDE_DIR finds include directories needed for compiling
# programs using the JNI interface.
#
# JNI include directories are usually in the Java distribution. This is
# deduced from the value of $JAVA_HOME, $JAVAC, or the path to "javac", in
# that order. When this macro completes, a list of directories is left in
# the variable JNI_INCLUDE_DIRS.
#
# Example usage follows:
#
# AX_JNI_INCLUDE_DIR
#
# for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
# do
# CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR"
# done
#
# If you want to force a specific compiler:
#
# - at the configure.in level, set JAVAC=yourcompiler before calling
# AX_JNI_INCLUDE_DIR
#
# - at the configure level, setenv JAVAC
#
# Note: This macro can work with the autoconf M4 macros for Java programs.
# This particular macro is not part of the original set of macros.
#
# LICENSE
#
# Copyright (c) 2008 Don Anderson <dda@sleepycat.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.

#serial 10

AU_ALIAS([AC_JNI_INCLUDE_DIR], [AX_JNI_INCLUDE_DIR])
AC_DEFUN([AX_JNI_INCLUDE_DIR],[

JNI_INCLUDE_DIRS=""

if test "x$JAVA_HOME" != x; then
_JTOPDIR="$JAVA_HOME"
else
if test "x$JAVAC" = x; then
JAVAC=javac
fi
AC_PATH_PROG([_ACJNI_JAVAC], [$JAVAC], [no])
if test "x$_ACJNI_JAVAC" = xno; then
AC_MSG_ERROR([cannot find JDK; try setting \$JAVAC or \$JAVA_HOME])
fi
_ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
_JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
fi

case "$host_os" in
darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
_JINC="$_JTOPDIR/Headers";;
*) _JINC="$_JTOPDIR/include";;
esac
_AS_ECHO_LOG([_JTOPDIR=$_JTOPDIR])
_AS_ECHO_LOG([_JINC=$_JINC])

# On Mac OS X 10.6.4, jni.h is a symlink:
# /System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/jni.h
# -> ../../CurrentJDK/Headers/jni.h.
AC_CHECK_FILE([$_JINC/jni.h],
[JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JINC"],
[_JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
AC_CHECK_FILE([$_JTOPDIR/include/jni.h],
[JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include"],
AC_MSG_ERROR([cannot find JDK header files]))
])

# get the likely subdirectories for system specific java includes
case "$host_os" in
bsdi*) _JNI_INC_SUBDIRS="bsdos";;
freebsd*) _JNI_INC_SUBDIRS="freebsd";;
linux*) _JNI_INC_SUBDIRS="linux genunix";;
osf*) _JNI_INC_SUBDIRS="alpha";;
solaris*) _JNI_INC_SUBDIRS="solaris";;
mingw*) _JNI_INC_SUBDIRS="win32";;
cygwin*) _JNI_INC_SUBDIRS="win32";;
*) _JNI_INC_SUBDIRS="genunix";;
esac

# add any subdirectories that are present
for JINCSUBDIR in $_JNI_INC_SUBDIRS
do
if test -d "$_JTOPDIR/include/$JINCSUBDIR"; then
JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include/$JINCSUBDIR"
fi
done
])

# _ACJNI_FOLLOW_SYMLINKS <path>
# Follows symbolic links on <path>,
# finally setting variable _ACJNI_FOLLOWED
# ----------------------------------------
AC_DEFUN([_ACJNI_FOLLOW_SYMLINKS],[
# find the include directory relative to the javac executable
_cur="$1"
while ls -ld "$_cur" 2>/dev/null | grep " -> " >/dev/null; do
AC_MSG_CHECKING([symlink for $_cur])
_slink=`ls -ld "$_cur" | sed 's/.* -> //'`
case "$_slink" in
/*) _cur="$_slink";;
# 'X' avoids triggering unwanted echo options.
*) _cur=`echo "X$_cur" | sed -e 's/^X//' -e 's:[[^/]]*$::'`"$_slink";;
esac
AC_MSG_RESULT([$_cur])
done
_ACJNI_FOLLOWED="$_cur"
])# _ACJNI
49 changes: 49 additions & 0 deletions m4/ax_prog_jar.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_prog_jar.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_PROG_JAR
#
# DESCRIPTION
#
# AX_PROG_JAR tests for an existing jar program. It uses the environment
# variable JAR then tests in sequence various common jar programs.
#
# If you want to force a specific compiler:
#
# - at the configure.in level, set JAR=yourcompiler before calling
# AX_PROG_JAR
#
# - at the configure level, setenv JAR
#
# You can use the JAR variable in your Makefile.in, with @JAR@.
#
# Note: This macro depends on the autoconf M4 macros for Java programs. It
# is VERY IMPORTANT that you download that whole set, some macros depend
# on other. Unfortunately, the autoconf archive does not support the
# concept of set of macros, so I had to break it for submission.
#
# The general documentation of those macros, as well as the sample
# configure.in, is included in the AX_PROG_JAVA macro.
#
# LICENSE
#
# Copyright (c) 2008 Egon Willighagen <e.willighagen@science.ru.nl>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.

#serial 7

AU_ALIAS([AC_PROG_JAR], [AX_PROG_JAR])
AC_DEFUN([AX_PROG_JAR],[
AS_IF([test "x$JAVAPREFIX" = x],
[test "x$JAR" = x && AC_CHECK_PROGS([JAR], [jar])],
[test "x$JAR" = x && AC_CHECK_PROGS([JAR], [jar], [], [$JAVAPREFIX/bin])])
test "x$JAR" = x && AC_MSG_ERROR([no acceptable jar program found in \$PATH])
AC_PROVIDE([$0])dnl
])
Loading