#!/bin/csh -f

echo ' -------------------------------- basic configure test -------------------------------- '
rm -f snd
rm -f config.cache
echo ' CFLAGS="-Wall"  '
./configure --quiet CFLAGS="-Wall" 
make allclean
make
echo ' '
echo ' '
make xm
echo ' '
echo ' '
./snd --version
./snd -noinit -l snd-test 0
make clmclean
make sndinfo
./sndinfo oboe.snd
make audinfo
./audinfo
make sndplay
./sndplay oboe.snd
make sndrecord

# GUILE_CONFIG_path=/home/bil/test/bin 
echo ' -------------------------------- basic configure test/bin -------------------------------- '
make allclean
echo ' CFLAGS="-Wall" GUILE_CONFIG_path=/home/bil/test/bin '
./configure --quiet CFLAGS="-Wall" GUILE_CONFIG_path=/home/bil/test/bin
make
make xm
./snd --version
./snd -l snd-test 0
make allclean
echo ' CC=g++ CFLAGS="-Wall" GUILE_CONFIG_path=/home/bil/test/bin '
./configure --quiet CC=g++ CFLAGS="-Wall" GUILE_CONFIG_path=/home/bil/test/bin
make
make xm
./snd --version
./snd -l snd-test 1
./snd -l snd-test 22

echo ' -------------------------------- with-no-gui -------------------------------- '
make allclean
rm -f snd
rm -f config.cache
echo ' CFLAGS="-Wall" --with-no-gui '
./configure --quiet CFLAGS="-Wall" --with-no-gui
make
echo ' '
echo ' '
./snd --version
make xm
./snd -noinit -l snd-test 2
./snd -noinit -l snd-test 28

echo ' -------------------------------- with-no-gui/ladspa -------------------------------- '
make allclean
rm -f snd
rm -f config.cache
echo ' CFLAGS="-Wall" --with-no-gui --without-ladspa '
./configure --quiet CFLAGS="-Wall" --with-no-gui --without-ladspa
make
echo ' '
echo ' '
./snd --version
./snd -noinit -l snd-test 3

echo ' -------------------------------- gtk -------------------------------- '
make allclean
rm -f snd
rm -f config.cache
echo ' CFLAGS="-Wall" --with-gtk '
./configure --quiet CFLAGS="-Wall" --with-gtk
make
make xg
echo ' '
echo ' '
./snd --version 2
./snd --version 8
make xg
./snd -l snd-test 10
rm xg.o
echo ' CC=g++ CFLAGS="-Wall" --with-gtk '
./configure --quiet CC=g++ CFLAGS="-Wall" --with-gtk --disable-deprecated
make xg
make allclean
echo ' CC=g++ --with-gtk CFLAGS="-Wall" '
./configure --quiet CC=g++ --with-gtk CFLAGS="-Wall"
make
make xg
./snd --version
./snd -noinit -l snd-test 9

echo ' -------------------------------- no-guile -------------------------------- '
make allclean
rm -f snd
rm -f config.cache
echo ' --without-guile --without-ruby '
./configure --quiet --without-guile --without-ruby
make
echo ' '
echo ' '
./snd --version
make allclean
echo ' --without-guile --without-ruby --with-gtk '
./configure --quiet --without-guile --without-ruby --with-gtk
make
echo ' '
echo ' '
./snd --version
make sndinfo
./sndinfo test.snd

echo ' '
date
echo ' -------------------------------- static gsl -------------------------------- '
make allclean
rm -f snd
rm -f config.cache
echo ' CFLAGS="-Wall" --with-static-gsl '
./configure --quiet CFLAGS="-Wall" --with-static-gsl
make
make xm
echo ' '
echo ' '
./snd --version
./snd -l snd-test 6

echo ' '
date
echo ' -------------------------------- configure --with-doubles test -------------------------------- '
make allclean
rm -f snd
rm -f config.cache
rm -f makefile
rm -f config.h
rm -f sndinfo
echo ' CFLAGS="-Wall"  --with-doubles '
./configure --quiet CFLAGS="-Wall"  --with-doubles
make
make xm
echo ' '
echo ' '
./snd --version
./snd -l snd-test

echo ' '
echo ' '
date
echo ' -------------------------------- configure --with-float-samples test -------------------------------- '
make allclean
rm -f snd
rm -f config.cache
rm -f makefile
rm -f config.h
rm -f sndinfo
echo ' CFLAGS="-Wall"  --with-float-samples --without-ladspa --with-gl --with-modules --without-gsl --without-xpm '
./configure --quiet CFLAGS="-Wall"  --with-float-samples --without-ladspa --with-gl --with-modules --without-gsl --without-xpm
make
make xm
echo ' '
echo ' '
./snd --version
./snd -l snd-test 9
./snd -l snd-test 20
make clmclean

echo ' -------------------------------- configure --with-modules test -------------------------------- '
make allclean
rm -f snd
rm -f config.cache
rm -f makefile
rm -f config.h
rm -f sndinfo
echo ' CFLAGS="-Wall"  --with-float-samples --with-modules '
./configure --quiet CFLAGS="-Wall"  --with-float-samples --with-modules
make
echo ' '
echo ' '
./snd --version
./snd -l snd-test
make clmclean

echo ' '
echo ' '
date
echo ' -------------------------------- configure --with-sample-width=32 test -------------------------------- '
make allclean
rm -f snd
rm -f config.cache
rm -f makefile
rm -f config.h
rm -f sndinfo
echo ' CFLAGS="-Wall"  --with-sample-width=32 --with-just-gl --with-static-motif --without-fftw '
./configure --quiet CFLAGS="-Wall"  --with-sample-width=32 --with-just-gl --with-static-motif --without-fftw
make
make xm
echo ' '
echo ' '
./snd --version
./snd -l snd-test 3

echo ' '
echo ' '
date
echo ' -------------------------------- configure --with-sample-width=28 test -------------------------------- '
make allclean
rm -f snd
rm -f config.cache
rm -f makefile
rm -f config.h
rm -f sndinfo
echo ' CFLAGS="-Wall"  --with-sample-width=28 '
./configure --quiet CFLAGS="-Wall"  --with-sample-width=28
make
make xm
echo ' '
echo ' '
./snd --version
./snd -l snd-test 9

echo ' '
echo ' '
date
echo ' -------------------------------- configure --with-sample-width=16 test -------------------------------- '
make allclean
rm -f snd
rm -f config.cache
rm -f makefile
rm -f config.h
rm -f sndinfo
echo ' CFLAGS="-Wall"  --with-sample-width=16 '
./configure --quiet CFLAGS="-Wall"  --with-sample-width=16
make
make xm
echo ' '
echo ' '
./snd --version
./snd -l snd-test 10

echo ' -------------------------------- configure --with-gtk test -------------------------------- '
make allclean
rm -f snd
rm -f config.cache
echo ' CFLAGS="-Wall"  --with-gtk '
./configure --quiet CFLAGS="-Wall"  --with-gtk
make
make xg
echo ' '
echo ' '
./snd --version
./snd -l snd-test 7
make allclean
rm -f snd
rm -f config.cache
echo ' CFLAGS="-Wall"  --with-gtk '
./configure --quiet CFLAGS="-Wall"  --with-gtk
make
make xg
echo ' '
echo ' '
./snd --version
./snd -l snd-test 8
make allclean
rm -f snd
rm -f config.cache
echo ' CFLAGS="-Wall"  --with-gtk --with-static-xm '
./configure --quiet CFLAGS="-Wall"  --with-gtk --with-static-xm
make
echo ' '
echo ' '
./snd --version
./snd -l snd-test
make allclean
echo ' CFLAGS="-Wall -DGTK_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED" --with-gtk --with-static-xm --with-x11 '
./configure --quiet --disable-deprecated CFLAGS="-Wall" --with-gtk --with-static-xm --with-x11
make
./snd --version
./snd -l snd-test 11
echo ' '
echo ' '
date
echo ' -------------------------------- motif test -------------------------------- '
make allclean
rm -f snd
rm -f sndinfo
rm -f audinfo
rm -f config.cache
echo ' CFLAGS="-Wall" --enable-snd-debug --with-gsl '
./configure --quiet CFLAGS="-Wall" --enable-snd-debug --with-gsl
make
make xm
echo ' '
echo ' '
./snd --version
./snd -noinit -l snd-test 2
make allclean
echo ' CFLAGS="-Wall" --with-static-xm '
./configure --quiet CFLAGS="-Wall" --with-static-xm
make
./snd --version
./snd -l snd-test
rm xm.o
echo ' CC=g++ --with-static-xm '
./configure --quiet CC=g++ --with-static-xm
make xm
./snd --version
./snd -l snd-test 12

make allclean
echo ' CFLAGS="-Wall" --with-static-xm --without-xpm --without-xp '
./configure --quiet CFLAGS="-Wall" --with-static-xm --without-xpm --without-xp
make
./snd --version
./snd -l snd-test

echo ' '
echo ' '
date
echo ' -------------------------------- snd-as-widget test -------------------------------- '
make allclean
rm -f snd
rm -f config.cache
echo ' CFLAGS="-Wall" --with-snd-as-widget '
./configure --quiet CFLAGS="-Wall" --with-snd-as-widget
make
make xm
gcc -c saw.c -I. -g -O2 -I/usr/local/include -I/usr/X11R6/include -o saw.o
gcc saw.o snd_widget.o -o saw -L/usr/X11R6/lib -lSM -lICE -lXm -lXt -lXp -lX11 -lXext -lXpm -L/usr/local/lib -lfftw3 -lguile -lguile-ltdl -lcrypt -lm
echo ' '
echo ' '
date
echo ' -------------------------------- gtk test -------------------------------- '
make allclean
rm -f snd
rm -f config.cache
echo ' CFLAGS="-Wall" --enable-snd-debug --with-gtk --with-gsl --with-gl '
./configure --quiet CFLAGS="-Wall" --enable-snd-debug --with-gtk --with-gsl --with-gl
make
make xg
echo ' '
echo ' '
./snd --version
./snd -l snd-test 14

echo ' '
echo ' '
date
echo ' -------------------------------- ruby test (Motif) -------------------------------- '
make allclean
rm -f snd
rm -f config.cache
echo ' CFLAGS="-Wall" --with-ruby '
./configure --quiet CFLAGS="-Wall" --with-ruby
make
make xm
echo ' '
echo ' '
make xm
echo ' '
echo ' '
./snd --version
./snd -noinit -l snd-test.rb
make allclean
echo ' CC=g++ CFLAGS="-Wall" --with-ruby '
./configure --quiet CC=g++ CFLAGS="-Wall" --with-ruby
make
make xm
make allclean
echo ' CFLAGS="-Wall" --with-ruby --with-static-xm --with-gl --enable-snd-debug '
./configure --quiet CFLAGS="-Wall" --with-ruby --with-static-xm --with-gl --enable-snd-debug
make
echo ' '
echo ' '
./snd --version
date
echo ' -------------------------------- ruby test (Gtk) -------------------------------- '
make allclean
rm -f snd
rm -f config.cache
echo ' CFLAGS="-Wall" --with-ruby --with-gtk '
./configure --quiet CFLAGS="-Wall" --with-ruby --with-gtk
make
make xg
echo ' '
echo ' '
./snd --version
make allclean
echo ' CC=g++ --with-ruby --with-gtk '
./configure --quiet CC=g++ --with-ruby --with-gtk
make
make xg
echo ' '
echo ' '
make allclean
echo ' CFLAGS="-Wall" --with-ruby --with-static-xm --with-gtk --enable-snd-debug --without-gsl --without-xpm --without-xp '
./configure --quiet CFLAGS="-Wall" --with-ruby --with-static-xm --with-gtk --enable-snd-debug --without-gsl --without-xpm --without-xp
make
echo ' '
echo ' '
./snd --version
make allclean
echo ' CFLAGS="-Wall -DGTK_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED" --with-ruby --with-static-xm --with-gtk --with-x11 --with-gl '
./configure --quiet disable-deprecated CFLAGS="-Wall" --with-ruby --with-static-xm --with-gtk --with-x11 --with-gl
make
./snd -noinit -l snd-test.rb
echo ' '
echo ' '
date
echo ' -------------------------------- ruby test (no gui) -------------------------------- '
make allclean
rm -f snd
rm -f config.cache
echo ' CFLAGS="-Wall" --with-ruby --with-no-gui --without-fftw '
./configure --quiet CFLAGS="-Wall" --with-ruby --with-no-gui --without-fftw
make
echo ' '
echo ' '
./snd --version
make allclean
echo ' CFLAGS="-Wall" --with-ruby --with-no-gui --enable-snd-debug '
./configure --quiet CFLAGS="-Wall" --with-ruby --with-no-gui --enable-snd-debug
make
echo ' '
echo ' '
./snd --version
make allclean
echo ' CC=g++ CFLAGS="-Wall" --with-ruby --with-no-gui --enable-snd-debug '
./configure --quiet CC=g++ CFLAGS="-Wall" --with-ruby --with-no-gui --enable-snd-debug
make

echo ' '
echo ' '
date
echo ' -------------------------------- g++ test -------------------------------- '
make allclean
rm -f snd
rm -f config.cache
echo ' CC=g++ CFLAGS="-Wall" '
./configure --quiet CC=g++ CFLAGS="-Wall"
make
make xm
make sndinfo
make audinfo
make sndplay
make sndrecord
./audinfo
./sndinfo test.snd
./snd --version
./snd -l snd-test 16
make allclean
echo ' '
echo ' '
echo ' CC=g++ --with-gtk '
./configure --quiet CC=g++ --with-gtk
make
make xg
./snd --version
./snd -l snd-test 17
./snd -l snd-test 20
make allclean
echo ' '
echo ' '
echo ' CC=g++ --with-no-gui '
./configure --quiet CC=g++ --with-no-gui
make
./snd --version
./snd -noinit -l snd-test 6
make allclean
echo ' CC=g++ --without-guile --without-ruby '
./configure --quiet CC=g++ --without-guile --without-ruby
make
make xm
./snd --version
make allclean
echo ' CC=g++ --with-static-xm --without-gsl '
./configure --quiet CC=g++ --with-static-xm --without-gsl
make
make xm
./snd --version
./snd -l snd-test 18
make allclean
echo ' '
echo ' '
date
echo ' -------------------------------- sndlib test -------------------------------- '
make allclean
rm -f snd
rm -f config.cache
rm -f sndinfo
rm -f audinfo
echo ' CFLAGS="-Wall" '
./configure --quiet CFLAGS="-Wall"
make sndinfo
./sndinfo oboe.snd
make audinfo
./audinfo

echo ' '
echo ' '
date
echo ' -------------------------------- no-gui test -------------------------------- '
make allclean
rm -f snd
echo ' CFLAGS="-Wall" --with-no-gui '
./configure --quiet CFLAGS="-Wall" --with-no-gui
make
./snd --version
./snd -l snd-test 20
./snd -l snd-test 8
echo ' '
echo ' '
date

echo ' -------------------------------- configure --disable-nls in various forms -------------------------------- '
make allclean
rm -f snd
rm -f config.cache
rm -f makefile
rm -f config.h
echo ' CFLAGS="-Wall" --disable-nls '
./configure --quiet CFLAGS="-Wall" --disable-nls
make
make xm
./snd --version
./snd -l snd-test 19
make allclean
echo ' '
echo ' '
echo ' CC=g++ --with-gtk --disable-nls  '
./configure --quiet CC=g++ --with-gtk --disable-nls
make
make xg
./snd --version
./snd -l snd-test 20
make allclean
echo ' '
echo ' '
echo ' CC=g++ --with-no-gui --disable-nls '
./configure --quiet CC=g++ --with-no-gui --disable-nls
make
./snd --version
make allclean
echo ' '
echo ' '
echo ' CC=g++ --without-guile --without-ruby --disable-nls '
./configure --quiet CC=g++ --without-guile --without-ruby --disable-nls
make
make xm
./snd --version
make allclean
echo ' '
echo ' '
echo ' CC=g++ --with-static-xm --disable-nls '
./configure --quiet CC=g++ --with-static-xm --disable-nls
make
./snd --version
./snd -e "(begin (display (+ 1 2 3)) (exit))"
make allclean
echo ' '
echo ' '
echo ' CFLAGS="-Wall" --with-ruby --disable-nls '
./configure --quiet CFLAGS="-Wall" --with-ruby --disable-nls
make
make xm
./snd --version
make allclean
echo ' --with-static-xm CFLAGS="-DXM_DISABLE_DEPRECATED -Wall" '
./configure --quiet --with-static-xm CFLAGS="-DXM_DISABLE_DEPRECATED -Wall"
./snd --version
./snd -l snd-test 28
make
make allclean
echo ' --with-static-xm --with-ruby CFLAGS="-DXM_DISABLE_DEPRECATED -Wall" '
./configure --quiet --with-static-xm --with-ruby CFLAGS="-DXM_DISABLE_DEPRECATED -Wall"
make
make allclean


# ./configure --enable-snd-debug CFLAGS=-DWITH_EFENCE SNDLIB_LIB=/home/bil/test/ElectricFence-2.2.2/libefence.a
