Browse Source

Merge pull request #4765

e2a98d2 Update obsolete AC macros. (randy-waterhouse)
e543811 Add warnings for autogen.sh. Fix AC_CONFIG_SRCDIR. (randy-waterhouse)
0.10
Wladimir J. van der Laan 10 years ago
parent
commit
cb9871194a
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 2
      autogen.sh
  2. 14
      build-aux/m4/bitcoin_find_bdb48.m4
  3. 28
      build-aux/m4/bitcoin_qt.m4
  4. 26
      configure.ac

2
autogen.sh

@ -5,4 +5,4 @@ cd "$srcdir"
if [ -z ${LIBTOOLIZE} ] && GLIBTOOLIZE="`which glibtoolize 2>/dev/null`"; then if [ -z ${LIBTOOLIZE} ] && GLIBTOOLIZE="`which glibtoolize 2>/dev/null`"; then
export LIBTOOLIZE="${GLIBTOOLIZE}" export LIBTOOLIZE="${GLIBTOOLIZE}"
fi fi
autoreconf --install --force autoreconf --install --force --warnings=all

14
build-aux/m4/bitcoin_find_bdb48.m4

@ -12,29 +12,29 @@ AC_DEFUN([BITCOIN_FIND_BDB48],[
done done
for searchpath in $bdbdirlist ''; do for searchpath in $bdbdirlist ''; do
test -n "${searchpath}" && searchpath="${searchpath}/" test -n "${searchpath}" && searchpath="${searchpath}/"
AC_TRY_COMPILE([ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <${searchpath}db_cxx.h> #include <${searchpath}db_cxx.h>
],[ ]],[[
#if !((DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 8) || DB_VERSION_MAJOR > 4) #if !((DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 8) || DB_VERSION_MAJOR > 4)
#error "failed to find bdb 4.8+" #error "failed to find bdb 4.8+"
#endif #endif
],[ ]])],[
if test "x$bdbpath" = "xX"; then if test "x$bdbpath" = "xX"; then
bdbpath="${searchpath}" bdbpath="${searchpath}"
fi fi
],[ ],[
continue continue
]) ])
AC_TRY_COMPILE([ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <${searchpath}db_cxx.h> #include <${searchpath}db_cxx.h>
],[ ]],[[
#if !(DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8) #if !(DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8)
#error "failed to find bdb 4.8" #error "failed to find bdb 4.8"
#endif #endif
],[ ]])],[
bdb48path="${searchpath}" bdb48path="${searchpath}"
break break
]) ],[])
done done
if test "x$bdbpath" = "xX"; then if test "x$bdbpath" = "xX"; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])

28
build-aux/m4/bitcoin_qt.m4

@ -217,17 +217,17 @@ dnl Requires: INCLUDES must be populated as necessary.
dnl Output: bitcoin_cv_qt5=yes|no dnl Output: bitcoin_cv_qt5=yes|no
AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[ AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[
AC_CACHE_CHECK(for Qt 5, bitcoin_cv_qt5,[ AC_CACHE_CHECK(for Qt 5, bitcoin_cv_qt5,[
AC_TRY_COMPILE( AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[#include <QtCore>], [[#include <QtCore>]],
[ [[
#if QT_VERSION < 0x050000 #if QT_VERSION < 0x050000
choke me choke me
#else #else
return 0; return 0;
#endif #endif
], ]])],
bitcoin_cv_qt5=yes, [bitcoin_cv_qt5=yes],
bitcoin_cv_qt5=no) [bitcoin_cv_qt5=no])
])]) ])])
dnl Internal. Check if the linked version of Qt was built as static libs. dnl Internal. Check if the linked version of Qt was built as static libs.
@ -237,15 +237,15 @@ dnl Output: bitcoin_cv_static_qt=yes|no
dnl Output: Defines QT_STATICPLUGIN if plugins are static. dnl Output: Defines QT_STATICPLUGIN if plugins are static.
AC_DEFUN([_BITCOIN_QT_IS_STATIC],[ AC_DEFUN([_BITCOIN_QT_IS_STATIC],[
AC_CACHE_CHECK(for static Qt, bitcoin_cv_static_qt,[ AC_CACHE_CHECK(for static Qt, bitcoin_cv_static_qt,[
AC_TRY_COMPILE( AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[#include <QtCore>], [[#include <QtCore>]],
[ [[
#if defined(QT_STATIC) #if defined(QT_STATIC)
return 0; return 0;
#else #else
choke me choke me
#endif #endif
], ]])],
[bitcoin_cv_static_qt=yes], [bitcoin_cv_static_qt=yes],
[bitcoin_cv_static_qt=no]) [bitcoin_cv_static_qt=no])
]) ])
@ -263,13 +263,13 @@ AC_DEFUN([_BITCOIN_QT_CHECK_STATIC_PLUGINS],[
AC_MSG_CHECKING(for static Qt plugins: $2) AC_MSG_CHECKING(for static Qt plugins: $2)
CHECK_STATIC_PLUGINS_TEMP_LIBS="$LIBS" CHECK_STATIC_PLUGINS_TEMP_LIBS="$LIBS"
LIBS="$2 $QT_LIBS $LIBS" LIBS="$2 $QT_LIBS $LIBS"
AC_TRY_LINK([ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#define QT_STATICPLUGIN #define QT_STATICPLUGIN
#include <QtPlugin> #include <QtPlugin>
$1], $1]],
[return 0;], [[return 0;]])],
[AC_MSG_RESULT(yes); QT_LIBS="$2 $QT_LIBS"], [AC_MSG_RESULT(yes); QT_LIBS="$2 $QT_LIBS"],
[AC_MSG_RESULT(no)]; BITCOIN_QT_FAIL(Could not resolve: $2)) [AC_MSG_RESULT(no); BITCOIN_QT_FAIL(Could not resolve: $2)])
LIBS="$CHECK_STATIC_PLUGINS_TEMP_LIBS" LIBS="$CHECK_STATIC_PLUGINS_TEMP_LIBS"
]) ])

26
configure.ac

@ -7,6 +7,8 @@ define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_IS_RELEASE, false) define(_CLIENT_VERSION_IS_RELEASE, false)
define(_COPYRIGHT_YEAR, 2014) define(_COPYRIGHT_YEAR, 2014)
AC_INIT([Bitcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@bitcoin.org],[bitcoin]) AC_INIT([Bitcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@bitcoin.org],[bitcoin])
AC_CONFIG_SRCDIR([src/main.cpp])
AC_CONFIG_HEADERS([src/config/bitcoin-config.h])
AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([build-aux/m4]) AC_CONFIG_MACRO_DIR([build-aux/m4])
LT_INIT([disable-shared]) LT_INIT([disable-shared])
@ -140,10 +142,6 @@ AC_ARG_ENABLE([glibc-back-compat],
AC_ARG_WITH([protoc-bindir],[AS_HELP_STRING([--with-protoc-bindir=BIN_DIR],[specify protoc bin path])], [protoc_bin_path=$withval], []) 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/config/bitcoin-config.h])
# Enable debug # Enable debug
AC_ARG_ENABLE([debug], AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug], [AS_HELP_STRING([--enable-debug],
@ -337,12 +335,12 @@ if test x$use_glibc_compat != xno; then
#__fdelt_chk's params and return type have changed from long unsigned int to long int. #__fdelt_chk's params and return type have changed from long unsigned int to long int.
# See which one is present here. # See which one is present here.
AC_MSG_CHECKING(__fdelt_chk type) AC_MSG_CHECKING(__fdelt_chk type)
AC_TRY_COMPILE([#ifdef _FORTIFY_SOURCE AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef _FORTIFY_SOURCE
#undef _FORTIFY_SOURCE #undef _FORTIFY_SOURCE
#endif #endif
#define _FORTIFY_SOURCE 2 #define _FORTIFY_SOURCE 2
#include <sys/select.h> #include <sys/select.h>
extern "C" long unsigned int __fdelt_warn(long unsigned int);],[], extern "C" long unsigned int __fdelt_warn(long unsigned int);]],[[]])],
[ fdelt_type="long unsigned int"], [ fdelt_type="long unsigned int"],
[ fdelt_type="long int"]) [ fdelt_type="long int"])
AC_MSG_RESULT($fdelt_type) AC_MSG_RESULT($fdelt_type)
@ -394,8 +392,8 @@ AC_CHECK_DECLS([le32toh, le64toh, htole32, htole64, be32toh, be64toh, htobe32, h
dnl Check for MSG_NOSIGNAL dnl Check for MSG_NOSIGNAL
AC_MSG_CHECKING(for MSG_NOSIGNAL) AC_MSG_CHECKING(for MSG_NOSIGNAL)
AC_TRY_COMPILE([#include <sys/socket.h>], AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]],
[ int f = MSG_NOSIGNAL; ], [[ 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(yes); AC_DEFINE(HAVE_MSG_NOSIGNAL, 1,[Define this symbol if you have MSG_NOSIGNAL]) ],
[ AC_MSG_RESULT(no)] [ AC_MSG_RESULT(no)]
) )
@ -537,16 +535,16 @@ TEMP_LIBS="$LIBS"
LIBS="$BOOST_LIBS $BOOST_CHRONO_LIB $LIBS" LIBS="$BOOST_LIBS $BOOST_CHRONO_LIB $LIBS"
TEMP_CPPFLAGS="$CPPFLAGS" TEMP_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
AC_TRY_LINK([ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>
#include <boost/version.hpp> #include <boost/version.hpp>
],[ ]],[[
#if BOOST_VERSION >= 105000 && (!defined(BOOST_HAS_NANOSLEEP) || BOOST_VERSION >= 105200) #if BOOST_VERSION >= 105000 && (!defined(BOOST_HAS_NANOSLEEP) || BOOST_VERSION >= 105200)
boost::this_thread::sleep_for(boost::chrono::milliseconds(0)); boost::this_thread::sleep_for(boost::chrono::milliseconds(0));
#else #else
choke me choke me
#endif #endif
], ]])],
[boost_sleep=yes; BOOST_LIBS="$BOOST_LIBS $BOOST_CHRONO_LIB"; [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])], AC_DEFINE(HAVE_WORKING_BOOST_SLEEP_FOR, 1, [Define this symbol if boost sleep_for works])],
[boost_sleep=no]) [boost_sleep=no])
@ -559,17 +557,17 @@ TEMP_LIBS="$LIBS"
LIBS="$BOOST_LIBS $LIBS" LIBS="$BOOST_LIBS $LIBS"
TEMP_CPPFLAGS="$CPPFLAGS" TEMP_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
AC_TRY_LINK([ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <boost/version.hpp> #include <boost/version.hpp>
#include <boost/thread.hpp> #include <boost/thread.hpp>
#include <boost/date_time/posix_time/posix_time_types.hpp> #include <boost/date_time/posix_time/posix_time_types.hpp>
],[ ]],[[
#if BOOST_VERSION <= 105600 #if BOOST_VERSION <= 105600
boost::this_thread::sleep(boost::posix_time::milliseconds(0)); boost::this_thread::sleep(boost::posix_time::milliseconds(0));
#else #else
choke me choke me
#endif #endif
], ]])],
[boost_sleep=yes; AC_DEFINE(HAVE_WORKING_BOOST_SLEEP, 1, [Define this symbol if boost sleep works])], [boost_sleep=yes; AC_DEFINE(HAVE_WORKING_BOOST_SLEEP, 1, [Define this symbol if boost sleep works])],
[boost_sleep=no]) [boost_sleep=no])
LIBS="$TEMP_LIBS" LIBS="$TEMP_LIBS"

Loading…
Cancel
Save