#!/bin/csh -f

echo ' -------------------------------- basic configure test -------------------------------- '
rm -f snd
rm -f config.cache
echo ' CFLAGS="-Wall"  '
./configure --quiet CFLAGS="-Wall -I/usr/X11R6/include" LDFLAGS="-L/usr/X11R6/lib"
make allclean
make
echo ' '
echo ' '
make xm
echo ' '
echo ' '
./snd --version
./snd -l snd-test 0
make clmclean
make sndinfo
./sndinfo oboe.snd
make audinfo
./audinfo
make sndplay
./sndplay oboe.snd


echo ' -------------------------------- basic configure -------------------------------- '
make allclean
echo ' CFLAGS="-Wall -I/usr/X11R6/include" '
./configure --quiet CFLAGS="-Wall -I/usr/X11R6/include" LDFLAGS="-L/usr/X11R6/lib"
make
make xm
./snd --version
./snd -l snd-test 0
make allclean

echo ' -------------------------------- with-no-gui -------------------------------- '
make allclean
rm -f snd
rm -f config.cache
echo ' CFLAGS="-Wall -I/usr/X11R6/include" --with-no-gui '
./configure --quiet CFLAGS="-Wall" --with-no-gui
make
echo ' '
echo ' '
./snd --version
make xm
./snd -l snd-test 2
./snd -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 -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 -l snd-test 9

echo ' -------------------------------- static gsl -------------------------------- '
make allclean
rm -f snd
rm -f config.cache
echo ' CFLAGS="-Wall -I/usr/X11R6/include" --with-static-gsl '
./configure --quiet CFLAGS="-Wall -I/usr/X11R6/include" --with-static-gsl LDFLAGS="-L/usr/X11R6/lib"
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 mus-config.h
rm -f sndinfo
echo ' CFLAGS="-Wall -I/usr/X11R6/include"  --with-doubles '
./configure --quiet CFLAGS="-Wall -I/usr/X11R6/include"  --with-doubles LDFLAGS="-L/usr/X11R6/lib"
make
make xm
echo ' '
echo ' '
./snd --version
./snd -l snd-test
echo ' -------------------------------- that was full snd-test with-doubles -------------------------------- '

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

echo ' -------------------------------- configure --with-sample-width=32 test -------------------------------- '
make allclean
rm -f snd
rm -f config.cache
rm -f makefile
rm -f mus-config.h
rm -f sndinfo
echo ' CFLAGS="-Wall -I/usr/X11R6/include"  --with-sample-width=32 --with-just-gl --with-static-motif --without-fftw '
./configure --quiet CFLAGS="-Wall -I/usr/X11R6/include"  --with-sample-width=32 --with-just-gl --with-static-motif --without-fftw LDFLAGS="-L/usr/X11R6/lib"
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 mus-config.h
rm -f sndinfo
echo ' CFLAGS="-Wall -I/usr/X11R6/include"  --with-sample-width=28 '
./configure --quiet CFLAGS="-Wall -I/usr/X11R6/include"  --with-sample-width=28 LDFLAGS="-L/usr/X11R6/lib"
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 mus-config.h
rm -f sndinfo
echo ' CFLAGS="-Wall -I/usr/X11R6/include"  --with-sample-width=16 '
./configure --quiet CFLAGS="-Wall -I/usr/X11R6/include"  --with-sample-width=16 LDFLAGS="-L/usr/X11R6/lib"
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
echo ' -------------------------------- that was full snd-test with-gtk -------------------------------- '
make allclean
echo ' CFLAGS="-Wall -DGTK_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED" --with-gtk --with-static-xm '
./configure --quiet --disable-deprecated CFLAGS="-Wall" --with-gtk --with-static-xm
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 -I/usr/X11R6/include" --enable-snd-debug --with-gsl '
./configure --quiet CFLAGS="-Wall -I/usr/X11R6/include" --enable-snd-debug --with-gsl LDFLAGS="-L/usr/X11R6/lib"
make
make xm
echo ' '
echo ' '
./snd --version
./snd -l snd-test 2
make allclean
echo ' CFLAGS="-Wall -I/usr/X11R6/include" --with-static-xm '
./configure --quiet CFLAGS="-Wall -I/usr/X11R6/include" --with-static-xm LDFLAGS="-L/usr/X11R6/lib"
make
./snd --version
./snd -l snd-test
echo ' -------------------------------- that was full snd-test with-motif -------------------------------- '
rm xm.o
echo ' CC=g++ --with-static-xm '
./configure --quiet CC=g++ --with-static-xm CFLAGS="-I/usr/X11R6/include" LDFLAGS="-L/usr/X11R6/lib"
make xm
./snd --version
./snd -l snd-test 12

make allclean
echo ' CFLAGS="-Wall -I/usr/X11R6/include" --with-static-xm --without-xpm --without-xp '
./configure --quiet CFLAGS="-Wall -I/usr/X11R6/include" --with-static-xm --without-xpm --without-xp LDFLAGS="-L/usr/X11R6/lib"
make
./snd --version
./snd -l snd-test 8

echo ' '
echo ' '
date
echo ' -------------------------------- snd-as-widget test -------------------------------- '
make allclean
rm -f snd
rm -f config.cache
echo ' CFLAGS="-Wall -I/usr/X11R6/include" --with-snd-as-widget '
./configure --quiet CFLAGS="-Wall -I/usr/X11R6/include" --with-snd-as-widget --without-fam --without-gsl --disable-nls LDFLAGS="-L/usr/X11R6/lib"
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 -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 '
./configure --quiet CFLAGS="-Wall" --enable-snd-debug --with-gtk --with-gsl
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 -I/usr/X11R6/include" --with-ruby '
./configure --quiet CFLAGS="-Wall -I/usr/X11R6/include" --with-ruby LDFLAGS="-L/usr/X11R6/lib"
make
make xm
echo ' '
echo ' '
make xm
echo ' '
echo ' '
./snd --version
# ./snd -l snd-test.rb -- libxm problem here stops entire sequence
make allclean
echo ' CC=g++ CFLAGS="-Wall -I/usr/X11R6/include" --with-ruby '
./configure --quiet CC=g++ CFLAGS="-Wall -I/usr/X11R6/include" --with-ruby LDFLAGS="-L/usr/X11R6/lib"
make
make xm
make allclean
echo ' CFLAGS="-Wall -I/usr/X11R6/include" --with-ruby --with-static-xm --with-gl --enable-snd-debug '
./configure --quiet CFLAGS="-Wall -I/usr/X11R6/include" --with-ruby --with-static-xm --with-gl --enable-snd-debug LDFLAGS="-L/usr/X11R6/lib"
make
echo ' '
echo ' '
./snd -noinit -l snd-test.rb 1
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 '
./configure --quiet --disable-deprecated CFLAGS="-Wall" --with-ruby --with-static-xm --with-gtk
make
./snd -noinit -l snd-test.rb 2
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 -I/usr/X11R6/include" '
./configure --quiet CC=g++ CFLAGS="-Wall -I/usr/X11R6/include" LDFLAGS="-L/usr/X11R6/lib"
make
make xm
make sndinfo
make audinfo
make sndplay
./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 -l snd-test 6
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 -I/usr/X11R6/include" LDFLAGS="-L/usr/X11R6/lib"
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 mus-config.h
echo ' CFLAGS="-Wall -I/usr/X11R6/include" --disable-nls '
./configure --quiet CFLAGS="-Wall -I/usr/X11R6/include" --disable-nls LDFLAGS="-L/usr/X11R6/lib"
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++ --with-static-xm --disable-nls '
./configure --quiet CC=g++ --with-static-xm --disable-nls CFLAGS="-I/usr/X11R6/include" LDFLAGS="-L/usr/X11R6/lib"
make
./snd --version
./snd -e "(begin (display (+ 1 2 3)) (exit))"
make allclean
echo ' '
echo ' '
echo ' CFLAGS="-Wall -I/usr/X11R6/include" --with-ruby --disable-nls '
./configure --quiet CFLAGS="-Wall -I/usr/X11R6/include" --with-ruby --disable-nls LDFLAGS="-L/usr/X11R6/lib"
make
make xm
./snd --version
make allclean
echo ' --with-static-xm CFLAGS="-DXM_DISABLE_DEPRECATED -Wall -I/usr/X11R6/include" '
./configure --quiet --with-static-xm CFLAGS="-DXM_DISABLE_DEPRECATED -Wall -I/usr/X11R6/include" LDFLAGS="-L/usr/X11R6/lib"
./snd --version
./snd -l snd-test 28
make
make allclean
echo ' --with-static-xm --with-ruby CFLAGS="-DXM_DISABLE_DEPRECATED -Wall -I/usr/X11R6/include" '
./configure --quiet --with-static-xm --with-ruby CFLAGS="-DXM_DISABLE_DEPRECATED -Wall -I/usr/X11R6/include" LDFLAGS="-L/usr/X11R6/lib"
make
make allclean

