diff --git a/.travis.yml b/.travis.yml index 704f34c7..5cc95014 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,13 @@ matrix: env: COMPILER=GCC5 PLOT=python - os: osx compiler: clang - + +# safelist +branches: + only: + - master + - develop + # Setup compiler before_install: - ./.travis/before_install.sh @@ -34,8 +40,14 @@ install: # Make sure python's available at runtime (if necessary) and then build KAT and run tests script: -- if [[ "$PLOT" == "python" ]] || [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH="$HOME/miniconda/bin:$PATH" && source activate test-environment && export LD_LIBRARY_PATH="$HOME/miniconda/envs/test-environment/lib:$LD_LIBRARY_PATH"; fi -- ./configure --disable-silent-rules && make && make check && make distcheck +- if [[ "$COMPILER" == "GCC5" ]]; then export CXX="g++-5" && export CC="gcc-5"; elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CXX="g++-4.9" && export CC="gcc-4.9"; fi +- if [[ "$PLOT" == "python" ]] || [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH="$HOME/miniconda/bin:$PATH" && source activate test-environment && export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/miniconda/envs/test-environment/lib"; fi +- gcc --version +- g++ --version +- ./configure +- make V=1 +- make V=1 check +#- make V=1 distcheck diff --git a/.travis/.gitignore b/.travis/.gitignore new file mode 100644 index 00000000..d3957307 --- /dev/null +++ b/.travis/.gitignore @@ -0,0 +1 @@ +/.install.sh.swp diff --git a/.travis/before_install.sh b/.travis/before_install.sh index a2fdd255..4f86c12c 100755 --- a/.travis/before_install.sh +++ b/.travis/before_install.sh @@ -5,18 +5,21 @@ if [[ $TRAVIS_OS_NAME == 'osx' ]]; then else sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test sudo apt-get update -qq + sudo apt-get install -qq libc6-dev if [ "$COMPILER" == "GCC5" ]; then - sudo apt-get install -qq g++-5 + sudo apt-get install -qq gcc-5 g++-5 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 100 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 100 export CXX="g++-5" - export CC="gcc-5" + export CC="gcc-5" else - sudo apt-get install -qq g++-4.9 + sudo apt-get install -qq gcc-4.9 g++-4.9 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 100 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 100 export CXX="g++-4.9" export CC="gcc-4.9" fi gcc --version + g++ --version + gcc --print-search-dirs fi diff --git a/.travis/install.sh b/.travis/install.sh index 38e2934b..84202df2 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -1,51 +1,54 @@ #!/bin/bash if [[ $TRAVIS_OS_NAME == 'osx' ]]; then + # Install boost -- looks like boost 1.55.0_2 is already installed with brew + #brew install boost - # Install boost -- looks like boost 1.55.0_2 is already installed with brew - #brew install boost - - # install anaconda - wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh; - bash miniconda.sh -b -p $HOME/miniconda; - export PATH="$HOME/miniconda/bin:$PATH"; - hash -r; - conda config --set always_yes yes --set changeps1 no; - conda update -q conda; - conda info -a - conda create -q -n test-environment python=3.5 anaconda; + # install anaconda + wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh; + bash miniconda.sh -b -p $HOME/miniconda; + export PATH="$HOME/miniconda/bin:$PATH"; + hash -r; + conda config --set always_yes yes --set changeps1 no; + conda update -q conda; + conda info -a + conda create -q -n test-environment python=3.5 anaconda; else - # Boost installation - wget -q http://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz/download - mv download boost.tar.gz - tar -xf boost.tar.gz - cd boost_1_59_0 - sudo ./bootstrap.sh --with-libraries=chrono,timer,program_options,filesystem,system - if [[ "$COMPILER" == "GCC5" ]]; then - sudo ./b2 -d0 --toolset=gcc-5 install; - else - sudo ./b2 -d0 --toolset=gcc-4.9 install; - fi - cd .. - - - # Plotting installation - if [[ "$PLOT" == "python" ]]; then - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; - bash miniconda.sh -b -p $HOME/miniconda; - export PATH="$HOME/miniconda/bin:$PATH"; - hash -r; - conda config --set always_yes yes --set changeps1 no; - conda update -q conda; - conda info -a - conda create -q -n test-environment python=3.5 anaconda; - elif [ "$PLOT" == "gnuplot" ]; then - sudo apt-get install gnuplot - gnuplot --version; - fi + # Boost installation + wget -q http://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz/download + mv download boost.tar.gz + tar -xf boost.tar.gz + cd boost_1_59_0 + sudo ./bootstrap.sh --with-libraries=chrono,timer,program_options,filesystem,system + if [[ "$COMPILER" == "GCC5" ]]; then + export CXX="g++-5" + export CC="gcc-5" + sudo ./b2 -d0 --toolset=gcc-5 install; + else + export CXX="g++-4.9" + export CC="gcc-4.9" + sudo ./b2 -d0 --toolset=gcc-4.9 install; + fi + cd .. + + + # Plotting installation + if [[ "$PLOT" == "python" ]]; then + wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; + bash miniconda.sh -b -p $HOME/miniconda; + export PATH="$HOME/miniconda/bin:$PATH"; + hash -r; + conda config --set always_yes yes --set changeps1 no; + conda update -q conda; + conda info -a + conda create -q -n test-environment python=3.5 anaconda; + elif [ "$PLOT" == "gnuplot" ]; then + sudo apt-get install gnuplot + gnuplot --version; + fi fi diff --git a/configure.ac b/configure.ac index 0d1c9eb9..0c31b0db 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ # Autoconf initialistion. Sets package name version and contact details AC_PREREQ([2.68]) -AC_INIT([kat],[2.3.0],[https://github.com/TGAC/KAT/issues],[kat],[https://github.com/TGAC/KAT]) +AC_INIT([kat],[2.3.1],[https://github.com/TGAC/KAT/issues],[kat],[https://github.com/TGAC/KAT]) AC_CONFIG_SRCDIR([src/kat.cc]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) @@ -78,45 +78,48 @@ else fi # Plotting -AC_ARG_ENABLE([gnuplot], AS_HELP_STRING([--enable-gnuplot], [Enable gnuplot plotting even if python matplotlib is available]), enable_gnuplot="yes", enable_gnuplot="no") - -#AM_PATH_PYTHON([], [], AC_MSG_ERROR([Python interpreter not found.])) - -AX_PYTHON_DEVEL([>= '3.1']) - -pybin=python${PYTHON_VERSION} pymod_good="no" -if [[ -n "${PYTHON_VERSION}" ]]; then - if [[ -z "${PYTHON_EXTRA_LIBS}" ]]; then - pymod_good="no" - AC_MSG_WARN([Python3 detected but Python3 development library was not found. If you wish to use python plotting please install python3 library. e.g. "sudo apt-get install python3-dev" on debian systems.]) - fi - pymod_good="yes" - AX_PYTHON_MODULE(numpy, ,${pybin}) - if [[ "${PYMOD}" == "no" ]]; then - pymod_good="no" - fi - AX_PYTHON_MODULE(matplotlib, ,${pybin}) - if [[ "${PYMOD}" == "no" ]]; then - pymod_good="no" - fi - AX_PYTHON_MODULE(scipy, ,${pybin}) - if [[ "${PYMOD}" == "no" ]]; then - pymod_good="no" +AC_ARG_ENABLE([noplotting], AS_HELP_STRING([--disable-plotting], [This will disable plotting even if python matplotlib or gnuplot are available]), do_plotting="no", do_plotting="yes") +AC_ARG_ENABLE([gnuplot], AS_HELP_STRING([--enable-gnuplot], [Enable gnuplot plotting even if python matplotlib is available]), use_gnuplot="yes", use_gnuplot="no") + +if [[ "${do_plotting}" == "yes" ]]; then + if [[ "${use_gnuplot}" == "no" ]]; then + AX_PYTHON_DEVEL([>= '3.1']) + + pybin=python${PYTHON_VERSION} + if [[ -n "${PYTHON_VERSION}" ]]; then + if [[ -z "${PYTHON_EXTRA_LIBS}" ]]; then + pymod_good="no" + AC_MSG_WARN([Python3 detected but Python3 development library was not found. If you wish to use python plotting please install python3 library. e.g. "sudo apt-get install python3-dev" on debian systems.]) + fi + pymod_good="yes" + AX_PYTHON_MODULE(numpy, ,${pybin}) + if [[ "${PYMOD}" == "no" ]]; then + pymod_good="no" + fi + AX_PYTHON_MODULE(matplotlib, ,${pybin}) + if [[ "${PYMOD}" == "no" ]]; then + pymod_good="no" + fi + AX_PYTHON_MODULE(scipy, ,${pybin}) + if [[ "${PYMOD}" == "no" ]]; then + pymod_good="no" + fi + fi fi -fi -# Check for gnuplot on path. Just emit a warning if not present -if [[ "${pymod_good}" == "no" ]] || [[ "${enable_gnuplot}" == "yes" ]]; then - AC_DEFINE([HAVE_PYTHON], [0], [Python not present]) - AC_CHECK_PROG([gnuplot_found], [gnuplot], [yes], [no]) - if [[ "${gnuplot_found}" == "no" ]] ; then - AC_DEFINE([HAVE_GNUPLOT], [0], [Gnuplot not present]) + # Check for gnuplot on path. Just emit a warning if not present + if [[ "${pymod_good}" == "no" ]] || [[ "${use_gnuplot}" == "yes" ]]; then + AC_DEFINE([HAVE_PYTHON], [0], [Python not present]) + AC_CHECK_PROG([gnuplot_found], [gnuplot], [yes], [no]) + if [[ "${gnuplot_found}" == "no" ]] ; then + AC_DEFINE([HAVE_GNUPLOT], [0], [Gnuplot not present]) + else + AC_DEFINE([HAVE_GNUPLOT], [1], [Gnuplot present]) + fi else - AC_DEFINE([HAVE_GNUPLOT], [1], [Gnuplot present]) + AC_DEFINE([HAVE_PYTHON], [1], [Python present]) fi -else - AC_DEFINE([HAVE_PYTHON], [1], [Python present]) fi # Check for sphinx to build documentation (optional) @@ -141,7 +144,11 @@ AM_CONDITIONAL([MAKE_DOCS], [test x$sphinx = xyes]) AC_SUBST([MAKE_DOCS]) + ## Check for boost + +AC_ARG_ENABLE([dynamic-boost], AS_HELP_STRING([--enable-dynamic-boost], [Boost is statically linked by default. Use this option if you would prefer to dynamically link boost]), dynboost="yes", dynboost="no") + AX_BOOST_BASE([1.52],, [AC_MSG_ERROR([Boost not found. Please ensure that boost is properly built and the BOOST_ROOT environment variable is set. Alternatively you can override BOOST_ROOT with the --with-boost option.])]) AX_BOOST_FILESYSTEM AX_BOOST_SYSTEM @@ -154,20 +161,37 @@ define([PC_FILE], lib/kat-2.2.pc) # Combine BOOST variables (apart for BOOST_TEST) -BOOST_LIBS="${BOOST_FILESYSTEM_LIB} ${BOOST_PROGRAM_OPTIONS_LIB} ${BOOST_SYSTEM_LIB} ${BOOST_TIMER_LIB}" -BOOST_STATIC_LIBS="${BOOST_TIMER_STATIC_LIB} ${BOOST_CHRONO_STATIC_LIB} ${RT_LIB} ${BOOST_FILESYSTEM_STATIC_LIB} ${BOOST_PROGRAM_OPTIONS_STATIC_LIB} ${BOOST_SYSTEM_STATIC_LIB} " +BOOST_DYN_LIBS="${BOOST_TIMER_LIB} ${BOOST_CHRONO_LIB} ${BOOST_FILESYSTEM_LIB} ${BOOST_PROGRAM_OPTIONS_LIB} ${BOOST_SYSTEM_LIB}" +AC_SUBST([BOOST_DYN_LIBS]) + +BOOST_STATIC_LIBS="${BOOST_TIMER_STATIC_LIB} ${BOOST_CHRONO_STATIC_LIB} ${BOOST_FILESYSTEM_STATIC_LIB} ${BOOST_PROGRAM_OPTIONS_STATIC_LIB} ${BOOST_SYSTEM_STATIC_LIB} " AC_SUBST([BOOST_STATIC_LIBS]) +# Prefer static linking of boost. If one or more static libs are not present +# (this happens with some default boost installations on some environments) then +# use dynamic libs instead. +if [[ "${dynboost}" == "yes" ]]; then + BOOST_LIBS="${BOOST_DYN_LIBS}" +else + if [[ -z "${BOOST_TIMER_STATIC_LIB}" ]] || [[ -z "${BOOST_CHRONO_STATIC_LIB}" ]] || [[ -z "${BOOST_FILESYSTEM_STATIC_LIB}" ]] || [[ -z "${BOOST_PROGRAM_OPTIONS_STATIC_LIB}" ]] || [[ -z "${BOOST_SYSTEM_STATIC_LIB}" ]]; then + AC_MSG_WARN([Not all static boost libraries could be found. Will use dynamic libraries instead.]) + BOOST_LIBS="${BOOST_DYN_LIBS}" + else + BOOST_LIBS="${BOOST_STATIC_LIBS}" + fi +fi +AC_SUBST([BOOST_LIBS]) + AM_CXXFLAGS="-DCPLUSPLUS" AC_SUBST([AM_CXXFLAGS]) if [[ "${pymod_good}" == "yes" ]]; then AM_CPPFLAGS="${BOOST_CPPFLAGS} ${PYTHON_CPPFLAGS}" - AM_LIBS="${PTHREAD_CFLAGS} ${BOOST_STATIC_LIBS} ${PYTHON_EXTRA_LIBS} ${PYTHON_LIBS}" + AM_LIBS="${PTHREAD_CFLAGS} ${BOOST_LIBS} ${RT_LIB} ${PYTHON_EXTRA_LIBS} ${PYTHON_LIBS}" AM_LDFLAGS="${BOOST_LDFLAGS} ${PYTHON_EXTRA_LDFLAGS}" else AM_CPPFLAGS="${BOOST_CPPFLAGS}" - AM_LIBS="${PTHREAD_CFLAGS} ${BOOST_STATIC_LIBS}" + AM_LIBS="${PTHREAD_CFLAGS} ${BOOST_LIBS} ${RT_LIB}" AM_LDFLAGS="${BOOST_LDFLAGS}" fi @@ -181,19 +205,23 @@ AC_CONFIG_FILES([Makefile doc/Makefile doc/source/conf.py lib/kat.pc lib/Makefil AC_CONFIG_SUBDIRS([deps/jellyfish-2.2.0]) AC_OUTPUT -if [[ "${pymod_good}" == "yes" ]] && [[ "$enable_gnuplot" == "no" ]] ; then - AC_MSG_NOTICE([Using python plotting]) +if [[ "${do_plotting}" == "no" ]]; then + AC_MSG_NOTICE([Plotting disabled]) else - if [[ "${gnuplot_found}" == "yes" ]]; then - if [[ "$enable_gnuplot" == "no" ]]; then - AC_MSG_WARN([Python3, or some required python modules where not found. Python via matplotlib is the preferred plotting method in KAT. If you want to use python plotting (the preferred option) then we suggest you install anaconda3 (or python3 with numpy, scipy and matplotlib separately). However, gnuplot was detected so KAT plots will be generated via gnuplot instead.]) + if [[ "${pymod_good}" == "yes" ]] && [[ "$use_gnuplot" == "no" ]] ; then + AC_MSG_NOTICE([Using python plotting]) + else + if [[ "${gnuplot_found}" == "yes" ]]; then + if [[ "${use_gnuplot}" == "no" ]]; then + AC_MSG_WARN([Python3, or some required python modules where not found. Python via matplotlib is the preferred plotting method in KAT. If you want to use python plotting (the preferred option) then we suggest you install anaconda3 (or python3 with numpy, scipy and matplotlib separately). However, gnuplot was detected so KAT plots will be generated via gnuplot instead.]) + else + AC_MSG_NOTICE([Using gnuplot plotting]) + fi else - AC_MSG_NOTICE([Using gnuplot plotting]) + AC_MSG_WARN([Neither python (with plotting modules present) or Gnuplot not detected. KAT will still work (minus plots). Should you require plotting functionality, you must install either anaconda3 (or python3 with numpy, scipy and matplotlib) or gnuplot, and then reconfigure and compile to enable plotting in KAT.]) fi - else - AC_MSG_WARN([Neither python (with plotting modules present) or Gnuplot not detected. KAT will still work (minus plots). Should you require plotting functionality, you must install either anaconda3 (or python3 with numpy, scipy and matplotlib) or gnuplot, and then reconfigure and compile to enable plotting in KAT.]) fi -fi +fi if [[ "${sphinx}" == "no" ]]; then AC_MSG_WARN([Sphinx not detected, or version is too old. Wont create documentation. You can still find the documentation online at: https://kat.readthedocs.org/en/latest/]) @@ -201,4 +229,10 @@ else AC_MSG_NOTICE([Building documentation with sphinx]) fi +if [[ "${dynboost}" == "yes" ]]; then + AC_MSG_NOTICE([Boost will be dynamically linked to your executable]) +else + AC_MSG_NOTICE([Boost will be statically linked to your executable]) +fi + diff --git a/deps/jellyfish-2.2.0/tests/.gitignore b/deps/jellyfish-2.2.0/tests/.gitignore index fabc599b..45c41134 100644 --- a/deps/jellyfish-2.2.0/tests/.gitignore +++ b/deps/jellyfish-2.2.0/tests/.gitignore @@ -18,3 +18,4 @@ /multi_file_fail_cmds /bloom_counter_commands *.timing +merge_m40* diff --git a/doc/Makefile b/doc/Makefile index 5d22d49e..d6d3c7fd 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -66,6 +66,7 @@ DISTFILES = $(DPS)/index.rst \ $(DPI)/kmer_spectra1.png \ $(DPI)/kmer_spectra_breakdown.png \ $(DPI)/pe_v_asm_clean.png \ + $(DPI)/pe_v_asm_wrong.png \ $(DPI)/pe_v_mp_after_density.png \ $(DPI)/pe_v_mp_after_shared.png \ $(DPI)/pe_v_mp_before_density.png \ diff --git a/doc/Makefile.in b/doc/Makefile.in index b5321986..b1a61d5b 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -66,6 +66,7 @@ DISTFILES = $(DPS)/index.rst \ $(DPI)/kmer_spectra1.png \ $(DPI)/kmer_spectra_breakdown.png \ $(DPI)/pe_v_asm_clean.png \ + $(DPI)/pe_v_asm_wrong.png \ $(DPI)/pe_v_mp_after_density.png \ $(DPI)/pe_v_mp_after_shared.png \ $(DPI)/pe_v_mp_before_density.png \ diff --git a/doc/source/conf.py b/doc/source/conf.py index 0d598f7e..0ec42d0f 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -52,9 +52,9 @@ # built documents. # # The short X.Y version. -version = '2.3.0' +version = '2.3.1' # The full version, including alpha/beta/rc tags. -release = '2.3.0' +release = '2.3.1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/m4/ax_boost_chrono.m4 b/m4/ax_boost_chrono.m4 index 51dd7d15..18cd5a76 100644 --- a/m4/ax_boost_chrono.m4 +++ b/m4/ax_boost_chrono.m4 @@ -106,17 +106,13 @@ AC_DEFUN([AX_BOOST_CHRONO], done no_find="no" - if test "x$ax_lib" = "x"; then - if test "x$ax_static_lib" = "x"; then - no_find="yes" - fi + if [[ -z "$ax_lib" ]] && [[ -z "$ax_static_lib" ]]; then + no_find="yes" fi no_link="no" - if test "x$link_chrono" != "xyes"; then - if test "x$link_chrono_static" != "xyes"; then - no_link="yes" - fi + if [[ "$link_chrono" == "no" ]] && [[ "$link_chrono_static" == "no" ]]; then + no_link="yes" fi else @@ -127,22 +123,24 @@ AC_DEFUN([AX_BOOST_CHRONO], done fi - if test "x$ax_lib" = "x"; then - AC_MSG_WARN(Could not find a dynamic version of the library!) - elif test "x$ax_static_lib" = "x"; then - AC_MSG_WARN(Could not find a static version of the library!) + if [[ -z "$ax_lib" ]]; then + AC_MSG_WARN(Could not find a dynamic version of boost_chrono) + fi + if [[ -z "$ax_static_lib" ]]; then + AC_MSG_WARN(Could not find a static version of boost_chrono) fi - if test "x$no_find" = "xyes"; then - AC_MSG_ERROR(Could not find any version of the library to link to) + if [[ "$no_find" == "yes" ]]; then + AC_MSG_ERROR(Could not find any version boost_chrono to link to) fi - if test "x$link_chrono" = "xno"; then - AC_MSG_WARN(Could not dynamic link against $ax_lib !) - elif test "x$link_chrono_static" = "xno"; then - AC_MSG_WARN(Could not static link against $ax_static_lib!) + if [[ "$link_chrono" = "no" ]]; then + AC_MSG_WARN(Could not dynamic link against $ax_lib) + fi + if [[ "$link_chrono_static" == "no" ]]; then + AC_MSG_WARN(Could not static link against $ax_static_lib) fi - if test "x$no_link" = "xyes"; then - AC_MSG_ERROR(Could not link against any boost-chrono lib) + if [[ "$no_link" == "yes" ]]; then + AC_MSG_ERROR(Could not link against any boost_chrono lib) fi fi diff --git a/m4/ax_boost_filesystem.m4 b/m4/ax_boost_filesystem.m4 index 8671d5cc..d6db5618 100644 --- a/m4/ax_boost_filesystem.m4 +++ b/m4/ax_boost_filesystem.m4 @@ -108,17 +108,13 @@ AC_DEFUN([AX_BOOST_FILESYSTEM], done no_find="no" - if test "x$ax_lib" = "x"; then - if test "x$ax_static_lib" = "x"; then - no_find="yes" - fi + if [[ -z "$ax_lib" ]] && [[ -z "$ax_static_lib" ]]; then + no_find="yes" fi no_link="no" - if test "x$link_filesystem" != "xyes"; then - if test "x$link_filesystem_static" != "xyes"; then - no_link="yes" - fi + if [[ "$link_filesystem" == "no" ]] && [[ "$link_filesystem_static" == "no" ]]; then + no_link="yes" fi else @@ -129,22 +125,24 @@ AC_DEFUN([AX_BOOST_FILESYSTEM], done fi - if test "x$ax_lib" = "x"; then - AC_MSG_WARN(Could not find a dynamic version of the library!) - elif test "x$ax_static_lib" = "x"; then - AC_MSG_WARN(Could not find a static version of the library!) + if [[ -z "$ax_lib" ]]; then + AC_MSG_WARN(Could not find a dynamic version of boost_filesystem) + fi + if [[ -z "$ax_static_lib" ]]; then + AC_MSG_WARN(Could not find a static version of boost_filesystem) fi - if test "x$no_find" = "xyes"; then - AC_MSG_ERROR(Could not find any version of the library to link to) + if [[ "$no_find" == "yes" ]]; then + AC_MSG_ERROR(Could not find any version boost_filesystem to link to) fi - if test "x$link_filesystem" = "xno"; then - AC_MSG_WARN(Could not dynamic link against $ax_lib !) - elif test "x$link_filesystem_static" = "xno"; then - AC_MSG_WARN(Could not static link against $ax_static_lib!) + if [[ "$link_filesystem" = "no" ]]; then + AC_MSG_WARN(Could not dynamic link against $ax_lib) + fi + if [[ "$link_filesystem_static" == "no" ]]; then + AC_MSG_WARN(Could not static link against $ax_static_lib) fi - if test "x$no_link" = "xyes"; then - AC_MSG_ERROR(Could not link against any boost-filesystem lib) + if [[ "$no_link" == "yes" ]]; then + AC_MSG_ERROR(Could not link against any boost_filesystem lib) fi fi diff --git a/m4/ax_boost_program_options.m4 b/m4/ax_boost_program_options.m4 index 33d84302..8fa99107 100644 --- a/m4/ax_boost_program_options.m4 +++ b/m4/ax_boost_program_options.m4 @@ -100,17 +100,13 @@ AC_DEFUN([AX_BOOST_PROGRAM_OPTIONS], done no_find="no" - if test "x$ax_lib" = "x"; then - if test "x$ax_static_lib" = "x"; then - no_find="yes" - fi + if [[ -z "$ax_lib" ]] && [[ -z "$ax_static_lib" ]]; then + no_find="yes" fi no_link="no" - if test "x$link_program_options" != "xyes"; then - if test "x$link_program_options_static" != "xyes"; then - no_link="yes" - fi + if [[ "$link_program_options" == "no" ]] && [[ "$link_program_options_static" == "no" ]]; then + no_link="yes" fi else @@ -121,22 +117,24 @@ AC_DEFUN([AX_BOOST_PROGRAM_OPTIONS], done fi - if test "x$ax_lib" = "x"; then - AC_MSG_WARN(Could not find a dynamic version of the library!) - elif test "x$ax_static_lib" = "x"; then - AC_MSG_WARN(Could not find a static version of the library!) + if [[ -z "$ax_lib" ]]; then + AC_MSG_WARN(Could not find a dynamic version of boost_program_options) + fi + if [[ -z "$ax_static_lib" ]]; then + AC_MSG_WARN(Could not find a static version of boost_program_options) fi - if test "x$no_find" = "xyes"; then - AC_MSG_ERROR(Could not find any version of the library to link to) + if [[ "$no_find" == "yes" ]]; then + AC_MSG_ERROR(Could not find any version boost_program_options to link to) fi - if test "x$link_program_options" = "xno"; then - AC_MSG_WARN(Could not dynamic link against $ax_lib !) - elif test "x$link_program_options_static" = "xno"; then - AC_MSG_WARN(Could not static link against $ax_static_lib!) + if [[ "$link_program_options" = "no" ]]; then + AC_MSG_WARN(Could not dynamic link against $ax_lib) + fi + if [[ "$link_program_options_static" == "no" ]]; then + AC_MSG_WARN(Could not static link against $ax_static_lib) fi - if test "x$no_link" = "xyes"; then - AC_MSG_ERROR(Could not link against any boost-program_options lib) + if [[ "$no_link" == "yes" ]]; then + AC_MSG_ERROR(Could not link against any boost_program_options lib) fi fi diff --git a/m4/ax_boost_system.m4 b/m4/ax_boost_system.m4 index 2adf0950..77f72260 100644 --- a/m4/ax_boost_system.m4 +++ b/m4/ax_boost_system.m4 @@ -106,17 +106,13 @@ AC_DEFUN([AX_BOOST_SYSTEM], done no_find="no" - if test "x$ax_lib" = "x"; then - if test "x$ax_static_lib" = "x"; then - no_find="yes" - fi + if [[ -z "$ax_lib" ]] && [[ -z "$ax_static_lib" ]]; then + no_find="yes" fi no_link="no" - if test "x$link_system" != "xyes"; then - if test "x$link_system_static" != "xyes"; then - no_link="yes" - fi + if [[ "$link_system" == "no" ]] && [[ "$link_system_static" == "no" ]]; then + no_link="yes" fi else @@ -127,22 +123,24 @@ AC_DEFUN([AX_BOOST_SYSTEM], done fi - if test "x$ax_lib" = "x"; then - AC_MSG_WARN(Could not find a dynamic version of the library!) - elif test "x$ax_static_lib" = "x"; then - AC_MSG_WARN(Could not find a static version of the library!) + if [[ -z "$ax_lib" ]]; then + AC_MSG_WARN(Could not find a dynamic version of boost_system) + fi + if [[ -z "$ax_static_lib" ]]; then + AC_MSG_WARN(Could not find a static version of boost_system) fi - if test "x$no_find" = "xyes"; then - AC_MSG_ERROR(Could not find any version of the library to link to) + if [[ "$no_find" == "yes" ]]; then + AC_MSG_ERROR(Could not find any version boost_system to link to) fi - if test "x$link_system" = "xno"; then - AC_MSG_WARN(Could not dynamic link against $ax_lib !) - elif test "x$link_system_static" = "xno"; then - AC_MSG_WARN(Could not static link against $ax_static_lib!) + if [[ "$link_system" = "no" ]]; then + AC_MSG_WARN(Could not dynamic link against $ax_lib) + fi + if [[ "$link_system_static" == "no" ]]; then + AC_MSG_WARN(Could not static link against $ax_static_lib) fi - if test "x$no_link" = "xyes"; then - AC_MSG_ERROR(Could not link against any boost-system lib) + if [[ "$no_link" == "yes" ]]; then + AC_MSG_ERROR(Could not link against any boost_system lib) fi fi diff --git a/m4/ax_boost_thread.m4 b/m4/ax_boost_thread.m4 deleted file mode 100644 index f9f858d2..00000000 --- a/m4/ax_boost_thread.m4 +++ /dev/null @@ -1,181 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_boost_thread.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_BOOST_THREAD -# -# DESCRIPTION -# -# Test for Thread library from the Boost C++ libraries. The macro requires -# a preceding call to AX_BOOST_BASE. Further documentation is available at -# . -# -# This macro calls: -# -# AC_SUBST(BOOST_THREAD_LIB) -# AC_SUBST(BOOST_THREAD_STATIC_LIB) -# -# And sets: -# -# HAVE_BOOST_THREAD -# -# LICENSE -# -# Copyright (c) 2009 Thomas Porschberg -# Copyright (c) 2009 Michael Tindal -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 27 - -AC_DEFUN([AX_BOOST_THREAD], -[ - AC_ARG_WITH([boost-thread], - AS_HELP_STRING([--with-boost-thread@<:@=special-lib@:>@], - [use the Thread library from boost - it is possible to specify a certain library for the linker - e.g. --with-boost-thread=boost_thread-gcc-mt ]), - [ - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ax_boost_user_thread_lib="" - else - want_boost="yes" - ax_boost_user_thread_lib="$withval" - fi - ], - [want_boost="yes"] - ) - - if test "x$want_boost" = "xyes"; then - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_BUILD]) - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_CACHE_CHECK(whether the Boost::Thread library is available, - ax_cv_boost_thread, - [AC_LANG_PUSH([C++]) - CXXFLAGS_SAVE=$CXXFLAGS - - if test "x$host_os" = "xsolaris" ; then - CXXFLAGS="-pthreads $CXXFLAGS" - elif test "x$host_os" = "xmingw32" ; then - CXXFLAGS="-mthreads $CXXFLAGS" - else - CXXFLAGS="-pthread $CXXFLAGS" - fi - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], - [[boost::thread_group thrds; - return 0;]])], - ax_cv_boost_thread=yes, ax_cv_boost_thread=no) - CXXFLAGS=$CXXFLAGS_SAVE - AC_LANG_POP([C++]) - ]) - if test "x$ax_cv_boost_thread" = "xyes"; then - if test "x$host_os" = "xsolaris" ; then - BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS" - elif test "x$host_os" = "xmingw32" ; then - BOOST_CPPFLAGS="-mthreads $BOOST_CPPFLAGS" - else - BOOST_CPPFLAGS="-pthread $BOOST_CPPFLAGS" - fi - - AC_SUBST(BOOST_CPPFLAGS) - - AC_DEFINE(HAVE_BOOST_THREAD,,[define if the Boost::Thread library is available]) - BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` - - LDFLAGS_SAVE=$LDFLAGS - case "x$host_os" in - *bsd* ) - LDFLAGS="-pthread $LDFLAGS" - break; - ;; - esac - if test "x$ax_cv_boost_thread" = "xyes"; then - AC_SUBST(BOOST_CPPFLAGS) - - AC_DEFINE(HAVE_BOOST_THREAD,,[define if the Boost::Thread library is available]) - BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` - - LDFLAGS_SAVE=$LDFLAGS - if test "x$ax_boost_user_thread_lib" = "x"; then - for libextension in `ls $BOOSTLIBDIR/libboost_thread*.so* $BOOSTLIBDIR/libboost_thread*.dylib* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_thread.*\)\.so.*$;\1;' -e 's;^lib\(boost_thread.*\)\.dylib.*$;\1;'` ; do - ax_lib=${libextension} - AC_CHECK_LIB($ax_lib, exit, - [BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break], - [link_thread="no"]) - done - if test "x$link_thread" != "xyes"; then - for libextension in `ls $BOOSTLIBDIR/boost_thread*.dll* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_thread.*\)\.dll.*$;\1;'` ; do - ax_lib=${libextension} - AC_CHECK_LIB($ax_lib, exit, - [BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break], - [link_thread="no"]) - done - fi - for libextension in `ls $BOOSTLIBDIR/libboost_thread*.a* 2>/dev/null` ; do - ax_static_lib=${libextension} - AC_CHECK_FILE($ax_static_lib, - [BOOST_THREAD_STATIC_LIB="$ax_static_lib"; AC_SUBST(BOOST_THREAD_STATIC_LIB) link_thread_static="yes"; break], - [link_thread_static="no"]) - done - - no_find="no" - if test "x$ax_lib" = "x"; then - if test "x$ax_static_lib" = "x"; then - no_find="yes" - fi - fi - - no_link="no" - if test "x$link_thread" != "xyes"; then - if test "x$link_thread_static" != "xyes"; then - no_link="yes" - fi - fi - - else - for ax_lib in $ax_boost_user_thread_lib boost_thread-$ax_boost_user_thread_lib; do - AC_CHECK_LIB($ax_lib, exit, - [BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break], - [link_thread="no"]) - done - - fi - if test "x$ax_lib" = "x"; then - AC_MSG_WARN(Could not find a dynamic version of the library!) - elif test "x$ax_static_lib" = "x"; then - AC_MSG_WARN(Could not find a static version of the library!) - fi - if test "x$no_find" = "xyes"; then - AC_MSG_ERROR(Could not find any version of the library to link to) - fi - - if test "x$link_thread" = "xno"; then - AC_MSG_WARN(Could not dynamic link against $ax_lib !) - elif test "x$link_thread_static" = "xno"; then - AC_MSG_WARN(Could not static link against $ax_static_lib!) - fi - if test "x$no_link" = "xyes"; then - AC_MSG_ERROR(Could not link against any boost-thread lib) - fi - - fi - - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" - fi -]) \ No newline at end of file diff --git a/m4/ax_boost_timer.m4 b/m4/ax_boost_timer.m4 index 5b7c7a6c..28477e7a 100644 --- a/m4/ax_boost_timer.m4 +++ b/m4/ax_boost_timer.m4 @@ -107,17 +107,13 @@ AC_DEFUN([AX_BOOST_TIMER], done no_find="no" - if test "x$ax_lib" = "x"; then - if test "x$ax_static_lib" = "x"; then - no_find="yes" - fi + if [[ -z "$ax_lib" ]] && [[ -z "$ax_static_lib" ]]; then + no_find="yes" fi no_link="no" - if test "x$link_timer" != "xyes"; then - if test "x$link_timer_static" != "xyes"; then - no_link="yes" - fi + if [[ "$link_timer" == "no" ]] && [[ "$link_timer_static" == "no" ]]; then + no_link="yes" fi else @@ -128,22 +124,24 @@ AC_DEFUN([AX_BOOST_TIMER], done fi - if test "x$ax_lib" = "x"; then - AC_MSG_WARN(Could not find a dynamic version of the library!) - elif test "x$ax_static_lib" = "x"; then - AC_MSG_WARN(Could not find a static version of the library!) + if [[ -z "$ax_lib" ]]; then + AC_MSG_WARN(Could not find a dynamic version of boost_timer) + fi + if [[ -z "$ax_static_lib" ]]; then + AC_MSG_WARN(Could not find a static version of boost_timer) fi - if test "x$no_find" = "xyes"; then - AC_MSG_ERROR(Could not find any version of the library to link to) + if [[ "$no_find" == "yes" ]]; then + AC_MSG_ERROR(Could not find any version boost_timer to link to) fi - if test "x$link_timer" = "xno"; then - AC_MSG_WARN(Could not dynamic link against $ax_lib !) - elif test "x$link_timer_static" = "xno"; then - AC_MSG_WARN(Could not static link against $ax_static_lib!) + if [[ "$link_timer" = "no" ]]; then + AC_MSG_WARN(Could not dynamic link against $ax_lib) + fi + if [[ "$link_timer_static" == "no" ]]; then + AC_MSG_WARN(Could not static link against $ax_static_lib) fi - if test "x$no_link" = "xyes"; then - AC_MSG_ERROR(Could not link against any boost-timer lib) + if [[ "$no_link" == "yes" ]]; then + AC_MSG_ERROR(Could not link against any boost_timer lib) fi fi diff --git a/m4/ax_boost_unit_test_framework.m4 b/m4/ax_boost_unit_test_framework.m4 deleted file mode 100644 index 099a0f7f..00000000 --- a/m4/ax_boost_unit_test_framework.m4 +++ /dev/null @@ -1,147 +0,0 @@ -# ================================================================================ -# http://www.gnu.org/software/autoconf-archive/ax_boost_unit_test_framework.html -# ================================================================================ -# -# SYNOPSIS -# -# AX_BOOST_UNIT_TEST_FRAMEWORK -# -# DESCRIPTION -# -# Test for Unit_Test_Framework library from the Boost C++ libraries. The -# macro requires a preceding call to AX_BOOST_BASE. Further documentation -# is available at . -# -# This macro calls: -# -# AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB) -# AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_STATIC_LIB) -# -# And sets: -# -# HAVE_BOOST_UNIT_TEST_FRAMEWORK -# -# LICENSE -# -# Copyright (c) 2008 Thomas Porschberg -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 19 - -AC_DEFUN([AX_BOOST_UNIT_TEST_FRAMEWORK], -[ - AC_ARG_WITH([boost-unit-test-framework], - AS_HELP_STRING([--with-boost-unit-test-framework@<:@=special-lib@:>@], - [use the Unit_Test_Framework library from boost - it is possible to specify a certain library for the linker - e.g. --with-boost-unit-test-framework=boost_unit_test_framework-gcc ]), - [ - if test "$withval" = "no"; then - want_boost="no" - elif test "$withval" = "yes"; then - want_boost="yes" - ax_boost_user_unit_test_framework_lib="" - else - want_boost="yes" - ax_boost_user_unit_test_framework_lib="$withval" - fi - ], - [want_boost="yes"] - ) - - if test "x$want_boost" = "xyes"; then - AC_REQUIRE([AC_PROG_CC]) - CPPFLAGS_SAVED="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" - export CPPFLAGS - - LDFLAGS_SAVED="$LDFLAGS" - LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" - export LDFLAGS - - AC_CACHE_CHECK(whether the Boost::Unit_Test_Framework library is available, - ax_cv_boost_unit_test_framework, - [AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], - [[using boost::unit_test::test_suite; - test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" ); return 0;]])], - ax_cv_boost_unit_test_framework=yes, ax_cv_boost_unit_test_framework=no) - AC_LANG_POP([C++]) - ] - ) - - if test "x$ax_cv_boost_unit_test_framework" = "xyes"; then - AC_DEFINE(HAVE_BOOST_UNIT_TEST_FRAMEWORK,,[define if the Boost::Unit_Test_Framework library is available]) - BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` - LDFLAGS_SAVE=$LDFLAGS - if test "x$ax_boost_user_unit_test_framework_lib" = "x"; then - for libextension in `ls $BOOSTLIBDIR/libboost_unit_test_framework*.so* $BOOSTLIBDIR/libboost_unit_test_framework*.dylib* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_unit_test_framework.*\)\.so.*$;\1;' -e 's;^lib\(boost_unit_test_framework.*\)\.dylib.*$;\1;'` ; do - ax_lib=${libextension} - AC_CHECK_LIB($ax_lib, exit, - [BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib"; AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB) link_unit_test_framework="yes"; break], - [link_unit_test_framework="no"]) - done - if test "x$link_unit_test_framework" != "xyes"; then - for libextension in `ls $BOOSTLIBDIR/boost_unit_test_framework*.dll* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_unit_test_framework.*\)\.dll.*$;\1;'` ; do - ax_lib=${libextension} - AC_CHECK_LIB($ax_lib, exit, - [BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib"; AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB) link_unit_test_framework="yes"; break], - [link_unit_test_framework="no"]) - done - fi - for libextension in `ls $BOOSTLIBDIR/libboost_unit_test_framework*.a* 2>/dev/null` ; do - ax_static_lib=${libextension} - AC_CHECK_FILE($ax_static_lib, - [BOOST_UNIT_TEST_FRAMEWORK_STATIC_LIB="$ax_static_lib"; AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_STATIC_LIB) link_unit_test_framework_static="yes"; break], - [link_unit_test_framework_static="no"]) - done - - no_find="no" - if test "x$ax_lib" = "x"; then - if test "x$ax_static_lib" = "x"; then - no_find="yes" - fi - fi - - no_link="no" - if test "x$link_unit_test_framework" != "xyes"; then - if test "x$link_unit_test_framework_static" != "xyes"; then - no_link="yes" - fi - fi - - else - for ax_lib in $ax_boost_user_unit_test_framework_lib boost_unit_test_framework-$ax_boost_user_unit_test_framework_lib; do - AC_CHECK_LIB($ax_lib, exit, - [BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib"; AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB) link_unit_test_framework="yes"; break], - [link_unit_test_framework="no"]) - done - - fi - if test "x$ax_lib" = "x"; then - AC_MSG_WARN(Could not find a dynamic version of the library!) - elif test "x$ax_static_lib" = "x"; then - AC_MSG_WARN(Could not find a static version of the library!) - fi - if test "x$no_find" = "xyes"; then - AC_MSG_ERROR(Could not find any version of the library to link to) - fi - - if test "x$link_unit_test_framework" = "xno"; then - AC_MSG_WARN(Could not dynamic link against $ax_lib !) - elif test "x$link_unit_test_framework_static" = "xno"; then - AC_MSG_WARN(Could not static link against $ax_static_lib!) - fi - if test "x$no_link" = "xyes"; then - AC_MSG_ERROR(Could not link against any boost-unit_test_framework lib) - fi - - fi - - CPPFLAGS="$CPPFLAGS_SAVED" - LDFLAGS="$LDFLAGS_SAVED" - fi -]) \ No newline at end of file diff --git a/m4/ax_python_devel.m4 b/m4/ax_python_devel.m4 index 331947f4..1458f1f8 100644 --- a/m4/ax_python_devel.m4 +++ b/m4/ax_python_devel.m4 @@ -23,7 +23,7 @@ # version number. Don't use "PYTHON_VERSION" for this: that environment # variable is declared as precious and thus reserved for the end-user. # -# This macro should work for all versions of Python >= 2.1.0. As an end +# This macro should work for all versions of Python >= 3.1.0. As an end # user, you can disable the check for the python version by setting the # PYTHON_NOVERSIONCHECK environment variable to something else than the # empty string. @@ -75,10 +75,14 @@ AC_DEFUN([AX_PYTHON_DEVEL],[ # Allow the use of a (user set) custom python version # AC_ARG_VAR([PYTHON_VERSION],[The installed Python - version to use, for example '2.3'. This string + version to use, for example '3.4'. This string will be appended to the Python interpreter canonical name.]) + if test -z "$PYTHON_VERSION"; then + PYTHON_VERSION="3" + fi + AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]]) if test -z "$PYTHON"; then AC_MSG_WARN([Cannot find python$PYTHON_VERSION in your system path]) @@ -86,11 +90,11 @@ AC_DEFUN([AX_PYTHON_DEVEL],[ fi # - # Check for a version of Python >= 2.1.0 + # Check for a version of Python >= 3.1.0 # ac_supports_python_ver=`$PYTHON -c "import sys; \ ver = sys.version.split ()[[0]]; \ - print (ver >= '2.1.0')"` + print (ver >= '3.1.0')"` python_full_ver=`$PYTHON -c "import sys; \ ver=sys.version.split ()[[0]]; \ print(ver)"` @@ -102,7 +106,7 @@ AC_DEFUN([AX_PYTHON_DEVEL],[ print(maj_ver + '.' + min_ver)"` PYTHON_FULL_VERSION="$python_full_ver" AC_MSG_NOTICE([Found python version: ${PYTHON_FULL_VERSION}]) - AC_MSG_CHECKING([for a version of Python >= '2.1.0']) + AC_MSG_CHECKING([for a version of Python >= '3.1.0']) if test "$ac_supports_python_ver" != "True"; then if test -z "$PYTHON_NOVERSIONCHECK"; then AC_MSG_RESULT([no]) diff --git a/src/Makefile.am b/src/Makefile.am index 1a5cacf3..ba9ef55f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -5,24 +5,29 @@ AUTOMAKE_OPTIONS = subdir-objects bin_PROGRAMS = kat # Executable inputs -kat_CXXFLAGS = -g -O3 -fwrapv -Wall -Wextra -Wno-deprecated-declarations -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable -Wno-unused-command-line-argument -ansi -pedantic -std=c++11 @AM_CXXFLAGS@ +kat_CXXFLAGS = \ + -g -O3 -fwrapv -Wall -Wextra \ + -Wno-deprecated-declarations -Wno-unused-function -Wno-unused-parameter \ + -Wno-unused-variable -Wno-unused-command-line-argument \ + -ansi -pedantic -std=c++11 \ + @AM_CXXFLAGS@ kat_CPPFLAGS = \ -isystem $(top_srcdir)/deps/seqan-library-2.0.0/include \ -isystem $(top_srcdir)/deps/jellyfish-2.2.0/include \ -isystem $(top_srcdir)/lib/include \ - @AM_CPPFLAGS@ @CPPFLAGS@ + @AM_CPPFLAGS@ kat_LDFLAGS = \ - -L../lib/.libs \ - -L../deps/jellyfish-2.2.0/.libs \ - @AM_LDFLAGS@ \ - @LDFLAGS@ + -static \ + -L../lib \ + -L../deps/jellyfish-2.2.0 \ + @AM_LDFLAGS@ kat_LDADD = \ @AM_LIBS@ \ - -l:libkat.a \ - -l:libkat_jellyfish.a + -lkat \ + -lkat_jellyfish noinst_HEADERS = \ diff --git a/tests/Makefile.am b/tests/Makefile.am index 1e1619cf..c95eff2f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -21,8 +21,8 @@ clean-local-check: -rm -rf temp # additional include paths necessary to compile the C++ library -CXXFLAGS=-g -O0 -fwrapv -Wall -Wextra -Wno-deprecated-declarations -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable -Wno-missing-field-initializers -Wno-sign-compare -std=c++11 @AM_CXXFLAGS@ -CPPFLAGS = -isystem $(top_srcdir)/deps/seqan-library-2.0.0/include \ +AM_CXXFLAGS=-g -O0 -fwrapv -Wall -Wextra -Wno-deprecated-declarations -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable -Wno-missing-field-initializers -Wno-sign-compare -std=c++11 @AM_CXXFLAGS@ +AM_CPPFLAGS = -isystem $(top_srcdir)/deps/seqan-library-2.0.0/include \ -isystem $(top_srcdir)/deps/jellyfish-2.2.0/include \ -isystem $(top_srcdir)/lib/include \ -DDATADIR=\"$(srcdir)/data\" \ @@ -49,13 +49,15 @@ check_unit_tests_SOURCES = \ check_main.cc check_unit_tests_LDFLAGS = \ + -static \ + -L. \ -L../lib \ -L../deps/jellyfish-2.2.0 \ - @AM_LDFLAGS@ \ - @LDFLAGS@ + @AM_LDFLAGS@ check_unit_tests_LDADD = \ libgtest.la \ + -lgtest \ -lkat \ -lkat_jellyfish \ @AM_LIBS@ diff --git a/tests/gtest.mk b/tests/gtest.mk index ac8583d4..4074fd62 100644 --- a/tests/gtest.mk +++ b/tests/gtest.mk @@ -7,8 +7,8 @@ check_LTLIBRARIES = libgtest.la libgtest_main.la libgtest_la_SOURCES = gtest/src/gtest-all.cc libgtest_main_la_SOURCES = gtest/src/gtest_main.cc libgtest_main_la_LIBADD = libgtest.la -libgtest_la_CXXFLAGS = -I$(srcdir) -libgtest_main_la_CXXFLAGS = -I$(srcdir) +libgtest_la_CPPFLAGS = -I$(srcdir) +libgtest_main_la_CPPFLAGS = -I$(srcdir) GTEST_SRC = gtest/src/gtest-all.cc \ gtest/src/gtest_main.cc \