| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
if test x"$srcdir" != x""; then |
| 4 |
builddir="." # running from make check, but it does not define that |
| 5 |
else |
| 6 |
srcdir=`echo "$0" | sed s,[^/]*$,,` |
| 7 |
test "$srcdir" = "$0" && srcdir=. |
| 8 |
test -z "$srcdir" && srcdir=. |
| 9 |
builddir="$srcdir" # running manually, have to assume |
| 10 |
fi |
| 11 |
|
| 12 |
srcdir=`cd $srcdir;pwd` |
| 13 |
builddir=`cd $builddir;pwd` |
| 14 |
|
| 15 |
basedir=".." |
| 16 |
cd $srcdir; if [ ! -d $basedir -o ! -f $basedir/src/dtsdec.c -o \ |
| 17 |
! -f $basedir/dtsdec-*.tar.gz ]; then |
| 18 |
cd ..; if [ ! -d $basedir -o ! -f $basedir/src/dtsdec.c -o \ |
| 19 |
! -f $basedir/dtsdec-*.tar.gz ]; then |
| 20 |
exit 77 |
| 21 |
fi |
| 22 |
fi |
| 23 |
basedir=`cd $basedir;pwd` |
| 24 |
|
| 25 |
cd $builddir |
| 26 |
rm -fr compile_test |
| 27 |
|
| 28 |
for compiler in cc gcc gcc272 gcc-2.95 gcc-3.0 gcc-3.1 gcc-3.2 c89 \ |
| 29 |
c++ g++ g++-2.95 g++-3.0 g++-3.1 g++-3.2 \ |
| 30 |
ccmalloc-gcc bgcc checkergcc tendracc icc \ |
| 31 |
tcc-noexec tcc-bounds i586-mingw32msvc-gcc; do |
| 32 |
compiler_path=`which $compiler` |
| 33 |
if test x"$compiler_path" = x""; then continue; fi |
| 34 |
|
| 35 |
mkdir compile_test |
| 36 |
cd compile_test; tar xzpf $basedir/dtsdec-*.tar.gz; cd dtsdec-* |
| 37 |
case "$compiler" in |
| 38 |
i586-mingw32msvc-gcc) |
| 39 |
opts="--host=i586-mingw32msvc --enable-warnings";; |
| 40 |
ccmalloc-gcc) opts="--enable-warnings --enable-debug";; |
| 41 |
tcc-*) opts="--enable-warnings --disable-oss";; |
| 42 |
*) opts="--enable-warnings";; |
| 43 |
esac |
| 44 |
error=1; CC=$compiler ./configure $opts && make && error=0 |
| 45 |
if test x"$error" != x"0"; then exit 1; fi |
| 46 |
error=1; CC=$compiler ./configure $opts --enable-fixed && make && error=0 |
| 47 |
if test x"$error" != x"0"; then exit 1; fi |
| 48 |
cd ../.. |
| 49 |
rm -fr compile_test |
| 50 |
done |
| 51 |
|
| 52 |
exit 0 |