language: c

os:
  - linux
  - osx

sudo: required

compiler:
  - gcc
  - clang

env:
  - CONFIGURE_CMD=configure
  - CONFIGURE_CMD=cmake

script:
  - |
      if [[ $CONFIGURE_CMD == 'configure' ]]; then
        export CC=${CC} && autoreconf -i && ./configure
      fi
  - |
      if [[ $CONFIGURE_CMD == 'cmake' ]]; then
        mkdir build && cd build && cmake -DCMAKE_C_COMPILER="${CC}" ..
      fi
  - make

