diff --git a/configure.ac b/configure.ac index b84e4e7..9c66528 100644 --- a/configure.ac +++ b/configure.ac @@ -272,6 +272,12 @@ AS_CASE([${CC}], [*], [AX_CHECK_COMPILE_FLAG([-Wno-missing-braces], [CXXFLAGS="$CXXFLAGS -Wno-missing-braces"])]) +# Ignore comments within comments or commenting of backslash extended lines. +#------------------------------------------------------------------------------ +AS_CASE([${CC}], [*], + [AX_CHECK_COMPILE_FLAG([-Wno-comment], + [CXXFLAGS="$CXXFLAGS -Wno-comment"])]) + # Conflict in stdlib under clang. Enabled in clang only. #------------------------------------------------------------------------------ AS_CASE([${CC}], [*clang*], @@ -290,12 +296,6 @@ AS_CASE([${CC}], [*], [AX_CHECK_LINK_FLAG([-fstack-protector-all], [LDFLAGS="$LDFLAGS -fstack-protector-all"])]) -# Hide inlines from external libs. Enabled in gcc only. -#------------------------------------------------------------------------------ -AS_CASE([${CC}], [*gcc*], - [AX_CHECK_COMPILE_FLAG([-fvisibility-inlines-hidden], - [CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"])]) - # Process outputs into templates. #============================================================================== diff --git a/install.sh b/install.sh index 2f043b8..6f3d41a 100755 --- a/install.sh +++ b/install.sh @@ -9,11 +9,12 @@ # # Script options: # --build-boost Builds Boost libraries. -# --build-zmq Build ZeroMQ libraries. +# --build-zmq Builds ZeroMQ libraries. # --build-dir= Location of downloaded and intermediate files. # --prefix= Library install location (defaults to /usr/local). # --disable-shared Disables shared library builds. # --disable-static Disables static library builds. +# --help Display usage, overriding script execution. # # Verified on Ubuntu 14.04, requires gcc-4.8 or newer. # Verified on OSX 10.10, using MacPorts and Homebrew repositories, requires @@ -44,6 +45,14 @@ BOOST_ARCHIVE="boost_1_57_0.tar.bz2" # Define utility functions. #============================================================================== +configure_links() +{ + # Configure dynamic linker run-time bindings when installing to system. + if [[ ($OS == Linux) && ($PREFIX == "/usr/local") ]]; then + ldconfig + fi +} + configure_options() { display_message "configure options:" @@ -56,14 +65,6 @@ configure_options() ./configure "$@" } -configure_links() -{ - # Configure dynamic linker run-time bindings when installing to system. - if [[ ($OS == Linux) && ($PREFIX == "/usr/local") ]]; then - ldconfig - fi -} - create_directory() { local DIRECTORY="$1" @@ -91,6 +92,8 @@ display_error() initialize_git() { + display_heading_message "Initialize git" + # Initialize git repository at the root of the current directory. git init git config user.name anonymous @@ -161,6 +164,22 @@ push_directory() pushd "$DIRECTORY" >/dev/null } +display_help() +{ + display_message "Usage: ./install.sh [OPTION]..." + display_message "Manage the installation of libbitcoin-client." + display_message "Script options:" + display_message " --build-boost Builds Boost libraries." + display_message " --build-zmq Build ZeroMQ libraries." + display_message " --build-dir= Location of downloaded and intermediate files." + display_message " --prefix= Library install location (defaults to /usr/local)." + display_message " --disable-shared Disables shared library builds." + display_message " --disable-static Disables static library builds." + display_message " --help Display usage, overriding script execution." + display_message "" + display_message "All unrecognized options provided shall be passed as configuration options for " + display_message "all dependencies." +} # Initialize the build environment. #============================================================================== @@ -168,6 +187,36 @@ push_directory() #------------------------------------------------------------------------------ set -e +# Parse command line options that are handled by this script. +#------------------------------------------------------------------------------ +for OPTION in "$@"; do + case $OPTION in + # Standard script options. + (--help) DISPLAY_HELP="yes";; + + # Standard build options. + (--prefix=*) PREFIX="${OPTION#*=}";; + (--disable-shared) DISABLE_SHARED="yes";; + (--disable-static) DISABLE_STATIC="yes";; + + # Common project options. + (--with-icu) WITH_ICU="yes";; + (--with-png) WITH_PNG="yes";; + (--with-qrencode) WITH_QRENCODE="yes";; + + # Custom build options (in the form of --build-