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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@ AS_CASE([${enable_shared}], [yes], AC_DEFINE([BOOST_ALL_DYN_LINK]))

# Check dependencies.
#==============================================================================
# Require Boost of at least version 1.56.0 and output ${boost_CPPFLAGS/LDFLAGS}.
# Require Boost of at least version 1.57.0 and output ${boost_CPPFLAGS/LDFLAGS}.
#------------------------------------------------------------------------------
AS_CASE([${CC}], [*],
[AX_BOOST_BASE([1.56.0],
[AX_BOOST_BASE([1.57.0],
[AC_SUBST([boost_CPPFLAGS], [${BOOST_CPPFLAGS}])
AC_SUBST([boost_LDFLAGS], [${BOOST_LDFLAGS}])
AC_MSG_NOTICE([boost_CPPFLAGS : ${boost_CPPFLAGS}])
AC_MSG_NOTICE([boost_LDFLAGS : ${boost_LDFLAGS}])],
[AC_MSG_ERROR([Boost 1.56.0 or later is required but was not found.])])])
[AC_MSG_ERROR([Boost 1.57.0 or later is required but was not found.])])])

AS_CASE([${with_tests}], [yes],
[AX_BOOST_UNIT_TEST_FRAMEWORK
Expand Down
37 changes: 32 additions & 5 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,14 @@
#------------------------------------------------------------------------------
BUILD_DIR="build-libbitcoin-protocol"

# The default object directory.
#------------------------------------------------------------------------------
OBJECT_DIR="bin-objects"

# Boost archive.
#------------------------------------------------------------------------------
BOOST_URL="http://downloads.sourceforge.net/project/boost/boost/1.56.0/boost_1_56_0.tar.bz2"
BOOST_ARCHIVE="boost_1_56_0.tar.bz2"
BOOST_URL="http://downloads.sourceforge.net/project/boost/boost/1.57.0/boost_1_57_0.tar.bz2"
BOOST_ARCHIVE="boost_1_57_0.tar.bz2"


# Initialize the build environment.
Expand Down Expand Up @@ -231,6 +235,18 @@ configure_options()
./configure "$@"
}

configure_options_object_dir()
{
echo "configure options:"
for OPTION in "$@"; do
if [[ $OPTION ]]; then
echo $OPTION
fi
done

../configure "$@"
}

configure_links()
{
# Configure dynamic linker run-time bindings when installing to system.
Expand Down Expand Up @@ -269,11 +285,14 @@ make_current_directory()
local JOBS=$1
shift 1

create_directory "$OBJECT_DIR"
./autogen.sh
configure_options "$@"
push_directory "$OBJECT_DIR"
configure_options_object_dir "$@"
make_jobs $JOBS
make install
configure_links
pop_directory
}

# make_jobs jobs [make_options]
Expand Down Expand Up @@ -407,6 +426,7 @@ build_from_tarball()

# Use the suffixed archive name as the extraction directory.
local EXTRACT="build-$ARCHIVE"
push_directory "$BUILD_DIR"
create_directory $EXTRACT
push_directory $EXTRACT

Expand Down Expand Up @@ -439,6 +459,8 @@ build_from_tarball()
# Restore flags to prevent side effects.
export LDFLAGS=$SAVE_LDFLAGS
export CPPFLAGS=$SAVE_LCPPFLAGS

pop_directory
}

# Because boost ICU detection assumes in incorrect ICU path.
Expand Down Expand Up @@ -524,6 +546,7 @@ build_from_tarball_boost()

# Use the suffixed archive name as the extraction directory.
local EXTRACT="build-$ARCHIVE"
push_directory "$BUILD_DIR"
create_directory $EXTRACT
push_directory $EXTRACT

Expand Down Expand Up @@ -589,11 +612,14 @@ build_from_tarball_boost()
"$@"

pop_directory
pop_directory
}

# Standard build from github.
build_from_github()
{
push_directory "$BUILD_DIR"

local ACCOUNT=$1
local REPO=$2
local BRANCH=$3
Expand All @@ -614,6 +640,7 @@ build_from_github()
push_directory $REPO
make_current_directory $JOBS "${CONFIGURATION[@]}"
pop_directory
pop_directory
}

# Standard build of current directory.
Expand Down Expand Up @@ -645,8 +672,8 @@ build_from_travis()

# The primary build is not downloaded if we are running in Travis.
if [[ $TRAVIS == true ]]; then
push_directory ".."
build_from_local "Local $TRAVIS_REPO_SLUG" $JOBS "${OPTIONS[@]}" "$@"
push_directory "$OBJECT_DIR"
make_tests $JOBS
pop_directory
else
Expand Down Expand Up @@ -675,5 +702,5 @@ build_all()
create_directory "$BUILD_DIR"
push_directory "$BUILD_DIR"
initialize_git
time build_all "${CONFIGURE_OPTIONS[@]}"
pop_directory
time build_all "${CONFIGURE_OPTIONS[@]}"