dist: trusty
sudo: required

language: c
cache: ccache
git:
    submodules: false

before_install:
    - if [ -n "$COVERALLS" ]; then
          pip install --user cpp-coveralls;
      fi;
    - if expr "$CONFIG_OPTS" ":" ".*enable-external-tests" > /dev/null; then
          git submodule update --init --recursive;
      fi;

addons:
    apt:
        packages:
            - ccache
            - golang-1.6

os:
    - linux

compiler:
    - clang
    - gcc

env:
    - CONFIG_OPTS=" --prefix=/home/travis/dist/" DESTDIR="_install" 

before_script:
    - env
    - pwd
    - ls -l
    - ./config -v $CONFIG_OPTS;

script:
    - if [ -z "$BUILDONLY" ]; then
          make="make -s";
      else
          make="make";
      fi
    - mkdir ~/dist
    - $make update
    - $make
    - $make install
