Page MenuHomePhabricator

No OneTemporary

diff --git a/configure.ac b/configure.ac
index 3a8d33a5a..d8521ad3a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,701 +1,704 @@
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 0)
define(_CLIENT_VERSION_MINOR, 9)
define(_CLIENT_VERSION_REVISION, 99)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_IS_RELEASE, false)
define(_COPYRIGHT_YEAR, 2014)
AC_INIT([Bitcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@bitcoin.org],[bitcoin])
AC_CONFIG_AUX_DIR([src/build-aux])
AC_CONFIG_MACRO_DIR([src/m4])
AC_CANONICAL_HOST
AH_TOP([#ifndef BITCOIN_CONFIG_H])
AH_TOP([#define BITCOIN_CONFIG_H])
AH_BOTTOM([#endif //BITCOIN_CONFIG_H])
# This m4 will only be used if a system copy cannot be found. This is helpful
# on systems where autotools are installed but the pkg-config macros are not in
# a default location. It is currently used for building on OSX where autotools
# are preinstalled but pkg-config comes from macports or homebrew. It should
# probably be removed when building on <= 10.6 is no longer supported.
m4_include([pkg.m4])
dnl faketime breaks configure and is only needed for make. Disable it here.
unset FAKETIME
if test "x${CXXFLAGS+set}" = "xset"; then
CXXFLAGS_overridden=yes
else
CXXFLAGS_overridden=no
fi
dnl ==============================================================
dnl Setup for automake
dnl ==============================================================
AM_INIT_AUTOMAKE([no-define subdir-objects foreign])
dnl faketime messes with timestamps and causes configure to be re-run.
dnl --disable-maintainer-mode can be used to bypass this.
AM_MAINTAINER_MODE([enable])
dnl make the compilation flags quiet unless V=1 is used
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# Enable wallet
AC_ARG_ENABLE([wallet],
[AS_HELP_STRING([--enable-wallet],
[enable wallet (default is yes)])],
[enable_wallet=$enableval],
[enable_wallet=yes])
AC_ARG_WITH([miniupnpc],
[AS_HELP_STRING([--with-miniupnpc],
[enable UPNP (default is yes if libminiupnpc is found)])],
[use_upnp=$withval],
[use_upnp=auto])
AC_ARG_ENABLE([upnp-default],
[AS_HELP_STRING([--enable-upnp-default],
[if UPNP is enabled, turn it on at startup (default is no)])],
[use_upnp_default=$enableval],
[use_upnp_default=no])
AC_ARG_ENABLE(tests,
AS_HELP_STRING([--enable-tests],[compile tests (default is yes)]),
[use_tests=$enableval],
[use_tests=yes])
AC_ARG_WITH([comparison-tool],
AS_HELP_STRING([--with-comparison-tool],[path to java comparison tool (requires --enable-tests)]),
[use_comparison_tool=$withval],
[use_comparison_tool=no])
AC_ARG_ENABLE([comparison-tool-reorg-tests],
AS_HELP_STRING([--enable-comparison-tool-reorg-tests],[enable expensive reorg tests in the comparison tool (default no)]),
[use_comparison_tool_reorg_tests=$enableval],
[use_comparison_tool_reorg_tests=no])
AC_ARG_WITH([qrencode],
[AS_HELP_STRING([--with-qrencode],
[enable QR code support (default is yes if qt is enabled and libqrencode is found)])],
[use_qr=$withval],
[use_qr=auto])
AC_ARG_ENABLE([hardening],
[AS_HELP_STRING([--enable-hardening],
[attempt to harden the resulting executables (default is yes)])],
[use_hardening=$enableval],
[use_hardening=yes])
AC_ARG_ENABLE([ccache],
[AS_HELP_STRING([--enable-ccache],
[use ccache for building (default is yes if ccache is found)])],
[use_ccache=$enableval],
[use_ccache=auto])
AC_ARG_ENABLE([lcov],
[AS_HELP_STRING([--enable-lcov],
[enable lcov testing (default is no)])],
[use_lcov=yes],
[use_lcov=no])
AC_ARG_ENABLE([glibc-back-compat],
[AS_HELP_STRING([--enable-glibc-back-compat],
[enable backwards compatibility with glibc and libstdc++])],
[use_glibc_compat=$enableval],
[use_glibc_compat=no])
AC_ARG_WITH([protoc-bindir],[AS_HELP_STRING([--with-protoc-bindir=BIN_DIR],[specify protoc bin path])], [protoc_bin_path=$withval], [])
AC_CONFIG_SRCDIR([src])
AC_CONFIG_HEADERS([src/bitcoin-config.h])
dnl Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXXCPP
AC_PROG_INSTALL
AC_PROG_OBJC
AC_PROG_LN_S
m4_ifdef([AC_PROG_OBJCXX],[AC_PROG_OBJCXX])
AC_PROG_MKDIR_P
AC_PROG_SED
AC_PATH_TOOL(AR, ar)
AC_PATH_TOOL(RANLIB, ranlib)
AC_PATH_TOOL(STRIP, strip)
AC_PATH_TOOL(GCOV, gcov)
AC_PATH_PROG(LCOV, lcov)
AC_PATH_PROG(JAVA, java)
AC_PATH_PROG(GENHTML, genhtml)
AC_PATH_PROG([GIT], [git])
AC_PATH_PROG(CCACHE,ccache)
AC_PATH_PROG(XGETTEXT,xgettext)
AC_PATH_PROG(HEXDUMP,hexdump)
PKG_PROG_PKG_CONFIG
# Enable debug
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug],
[use debug compiler flags and macros (default is no)])],
[enable_debug=$enableval],
[enable_debug=no])
if test "x$enable_debug" = xyes; then
if test "x$GCC" = xyes; then
CFLAGS="-g3 -O0 -DDEBUG"
fi
if test "x$GXX" = xyes; then
CXXFLAGS="-g3 -O0 -DDEBUG"
fi
fi
## TODO: Remove these hard-coded paths and flags. They are here for the sake of
## compatibility with the legacy buildsystem.
##
if test "x$CXXFLAGS_overridden" = "xno"; then
CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter"
fi
CPPFLAGS="$CPPFLAGS -DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS"
AC_LANG_PUSH([C++])
use_pkgconfig=yes
case $host in
*mingw*)
#pkgconfig does more harm than good with MinGW
use_pkgconfig=no
TARGET_OS=windows
AC_CHECK_LIB([mingwthrd], [main],, AC_MSG_ERROR(lib missing))
AC_CHECK_LIB([kernel32], [main],, AC_MSG_ERROR(lib missing))
AC_CHECK_LIB([user32], [main],, AC_MSG_ERROR(lib missing))
AC_CHECK_LIB([gdi32], [main],, AC_MSG_ERROR(lib missing))
AC_CHECK_LIB([comdlg32], [main],, AC_MSG_ERROR(lib missing))
AC_CHECK_LIB([winspool], [main],, AC_MSG_ERROR(lib missing))
AC_CHECK_LIB([winmm], [main],, AC_MSG_ERROR(lib missing))
AC_CHECK_LIB([shell32], [main],, AC_MSG_ERROR(lib missing))
AC_CHECK_LIB([comctl32], [main],, AC_MSG_ERROR(lib missing))
AC_CHECK_LIB([ole32], [main],, AC_MSG_ERROR(lib missing))
AC_CHECK_LIB([oleaut32], [main],, AC_MSG_ERROR(lib missing))
AC_CHECK_LIB([uuid], [main],, AC_MSG_ERROR(lib missing))
AC_CHECK_LIB([rpcrt4], [main],, AC_MSG_ERROR(lib missing))
AC_CHECK_LIB([advapi32], [main],, AC_MSG_ERROR(lib missing))
AC_CHECK_LIB([ws2_32], [main],, AC_MSG_ERROR(lib missing))
AC_CHECK_LIB([mswsock], [main],, AC_MSG_ERROR(lib missing))
AC_CHECK_LIB([shlwapi], [main],, AC_MSG_ERROR(lib missing))
AC_CHECK_LIB([iphlpapi], [main],, AC_MSG_ERROR(lib missing))
AC_CHECK_LIB([crypt32], [main],, AC_MSG_ERROR(lib missing))
AX_CHECK_LINK_FLAG([[-static]],[LDFLAGS="$LDFLAGS -static"])
AX_CHECK_LINK_FLAG([[-static-libgcc]],[LDFLAGS="$LDFLAGS -static-libgcc"])
AX_CHECK_LINK_FLAG([[-static-libstdc++]],[LDFLAGS="$LDFLAGS -static-libstdc++"])
AC_PATH_PROG([MAKENSIS], [makensis], none)
if test x$MAKENSIS = xnone; then
AC_MSG_WARN("makensis not found. Cannot create installer.")
fi
AC_PATH_TOOL(WINDRES, windres, none)
if test x$WINDRES = xnone; then
AC_MSG_ERROR("windres not found")
fi
CPPFLAGS="$CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB"
LEVELDB_TARGET_FLAGS="TARGET_OS=OS_WINDOWS_CROSSCOMPILE"
if test "x$CXXFLAGS_overridden" = "xno"; then
CXXFLAGS="$CXXFLAGS -w"
fi
case $host in
i?86-*) WINDOWS_BITS=32 ;;
x86_64-*) WINDOWS_BITS=64 ;;
*) AC_MSG_ERROR("Could not determine win32/win64 for installer") ;;
esac
AC_SUBST(WINDOWS_BITS)
;;
*darwin*)
TARGET_OS=darwin
LEVELDB_TARGET_FLAGS="TARGET_OS=Darwin"
if test x$cross_compiling != xyes; then
BUILD_OS=darwin
AC_CHECK_PROG([PORT],port, port)
if test x$PORT = xport; then
dnl add default macports paths
CPPFLAGS="$CPPFLAGS -isystem /opt/local/include -I/opt/local/include/db48"
LIBS="$LIBS -L/opt/local/lib -L/opt/local/lib/db48"
fi
AC_CHECK_PROG([BREW],brew, brew)
if test x$BREW = xbrew; then
dnl add default homebrew paths
openssl_prefix=`$BREW --prefix openssl`
bdb_prefix=`$BREW --prefix berkeley-db4`
export PKG_CONFIG_PATH="$openssl_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
CPPFLAGS="$CPPFLAGS -I$bdb_prefix/include"
LIBS="$LIBS -L$bdb_prefix/lib"
fi
else
case $build_os in
*darwin*)
BUILD_OS=darwin
;;
*)
AC_PATH_TOOL([INSTALLNAMETOOL], [install_name_tool], install_name_tool)
AC_PATH_TOOL([OTOOL], [otool], otool)
AC_PATH_PROGS([GENISOIMAGE], [genisoimage mkisofs],genisoimage)
;;
esac
fi
CPPFLAGS="$CPPFLAGS -DMAC_OSX"
;;
*)
;;
esac
if test x$use_comparison_tool != xno; then
AC_SUBST(JAVA_COMPARISON_TOOL, $use_comparison_tool)
fi
if test x$use_comparison_tool_reorg_tests != xno; then
if test x$use_comparison_tool == x; then
AC_MSG_ERROR("comparison tool reorg tests but comparison tool was not specified")
fi
AC_SUBST(COMPARISON_TOOL_REORG_TESTS, 1)
else
AC_SUBST(COMPARISON_TOOL_REORG_TESTS, 0)
fi
if test x$use_lcov == xyes; then
if test x$LCOV == x; then
AC_MSG_ERROR("lcov testing requested but lcov not found")
fi
if test x$GCOV == x; then
AC_MSG_ERROR("lcov testing requested but gcov not found")
fi
if test x$JAVA == x; then
AC_MSG_ERROR("lcov testing requested but java not found")
fi
if test x$GENHTML == x; then
AC_MSG_ERROR("lcov testing requested but genhtml not found")
fi
if test x$use_comparison_tool == x; then
AC_MSG_ERROR("lcov testing requested but comparison tool was not specified")
fi
LCOV="$LCOV --gcov-tool=$GCOV"
AX_CHECK_COMPILE_FLAG([--coverage],[CXXFLAGS="$CXXFLAGS --coverage"],
[AC_MSG_ERROR("lcov testing requested but --coverage flag does not work")])
fi
dnl Require little endian
AC_C_BIGENDIAN([AC_MSG_ERROR("Big Endian not supported")])
dnl Check for pthread compile/link requirements
AX_PTHREAD
INCLUDES="$INCLUDES $PTHREAD_CFLAGS"
# The following macro will add the necessary defines to bitcoin-config.h, but
# they also need to be passed down to any subprojects. Pull the results out of
# the cache and add them to CPPFLAGS.
AC_SYS_LARGEFILE
# detect POSIX or GNU variant of strerror_r
AC_FUNC_STRERROR_R
if test x$ac_cv_sys_file_offset_bits != x &&
test x$ac_cv_sys_file_offset_bits != xno &&
test x$ac_cv_sys_file_offset_bits != xunknown; then
CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
fi
if test x$ac_cv_sys_large_files != x &&
test x$ac_cv_sys_large_files != xno &&
test x$ac_cv_sys_large_files != xunknown; then
CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=$ac_cv_sys_large_files"
fi
AX_CHECK_LINK_FLAG([[-Wl,--large-address-aware]], [LDFLAGS="$LDFLAGS -Wl,--large-address-aware"])
if test x$use_glibc_compat != xno; then
#__fdelt_chk's params and return type have changed from long unsigned int to long int.
# See which one is present here.
AC_MSG_CHECKING(__fdelt_chk type)
AC_TRY_COMPILE([#define __USE_FORTIFY_LEVEL 2
#include <sys/select.h>
extern "C" long unsigned int __fdelt_warn(long unsigned int);],[],
[ fdelt_type="long unsigned int"],
[ fdelt_type="long int"])
AC_MSG_RESULT($fdelt_type)
AC_DEFINE_UNQUOTED(FDELT_TYPE, $fdelt_type,[parameter and return value type for __fdelt_chk])
fi
if test x$use_hardening != xno; then
AX_CHECK_COMPILE_FLAG([-Wstack-protector],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -Wstack-protector"])
AX_CHECK_COMPILE_FLAG([-fstack-protector-all],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-protector-all"])
AX_CHECK_COMPILE_FLAG([-fPIE],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fPIE"])
AX_CHECK_PREPROC_FLAG([-D_FORTIFY_SOURCE=2],[
AX_CHECK_PREPROC_FLAG([-U_FORTIFY_SOURCE],[
HARDENED_CPPFLAGS="$HARDENED_CPPFLAGS -U_FORTIFY_SOURCE"
])
HARDENED_CPPFLAGS="$HARDENED_CPPFLAGS -D_FORTIFY_SOURCE=2"
])
AX_CHECK_LINK_FLAG([[-Wl,--dynamicbase]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--dynamicbase"])
AX_CHECK_LINK_FLAG([[-Wl,--nxcompat]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--nxcompat"])
AX_CHECK_LINK_FLAG([[-Wl,-z,relro]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,relro"])
AX_CHECK_LINK_FLAG([[-Wl,-z,now]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"])
if test x$TARGET_OS != xwindows; then
# -pie will link successfully with MinGW, but it's unsupported and leads to undeterministic binaries
AX_CHECK_LINK_FLAG([[-pie]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"])
fi
CXXFLAGS="$CXXFLAGS $HARDENED_CXXFLAGS"
CPPFLAGS="$CPPFLAGS $HARDENED_CPPFLAGS"
LDFLAGS="$LDFLAGS $HARDENED_LDFLAGS"
OBJCXXFLAGS="$CXXFLAGS"
fi
dnl this flag screws up non-darwin gcc even when the check fails. special-case it.
if test x$TARGET_OS = xdarwin; then
AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"])
fi
AC_CHECK_HEADERS([stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h])
dnl Check for MSG_NOSIGNAL
AC_MSG_CHECKING(for MSG_NOSIGNAL)
AC_TRY_COMPILE([#include <sys/socket.h>],
[ int f = MSG_NOSIGNAL; ],
[ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_MSG_NOSIGNAL, 1,[Define this symbol if you have MSG_NOSIGNAL]) ],
[ AC_MSG_RESULT(no)]
)
LEVELDB_CPPFLAGS=
LIBLEVELDB=
LIBMEMENV=
AM_CONDITIONAL([EMBEDDED_LEVELDB],[true])
AC_SUBST(LEVELDB_CPPFLAGS)
AC_SUBST(LIBLEVELDB)
AC_SUBST(LIBMEMENV)
if test x$enable_wallet != xno; then
dnl Check for libdb_cxx only if wallet enabled
BITCOIN_FIND_BDB48
fi
dnl Check for libminiupnpc (optional)
if test x$use_upnp != xno; then
AC_CHECK_HEADERS(
[miniupnpc/miniwget.h miniupnpc/miniupnpc.h miniupnpc/upnpcommands.h miniupnpc/upnperrors.h],
[AC_CHECK_LIB([miniupnpc], [main],, [have_miniupnpc=no])],
[have_miniupnpc=no]
)
fi
dnl Check for boost libs
AX_BOOST_BASE
AX_BOOST_SYSTEM
AX_BOOST_FILESYSTEM
AX_BOOST_PROGRAM_OPTIONS
AX_BOOST_THREAD
AX_BOOST_CHRONO
if test x$use_tests = xyes; then
if test x$HEXDUMP = x; then
AC_MSG_ERROR(hexdump is required for tests)
fi
AX_BOOST_UNIT_TEST_FRAMEWORK
dnl Determine if -DBOOST_TEST_DYN_LINK is needed
AC_MSG_CHECKING([for dynamic linked boost test])
TEMP_LIBS="$LIBS"
LIBS="$LIBS $BOOST_UNIT_TEST_FRAMEWORK_LIB"
TEMP_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
AC_LINK_IFELSE([AC_LANG_SOURCE([
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>
])],
[AC_MSG_RESULT(yes)]
[TESTDEFS="$TESTDEFS -DBOOST_TEST_DYN_LINK"],
[AC_MSG_RESULT(no)])
LIBS="$TEMP_LIBS"
CPPFLAGS="$TEMP_CPPFLAGS"
fi
BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_PROGRAM_OPTIONS_LIB $BOOST_THREAD_LIB"
BOOST_INCLUDES="$BOOST_CPPFLAGS"
dnl Boost >= 1.50 uses sleep_for rather than the now-deprecated sleep, however
dnl it was broken from 1.50 to 1.52 when backed by nanosleep. Use sleep_for if
dnl a working version is available, else fall back to sleep. sleep was removed
dnl after 1.56.
dnl If neither is available, abort.
dnl If sleep_for is used, boost_chrono becomes a requirement.
if test x$ax_cv_boost_chrono = xyes; then
dnl Allow passing extra needed dependency libraries for boost-chrono from static gitian build
BOOST_CHRONO_LIB="$BOOST_CHRONO_LIB $BOOST_CHRONO_EXTRALIBS"
TEMP_LIBS="$LIBS"
LIBS="$LIBS $BOOST_LIBS $BOOST_CHRONO_LIB"
TEMP_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
AC_TRY_LINK([
#include <boost/thread/thread.hpp>
#include <boost/version.hpp>
],[
#if BOOST_VERSION >= 105000 && (!defined(BOOST_HAS_NANOSLEEP) || BOOST_VERSION >= 105200)
boost::this_thread::sleep_for(boost::chrono::milliseconds(0));
#else
choke me
#endif
],
[boost_sleep=yes; BOOST_LIBS="$BOOST_LIBS $BOOST_CHRONO_LIB";
AC_DEFINE(HAVE_WORKING_BOOST_SLEEP_FOR, 1, [Define this symbol if boost sleep_for works])],
[boost_sleep=no])
LIBS="$TEMP_LIBS"
CPPFLAGS="$TEMP_CPPFLAGS"
fi
if test x$boost_sleep != xyes; then
TEMP_LIBS="$LIBS"
LIBS="$LIBS $BOOST_LIBS"
TEMP_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
AC_TRY_LINK([
#include <boost/version.hpp>
#include <boost/thread.hpp>
#include <boost/date_time/posix_time/posix_time_types.hpp>
],[
#if BOOST_VERSION <= 105600
boost::this_thread::sleep(boost::posix_time::milliseconds(0));
#else
choke me
#endif
],
[boost_sleep=yes; AC_DEFINE(HAVE_WORKING_BOOST_SLEEP, 1, [Define this symbol if boost sleep works])],
[boost_sleep=no])
LIBS="$TEMP_LIBS"
CPPFLAGS="$TEMP_CPPFLAGS"
fi
if test x$boost_sleep != xyes; then
AC_MSG_ERROR(No working boost sleep implementation found. If on ubuntu 13.10 with libboost1.54-all-dev remove libboost.1.54-all-dev and use libboost1.53-all-dev)
fi
AC_ARG_WITH([cli],
[AS_HELP_STRING([--with-cli],
[with CLI (default is yes)])],
[build_bitcoin_cli=$withval],
[build_bitcoin_cli=yes])
AC_ARG_WITH([daemon],
[AS_HELP_STRING([--with-daemon],
[with daemon (default is yes)])],
[build_bitcoind=$withval],
[build_bitcoind=yes])
BITCOIN_QT_INIT
if test x$use_pkgconfig = xyes; then
if test x$PKG_CONFIG == x; then
AC_MSG_ERROR(pkg-config not found.)
fi
: #NOP
m4_ifdef(
[PKG_CHECK_MODULES],
[
PKG_CHECK_MODULES([SSL], [libssl], [INCLUDES="$INCLUDES $SSL_CFLAGS"; LIBS="$LIBS $SSL_LIBS"], [AC_MSG_ERROR(openssl not found.)])
PKG_CHECK_MODULES([CRYPTO], [libcrypto], [INCLUDES="$INCLUDES $CRYPTO_CFLAGS"; LIBS="$LIBS $CRYPTO_LIBS"], [AC_MSG_ERROR(libcrypto not found.)])
BITCOIN_QT_CHECK([PKG_CHECK_MODULES([PROTOBUF], [protobuf], [have_protobuf=yes], [BITCOIN_QT_FAIL(libprotobuf not found)])])
if test x$use_qr != xno; then
BITCOIN_QT_CHECK([PKG_CHECK_MODULES([QR], [libqrencode], [have_qrencode=yes], [have_qrencode=no])])
fi
]
)
else
AC_CHECK_HEADER([openssl/crypto.h],,AC_MSG_ERROR(libcrypto headers missing))
AC_CHECK_LIB([crypto], [main],, AC_MSG_ERROR(libcrypto missing))
AC_CHECK_HEADER([openssl/ssl.h],, AC_MSG_ERROR(libssl headers missing),)
AC_CHECK_LIB([ssl], [main],, AC_MSG_ERROR(libssl missing))
BITCOIN_QT_CHECK(AC_CHECK_LIB([protobuf] ,[main],,BITCOIN_QT_FAIL(libprotobuf not found)))
if test x$use_qr != xno; then
BITCOIN_QT_CHECK([AC_CHECK_LIB([qrencode], [main],, [have_qrencode=no])])
BITCOIN_QT_CHECK([AC_CHECK_HEADER([qrencode.h],, have_qrencode=no)])
fi
fi
BITCOIN_QT_PATH_PROGS([PROTOC], [protoc],$protoc_bin_path)
AC_MSG_CHECKING([whether to build bitcoind])
AM_CONDITIONAL([BUILD_BITCOIND], [test x$build_bitcoind = xyes])
AC_MSG_RESULT($build_bitcoind)
AC_MSG_CHECKING([whether to build bitcoin-cli])
AM_CONDITIONAL([BUILD_BITCOIN_CLI], [test x$build_bitcoin_cli = xyes])
AC_MSG_RESULT($build_bitcoin_cli)
dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus
BITCOIN_QT_CONFIGURE([$use_pkgconfig], [qt4])
AC_LANG_POP
if test "x$use_ccache" != "xno"; then
AC_MSG_CHECKING(if ccache should be used)
if test x$CCACHE = x; then
if test "x$use_ccache" = "xyes"; then
AC_MSG_ERROR([ccache not found.]);
else
use_ccache=no
fi
else
use_ccache=yes
CC="$ac_cv_path_CCACHE $CC"
CXX="$ac_cv_path_CCACHE $CXX"
fi
AC_MSG_RESULT($use_ccache)
fi
dnl enable wallet
AC_MSG_CHECKING([if wallet should be enabled])
if test x$enable_wallet != xno; then
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED([ENABLE_WALLET],[1],[Define to 1 to enable wallet functions])
else
AC_MSG_RESULT(no)
fi
dnl enable upnp support
AC_MSG_CHECKING([whether to build with support for UPnP])
if test x$have_miniupnpc = xno; then
if test x$use_upnp = xyes; then
AC_MSG_ERROR("UPnP requested but cannot be built. use --without-miniupnpc")
fi
AC_MSG_RESULT(no)
else
if test x$use_upnp != xno; then
AC_MSG_RESULT(yes)
AC_MSG_CHECKING([whether to build with UPnP enabled by default])
use_upnp=yes
upnp_setting=0
if test x$use_upnp_default != xno; then
use_upnp_default=yes
upnp_setting=1
fi
AC_MSG_RESULT($use_upnp_default)
AC_DEFINE_UNQUOTED([USE_UPNP],[$upnp_setting],[UPnP support not compiled if undefined, otherwise value (0 or 1) determines default state])
if test x$TARGET_OS = xwindows; then
CPPFLAGS="$CPPFLAGS -DSTATICLIB"
fi
else
AC_MSG_RESULT(no)
fi
fi
dnl these are only used when qt is enabled
if test x$bitcoin_enable_qt != xno; then
BUILD_QT=qt
dnl enable dbus support
AC_MSG_CHECKING([whether to build GUI with support for D-Bus])
if test x$bitcoin_enable_qt_dbus != xno; then
AC_DEFINE([USE_DBUS],[1],[Define if dbus support should be compiled in])
fi
AC_MSG_RESULT($bitcoin_enable_qt_dbus)
dnl enable qr support
AC_MSG_CHECKING([whether to build GUI with support for QR codes])
if test x$have_qrencode = xno; then
if test x$use_qr == xyes; then
AC_MSG_ERROR("QR support requested but cannot be built. use --without-qrencode")
fi
AC_MSG_RESULT(no)
else
if test x$use_qr != xno; then
AC_MSG_RESULT(yes)
AC_DEFINE([USE_QRCODE],[1],[Define if QR support should be compiled in])
use_qr=yes
else
AC_MSG_RESULT(no)
fi
fi
if test x$XGETTEXT == x; then
AC_MSG_WARN("xgettext is required to update qt translations")
fi
AC_MSG_CHECKING([whether to build test_bitcoin-qt])
if test x$use_tests$bitcoin_enable_qt_test = xyesyes; then
AC_MSG_RESULT([yes])
BUILD_TEST_QT="test"
else
AC_MSG_RESULT([no])
fi
fi
AC_MSG_CHECKING([whether to build test_bitcoin])
if test x$use_tests = xyes; then
AC_MSG_RESULT([yes])
BUILD_TEST="test"
else
AC_MSG_RESULT([no])
fi
if test "x$use_tests$build_bitcoind$use_qt" = "xnonono"; then
AC_MSG_ERROR([No targets! Please specify at least one of: --enable-cli --enable-daemon --enable-gui or --enable-tests])
fi
AM_CONDITIONAL([TARGET_DARWIN], [test x$TARGET_OS = xdarwin])
AM_CONDITIONAL([BUILD_DARWIN], [test x$BUILD_OS = xdarwin])
AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows])
AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet == xyes])
+AM_CONDITIONAL([ENABLE_TESTS],[test x$use_tests == xyes])
+AM_CONDITIONAL([ENABLE_QT],[test x$bitcoin_enable_qt == xyes])
+AM_CONDITIONAL([ENABLE_QT_TESTS],[test x$use_tests$bitcoin_enable_qt_test = xyesyes])
AM_CONDITIONAL([USE_QRCODE], [test x$use_qr = xyes])
AM_CONDITIONAL([USE_LCOV],[test x$use_lcov == xyes])
AM_CONDITIONAL([USE_COMPARISON_TOOL],[test x$use_comparison_tool != xno])
AM_CONDITIONAL([USE_COMPARISON_TOOL_REORG_TESTS],[test x$use_comparison_tool_reorg_test != xno])
AM_CONDITIONAL([GLIBC_BACK_COMPAT],[test x$use_glibc_compat = xyes])
AC_DEFINE(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR, [Major version])
AC_DEFINE(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR, [Minor version])
AC_DEFINE(CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION, [Build revision])
AC_DEFINE(CLIENT_VERSION_BUILD, _CLIENT_VERSION_BUILD, [Version Build])
AC_DEFINE(CLIENT_VERSION_IS_RELEASE, _CLIENT_VERSION_IS_RELEASE, [Version is release])
AC_DEFINE(COPYRIGHT_YEAR, _COPYRIGHT_YEAR, [Version is release])
AC_SUBST(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR)
AC_SUBST(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR)
AC_SUBST(CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION)
AC_SUBST(CLIENT_VERSION_BUILD, _CLIENT_VERSION_BUILD)
AC_SUBST(CLIENT_VERSION_IS_RELEASE, _CLIENT_VERSION_IS_RELEASE)
AC_SUBST(COPYRIGHT_YEAR, _COPYRIGHT_YEAR)
AC_SUBST(USE_UPNP)
AC_SUBST(USE_QRCODE)
AC_SUBST(INCLUDES)
AC_SUBST(BOOST_LIBS)
AC_SUBST(TESTDEFS)
AC_SUBST(LEVELDB_TARGET_FLAGS)
AC_SUBST(BUILD_TEST)
AC_SUBST(BUILD_QT)
AC_SUBST(BUILD_TEST_QT)
-AC_CONFIG_FILES([Makefile src/Makefile src/test/Makefile src/qt/Makefile src/qt/test/Makefile share/setup.nsi share/qt/Info.plist])
+AC_CONFIG_FILES([Makefile src/Makefile share/setup.nsi share/qt/Info.plist])
AC_CONFIG_FILES([qa/pull-tester/run-bitcoind-for-test.sh],[chmod +x qa/pull-tester/run-bitcoind-for-test.sh])
AC_CONFIG_FILES([qa/pull-tester/build-tests.sh],[chmod +x qa/pull-tester/build-tests.sh])
AC_OUTPUT
diff --git a/src/Makefile.am b/src/Makefile.am
index a49ad5871..3016be47b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,203 +1,242 @@
-include Makefile.include
+AM_CPPFLAGS = $(INCLUDES)
+AM_LDFLAGS = $(PTHREAD_CFLAGS)
-AM_CPPFLAGS += -I$(builddir)
+
+if EMBEDDED_LEVELDB
+LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/include
+LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/helpers/memenv
+LIBLEVELDB += $(builddir)/leveldb/libleveldb.a
+LIBMEMENV += $(builddir)/leveldb/libmemenv.a
+
+# NOTE: This dependency is not strictly necessary, but without it make may try to build both in parallel, which breaks the LevelDB build system in a race
+$(LIBLEVELDB): $(LIBMEMENV)
+
+$(LIBLEVELDB) $(LIBMEMENV):
+ @echo "Building LevelDB ..." && $(MAKE) -C $(@D) $(@F) CXX="$(CXX)" \
+ CC="$(CC)" PLATFORM=$(TARGET_OS) AR="$(AR)" $(LEVELDB_TARGET_FLAGS) \
+ OPT="$(CXXFLAGS) $(CPPFLAGS)"
+endif
+
+BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS)
noinst_LIBRARIES = \
libbitcoin_server.a \
libbitcoin_common.a \
libbitcoin_cli.a
if ENABLE_WALLET
+BITCOIN_INCLUDES += $(BDB_CPPFLAGS)
noinst_LIBRARIES += libbitcoin_wallet.a
endif
bin_PROGRAMS =
+TESTS =
if BUILD_BITCOIND
bin_PROGRAMS += bitcoind
endif
if BUILD_BITCOIN_CLI
bin_PROGRAMS += bitcoin-cli
endif
-SUBDIRS = . $(BUILD_QT) $(BUILD_TEST)
-DIST_SUBDIRS = . qt test
.PHONY: FORCE
# bitcoin core #
BITCOIN_CORE_H = \
addrman.h \
alert.h \
allocators.h \
base58.h \
bloom.h \
chainparams.h \
checkpoints.h \
checkqueue.h \
clientversion.h \
coincontrol.h \
coins.h \
compat.h \
core.h \
crypter.h \
db.h \
hash.h \
init.h \
key.h \
keystore.h \
leveldbwrapper.h \
limitedmap.h \
main.h \
miner.h \
mruset.h \
netbase.h \
net.h \
noui.h \
protocol.h \
rpcclient.h \
rpcprotocol.h \
rpcserver.h \
script.h \
serialize.h \
sync.h \
threadsafety.h \
tinyformat.h \
txdb.h \
txmempool.h \
ui_interface.h \
uint256.h \
util.h \
version.h \
walletdb.h \
wallet.h
JSON_H = \
json/json_spirit.h \
json/json_spirit_error_position.h \
json/json_spirit_reader.h \
json/json_spirit_reader_template.h \
json/json_spirit_stream_reader.h \
json/json_spirit_utils.h \
json/json_spirit_value.h \
json/json_spirit_writer.h \
json/json_spirit_writer_template.h
obj/build.h: FORCE
- @$(MKDIR_P) $(abs_top_builddir)/src/obj
+ @$(MKDIR_P) $(builddir)/obj
@$(top_srcdir)/share/genbuild.sh $(abs_top_builddir)/src/obj/build.h \
$(abs_top_srcdir)
-version.o: obj/build.h
+libbitcoin_common_a-version.$(OBJEXT): obj/build.h
+libbitcoin_server_a_CPPFLAGS = $(BITCOIN_INCLUDES)
libbitcoin_server_a_SOURCES = \
addrman.cpp \
alert.cpp \
bloom.cpp \
checkpoints.cpp \
coins.cpp \
init.cpp \
keystore.cpp \
leveldbwrapper.cpp \
main.cpp \
miner.cpp \
net.cpp \
noui.cpp \
rpcblockchain.cpp \
rpcmining.cpp \
rpcmisc.cpp \
rpcnet.cpp \
rpcrawtransaction.cpp \
rpcserver.cpp \
txdb.cpp \
txmempool.cpp \
$(JSON_H) \
$(BITCOIN_CORE_H)
+libbitcoin_wallet_a_CPPFLAGS = $(BITCOIN_INCLUDES)
libbitcoin_wallet_a_SOURCES = \
db.cpp \
crypter.cpp \
rpcdump.cpp \
rpcwallet.cpp \
wallet.cpp \
walletdb.cpp \
$(BITCOIN_CORE_H)
+libbitcoin_common_a_CPPFLAGS = $(BITCOIN_INCLUDES)
libbitcoin_common_a_SOURCES = \
base58.cpp \
allocators.cpp \
chainparams.cpp \
core.cpp \
hash.cpp \
key.cpp \
netbase.cpp \
protocol.cpp \
rpcprotocol.cpp \
script.cpp \
sync.cpp \
util.cpp \
version.cpp \
$(BITCOIN_CORE_H)
if GLIBC_BACK_COMPAT
libbitcoin_common_a_SOURCES += compat/glibc_compat.cpp
libbitcoin_common_a_SOURCES += compat/glibcxx_compat.cpp
endif
libbitcoin_cli_a_SOURCES = \
rpcclient.cpp \
$(BITCOIN_CORE_H)
-nodist_libbitcoin_common_a_SOURCES = $(top_srcdir)/src/obj/build.h
+nodist_libbitcoin_common_a_SOURCES = $(srcdir)/obj/build.h
#
# bitcoind binary #
bitcoind_LDADD = \
libbitcoin_server.a \
libbitcoin_cli.a \
libbitcoin_common.a \
$(LIBLEVELDB) \
$(LIBMEMENV)
if ENABLE_WALLET
bitcoind_LDADD += libbitcoin_wallet.a
endif
bitcoind_SOURCES = bitcoind.cpp
#
if TARGET_WINDOWS
bitcoind_SOURCES += bitcoind-res.rc
endif
-AM_CPPFLAGS += $(BDB_CPPFLAGS)
bitcoind_LDADD += $(BOOST_LIBS) $(BDB_LIBS)
+bitcoind_CPPFLAGS = $(BITCOIN_INCLUDES)
# bitcoin-cli binary #
bitcoin_cli_LDADD = \
libbitcoin_cli.a \
libbitcoin_common.a \
$(BOOST_LIBS)
bitcoin_cli_SOURCES = bitcoin-cli.cpp
+bitcoin_cli_CPPFLAGS = $(BITCOIN_INCLUDES)
#
if TARGET_WINDOWS
bitcoin_cli_SOURCES += bitcoin-cli-res.rc
endif
-# NOTE: This dependency is not strictly necessary, but without it make may try to build both in parallel, which breaks the LevelDB build system in a race
-leveldb/libleveldb.a: leveldb/libmemenv.a
-
-leveldb/%.a:
- @echo "Building LevelDB ..." && $(MAKE) -C $(@D) $(@F) CXX="$(CXX)" \
- CC="$(CC)" PLATFORM=$(TARGET_OS) AR="$(AR)" $(LEVELDB_TARGET_FLAGS) \
- OPT="$(CXXFLAGS) $(CPPFLAGS)"
-
-qt/bitcoinstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_common_a_SOURCES) $(libbitcoin_cli_a_SOURCES)
- @test -n $(XGETTEXT) || echo "xgettext is required for updating translations"
- @cd $(top_srcdir); XGETTEXT=$(XGETTEXT) share/qt/extract_strings_qt.py
-
CLEANFILES = leveldb/libleveldb.a leveldb/libmemenv.a *.gcda *.gcno
DISTCLEANFILES = obj/build.h
-EXTRA_DIST = leveldb Makefile.include
+EXTRA_DIST = leveldb
clean-local:
-$(MAKE) -C leveldb clean
rm -f leveldb/*/*.gcno leveldb/helpers/memenv/*.gcno
+
+.rc.o:
+ @test -f $(WINDRES)
+ $(AM_V_GEN) $(WINDRES) -i $< -o $@
+
+.mm.o:
+ $(AM_V_CXX) $(OBJCXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CXXFLAGS) $(QT_INCLUDES) $(CXXFLAGS) -c -o $@ $<
+
+%.pb.cc %.pb.h: %.proto
+ @test -f $(PROTOC)
+ $(AM_V_GEN) $(PROTOC) --cpp_out=$(@D) --proto_path=$(abspath $(<D) $<)
+
+LIBBITCOIN_SERVER=libbitcoin_server.a
+LIBBITCOIN_WALLET=libbitcoin_wallet.a
+LIBBITCOIN_COMMON=libbitcoin_common.a
+LIBBITCOIN_CLI=libbitcoin_cli.a
+LIBBITCOINQT=qt/libbitcoinqt.a
+
+if ENABLE_TESTS
+include Makefile.test.include
+endif
+
+if ENABLE_QT
+include Makefile.qt.include
+endif
+
+if ENABLE_QT_TESTS
+include Makefile.qttest.include
+endif
diff --git a/src/Makefile.include b/src/Makefile.include
deleted file mode 100644
index 2fc6cd777..000000000
--- a/src/Makefile.include
+++ /dev/null
@@ -1,79 +0,0 @@
-if EMBEDDED_LEVELDB
-LEVELDB_CPPFLAGS += -I$(top_srcdir)/src/leveldb/include
-LEVELDB_CPPFLAGS += -I$(top_srcdir)/src/leveldb/helpers/memenv
-LIBLEVELDB += $(top_builddir)/src/leveldb/libleveldb.a
-LIBMEMENV += $(top_builddir)/src/leveldb/libmemenv.a
-endif
-
-AM_CPPFLAGS = $(INCLUDES) \
- -I$(top_builddir)/src/obj \
- $(BDB_CPPFLAGS) \
- $(BOOST_CPPFLAGS) $(BOOST_INCLUDES)
-AM_CPPFLAGS += $(LEVELDB_CPPFLAGS)
-AM_LDFLAGS = $(PTHREAD_CFLAGS)
-
-LIBBITCOIN_SERVER=$(top_builddir)/src/libbitcoin_server.a
-LIBBITCOIN_WALLET=$(top_builddir)/src/libbitcoin_wallet.a
-LIBBITCOIN_COMMON=$(top_builddir)/src/libbitcoin_common.a
-LIBBITCOIN_CLI=$(top_builddir)/src/libbitcoin_cli.a
-LIBBITCOINQT=$(top_builddir)/src/qt/libbitcoinqt.a
-
-$(LIBBITCOIN):
- $(MAKE) -C $(top_builddir)/src $(@F)
-
-if EMBEDDED_LEVELDB
-$(LIBLEVELDB) $(LIBMEMENV):
- $(MAKE) -C $(top_builddir)/src leveldb/$(@F)
-endif
-
-$(LIBBITCOINQT):
- $(MAKE) -C $(top_builddir)/src/qt $(@F)
-
-.mm.o:
- $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CXXFLAGS) $(QT_INCLUDES) $(CXXFLAGS) -c -o $@ $<
-
-.rc.o:
- @test -f $(WINDRES) && $(WINDRES) -i $< -o $@ || \
- echo error: could not build $@
-
-ui_%.h: %.ui
- @test -d $(abs_builddir)/$(@D) || $(MKDIR_P) $(abs_builddir)/$(@D)
- @test -f $(UIC) && QT_SELECT=$(QT_SELECT) $(UIC) -o $(abs_builddir)/$@ $(abs_srcdir)/$< || echo error: could not build $(abs_builddir)/$@
- $(SED) -e '/^\*\*.*Created:/d' $(abs_builddir)/$@ > $(abs_builddir)/$@.n && mv $(abs_builddir)/$@{.n,}
- $(SED) -e '/^\*\*.*by:/d' $(abs_builddir)/$@ > $(abs_builddir)/$@.n && mv $(abs_builddir)/$@{.n,}
-
-%.moc: %.cpp
- QT_SELECT=$(QT_SELECT) $(MOC) $(QT_INCLUDES) $(MOC_DEFS) -o $@ $<
- $(SED) -e '/^\*\*.*Created:/d' $@ > $@.n && mv $@{.n,}
- $(SED) -e '/^\*\*.*by:/d' $@ > $@.n && mv $@{.n,}
-
-moc_%.cpp: %.h
- QT_SELECT=$(QT_SELECT) $(MOC) $(QT_INCLUDES) $(MOC_DEFS) -o $@ $<
- $(SED) -e '/^\*\*.*Created:/d' $@ > $@.n && mv $@{.n,}
- $(SED) -e '/^\*\*.*by:/d' $@ > $@.n && mv $@{.n,}
-
-%.qm: %.ts
- @test -d $(abs_builddir)/$(@D) || $(MKDIR_P) $(abs_builddir)/$(@D)
- @test -f $(LRELEASE) && QT_SELECT=$(QT_SELECT) $(LRELEASE) $(abs_srcdir)/$< -qm $(abs_builddir)/$@ || \
- echo error: could not build $(abs_builddir)/$@
-
-%.pb.cc %.pb.h: %.proto
- test -f $(PROTOC) && $(PROTOC) --cpp_out=$(@D) --proto_path=$(abspath $(<D) $<) || \
- echo error: could not build $@
-
-%.json.h: %.json
- @$(MKDIR_P) $(@D)
- @echo "namespace json_tests{" > $@
- @echo "static unsigned const char $(*F)[] = {" >> $@
- @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' >> $@
- @echo "};};" >> $@
- @echo "Generated $@"
-
-%.raw.h: %.raw
- @$(MKDIR_P) $(@D)
- @echo "namespace alert_tests{" > $@
- @echo "static unsigned const char $(*F)[] = {" >> $@
- @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' >> $@
- @echo "};};" >> $@
- @echo "Generated $@"
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
new file mode 100644
index 000000000..749b976c4
--- /dev/null
+++ b/src/Makefile.qt.include
@@ -0,0 +1,404 @@
+bin_PROGRAMS += qt/bitcoin-qt
+noinst_LIBRARIES += qt/libbitcoinqt.a
+
+# bitcoin qt core #
+QT_TS = \
+ qt/locale/bitcoin_ach.ts \
+ qt/locale/bitcoin_af_ZA.ts \
+ qt/locale/bitcoin_ar.ts \
+ qt/locale/bitcoin_be_BY.ts \
+ qt/locale/bitcoin_bg.ts \
+ qt/locale/bitcoin_bs.ts \
+ qt/locale/bitcoin_ca_ES.ts \
+ qt/locale/bitcoin_ca.ts \
+ qt/locale/bitcoin_ca@valencia.ts \
+ qt/locale/bitcoin_cmn.ts \
+ qt/locale/bitcoin_cs.ts \
+ qt/locale/bitcoin_cy.ts \
+ qt/locale/bitcoin_da.ts \
+ qt/locale/bitcoin_de.ts \
+ qt/locale/bitcoin_el_GR.ts \
+ qt/locale/bitcoin_en.ts \
+ qt/locale/bitcoin_eo.ts \
+ qt/locale/bitcoin_es_CL.ts \
+ qt/locale/bitcoin_es_DO.ts \
+ qt/locale/bitcoin_es_MX.ts \
+ qt/locale/bitcoin_es.ts \
+ qt/locale/bitcoin_es_UY.ts \
+ qt/locale/bitcoin_et.ts \
+ qt/locale/bitcoin_eu_ES.ts \
+ qt/locale/bitcoin_fa_IR.ts \
+ qt/locale/bitcoin_fa.ts \
+ qt/locale/bitcoin_fi.ts \
+ qt/locale/bitcoin_fr_CA.ts \
+ qt/locale/bitcoin_fr.ts \
+ qt/locale/bitcoin_gl.ts \
+ qt/locale/bitcoin_gu_IN.ts \
+ qt/locale/bitcoin_he.ts \
+ qt/locale/bitcoin_hi_IN.ts \
+ qt/locale/bitcoin_hr.ts \
+ qt/locale/bitcoin_hu.ts \
+ qt/locale/bitcoin_id_ID.ts \
+ qt/locale/bitcoin_it.ts \
+ qt/locale/bitcoin_ja.ts \
+ qt/locale/bitcoin_ka.ts \
+ qt/locale/bitcoin_kk_KZ.ts \
+ qt/locale/bitcoin_ko_KR.ts \
+ qt/locale/bitcoin_ky.ts \
+ qt/locale/bitcoin_la.ts \
+ qt/locale/bitcoin_lt.ts \
+ qt/locale/bitcoin_lv_LV.ts \
+ qt/locale/bitcoin_mn.ts \
+ qt/locale/bitcoin_ms_MY.ts \
+ qt/locale/bitcoin_nb.ts \
+ qt/locale/bitcoin_nl.ts \
+ qt/locale/bitcoin_pam.ts \
+ qt/locale/bitcoin_pl.ts \
+ qt/locale/bitcoin_pt_BR.ts \
+ qt/locale/bitcoin_pt_PT.ts \
+ qt/locale/bitcoin_ro_RO.ts \
+ qt/locale/bitcoin_ru.ts \
+ qt/locale/bitcoin_sah.ts \
+ qt/locale/bitcoin_sk.ts \
+ qt/locale/bitcoin_sl_SI.ts \
+ qt/locale/bitcoin_sq.ts \
+ qt/locale/bitcoin_sr.ts \
+ qt/locale/bitcoin_sv.ts \
+ qt/locale/bitcoin_th_TH.ts \
+ qt/locale/bitcoin_tr.ts \
+ qt/locale/bitcoin_uk.ts \
+ qt/locale/bitcoin_ur_PK.ts \
+ qt/locale/bitcoin_uz@Cyrl.ts \
+ qt/locale/bitcoin_vi.ts \
+ qt/locale/bitcoin_vi_VN.ts \
+ qt/locale/bitcoin_zh_CN.ts \
+ qt/locale/bitcoin_zh_HK.ts \
+ qt/locale/bitcoin_zh_TW.ts
+
+QT_FORMS_UI = \
+ qt/forms/aboutdialog.ui \
+ qt/forms/addressbookpage.ui \
+ qt/forms/askpassphrasedialog.ui \
+ qt/forms/coincontroldialog.ui \
+ qt/forms/editaddressdialog.ui \
+ qt/forms/helpmessagedialog.ui \
+ qt/forms/intro.ui \
+ qt/forms/openuridialog.ui \
+ qt/forms/optionsdialog.ui \
+ qt/forms/overviewpage.ui \
+ qt/forms/receivecoinsdialog.ui \
+ qt/forms/receiverequestdialog.ui \
+ qt/forms/rpcconsole.ui \
+ qt/forms/sendcoinsdialog.ui \
+ qt/forms/sendcoinsentry.ui \
+ qt/forms/signverifymessagedialog.ui \
+ qt/forms/transactiondescdialog.ui
+
+QT_MOC_CPP = \
+ qt/moc_addressbookpage.cpp \
+ qt/moc_addresstablemodel.cpp \
+ qt/moc_askpassphrasedialog.cpp \
+ qt/moc_bitcoinaddressvalidator.cpp \
+ qt/moc_bitcoinamountfield.cpp \
+ qt/moc_bitcoingui.cpp \
+ qt/moc_bitcoinunits.cpp \
+ qt/moc_clientmodel.cpp \
+ qt/moc_coincontroldialog.cpp \
+ qt/moc_coincontroltreewidget.cpp \
+ qt/moc_csvmodelwriter.cpp \
+ qt/moc_editaddressdialog.cpp \
+ qt/moc_guiutil.cpp \
+ qt/moc_intro.cpp \
+ qt/moc_macdockiconhandler.cpp \
+ qt/moc_macnotificationhandler.cpp \
+ qt/moc_monitoreddatamapper.cpp \
+ qt/moc_notificator.cpp \
+ qt/moc_openuridialog.cpp \
+ qt/moc_optionsdialog.cpp \
+ qt/moc_optionsmodel.cpp \
+ qt/moc_overviewpage.cpp \
+ qt/moc_peertablemodel.cpp \
+ qt/moc_paymentserver.cpp \
+ qt/moc_qvalidatedlineedit.cpp \
+ qt/moc_qvaluecombobox.cpp \
+ qt/moc_receivecoinsdialog.cpp \
+ qt/moc_receiverequestdialog.cpp \
+ qt/moc_recentrequeststablemodel.cpp \
+ qt/moc_rpcconsole.cpp \
+ qt/moc_sendcoinsdialog.cpp \
+ qt/moc_sendcoinsentry.cpp \
+ qt/moc_signverifymessagedialog.cpp \
+ qt/moc_splashscreen.cpp \
+ qt/moc_trafficgraphwidget.cpp \
+ qt/moc_transactiondesc.cpp \
+ qt/moc_transactiondescdialog.cpp \
+ qt/moc_transactionfilterproxy.cpp \
+ qt/moc_transactiontablemodel.cpp \
+ qt/moc_transactionview.cpp \
+ qt/moc_utilitydialog.cpp \
+ qt/moc_walletframe.cpp \
+ qt/moc_walletmodel.cpp \
+ qt/moc_walletview.cpp
+
+BITCOIN_MM = \
+ qt/macdockiconhandler.mm \
+ qt/macnotificationhandler.mm
+
+QT_MOC = \
+ qt/bitcoin.moc \
+ qt/intro.moc \
+ qt/overviewpage.moc \
+ qt/rpcconsole.moc
+
+QT_QRC_CPP = qt/qrc_bitcoin.cpp
+QT_QRC = qt/bitcoin.qrc
+
+PROTOBUF_CC = qt/paymentrequest.pb.cc
+PROTOBUF_H = qt/paymentrequest.pb.h
+PROTOBUF_PROTO = qt/paymentrequest.proto
+
+BITCOIN_QT_H = \
+ qt/addressbookpage.h \
+ qt/addresstablemodel.h \
+ qt/askpassphrasedialog.h \
+ qt/bitcoinaddressvalidator.h \
+ qt/bitcoinamountfield.h \
+ qt/bitcoingui.h \
+ qt/bitcoinunits.h \
+ qt/clientmodel.h \
+ qt/coincontroldialog.h \
+ qt/coincontroltreewidget.h \
+ qt/csvmodelwriter.h \
+ qt/editaddressdialog.h \
+ qt/guiconstants.h \
+ qt/guiutil.h \
+ qt/intro.h \
+ qt/macdockiconhandler.h \
+ qt/macnotificationhandler.h \
+ qt/monitoreddatamapper.h \
+ qt/notificator.h \
+ qt/openuridialog.h \
+ qt/optionsdialog.h \
+ qt/optionsmodel.h \
+ qt/overviewpage.h \
+ qt/paymentrequestplus.h \
+ qt/paymentserver.h \
+ qt/peertablemodel.h \
+ qt/qvalidatedlineedit.h \
+ qt/qvaluecombobox.h \
+ qt/receivecoinsdialog.h \
+ qt/receiverequestdialog.h \
+ qt/recentrequeststablemodel.h \
+ qt/rpcconsole.h \
+ qt/sendcoinsdialog.h \
+ qt/sendcoinsentry.h \
+ qt/signverifymessagedialog.h \
+ qt/splashscreen.h \
+ qt/trafficgraphwidget.h \
+ qt/transactiondesc.h \
+ qt/transactiondescdialog.h \
+ qt/transactionfilterproxy.h \
+ qt/transactionrecord.h \
+ qt/transactiontablemodel.h \
+ qt/transactionview.h \
+ qt/utilitydialog.h \
+ qt/walletframe.h \
+ qt/walletmodel.h \
+ qt/walletmodeltransaction.h \
+ qt/walletview.h \
+ qt/winshutdownmonitor.h
+
+RES_ICONS = \
+ qt/res/icons/add.png \
+ qt/res/icons/address-book.png \
+ qt/res/icons/bitcoin.ico \
+ qt/res/icons/bitcoin.png \
+ qt/res/icons/bitcoin_testnet.ico \
+ qt/res/icons/bitcoin_testnet.png \
+ qt/res/icons/clock1.png \
+ qt/res/icons/clock2.png \
+ qt/res/icons/clock3.png \
+ qt/res/icons/clock4.png \
+ qt/res/icons/clock5.png \
+ qt/res/icons/configure.png \
+ qt/res/icons/connect0_16.png \
+ qt/res/icons/connect1_16.png \
+ qt/res/icons/connect2_16.png \
+ qt/res/icons/connect3_16.png \
+ qt/res/icons/connect4_16.png \
+ qt/res/icons/debugwindow.png \
+ qt/res/icons/edit.png \
+ qt/res/icons/editcopy.png \
+ qt/res/icons/editpaste.png \
+ qt/res/icons/export.png \
+ qt/res/icons/filesave.png \
+ qt/res/icons/history.png \
+ qt/res/icons/key.png \
+ qt/res/icons/lock_closed.png \
+ qt/res/icons/lock_open.png \
+ qt/res/icons/overview.png \
+ qt/res/icons/qrcode.png \
+ qt/res/icons/quit.png \
+ qt/res/icons/receive.png \
+ qt/res/icons/remove.png \
+ qt/res/icons/send.png \
+ qt/res/icons/synced.png \
+ qt/res/icons/toolbar.png \
+ qt/res/icons/toolbar_testnet.png \
+ qt/res/icons/transaction0.png \
+ qt/res/icons/transaction2.png \
+ qt/res/icons/transaction_conflicted.png \
+ qt/res/icons/tx_inout.png \
+ qt/res/icons/tx_input.png \
+ qt/res/icons/tx_output.png \
+ qt/res/icons/tx_mined.png
+
+BITCOIN_QT_CPP = \
+ qt/bitcoinaddressvalidator.cpp \
+ qt/bitcoinamountfield.cpp \
+ qt/bitcoingui.cpp \
+ qt/bitcoinunits.cpp \
+ qt/clientmodel.cpp \
+ qt/csvmodelwriter.cpp \
+ qt/guiutil.cpp \
+ qt/intro.cpp \
+ qt/monitoreddatamapper.cpp \
+ qt/notificator.cpp \
+ qt/optionsdialog.cpp \
+ qt/optionsmodel.cpp \
+ qt/peertablemodel.cpp \
+ qt/qvalidatedlineedit.cpp \
+ qt/qvaluecombobox.cpp \
+ qt/rpcconsole.cpp \
+ qt/splashscreen.cpp \
+ qt/trafficgraphwidget.cpp \
+ qt/utilitydialog.cpp \
+ qt/winshutdownmonitor.cpp
+
+if ENABLE_WALLET
+BITCOIN_QT_CPP += \
+ qt/addressbookpage.cpp \
+ qt/addresstablemodel.cpp \
+ qt/askpassphrasedialog.cpp \
+ qt/coincontroldialog.cpp \
+ qt/coincontroltreewidget.cpp \
+ qt/editaddressdialog.cpp \
+ qt/openuridialog.cpp \
+ qt/overviewpage.cpp \
+ qt/paymentrequestplus.cpp \
+ qt/paymentserver.cpp \
+ qt/receivecoinsdialog.cpp \
+ qt/receiverequestdialog.cpp \
+ qt/recentrequeststablemodel.cpp \
+ qt/sendcoinsdialog.cpp \
+ qt/sendcoinsentry.cpp \
+ qt/signverifymessagedialog.cpp \
+ qt/transactiondesc.cpp \
+ qt/transactiondescdialog.cpp \
+ qt/transactionfilterproxy.cpp \
+ qt/transactionrecord.cpp \
+ qt/transactiontablemodel.cpp \
+ qt/transactionview.cpp \
+ qt/walletframe.cpp \
+ qt/walletmodel.cpp \
+ qt/walletmodeltransaction.cpp \
+ qt/walletview.cpp
+endif
+
+RES_IMAGES = \
+ qt/res/images/about.png \
+ qt/res/images/splash.png \
+ qt/res/images/splash_testnet.png
+
+RES_MOVIES = $(wildcard qt/res/movies/spinner-*.png)
+
+BITCOIN_RC = qt/res/bitcoin-qt-res.rc
+
+BITCOIN_QT_INCLUDES = -I$(builddir)/qt -I$(srcdir)/qt -I$(srcdir)/qt/forms \
+ -I$(builddir)/qt/forms
+
+qt_libbitcoinqt_a_CPPFLAGS = $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
+ $(QT_INCLUDES) $(QT_DBUS_INCLUDES) $(PROTOBUF_CFLAGS) $(QR_CFLAGS)
+
+qt_libbitcoinqt_a_SOURCES = $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(QT_FORMS_UI) \
+ $(QT_QRC) $(QT_TS) $(PROTOBUF_PROTO) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES)
+
+nodist_qt_libbitcoinqt_a_SOURCES = $(QT_MOC_CPP) $(QT_MOC) $(PROTOBUF_CC) \
+ $(PROTOBUF_H) $(QT_QRC_CPP)
+
+# forms/foo.h -> forms/ui_foo.h
+QT_FORMS_H=$(join $(dir $(QT_FORMS_UI)),$(addprefix ui_, $(notdir $(QT_FORMS_UI:.ui=.h))))
+
+# Most files will depend on the forms and moc files as includes. Generate them
+# before anything else.
+$(QT_MOC): $(QT_FORMS_H)
+$(qt_libbitcoinqt_a_OBJECTS) $(qt_bitcoin_qt_OBJECTS) : | $(QT_MOC)
+
+#Generating these with a half-written protobuf header leads to wacky results.
+#This makes sure it's done.
+$(QT_MOC): $(PROTOBUF_H)
+$(QT_MOC_CPP): $(PROTOBUF_H)
+
+# bitcoin-qt binary #
+qt_bitcoin_qt_CPPFLAGS = $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
+ $(QT_INCLUDES) $(PROTOBUF_CFLAGS) $(QR_CFLAGS)
+
+qt_bitcoin_qt_SOURCES = qt/bitcoin.cpp
+if TARGET_DARWIN
+ qt_bitcoin_qt_SOURCES += $(BITCOIN_MM)
+endif
+if TARGET_WINDOWS
+ qt_bitcoin_qt_SOURCES += $(BITCOIN_RC)
+endif
+qt_bitcoin_qt_LDADD = qt/libbitcoinqt.a $(LIBBITCOIN_SERVER)
+if ENABLE_WALLET
+qt_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
+endif
+qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) $(LIBMEMENV) \
+ $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS)
+qt_bitcoin_qt_LDFLAGS = $(QT_LDFLAGS)
+
+#locale/foo.ts -> locale/foo.qm
+QT_QM=$(QT_TS:.ts=.qm)
+
+.SECONDARY: $(QT_QM)
+
+qt/bitcoinstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_common_a_SOURCES) $(libbitcoin_cli_a_SOURCES)
+ @test -n $(XGETTEXT) || echo "xgettext is required for updating translations"
+ $(AM_V_GEN) cd $(top_srcdir); XGETTEXT=$(XGETTEXT) share/qt/extract_strings_qt.py
+
+translate: qt/bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM)
+ @test -n $(LUPDATE) || echo "lupdate is required for updating translations"
+ $(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LUPDATE) $^ -locations relative -no-obsolete -ts qt/locale/bitcoin_en.ts
+
+$(QT_QRC_CPP): $(QT_QRC) $(QT_QM) $(QT_FORMS_H) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES) $(PROTOBUF_H)
+ @test -f $(RCC)
+ $(AM_V_GEN) cd $(srcdir); QT_SELECT=$(QT_SELECT) $(RCC) -name bitcoin $< | \
+ $(SED) -e '/^\*\*.*Created:/d' -e '/^\*\*.*by:/d' > $(abs_builddir)/$@
+
+CLEAN_QT = $(nodist_qt_libbitcoinqt_a_SOURCES) $(QT_QM) $(QT_FORMS_H) qt/*.gcda qt/*.gcno
+
+CLEANFILES += $(CLEAN_QT)
+
+bitcoin_qt_clean: FORCE
+ rm -f $(CLEAN_QT) $(qt_libbitcoinqt_a_OBJECTS) $(qt_bitcoin_qt_OBJECTS) qt/bitcoin-qt$(EXEEXT) $(LIBBITCOINQT)
+
+bitcoin_qt : qt/bitcoin-qt$(EXEEXT)
+
+ui_%.h: %.ui
+ @test -f $(UIC)
+ @$(MKDIR_P) $(@D)
+ $(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(UIC) -o $@ $< || (echo "Error creating $@"; false)
+
+%.moc: %.cpp
+ $(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(MOC) $(QT_INCLUDES) $(MOC_DEFS) $< | \
+ $(SED) -e '/^\*\*.*Created:/d' -e '/^\*\*.*by:/d' > $@
+
+moc_%.cpp: %.h
+ $(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(MOC) $(QT_INCLUDES) $(MOC_DEFS) $< | \
+ $(SED) -e '/^\*\*.*Created:/d' -e '/^\*\*.*by:/d' > $@
+
+%.qm: %.ts
+ @test -f $(LRELEASE)
+ @$(MKDIR_P) $(@D)
+ $(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LRELEASE) -silent $< -qm $@
diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include
new file mode 100644
index 000000000..e0b49d024
--- /dev/null
+++ b/src/Makefile.qttest.include
@@ -0,0 +1,48 @@
+bin_PROGRAMS += qt/test/test_bitcoin-qt
+TESTS += qt/test/test_bitcoin-qt
+
+TEST_QT_MOC_CPP = qt/test/moc_uritests.cpp
+
+if ENABLE_WALLET
+TEST_QT_MOC_CPP += qt/test/moc_paymentservertests.cpp
+endif
+
+TEST_QT_H = \
+ qt/test/uritests.h \
+ qt/test/paymentrequestdata.h \
+ qt/test/paymentservertests.h
+
+qt_test_test_bitcoin_qt_CPPFLAGS = $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
+ $(QT_INCLUDES) $(QT_TEST_INCLUDES)
+
+qt_test_test_bitcoin_qt_SOURCES = \
+ qt/test/test_main.cpp \
+ qt/test/uritests.cpp \
+ $(TEST_QT_H)
+if ENABLE_WALLET
+qt_test_test_bitcoin_qt_SOURCES += \
+ qt/test/paymentservertests.cpp
+endif
+
+nodist_qt_test_test_bitcoin_qt_SOURCES = $(TEST_QT_MOC_CPP)
+
+qt_test_test_bitcoin_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN_SERVER)
+if ENABLE_WALLET
+qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
+endif
+qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) \
+ $(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \
+ $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS)
+qt_test_test_bitcoin_qt_LDFLAGS = $(QT_LDFLAGS)
+
+CLEAN_BITCOIN_QT_TEST = $(TEST_QT_MOC_CPP) qt/test/*.gcda qt/test/*.gcno
+
+CLEANFILES += $(CLEAN_BITCOIN_QT_TEST)
+
+test_bitcoin_qt : qt/test/test_bitcoin-qt$(EXEEXT)
+
+test_bitcoin_qt_check : qt/test/test_bitcoin-qt$(EXEEXT) FORCE
+ $(MAKE) check-TESTS TESTS=$^
+
+test_bitcoin_qt_clean: FORCE
+ rm -f $(CLEAN_BITCOIN_QT_TEST) $(qt_test_test_bitcoin_qt_OBJECTS)
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
new file mode 100644
index 000000000..988830260
--- /dev/null
+++ b/src/Makefile.test.include
@@ -0,0 +1,101 @@
+TESTS += test/test_bitcoin
+bin_PROGRAMS += test/test_bitcoin
+TEST_SRCDIR = test
+TEST_BINARY=test/test_bitcoin$(EXEEXT)
+
+JSON_TEST_FILES = \
+ test/data/script_valid.json \
+ test/data/base58_keys_valid.json \
+ test/data/sig_canonical.json \
+ test/data/sig_noncanonical.json \
+ test/data/base58_encode_decode.json \
+ test/data/base58_keys_invalid.json \
+ test/data/script_invalid.json \
+ test/data/tx_invalid.json \
+ test/data/tx_valid.json \
+ test/data/sighash.json
+
+RAW_TEST_FILES = test/data/alertTests.raw
+
+GENERATED_TEST_FILES = $(JSON_TEST_FILES:.json=.json.h) $(RAW_TEST_FILES:.raw=.raw.h)
+
+BITCOIN_TESTS =\
+ test/bignum.h \
+ test/alert_tests.cpp \
+ test/allocator_tests.cpp \
+ test/base32_tests.cpp \
+ test/base58_tests.cpp \
+ test/base64_tests.cpp \
+ test/bloom_tests.cpp \
+ test/canonical_tests.cpp \
+ test/checkblock_tests.cpp \
+ test/Checkpoints_tests.cpp \
+ test/compress_tests.cpp \
+ test/DoS_tests.cpp \
+ test/getarg_tests.cpp \
+ test/key_tests.cpp \
+ test/main_tests.cpp \
+ test/miner_tests.cpp \
+ test/mruset_tests.cpp \
+ test/multisig_tests.cpp \
+ test/netbase_tests.cpp \
+ test/pmt_tests.cpp \
+ test/rpc_tests.cpp \
+ test/script_P2SH_tests.cpp \
+ test/script_tests.cpp \
+ test/serialize_tests.cpp \
+ test/sigopcount_tests.cpp \
+ test/test_bitcoin.cpp \
+ test/transaction_tests.cpp \
+ test/uint256_tests.cpp \
+ test/util_tests.cpp \
+ test/scriptnum_tests.cpp \
+ test/sighash_tests.cpp
+
+if ENABLE_WALLET
+BITCOIN_TESTS += \
+ test/accounting_tests.cpp \
+ test/wallet_tests.cpp \
+ test/rpc_wallet_tests.cpp
+endif
+
+test_test_bitcoin_SOURCES = $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES)
+test_test_bitcoin_CPPFLAGS = $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS)
+test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) $(LIBMEMENV) \
+ $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB)
+if ENABLE_WALLET
+test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET)
+endif
+test_test_bitcoin_LDADD += $(BDB_LIBS)
+
+nodist_test_test_bitcoin_SOURCES = $(GENERATED_TEST_FILES)
+
+$(BITCOIN_TESTS): $(GENERATED_TEST_FILES)
+
+CLEAN_BITCOIN_TEST = test/*.gcda test/*.gcno $(GENERATED_TEST_FILES)
+
+CLEANFILES += $(CLEAN_BITCOIN_TEST)
+
+bitcoin_test: $(TEST_BINARY)
+
+bitcoin_test_check: $(TEST_BINARY) FORCE
+ $(MAKE) check-TESTS TESTS=$^
+
+bitcoin_test_clean : FORCE
+ rm -f $(CLEAN_BITCOIN_TEST) $(test_test_bitcoin_OBJECTS) $(TEST_BINARY)
+
+%.json.h: %.json
+ @$(MKDIR_P) $(@D)
+ @echo "namespace json_tests{" > $@
+ @echo "static unsigned const char $(*F)[] = {" >> $@
+ @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' >> $@
+ @echo "};};" >> $@
+ @echo "Generated $@"
+
+%.raw.h: %.raw
+ @$(MKDIR_P) $(@D)
+ @echo "namespace alert_tests{" > $@
+ @echo "static unsigned const char $(*F)[] = {" >> $@
+ @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' >> $@
+ @echo "};};" >> $@
+ @echo "Generated $@"
diff --git a/src/m4/bitcoin_qt.m4 b/src/m4/bitcoin_qt.m4
index e71ecd717..244b03a5c 100644
--- a/src/m4/bitcoin_qt.m4
+++ b/src/m4/bitcoin_qt.m4
@@ -1,387 +1,387 @@
dnl Helper for cases where a qt dependency is not met.
dnl Output: If qt version is auto, set bitcoin_enable_qt to false. Else, exit.
AC_DEFUN([BITCOIN_QT_FAIL],[
if test "x$bitcoin_qt_want_version" = "xauto" && test x$bitcoin_qt_force != xyes; then
if test x$bitcoin_enable_qt != xno; then
AC_MSG_WARN([$1; bitcoin-qt frontend will not be built])
fi
bitcoin_enable_qt=no
else
AC_MSG_ERROR([$1])
fi
])
AC_DEFUN([BITCOIN_QT_CHECK],[
if test "x$bitcoin_enable_qt" != "xno" && test x$bitcoin_qt_want_version != xno; then
true
$1
else
true
$2
fi
])
dnl BITCOIN_QT_PATH_PROGS([FOO], [foo foo2], [/path/to/search/first], [continue if missing])
dnl Helper for finding the path of programs needed for Qt.
dnl Inputs: $1: Variable to be set
dnl Inputs: $2: List of programs to search for
dnl Inputs: $3: Look for $2 here before $PATH
dnl Inputs: $4: If "yes", don't fail if $2 is not found.
dnl Output: $1 is set to the path of $2 if found. $2 are searched in order.
AC_DEFUN([BITCOIN_QT_PATH_PROGS],[
BITCOIN_QT_CHECK([
if test "x$3" != "x"; then
AC_PATH_PROGS($1,$2,,$3)
else
AC_PATH_PROGS($1,$2)
fi
if test "x$$1" = "x" && test "x$4" != "xyes"; then
BITCOIN_QT_FAIL([$1 not found])
fi
])
])
dnl Initialize qt input.
dnl This must be called before any other BITCOIN_QT* macros to ensure that
dnl input variables are set correctly.
dnl CAUTION: Do not use this inside of a conditional.
AC_DEFUN([BITCOIN_QT_INIT],[
dnl enable qt support
AC_ARG_WITH([gui],
[AS_HELP_STRING([--with-gui],
[with GUI (no|qt4|qt5|auto. default is auto, qt4 tried first.)])],
[
bitcoin_qt_want_version=$withval
if test x$bitcoin_qt_want_version = xyes; then
bitcoin_qt_force=yes
bitcoin_qt_want_version=auto
fi
],
[bitcoin_qt_want_version=auto])
AC_ARG_WITH([qt-incdir],[AS_HELP_STRING([--with-qt-incdir=INC_DIR],[specify qt include path (overridden by pkgconfig)])], [qt_include_path=$withval], [])
AC_ARG_WITH([qt-libdir],[AS_HELP_STRING([--with-qt-libdir=LIB_DIR],[specify qt lib path (overridden by pkgconfig)])], [qt_lib_path=$withval], [])
AC_ARG_WITH([qt-plugindir],[AS_HELP_STRING([--with-qt-plugindir=PLUGIN_DIR],[specify qt plugin path (overridden by pkgconfig)])], [qt_plugin_path=$withval], [])
AC_ARG_WITH([qt-bindir],[AS_HELP_STRING([--with-qt-bindir=BIN_DIR],[specify qt bin path])], [qt_bin_path=$withval], [])
AC_ARG_WITH([qtdbus],
[AS_HELP_STRING([--with-qtdbus],
[enable DBus support (default is yes if qt is enabled and QtDBus is found)])],
[use_dbus=$withval],
[use_dbus=auto])
])
dnl Find the appropriate version of Qt libraries and includes.
dnl Inputs: $1: Whether or not pkg-config should be used. yes|no. Default: yes.
dnl Inputs: $2: If $1 is "yes" and --with-gui=auto, which qt version should be
dnl tried first.
dnl Outputs: See _BITCOIN_QT_FIND_LIBS_*
dnl Outputs: Sets variables for all qt-related tools.
dnl Outputs: bitcoin_enable_qt, bitcoin_enable_qt_dbus, bitcoin_enable_qt_test
AC_DEFUN([BITCOIN_QT_CONFIGURE],[
use_pkgconfig=$1
if test x$use_pkgconfig == x; then
use_pkgconfig=yes
fi
if test x$use_pkgconfig = xyes; then
if test x$PKG_CONFIG == x; then
AC_MSG_ERROR(pkg-config not found.)
fi
BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG([$2])])
else
BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG])
fi
BITCOIN_QT_PATH_PROGS([MOC], [moc-qt${bitcoin_qt_got_major_vers} moc${bitcoin_qt_got_major_vers} moc], $qt_bin_path)
BITCOIN_QT_PATH_PROGS([UIC], [uic-qt${bitcoin_qt_got_major_vers} uic${bitcoin_qt_got_major_vers} uic], $qt_bin_path)
BITCOIN_QT_PATH_PROGS([RCC], [rcc-qt${bitcoin_qt_got_major_vers} rcc${bitcoin_qt_got_major_vers} rcc], $qt_bin_path)
BITCOIN_QT_PATH_PROGS([LRELEASE], [lrelease-qt${bitcoin_qt_got_major_vers} lrelease${bitcoin_qt_got_major_vers} lrelease], $qt_bin_path)
BITCOIN_QT_PATH_PROGS([LUPDATE], [lupdate-qt${bitcoin_qt_got_major_vers} lupdate${bitcoin_qt_got_major_vers} lupdate],$qt_bin_path, yes)
- MOC_DEFS='-DHAVE_CONFIG_H -I$(top_srcdir)/src'
+ MOC_DEFS='-DHAVE_CONFIG_H -I$(srcdir)'
case $host in
*darwin*)
BITCOIN_QT_CHECK([
MOC_DEFS="${MOC_DEFS} -DQ_OS_MAC"
base_frameworks="-framework Foundation -framework ApplicationServices -framework AppKit"
AX_CHECK_LINK_FLAG([[$base_frameworks]],[QT_LIBS="$QT_LIBS $base_frameworks"],[AC_MSG_ERROR(could not find base frameworks)])
])
;;
*mingw*)
BITCOIN_QT_CHECK([
AX_CHECK_LINK_FLAG([[-mwindows]],[QT_LDFLAGS="$QT_LDFLAGS -mwindows"],[AC_MSG_WARN(-mwindows linker support not detected)])
])
esac
dnl enable qt support
AC_MSG_CHECKING(whether to build Bitcoin Core GUI)
BITCOIN_QT_CHECK([
bitcoin_enable_qt=yes
bitcoin_enable_qt_test=yes
if test x$have_qt_test = xno; then
bitcoin_enable_qt_test=no
fi
bitcoin_enable_qt_dbus=no
if test x$use_dbus != xno && test x$have_qt_dbus = xyes; then
bitcoin_enable_qt_dbus=yes
fi
if test x$use_dbus = xyes && test x$have_qt_dbus = xno; then
AC_MSG_ERROR("libQtDBus not found. Install libQtDBus or remove --with-qtdbus.")
fi
if test x$LUPDATE == x; then
AC_MSG_WARN("lupdate is required to update qt translations")
fi
],[
bitcoin_enable_qt=no
])
AC_MSG_RESULT([$bitcoin_enable_qt (Qt${bitcoin_qt_got_major_vers})])
AC_SUBST(QT_INCLUDES)
AC_SUBST(QT_LIBS)
AC_SUBST(QT_LDFLAGS)
AC_SUBST(QT_DBUS_INCLUDES)
AC_SUBST(QT_DBUS_LIBS)
AC_SUBST(QT_TEST_INCLUDES)
AC_SUBST(QT_TEST_LIBS)
AC_SUBST(QT_SELECT, qt${bitcoin_qt_got_major_vers})
AC_SUBST(MOC_DEFS)
])
dnl All macros below are internal and should _not_ be used from the main
dnl configure.ac.
dnl ----
dnl Internal. Check if the included version of Qt is Qt5.
dnl Requires: INCLUDES must be populated as necessary.
dnl Output: bitcoin_cv_qt5=yes|no
AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[
AC_CACHE_CHECK(for Qt 5, bitcoin_cv_qt5,[
AC_TRY_COMPILE(
[#include <QtCore>],
[
#if QT_VERSION < 0x050000
choke me
#else
return 0;
#endif
],
bitcoin_cv_qt5=yes,
bitcoin_cv_qt5=no)
])])
dnl Internal. Check if the linked version of Qt was built as static libs.
dnl Requires: Qt5. This check cannot determine if Qt4 is static.
dnl Requires: INCLUDES and LIBS must be populated as necessary.
dnl Output: bitcoin_cv_static_qt=yes|no
dnl Output: Defines QT_STATICPLUGIN if plugins are static.
AC_DEFUN([_BITCOIN_QT_IS_STATIC],[
AC_CACHE_CHECK(for static Qt, bitcoin_cv_static_qt,[
AC_TRY_COMPILE(
[#include <QtCore>],
[
#if defined(QT_STATIC)
return 0;
#else
choke me
#endif
],
[bitcoin_cv_static_qt=yes],
[bitcoin_cv_static_qt=no])
])
if test xbitcoin_cv_static_qt = xyes; then
AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol for static Qt plugins])
fi
])
dnl Internal. Check if the link-requirements for static plugins are met.
dnl Requires: INCLUDES and LIBS must be populated as necessary.
dnl Inputs: $1: A series of Q_IMPORT_PLUGIN().
dnl Inputs: $2: The libraries that resolve $1.
dnl Output: QT_LIBS is prepended or configure exits.
AC_DEFUN([_BITCOIN_QT_CHECK_STATIC_PLUGINS],[
AC_MSG_CHECKING(for static Qt plugins: $2)
CHECK_STATIC_PLUGINS_TEMP_LIBS="$LIBS"
LIBS="$2 $QT_LIBS $LIBS"
AC_TRY_LINK([
#define QT_STATICPLUGIN
#include <QtPlugin>
$1],
[return 0;],
[AC_MSG_RESULT(yes); QT_LIBS="$2 $QT_LIBS"],
[AC_MSG_RESULT(no)]; BITCOIN_QT_FAIL(Could not resolve: $2))
LIBS="$CHECK_STATIC_PLUGINS_TEMP_LIBS"
])
dnl Internal. Find Qt libraries using pkg-config.
dnl Inputs: bitcoin_qt_want_version (from --with-gui=). The version to check
dnl first.
dnl Inputs: $1: If bitcoin_qt_want_version is "auto", check for this version
dnl first.
dnl Outputs: All necessary QT_* variables are set.
dnl Outputs: bitcoin_qt_got_major_vers is set to "4" or "5".
dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no.
AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG],[
m4_ifdef([PKG_CHECK_MODULES],[
auto_priority_version=$1
if test x$auto_priority_version == x; then
auto_priority_version=qt5
fi
if test x$bitcoin_qt_want_version == xqt5 || ( test x$bitcoin_qt_want_version == xauto && test x$auto_priority_version == xqt5 ); then
QT_LIB_PREFIX=Qt5
bitcoin_qt_got_major_vers=5
else
QT_LIB_PREFIX=Qt
bitcoin_qt_got_major_vers=4
fi
qt5_modules="Qt5Core Qt5Gui Qt5Network Qt5Widgets"
qt4_modules="QtCore QtGui QtNetwork"
BITCOIN_QT_CHECK([
if test x$bitcoin_qt_want_version == xqt5 || ( test x$bitcoin_qt_want_version == xauto && test x$auto_priority_version == xqt5 ); then
PKG_CHECK_MODULES([QT], [$qt5_modules], [QT_INCLUDES="$QT_CFLAGS"; have_qt=yes],[have_qt=no])
elif test x$bitcoin_qt_want_version == xqt4 || ( test x$bitcoin_qt_want_version == xauto && test x$auto_priority_version == xqt4 ); then
PKG_CHECK_MODULES([QT], [$qt4_modules], [QT_INCLUDES="$QT_CFLAGS"; have_qt=yes], [have_qt=no])
fi
dnl qt version is set to 'auto' and the preferred version wasn't found. Now try the other.
if test x$have_qt == xno && test x$bitcoin_qt_want_version == xauto; then
if test x$auto_priority_version = x$qt5; then
PKG_CHECK_MODULES([QT], [$qt4_modules], [QT_INCLUDES="$QT_CFLAGS"; have_qt=yes; QT_LIB_PREFIX=Qt; bitcoin_qt_got_major_vers=4], [have_qt=no])
else
PKG_CHECK_MODULES([QT], [$qt5_modules], [QT_INCLUDES="$QT_CFLAGS"; have_qt=yes; QT_LIB_PREFIX=Qt5; bitcoin_qt_got_major_vers=5], [have_qt=no])
fi
fi
if test x$have_qt != xyes; then
have_qt=no
BITCOIN_QT_FAIL([Qt dependencies not found])
fi
])
BITCOIN_QT_CHECK([
PKG_CHECK_MODULES([QT_TEST], [${QT_LIB_PREFIX}Test], [QT_TEST_INCLUDES="$QT_TEST_CFLAGS"; have_qt_test=yes], [have_qt_test=no])
if test x$use_dbus != xno; then
PKG_CHECK_MODULES([QT_DBUS], [${QT_LIB_PREFIX}DBus], [QT_DBUS_INCLUDES="$QT_DBUS_CFLAGS"; have_qt_dbus=yes], [have_qt_dbus=no])
fi
])
])
true; dnl
])
dnl Internal. Find Qt libraries without using pkg-config. Version is deduced
dnl from the discovered headers.
dnl Inputs: bitcoin_qt_want_version (from --with-gui=). The version to use.
dnl If "auto", the version will be discovered by _BITCOIN_QT_CHECK_QT5.
dnl Outputs: All necessary QT_* variables are set.
dnl Outputs: bitcoin_qt_got_major_vers is set to "4" or "5".
dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no.
AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
TEMP_CPPFLAGS="$CPPFLAGS"
TEMP_LIBS="$LIBS"
BITCOIN_QT_CHECK([
if test x$qt_include_path != x; then
QT_INCLUDES="-I$qt_include_path -I$qt_include_path/QtCore -I$qt_include_path/QtGui -I$qt_include_path/QtWidgets -I$qt_include_path/QtNetwork -I$qt_include_path/QtTest -I$qt_include_path/QtDBus"
CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
fi
])
BITCOIN_QT_CHECK([AC_CHECK_HEADER([QtPlugin],,BITCOIN_QT_FAIL(QtCore headers missing))])
BITCOIN_QT_CHECK([AC_CHECK_HEADER([QApplication],, BITCOIN_QT_FAIL(QtGui headers missing))])
BITCOIN_QT_CHECK([AC_CHECK_HEADER([QLocalSocket],, BITCOIN_QT_FAIL(QtNetwork headers missing))])
BITCOIN_QT_CHECK([
if test x$bitcoin_qt_want_version = xauto; then
_BITCOIN_QT_CHECK_QT5
fi
if test x$bitcoin_cv_qt5 == xyes || test x$bitcoin_qt_want_version = xqt5; then
QT_LIB_PREFIX=Qt5
bitcoin_qt_got_major_vers=5
else
QT_LIB_PREFIX=Qt
bitcoin_qt_got_major_vers=4
fi
])
BITCOIN_QT_CHECK([
LIBS=
if test x$qt_lib_path != x; then
LIBS="$LIBS -L$qt_lib_path"
fi
if test x$qt_plugin_path != x; then
LIBS="$LIBS -L$qt_plugin_path/accessible"
if test x$bitcoin_qt_got_major_vers == x5; then
LIBS="$LIBS -L$qt_plugin_path/platforms"
else
LIBS="$LIBS -L$qt_plugin_path/codecs"
fi
fi
if test x$TARGET_OS == xwindows; then
AC_CHECK_LIB([imm32], [main],, BITCOIN_QT_FAIL(libimm32 not found))
fi
])
BITCOIN_QT_CHECK(AC_CHECK_LIB([z] ,[main],,BITCOIN_QT_FAIL(zlib not found)))
BITCOIN_QT_CHECK(AC_CHECK_LIB([png] ,[main],,BITCOIN_QT_FAIL(png not found)))
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Core] ,[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXCore not found)))
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Gui] ,[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXGui not found)))
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Network],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXNetwork not found)))
if test x$bitcoin_qt_got_major_vers == x5; then
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Widgets],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXWidgets not found)))
fi
QT_LIBS="$LIBS"
LIBS="$TEMP_LIBS"
dnl This is ugly and complicated. Yuck. Works as follows:
dnl We can't discern whether Qt4 builds are static or not. For Qt5, we can
dnl check a header to find out. When Qt is built statically, some plugins must
dnl be linked into the final binary as well. These plugins have changed between
dnl Qt4 and Qt5. With Qt5, languages moved into core and the WindowsIntegration
dnl plugin was added. Since we can't tell if Qt4 is static or not, it is
dnl assumed for all non-pkg-config builds.
dnl _BITCOIN_QT_CHECK_STATIC_PLUGINS does a quick link-check and appends the
dnl results to QT_LIBS.
BITCOIN_QT_CHECK([
if test x$bitcoin_qt_got_major_vers == x5; then
_BITCOIN_QT_IS_STATIC
if test x$bitcoin_cv_static_qt == xyes; then
AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static])
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(AccessibleFactory)], [-lqtaccessiblewidgets])
if test x$TARGET_OS == xwindows; then
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)],[-lqwindows])
fi
fi
else
AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static])
_BITCOIN_QT_CHECK_STATIC_PLUGINS([
Q_IMPORT_PLUGIN(qcncodecs)
Q_IMPORT_PLUGIN(qjpcodecs)
Q_IMPORT_PLUGIN(qtwcodecs)
Q_IMPORT_PLUGIN(qkrcodecs)
Q_IMPORT_PLUGIN(AccessibleFactory)],
[-lqcncodecs -lqjpcodecs -lqtwcodecs -lqkrcodecs -lqtaccessiblewidgets])
fi
])
BITCOIN_QT_CHECK([
LIBS=
if test x$qt_lib_path != x; then
LIBS="-L$qt_lib_path"
fi
AC_CHECK_LIB([${QT_LIB_PREFIX}Test], [main],, have_qt_test=no)
AC_CHECK_HEADER([QTest],, have_qt_test=no)
QT_TEST_LIBS="$LIBS"
if test x$use_dbus != xno; then
LIBS=
if test x$qt_lib_path != x; then
LIBS="-L$qt_lib_path"
fi
AC_CHECK_LIB([${QT_LIB_PREFIX}DBus], [main],, have_qt_dbus=no)
AC_CHECK_HEADER([QtDBus],, have_qt_dbus=no)
QT_DBUS_LIBS="$LIBS"
fi
])
CPPFLAGS="$TEMP_CPPFLAGS"
LIBS="$TEMP_LIBS"
])
diff --git a/src/qt/Makefile b/src/qt/Makefile
new file mode 100644
index 000000000..b9dcf0c59
--- /dev/null
+++ b/src/qt/Makefile
@@ -0,0 +1,9 @@
+.PHONY: FORCE
+all: FORCE
+ $(MAKE) -C .. bitcoin_qt test_bitcoin_qt
+clean: FORCE
+ $(MAKE) -C .. bitcoin_qt_clean test_bitcoin_qt_clean
+check: FORCE
+ $(MAKE) -C .. test_bitcoin_qt_check
+bitcoin-qt bitcoin-qt.exe: FORCE
+ $(MAKE) -C .. bitcoin_qt
diff --git a/src/qt/Makefile.am b/src/qt/Makefile.am
deleted file mode 100644
index d527f790e..000000000
--- a/src/qt/Makefile.am
+++ /dev/null
@@ -1,382 +0,0 @@
-include $(top_srcdir)/src/Makefile.include
-
-AM_CPPFLAGS += -I$(top_srcdir)/src \
- -I$(top_builddir)/src/qt \
- -I$(top_builddir)/src/qt/forms \
- $(PROTOBUF_CFLAGS) \
- $(QR_CFLAGS)
-bin_PROGRAMS = bitcoin-qt
-noinst_LIBRARIES = libbitcoinqt.a
-SUBDIRS = . $(BUILD_TEST_QT)
-DIST_SUBDIRS = . test
-
-# bitcoin qt core #
-QT_TS = \
- locale/bitcoin_ach.ts \
- locale/bitcoin_af_ZA.ts \
- locale/bitcoin_ar.ts \
- locale/bitcoin_be_BY.ts \
- locale/bitcoin_bg.ts \
- locale/bitcoin_bs.ts \
- locale/bitcoin_ca_ES.ts \
- locale/bitcoin_ca.ts \
- locale/bitcoin_ca@valencia.ts \
- locale/bitcoin_cmn.ts \
- locale/bitcoin_cs.ts \
- locale/bitcoin_cy.ts \
- locale/bitcoin_da.ts \
- locale/bitcoin_de.ts \
- locale/bitcoin_el_GR.ts \
- locale/bitcoin_en.ts \
- locale/bitcoin_eo.ts \
- locale/bitcoin_es_CL.ts \
- locale/bitcoin_es_DO.ts \
- locale/bitcoin_es_MX.ts \
- locale/bitcoin_es.ts \
- locale/bitcoin_es_UY.ts \
- locale/bitcoin_et.ts \
- locale/bitcoin_eu_ES.ts \
- locale/bitcoin_fa_IR.ts \
- locale/bitcoin_fa.ts \
- locale/bitcoin_fi.ts \
- locale/bitcoin_fr_CA.ts \
- locale/bitcoin_fr.ts \
- locale/bitcoin_gl.ts \
- locale/bitcoin_gu_IN.ts \
- locale/bitcoin_he.ts \
- locale/bitcoin_hi_IN.ts \
- locale/bitcoin_hr.ts \
- locale/bitcoin_hu.ts \
- locale/bitcoin_id_ID.ts \
- locale/bitcoin_it.ts \
- locale/bitcoin_ja.ts \
- locale/bitcoin_ka.ts \
- locale/bitcoin_kk_KZ.ts \
- locale/bitcoin_ko_KR.ts \
- locale/bitcoin_ky.ts \
- locale/bitcoin_la.ts \
- locale/bitcoin_lt.ts \
- locale/bitcoin_lv_LV.ts \
- locale/bitcoin_mn.ts \
- locale/bitcoin_ms_MY.ts \
- locale/bitcoin_nb.ts \
- locale/bitcoin_nl.ts \
- locale/bitcoin_pam.ts \
- locale/bitcoin_pl.ts \
- locale/bitcoin_pt_BR.ts \
- locale/bitcoin_pt_PT.ts \
- locale/bitcoin_ro_RO.ts \
- locale/bitcoin_ru.ts \
- locale/bitcoin_sah.ts \
- locale/bitcoin_sk.ts \
- locale/bitcoin_sl_SI.ts \
- locale/bitcoin_sq.ts \
- locale/bitcoin_sr.ts \
- locale/bitcoin_sv.ts \
- locale/bitcoin_th_TH.ts \
- locale/bitcoin_tr.ts \
- locale/bitcoin_uk.ts \
- locale/bitcoin_ur_PK.ts \
- locale/bitcoin_uz@Cyrl.ts \
- locale/bitcoin_vi.ts \
- locale/bitcoin_vi_VN.ts \
- locale/bitcoin_zh_CN.ts \
- locale/bitcoin_zh_HK.ts \
- locale/bitcoin_zh_TW.ts
-
-QT_FORMS_UI = \
- forms/aboutdialog.ui \
- forms/addressbookpage.ui \
- forms/askpassphrasedialog.ui \
- forms/coincontroldialog.ui \
- forms/editaddressdialog.ui \
- forms/helpmessagedialog.ui \
- forms/intro.ui \
- forms/openuridialog.ui \
- forms/optionsdialog.ui \
- forms/overviewpage.ui \
- forms/receivecoinsdialog.ui \
- forms/receiverequestdialog.ui \
- forms/rpcconsole.ui \
- forms/sendcoinsdialog.ui \
- forms/sendcoinsentry.ui \
- forms/signverifymessagedialog.ui \
- forms/transactiondescdialog.ui
-
-QT_MOC_CPP = \
- moc_addressbookpage.cpp \
- moc_addresstablemodel.cpp \
- moc_askpassphrasedialog.cpp \
- moc_bitcoinaddressvalidator.cpp \
- moc_bitcoinamountfield.cpp \
- moc_bitcoingui.cpp \
- moc_bitcoinunits.cpp \
- moc_clientmodel.cpp \
- moc_coincontroldialog.cpp \
- moc_coincontroltreewidget.cpp \
- moc_csvmodelwriter.cpp \
- moc_editaddressdialog.cpp \
- moc_guiutil.cpp \
- moc_intro.cpp \
- moc_macdockiconhandler.cpp \
- moc_macnotificationhandler.cpp \
- moc_monitoreddatamapper.cpp \
- moc_notificator.cpp \
- moc_openuridialog.cpp \
- moc_optionsdialog.cpp \
- moc_optionsmodel.cpp \
- moc_overviewpage.cpp \
- moc_peertablemodel.cpp \
- moc_paymentserver.cpp \
- moc_qvalidatedlineedit.cpp \
- moc_qvaluecombobox.cpp \
- moc_receivecoinsdialog.cpp \
- moc_receiverequestdialog.cpp \
- moc_recentrequeststablemodel.cpp \
- moc_rpcconsole.cpp \
- moc_sendcoinsdialog.cpp \
- moc_sendcoinsentry.cpp \
- moc_signverifymessagedialog.cpp \
- moc_splashscreen.cpp \
- moc_trafficgraphwidget.cpp \
- moc_transactiondesc.cpp \
- moc_transactiondescdialog.cpp \
- moc_transactionfilterproxy.cpp \
- moc_transactiontablemodel.cpp \
- moc_transactionview.cpp \
- moc_utilitydialog.cpp \
- moc_walletframe.cpp \
- moc_walletmodel.cpp \
- moc_walletview.cpp
-
-BITCOIN_MM = \
- macdockiconhandler.mm \
- macnotificationhandler.mm
-
-QT_MOC = \
- bitcoin.moc \
- intro.moc \
- overviewpage.moc \
- rpcconsole.moc
-
-QT_QRC_CPP = qrc_bitcoin.cpp
-QT_QRC = bitcoin.qrc
-
-PROTOBUF_CC = paymentrequest.pb.cc
-PROTOBUF_H = paymentrequest.pb.h
-PROTOBUF_PROTO = paymentrequest.proto
-
-BITCOIN_QT_H = \
- addressbookpage.h \
- addresstablemodel.h \
- askpassphrasedialog.h \
- bitcoinaddressvalidator.h \
- bitcoinamountfield.h \
- bitcoingui.h \
- bitcoinunits.h \
- clientmodel.h \
- coincontroldialog.h \
- coincontroltreewidget.h \
- csvmodelwriter.h \
- editaddressdialog.h \
- guiconstants.h \
- guiutil.h \
- intro.h \
- macdockiconhandler.h \
- macnotificationhandler.h \
- monitoreddatamapper.h \
- notificator.h \
- openuridialog.h \
- optionsdialog.h \
- optionsmodel.h \
- overviewpage.h \
- paymentrequestplus.h \
- paymentserver.h \
- peertablemodel.h \
- qvalidatedlineedit.h \
- qvaluecombobox.h \
- receivecoinsdialog.h \
- receiverequestdialog.h \
- recentrequeststablemodel.h \
- rpcconsole.h \
- sendcoinsdialog.h \
- sendcoinsentry.h \
- signverifymessagedialog.h \
- splashscreen.h \
- trafficgraphwidget.h \
- transactiondesc.h \
- transactiondescdialog.h \
- transactionfilterproxy.h \
- transactionrecord.h \
- transactiontablemodel.h \
- transactionview.h \
- utilitydialog.h \
- walletframe.h \
- walletmodel.h \
- walletmodeltransaction.h \
- walletview.h \
- winshutdownmonitor.h
-
-RES_ICONS = \
- res/icons/add.png \
- res/icons/address-book.png \
- res/icons/bitcoin.ico \
- res/icons/bitcoin.png \
- res/icons/bitcoin_testnet.ico \
- res/icons/bitcoin_testnet.png \
- res/icons/clock1.png \
- res/icons/clock2.png \
- res/icons/clock3.png \
- res/icons/clock4.png \
- res/icons/clock5.png \
- res/icons/configure.png \
- res/icons/connect0_16.png \
- res/icons/connect1_16.png \
- res/icons/connect2_16.png \
- res/icons/connect3_16.png \
- res/icons/connect4_16.png \
- res/icons/debugwindow.png \
- res/icons/edit.png \
- res/icons/editcopy.png \
- res/icons/editpaste.png \
- res/icons/export.png \
- res/icons/filesave.png \
- res/icons/history.png \
- res/icons/key.png \
- res/icons/lock_closed.png \
- res/icons/lock_open.png \
- res/icons/overview.png \
- res/icons/qrcode.png \
- res/icons/quit.png \
- res/icons/receive.png \
- res/icons/remove.png \
- res/icons/send.png \
- res/icons/synced.png \
- res/icons/toolbar.png \
- res/icons/toolbar_testnet.png \
- res/icons/transaction0.png \
- res/icons/transaction2.png \
- res/icons/transaction_conflicted.png \
- res/icons/tx_inout.png \
- res/icons/tx_input.png \
- res/icons/tx_output.png \
- res/icons/tx_mined.png
-
-BITCOIN_QT_CPP = \
- bitcoin.cpp \
- bitcoinaddressvalidator.cpp \
- bitcoinamountfield.cpp \
- bitcoingui.cpp \
- bitcoinunits.cpp \
- clientmodel.cpp \
- csvmodelwriter.cpp \
- guiutil.cpp \
- intro.cpp \
- monitoreddatamapper.cpp \
- notificator.cpp \
- optionsdialog.cpp \
- optionsmodel.cpp \
- peertablemodel.cpp \
- qvalidatedlineedit.cpp \
- qvaluecombobox.cpp \
- rpcconsole.cpp \
- splashscreen.cpp \
- trafficgraphwidget.cpp \
- utilitydialog.cpp \
- winshutdownmonitor.cpp
-
-if ENABLE_WALLET
-BITCOIN_QT_CPP += \
- addressbookpage.cpp \
- addresstablemodel.cpp \
- askpassphrasedialog.cpp \
- coincontroldialog.cpp \
- coincontroltreewidget.cpp \
- editaddressdialog.cpp \
- openuridialog.cpp \
- overviewpage.cpp \
- paymentrequestplus.cpp \
- paymentserver.cpp \
- receivecoinsdialog.cpp \
- receiverequestdialog.cpp \
- recentrequeststablemodel.cpp \
- sendcoinsdialog.cpp \
- sendcoinsentry.cpp \
- signverifymessagedialog.cpp \
- transactiondesc.cpp \
- transactiondescdialog.cpp \
- transactionfilterproxy.cpp \
- transactionrecord.cpp \
- transactiontablemodel.cpp \
- transactionview.cpp \
- walletframe.cpp \
- walletmodel.cpp \
- walletmodeltransaction.cpp \
- walletview.cpp
-endif
-
-RES_IMAGES = \
- res/images/about.png \
- res/images/splash.png \
- res/images/splash_testnet.png
-
-RES_MOVIES = $(wildcard res/movies/spinner-*.png)
-
-BITCOIN_RC = res/bitcoin-qt-res.rc
-
-libbitcoinqt_a_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) \
- -I$(top_srcdir)/src/qt/forms $(QT_DBUS_INCLUDES)
-libbitcoinqt_a_SOURCES = $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(QT_FORMS_UI) \
- $(QT_QRC) $(QT_TS) $(PROTOBUF_PROTO) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES)
-
-nodist_libbitcoinqt_a_SOURCES = $(QT_MOC_CPP) $(QT_MOC) $(PROTOBUF_CC) \
- $(PROTOBUF_H) $(QT_QRC_CPP)
-
-BUILT_SOURCES = $(nodist_libbitcoinqt_a_SOURCES)
-
-#Generating these with a half-written protobuf header leads to wacky results.
-#This makes sure it's done.
-$(QT_MOC): $(PROTOBUF_H)
-$(QT_MOC_CPP): $(PROTOBUF_H)
-
-# bitcoin-qt binary #
-bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) \
- -I$(top_srcdir)/src/qt/forms
-bitcoin_qt_SOURCES = bitcoin.cpp
-if TARGET_DARWIN
- bitcoin_qt_SOURCES += $(BITCOIN_MM)
-endif
-if TARGET_WINDOWS
- bitcoin_qt_SOURCES += $(BITCOIN_RC)
-endif
-bitcoin_qt_LDADD = libbitcoinqt.a $(LIBBITCOIN_SERVER)
-if ENABLE_WALLET
-bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
-endif
-bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) $(LIBMEMENV) \
- $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS)
-bitcoin_qt_LDFLAGS = $(QT_LDFLAGS)
-
-# forms/foo.h -> forms/ui_foo.h
-QT_FORMS_H=$(join $(dir $(QT_FORMS_UI)),$(addprefix ui_, $(notdir $(QT_FORMS_UI:.ui=.h))))
-
-#locale/foo.ts -> locale/foo.qm
-QT_QM=$(QT_TS:.ts=.qm)
-
-.PHONY: FORCE
-.SECONDARY: $(QT_QM)
-
-bitcoinstrings.cpp: FORCE
- $(MAKE) -C $(top_srcdir)/src qt/bitcoinstrings.cpp
-
-translate: bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM)
- @test -n $(LUPDATE) || echo "lupdate is required for updating translations"
- @QT_SELECT=$(QT_SELECT) $(LUPDATE) $^ -locations relative -no-obsolete -ts locale/bitcoin_en.ts
-
-$(QT_QRC_CPP): $(QT_QRC) $(QT_QM) $(QT_FORMS_H) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES) $(PROTOBUF_H)
- @cd $(abs_srcdir); test -f $(RCC) && QT_SELECT=$(QT_SELECT) $(RCC) -name bitcoin -o $(abs_builddir)/$@ $< || \
- echo error: could not build $@
- $(SED) -e '/^\*\*.*Created:/d' $@ > $@.n && mv $@{.n,}
- $(SED) -e '/^\*\*.*by:/d' $@ > $@.n && mv $@{.n,}
-
-CLEANFILES = $(BUILT_SOURCES) $(QT_QM) $(QT_FORMS_H) *.gcda *.gcno
diff --git a/src/qt/test/Makefile b/src/qt/test/Makefile
new file mode 100644
index 000000000..a02f86b62
--- /dev/null
+++ b/src/qt/test/Makefile
@@ -0,0 +1,6 @@
+all:
+ $(MAKE) -C ../../ test_bitcoin_qt
+clean:
+ $(MAKE) -C ../../ test_bitcoin_qt_clean
+check:
+ $(MAKE) -C ../../ test_bitcoin_qt_check
diff --git a/src/qt/test/Makefile.am b/src/qt/test/Makefile.am
deleted file mode 100644
index 2461b5ff4..000000000
--- a/src/qt/test/Makefile.am
+++ /dev/null
@@ -1,46 +0,0 @@
-include $(top_srcdir)/src/Makefile.include
-
-AM_CPPFLAGS += -I$(top_srcdir)/src \
- -I$(top_srcdir)/src/qt \
- -I$(top_builddir)/src/qt \
- $(PROTOBUF_CFLAGS) \
- $(QR_CFLAGS)
-bin_PROGRAMS = test_bitcoin-qt
-TESTS = test_bitcoin-qt
-
-TEST_QT_MOC_CPP = moc_uritests.cpp
-
-if ENABLE_WALLET
-TEST_QT_MOC_CPP += moc_paymentservertests.cpp
-endif
-
-TEST_QT_H = \
- uritests.h \
- paymentrequestdata.h \
- paymentservertests.h
-
-BUILT_SOURCES = $(TEST_QT_MOC_CPP)
-
-test_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) $(QT_TEST_INCLUDES)
-
-test_bitcoin_qt_SOURCES = \
- test_main.cpp \
- uritests.cpp \
- $(TEST_QT_H)
-if ENABLE_WALLET
-test_bitcoin_qt_SOURCES += \
- paymentservertests.cpp
-endif
-
-nodist_test_bitcoin_qt_SOURCES = $(TEST_QT_MOC_CPP)
-
-test_bitcoin_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN_SERVER)
-if ENABLE_WALLET
-test_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
-endif
-test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) \
- $(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \
- $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS)
-test_bitcoin_qt_LDFLAGS = $(QT_LDFLAGS)
-
-CLEANFILES = $(BUILT_SOURCES) *.gcda *.gcno
diff --git a/src/test/Makefile b/src/test/Makefile
new file mode 100644
index 000000000..87bf73fec
--- /dev/null
+++ b/src/test/Makefile
@@ -0,0 +1,6 @@
+all:
+ $(MAKE) -C .. bitcoin_test
+clean:
+ $(MAKE) -C .. bitcoin_test_clean
+check:
+ $(MAKE) -C .. bitcoin_test_check
diff --git a/src/test/Makefile.am b/src/test/Makefile.am
deleted file mode 100644
index cde3a31e2..000000000
--- a/src/test/Makefile.am
+++ /dev/null
@@ -1,77 +0,0 @@
-include $(top_srcdir)/src/Makefile.include
-
-AM_CPPFLAGS += -I$(top_srcdir)/src
-
-bin_PROGRAMS = test_bitcoin
-
-TESTS = test_bitcoin
-
-JSON_TEST_FILES = \
- data/script_valid.json \
- data/base58_keys_valid.json \
- data/sig_canonical.json \
- data/sig_noncanonical.json \
- data/base58_encode_decode.json \
- data/base58_keys_invalid.json \
- data/script_invalid.json \
- data/tx_invalid.json \
- data/tx_valid.json \
- data/sighash.json
-
-RAW_TEST_FILES = data/alertTests.raw
-
-BUILT_SOURCES = $(JSON_TEST_FILES:.json=.json.h) $(RAW_TEST_FILES:.raw=.raw.h)
-
-# test_bitcoin binary #
-test_bitcoin_CPPFLAGS = $(AM_CPPFLAGS) $(TESTDEFS)
-test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) $(LIBMEMENV) \
- $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB)
-if ENABLE_WALLET
-test_bitcoin_LDADD += $(LIBBITCOIN_WALLET)
-endif
-test_bitcoin_LDADD += $(BDB_LIBS)
-
-test_bitcoin_SOURCES = \
- bignum.h \
- alert_tests.cpp \
- allocator_tests.cpp \
- base32_tests.cpp \
- base58_tests.cpp \
- base64_tests.cpp \
- bloom_tests.cpp \
- canonical_tests.cpp \
- checkblock_tests.cpp \
- Checkpoints_tests.cpp \
- compress_tests.cpp \
- DoS_tests.cpp \
- getarg_tests.cpp \
- key_tests.cpp \
- main_tests.cpp \
- miner_tests.cpp \
- mruset_tests.cpp \
- multisig_tests.cpp \
- netbase_tests.cpp \
- pmt_tests.cpp \
- rpc_tests.cpp \
- script_P2SH_tests.cpp \
- script_tests.cpp \
- serialize_tests.cpp \
- sigopcount_tests.cpp \
- test_bitcoin.cpp \
- transaction_tests.cpp \
- uint256_tests.cpp \
- util_tests.cpp \
- scriptnum_tests.cpp \
- sighash_tests.cpp \
- $(JSON_TEST_FILES) $(RAW_TEST_FILES)
-
-if ENABLE_WALLET
-test_bitcoin_SOURCES += \
- accounting_tests.cpp \
- wallet_tests.cpp \
- rpc_wallet_tests.cpp
-endif
-
-nodist_test_bitcoin_SOURCES = $(BUILT_SOURCES)
-
-CLEANFILES = *.gcda *.gcno $(BUILT_SOURCES)

File Metadata

Mime Type
text/x-diff
Expires
Wed, May 21, 23:14 (1 d, 5 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5866141
Default Alt Text
(80 KB)

Event Timeline