dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
-define(_CLIENT_VERSION_MAJOR, 1)
-define(_CLIENT_VERSION_MINOR, 1)
-define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 25)
+define(_CLIENT_VERSION_MAJOR, 2)
+define(_CLIENT_VERSION_MINOR, 0)
+define(_CLIENT_VERSION_REVISION, 4)
+define(_CLIENT_VERSION_BUILD, 50)
define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50)))
define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1)))
define(_CLIENT_VERSION_IS_RELEASE, true)
-define(_COPYRIGHT_YEAR, 2017)
+define(_COPYRIGHT_YEAR, 2018)
AC_INIT([Zcash],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_SUFFIX(_ZC_BUILD_VAL)],[https://github.com/zcash/zcash/issues],[zcash])
AC_CONFIG_SRCDIR([src/main.cpp])
AC_CONFIG_HEADERS([src/config/bitcoin-config.h])
AC_ARG_WITH([libs],
[AS_HELP_STRING([--with-libs],
- [build libraries (default=yes)])],
+ [build libraries (default=no)])],
[build_bitcoin_libs=$withval],
- [build_bitcoin_libs=yes])
+ [build_bitcoin_libs=no])
AC_ARG_WITH([daemon],
[AS_HELP_STRING([--with-daemon],
HARDENED_CPPFLAGS="$HARDENED_CPPFLAGS -D_FORTIFY_SOURCE=2"
],[AC_MSG_ERROR(Cannot enable -D_FORTIFY_SOURCE=2)])
- if test x$BUILD_OS = xdarwin; then
+ if test x$BUILD_OS = xdarwin || test x$TARGET_OS = xwindows; then
# Xcode's ld (at least ld64-302.3) doesn't support -z
+ # mingw-w64's ld (at least mingw-w64 4.0.4-2) also appears to not support -z
AX_CHECK_LINK_FLAG([[-Wl,-z,relro]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,relro"],[AC_MSG_WARN(Cannot enable RELRO)])
AX_CHECK_LINK_FLAG([[-Wl,-z,now]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"],[AC_MSG_WARN(Cannot enable BIND_NOW)])
else
if test x$TARGET_OS != xwindows; then
# All windows code is PIC, forcing it on just adds useless compile warnings
AX_CHECK_COMPILE_FLAG([-fPIE],[PIE_FLAGS="-fPIE"],[AC_MSG_ERROR(Cannot enable -fPIE)])
- AX_CHECK_LINK_FLAG([[-pie]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"],[AC_MSG_ERROR(Cannot enable -pie)])
+ if test x$BUILD_OS = xdarwin; then
+ AX_CHECK_LINK_FLAG([[-Wl,-pie]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-pie"],[AC_MSG_ERROR(Cannot enable -Wl,-pie)])
+ else
+ AX_CHECK_LINK_FLAG([[-pie]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"],[AC_MSG_ERROR(Cannot enable -pie)])
+ fi
else
# These are only available on Windows.
AX_CHECK_LINK_FLAG([[-Wl,--dynamicbase]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,--dynamicbase"],[AC_MSG_ERROR(Cannot enable --dynamicbase)])
[],
[AC_MSG_WARN([Proton headers not found, disabling Proton support])
use_proton=no])
- AC_CHECK_LIB([qpid-proton-cpp], [main],
- [PROTON_LIBS="-lqpid-proton-cpp -lqpid-proton"],
- [AC_MSG_WARN([Proton libraries not found, disabling Proton support])
+ AC_CHECK_LIB([qpid-proton-cpp-static], [main],
+ [PROTON_LIBS="-lqpid-proton-cpp-static"],
+ [AC_MSG_WARN([Proton qpid-proton-cpp-static library not found, disabling Proton support])
+ use_proton=no])
+ AC_CHECK_LIB([qpid-proton-core-static], [main],
+ [PROTON_LIBS+=" -lqpid-proton-core-static"],
+ [AC_MSG_WARN([Proton qpid-proton-core-static library not found, disabling Proton support])
+ use_proton=no])
+ AC_CHECK_LIB([qpid-proton-static], [main],
+ [PROTON_LIBS+=" -lqpid-proton-static"],
+ [AC_MSG_WARN([Proton qpid-proton-static library not found, disabling Proton support])
use_proton=no])
fi
if test x$use_proton = xyes; then
AC_CHECK_LIB([gmpxx],[main],GMPXX_LIBS=-lgmpxx, [AC_MSG_ERROR(libgmpxx missing)])
RUST_LIBS="-lrustzcash"
+case $host in
+ *mingw*)
+ ;;
+ *)
+ RUST_LIBS="$RUST_LIBS -ldl"
+ ;;
+esac
dnl Check for OpenMP support
AX_OPENMP(