mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-02 09:15:04 +02:00
build: Update build system for new leveldb
Upstream leveldb switched build systems, which means we need to define a few different values.
This commit is contained in:
55
configure.ac
55
configure.ac
@@ -517,7 +517,6 @@ case $host in
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -D_WIN32_WINNT=0x0601"
|
||||
LEVELDB_TARGET_FLAGS="-DOS_WINDOWS"
|
||||
if test "x$CXXFLAGS_overridden" = "xno"; then
|
||||
CXXFLAGS="$CXXFLAGS -w"
|
||||
fi
|
||||
@@ -533,7 +532,6 @@ case $host in
|
||||
;;
|
||||
*darwin*)
|
||||
TARGET_OS=darwin
|
||||
LEVELDB_TARGET_FLAGS="-DOS_MACOSX"
|
||||
if test x$cross_compiling != xyes; then
|
||||
BUILD_OS=darwin
|
||||
AC_PATH_PROGS([RSVG_CONVERT], [rsvg-convert rsvg],rsvg-convert)
|
||||
@@ -585,35 +583,9 @@ case $host in
|
||||
*android*)
|
||||
dnl make sure android stays above linux for hosts like *linux-android*
|
||||
TARGET_OS=android
|
||||
LEVELDB_TARGET_FLAGS="-DOS_ANDROID"
|
||||
;;
|
||||
*linux*)
|
||||
TARGET_OS=linux
|
||||
LEVELDB_TARGET_FLAGS="-DOS_LINUX"
|
||||
;;
|
||||
*kfreebsd*)
|
||||
LEVELDB_TARGET_FLAGS="-DOS_KFREEBSD"
|
||||
;;
|
||||
*freebsd*)
|
||||
LEVELDB_TARGET_FLAGS="-DOS_FREEBSD"
|
||||
;;
|
||||
*openbsd*)
|
||||
LEVELDB_TARGET_FLAGS="-DOS_OPENBSD"
|
||||
;;
|
||||
*netbsd*)
|
||||
LEVELDB_TARGET_FLAGS="-DOS_NETBSD"
|
||||
;;
|
||||
*dragonfly*)
|
||||
LEVELDB_TARGET_FLAGS="-DOS_DRAGONFLYBSD"
|
||||
;;
|
||||
*solaris*)
|
||||
LEVELDB_TARGET_FLAGS="-DOS_SOLARIS"
|
||||
;;
|
||||
*hpux*)
|
||||
LEVELDB_TARGET_FLAGS="-DOS_HPUX"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR(Cannot build leveldb for $host. Please file a bug report.)
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -962,6 +934,28 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>
|
||||
[ AC_MSG_RESULT(no)]
|
||||
)
|
||||
|
||||
dnl LevelDB platform checks
|
||||
AC_MSG_CHECKING(for fdatasync)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]],
|
||||
[[ fdatasync(0); ]])],
|
||||
[ AC_MSG_RESULT(yes); HAVE_FDATASYNC=1 ],
|
||||
[ AC_MSG_RESULT(no); HAVE_FDATASYNC=0 ]
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING(for F_FULLFSYNC)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <fcntl.h>]],
|
||||
[[ fcntl(0, F_FULLFSYNC, 0); ]])],
|
||||
[ AC_MSG_RESULT(yes); HAVE_FULLFSYNC=1 ],
|
||||
[ AC_MSG_RESULT(no); HAVE_FULLFSYNC=0 ]
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING(for O_CLOEXEC)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <fcntl.h>]],
|
||||
[[ open("", O_CLOEXEC); ]])],
|
||||
[ AC_MSG_RESULT(yes); HAVE_O_CLOEXEC=1 ],
|
||||
[ AC_MSG_RESULT(no); HAVE_O_CLOEXEC=0 ]
|
||||
)
|
||||
|
||||
dnl Check for reduced exports
|
||||
if test x$use_reduce_exports = xyes; then
|
||||
AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],[RE_CXXFLAGS="-fvisibility=hidden"],
|
||||
@@ -1522,6 +1516,7 @@ AM_CONDITIONAL([ENABLE_SSE41],[test x$enable_sse41 = xyes])
|
||||
AM_CONDITIONAL([ENABLE_AVX2],[test x$enable_avx2 = xyes])
|
||||
AM_CONDITIONAL([ENABLE_SHANI],[test x$enable_shani = xyes])
|
||||
AM_CONDITIONAL([USE_ASM],[test x$use_asm = xyes])
|
||||
AM_CONDITIONAL([WORDS_BIGENDIAN],[test x$ac_cv_c_bigendian = xyes])
|
||||
|
||||
AC_DEFINE(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR, [Major version])
|
||||
AC_DEFINE(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR, [Minor version])
|
||||
@@ -1573,13 +1568,15 @@ AC_SUBST(USE_UPNP)
|
||||
AC_SUBST(USE_QRCODE)
|
||||
AC_SUBST(BOOST_LIBS)
|
||||
AC_SUBST(TESTDEFS)
|
||||
AC_SUBST(LEVELDB_TARGET_FLAGS)
|
||||
AC_SUBST(MINIUPNPC_CPPFLAGS)
|
||||
AC_SUBST(MINIUPNPC_LIBS)
|
||||
AC_SUBST(EVENT_LIBS)
|
||||
AC_SUBST(EVENT_PTHREADS_LIBS)
|
||||
AC_SUBST(ZMQ_LIBS)
|
||||
AC_SUBST(QR_LIBS)
|
||||
AC_SUBST(HAVE_FDATASYNC)
|
||||
AC_SUBST(HAVE_FULLFSYNC)
|
||||
AC_SUBST(HAVE_O_CLOEXEC)
|
||||
AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist test/config.ini])
|
||||
AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh])
|
||||
AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([doc/Doxyfile])])
|
||||
|
||||
Reference in New Issue
Block a user