language: c
compiler:
  - gcc
  - clang
env:
  - build32=false
  - build32=true
matrix:
  exclude:
    - compiler: clang
      env: build32=true

before_script:
  - sudo apt-get install dejagnu texinfo
  - if $build32 ; then sudo apt-get install gcc-multilib g++-multilib ; fi

script: run= && if $build32 ; then run=i386 && mkdir path32 && PATH="$(pwd)/path32:$PATH" && printf '#!/bin/sh\nexec /usr/bin/'"$CC"' -m32 "$@"' > "path32/$CC" && chmod a+x "path32/$CC" ; fi && ./autogen.sh && $run ./configure && make && make dist && make check
