#!/bin/csh -f

# cp ~/dist/snd/snd.tar .
# tar xf snd.tar

# words I constantly missppelll
fgrep decrip *.html
fgrep accomoda *.html
fgrep pysical *.html
fgrep decrip *.c
fgrep maake *.c
fgrep maake *.html
fgrep accomoda *.c
fgrep decrip *.scm
fgrep accomoda *.scm
# fgrep -e " #(" *.scm
fgrep -e "the the " *.c
fgrep -e "the the " *.html
fgrep udpate *.c
fgrep udpate *.html
fgrep udpate *.scm
fgrep -e "Float* " *.[ch]
fgrep -e "float* " *.h
fgrep -e "double* " *.h
fgrep -e "int* " *.h
fgrep -e "off_t* " *.[ch]
fgrep -e "long* " *.[ch]
grep ' \-\-$' *.html
/home/bil/cl/snd tools/va.scm
# tools/check-gtk.scm

rm -f snd
rm -f config.cache

echo ' -------------------------------------------------------------------------------- '
echo ' ----                 basic configure test                                  ----- '
echo ' -------------------------------------------------------------------------------- '
./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 -noinit --features "'clm 'snd-s7 'snd-motif 'sndlib"
./snd tools/check-help.scm
# ./snd generators.scm peak-phases.scm -e "(begin (test-peak-phases) (exit))"

# echo '(let ((hxm (dlopen (string-append (getcwd) "/xm.so")))) (dlinit hxm "Init_libxm") (display XmARROWS_END) (exit))' > tmp.scm
# ./snd tmp.scm
# rm tmp.scm

echo ' -------------------------------- s7 r5rs and other defaults changed -------------------------------- '
make allclean
sed mus-config.h -e 's/#define WITH_MULTIDIMENSIONAL_VECTORS 1/#define WITH_MULTIDIMENSIONAL_VECTORS 0/' > tmp
mv tmp mus-config.h
sed mus-config.h -e 's/#define WITH_R5RS_RATIONALIZE 0/#define WITH_R5RS_RATIONALIZE 1/' > tmp
mv tmp mus-config.h

./configure --quiet CFLAGS="-Wall -I/usr/X11R6/include" LDFLAGS="-L/usr/X11R6/lib" 
make
echo ' '
echo ' '

echo ' -------------------------------- no strftime -------------------------------- '

sed mus-config.h -e 's/#define HAVE_STRFTIME 1/#define HAVE_STRFTIME 0/' > tmp
mv tmp mus-config.h
make

echo ' -------------------------------- no readlink -------------------------------- '

sed mus-config.h -e 's/#define HAVE_READLINK 1/#define HAVE_READLINK 0/' > tmp
mv tmp mus-config.h
make

echo ' -------------------------------- no getcwd -------------------------------- '

sed mus-config.h -e 's/#define HAVE_GETCWD 1/#define HAVE_GETCWD 0/' > tmp
mv tmp mus-config.h
make

echo ' -------------------------------- no lstat -------------------------------- '

sed mus-config.h -e 's/#define HAVE_LSTAT 1/#define HAVE_LSTAT 0/' > tmp
mv tmp mus-config.h
make

echo ' -------------------------------- no access -------------------------------- '

sed mus-config.h -e 's/#define HAVE_ACCESS 1/#define HAVE_ACCESS 0/' > tmp
mv tmp mus-config.h
make

echo ' -------------------------------- no strcasecmp -------------------------------- '

sed mus-config.h -e 's/#define HAVE_STRCASECMP 1/#define HAVE_STRCASECMP 0/' > tmp
mv tmp mus-config.h
make

echo ' -------------------------------- no snprintf -------------------------------- '

sed mus-config.h -e 's/#define HAVE_SNPRINTF 1/#define HAVE_SNPRINTF 0/' > tmp
mv tmp mus-config.h
make

make clmclean
make sndinfo
make audinfo
make sndplay
make allclean

echo ' '
echo ' '
echo ' -------------------------------------------------------------------------------- '
echo ' ----                 --enable-snd-debug g++                                ----  '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet --enable-snd-debug CC=g++ CFLAGS="-Wall -I/usr/X11R6/include" LDFLAGS="-L/usr/X11R6/lib" 
make
make xm
./snd --version
./snd -noinit --features "'clm 'snd-debug"

make allclean
rm -f snd
rm -f config.cache

echo ' '
echo ' '
echo ' -------------------------------------------------------------------------------- '
echo ' -----                --with-no-gui                                         ----  '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include" --with-no-gui
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features "'clm 'snd-nogui"

make allclean
rm -f snd
rm -f config.cache

echo ' '
echo ' '
echo ' -------------------------------------------------------------------------------- '
echo ' -----                --with-no-gui --with-oss                              ----  '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include" --with-no-gui --with-oss
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features "'clm 'snd-nogui 'oss"

make allclean
rm -f snd
rm -f config.cache

echo ' '
echo ' '
echo ' -------------------------------------------------------------------------------- '
echo ' -----                --with-no-gui --with-esd                              ----  '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include" --with-no-gui --with-esd
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features "'clm 'snd-nogui 'esd"

make allclean
rm -f snd
rm -f config.cache

echo ' -------------------------------------------------------------------------------- '
echo ' -----                --with-no-gui --with-gmp                              ----  '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet --with-no-gui --with-gmp
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features "'clm 'snd-nogui 'gmp"

make allclean
rm -f snd
rm -f config.cache

echo ' '
echo ' '
echo ' -------------------------------------------------------------------------------- '
echo ' ----                 -with-no-gui --without-ladspa                         ----  '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include" --with-no-gui --without-ladspa
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features "'clm 'snd-nogui 'snd-s7"

make allclean
rm -f snd
rm -f config.cache

echo ' '
echo ' '
echo ' -------------------------------------------------------------------------------- '
echo ' ----                --with-gtk                                             ----  '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include" --with-gtk
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features "'clm 'snd-gtk 'snd-s7"

echo ' -------------------------------------------------------------------------------- '
echo ' ----                 --with-gtk --with-cairo                               ----  '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include" --with-gtk --with-cairo
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features "'clm 'snd-gtk"
make xg
echo '(let ((hxm (dlopen (string-append (getcwd) "/xg.so")))) (dlinit hxm "Init_libxg") (display GTK_ARROW_UP) (exit))' > tmp.scm
./snd tmp.scm
rm tmp.scm
rm xg.o

echo ' '
echo ' '
echo ' -------------------------------------------------------------------------------- '
echo ' ----                 g++ --with-gtk --disable-deprecated                   ----  '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet CC=g++ CFLAGS="-Wall -I/usr/X11R6/include" --with-gtk --disable-deprecated
make xg
make allclean
make
./snd --version
./snd -noinit --features "'clm 'snd-gtk 'snd-s7"
make allclean

echo ' '
echo ' '
echo ' -------------------------------------------------------------------------------- '
echo ' -----                g++ --with-gtk                                         ---  '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet CC=g++ --with-gtk CFLAGS="-Wall -I/usr/X11R6/include"
make
./snd --version
./snd -noinit --features "'clm 'snd-gtk"
make allclean

echo ' '
echo ' '
echo ' -------------------------------------------------------------------------------- '
echo ' -----                g++ --with-gtk --with-gsl                   ---  '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet CC=g++ --with-gtk --with-gsl CFLAGS="-Wall -I/usr/X11R6/include"
make
./snd --version
./snd -noinit --features "'clm 'snd-gtk 'gsl"
make allclean

echo ' '
echo ' '
echo ' -------------------------------------------------------------------------------- '
echo ' ----                 g++ --with-gtk --without-builtin-gtkrc                 ---  '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet --with-gtk --without-builtin-gtkrc CFLAGS="-Wall -I/usr/X11R6/include"
make
./snd --version
./snd -noinit --features "'clm 'snd-gtk"

make allclean
rm -f snd
rm -f config.cache

echo ' '
echo ' '
echo ' -------------------------------------------------------------------------------- '
echo ' -----                --with-forth                                           ---- '
echo ' -------------------------------------------------------------------------------- '
./configure LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-I/usr/X11R6/include" --quiet --with-forth
make
./snd --version
./snd -noinit --features "'clm 'snd-forth 'snd-motif"
make allclean

echo ' '
echo ' '
echo ' -------------------------------------------------------------------------------- '
echo ' -----                --with-forth --enable-snd-debug --with-static-xm --with-editres --with-gl ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet --with-forth --enable-snd-debug --with-static-xm --with-editres --with-gl LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include"
make
./snd --version
./snd -noinit --features "'clm 'snd-forth 'xm 'gl"
make allclean

echo ' '
echo ' '
echo ' -------------------------------------------------------------------------------- '
echo ' -----                --with-forth --with-gtk --with-static-xg      --- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet --with-forth --with-gtk --with-static-xg LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include"
make
./snd --version
./snd -noinit --features "'clm 'snd-gtk 'xg 'gl"
make allclean

echo ' '
echo ' '
echo ' -------------------------------------------------------------------------------- '
echo ' -----                --with-forth --with-no-gui                              --- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet --with-forth --with-no-gui LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include"
make
./snd --version
./snd -noinit --features "'clm 'snd-forth 'snd-nogui"
make allclean

echo ' '
echo ' '
echo ' -------------------------------------------------------------------------------- '
echo ' ----                 --without-extension-language                        ----  '
echo ' -------------------------------------------------------------------------------- '
./configure LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-I/usr/X11R6/include" --quiet --without-extension-language
make
echo ' '
echo ' '
./snd --version
make allclean

echo ' -------------------------------------------------------------------------------- '
echo ' -----                --without-extension-language --with-gtk             ----  '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet --without-extension-language --with-gtk --with-static-xg
make
echo ' '
echo ' '
./snd --version
rm -f sndinfo
make sndinfo
./sndinfo test.snd
make allclean

echo ' -------------------------------------------------------------------------------- '
echo ' ----                 --without-extension-language --with-gtk --with-cairo ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet --without-extension-language --with-gtk --with-cairo
make
echo ' '
echo ' '
./snd --version
make allclean

echo ' -------------------------------------------------------------------------------- '
echo ' ----                 --without-extension-language --with-gtk ------  '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet --without-extension-language --with-gtk
make
echo ' '
echo ' '
./snd --version
make allclean

echo ' -------------------------------------------------------------------------------- '
echo ' ----                 --without-extension-language --with-just-gl       ------  '
echo ' -------------------------------------------------------------------------------- '
./configure LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-I/usr/X11R6/include" --quiet --without-extension-language --with-just-gl
make
echo ' '
echo ' '
./snd --version

echo ' -------------------------------------------------------------------------------- '
echo ' -----                --without-extension-language g++                    ----  '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet --without-extension-language --with-static-xm CC=g++ LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-I/usr/X11R6/include"
make
echo ' '
echo ' '
./snd --version
make allclean

echo ' '
echo ' '
echo ' -------------------------------------------------------------------------------- '
echo ' -----                --with-gtk --with-cairo --with-static-xg                --- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet --with-gtk --with-static-xg --with-cairo LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include"
make
./snd --version
./snd -noinit --features "'clm 'snd-gtk 'xg 'gl"
make allclean

echo ' '
echo ' '
echo ' -------------------------------------------------------------------------------- '
echo ' -----                --with-gtk --with-cairo --with-static-xg g++ doubles/threads --- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet --with-gtk --with-static-xg CC=g++ --with-cairo --with-doubles --enable-threads LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include"
make
./snd --version
./snd -noinit --features "'clm 'snd-gtk 'xg 'gl"
make allclean

echo ' -------------------------------------------------------------------------------- '
echo ' -----                 --with-doubles                                       ----  '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include"  --with-doubles
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features "'clm 'snd-s7"

echo ' '
make allclean
rm -f snd
rm -f config.cache
rm -f makefile
rm -f mus-config.h
rm -f sndinfo

echo ' -------------------------------------------------------------------------------- '
echo ' ----                  --with-doubles  but int samples                      ----  '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include"  --with-doubles --without-float-samples
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features "'clm 'snd-s7"

echo ' '
echo ' '
make allclean
rm -f snd
rm -f config.cache
rm -f makefile
rm -f mus-config.h
rm -f sndinfo

echo ' -------------------------------------------------------------------------------- '
echo ' ----                  --without-float-samples --without-ladspa --with-gl --with-gl2ps --without-gsl --without-xpm '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include"  --without-float-samples --without-ladspa --with-gl --with-gl2ps --without-gsl --without-xpm
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features "'clm 'gl 'gl2ps"
make clmclean

echo ' '
echo ' '
make allclean
rm -f snd
rm -f config.cache
rm -f makefile
rm -f mus-config.h
rm -f sndinfo

echo ' -------------------------------------------------------------------------------- '
echo ' -----                 --without-float-samples --with-sample-width=32 --with-just-gl --with-static-motif --without-fftw '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include"  --without-float-samples --with-sample-width=32 --with-just-gl --with-static-motif --without-fftw
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features "'clm 'snd-motif"

echo ' '
echo ' '
make allclean
rm -f snd
rm -f config.cache
rm -f makefile
rm -f mus-config.h
rm -f sndinfo

echo ' -------------------------------------------------------------------------------- '
echo ' -----                 --without-float-samples --with-sample-width=28       ----  '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include"  --without-float-samples --with-sample-width=28
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features "'clm"

echo ' '
echo ' '
make allclean
rm -f snd
rm -f config.cache
rm -f makefile
rm -f mus-config.h
rm -f sndinfo
echo ' -------------------------------------------------------------------------------- '
echo ' -----                 --without-float-samples --with-sample-width=16        ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include"  --without-float-samples --with-sample-width=16
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features "'clm"

echo ' '
echo ' '
make allclean
rm -f snd
rm -f config.cache
rm -f makefile
rm -f mus-config.h
rm -f sndinfo
echo ' -------------------------------------------------------------------------------- '
echo ' -----                 --without-float-samples --with-sample-width=24 g++    ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet CC=g++ LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include"  --without-float-samples --with-sample-width=24
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features "'clm"

make allclean
rm -f snd
rm -f config.cache

echo ' -------------------------------------------------------------------------------- '
echo ' ----                  --with-gtk                                            ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include"  --with-gtk
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features "'clm 'snd-gtk"
make allclean
rm -f snd
rm -f config.cache

echo ' -------------------------------------------------------------------------------- '
echo ' -----                 --with-gtk --with-static-xm                           ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include"  --with-gtk --with-static-xm
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features "'clm 'snd-gtk 'xg"
make allclean

echo ' -------------------------------------------------------------------------------- '
echo ' -----                GTK_DISABLE_DEPRECATED G_DISABLE_DEPRECATED GDK_DISABLE_DEPRECATED --with-gtk --with-static-xm '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet --disable-deprecated CFLAGS="-Wall -I/usr/X11R6/include -D_FORTIFY_SOURCE" --with-gtk --with-static-xm
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features "'clm 'snd-gtk 'xg"

make allclean
rm -f snd
rm -f sndinfo
rm -f audinfo
rm -f config.cache

echo ' -------------------------------------------------------------------------------- '
echo ' ----                --enable-snd-debug --with-gsl                           ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include -DXEN_DEBUGGING" --enable-snd-debug --with-gsl
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features "'clm 'gsl 'snd-debug 'snd-motif"
make allclean

echo ' -------------------------------------------------------------------------------- '
echo ' ----                --with-gmp                                              ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include" --with-gmp
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features "'clm 'snd-debug 'snd-motif 'gmp"
make allclean

echo ' -------------------------------------------------------------------------------- '
echo ' -----                --with-static-xm  editres                              ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include" --with-static-xm --with-editres --disable-deprecated
make
make allclean

echo ' '
echo ' '
echo ' -------------------------------------------------------------------------------- '
echo ' -----                g++ --with-static-xm                                   ---- '
echo ' -------------------------------------------------------------------------------- '
./configure LDFLAGS="-L/usr/X11R6/lib" --quiet CC=g++ --with-static-xm CFLAGS="-I/usr/X11R6/include"
make

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

echo ' '
echo ' '
make allclean
rm -f snd
rm -f config.cache

echo ' -------------------------------------------------------------------------------- '
echo ' ----                 --with-snd-as-widget                                   ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include" --with-snd-as-widget
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features "'clm"

make allclean
rm -f snd
rm -f config.cache

echo ' -------------------------------------------------------------------------------- '
echo ' ----                 --enable-snd-debug --with-gtk --with-gsl '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include -DXEN_DEBUGGING" --enable-snd-debug --with-gtk --with-gsl
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features "'clm 'snd-gtk 'gsl 'gl 'snd-debug 'snd-s7 'gl2ps"


make allclean
rm -f snd
rm -f config.cache

echo ' -------------------------------------------------------------------------------- '
echo ' ----                 --with-gtk --with-gmp                                  ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet --with-gtk --with-gmp
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features "'clm 'snd-gtk 'gmp"

echo ' '
echo ' '
make allclean
rm -f snd
rm -f config.cache

echo ' -------------------------------------------------------------------------------- '
echo ' -----                --with-ruby                                            ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include" --with-ruby
make
echo ' '
echo ' '
make xm
echo ' '
echo ' '
./snd --version
./snd -noinit --features ":clm, :snd_ruby, :snd_motif"
make allclean

echo ' -------------------------------------------------------------------------------- '
echo ' ----                 g++ --with-ruby                                        ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet CC=g++ LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include" --with-ruby
make
./snd --version
./snd -noinit --features ":clm, :snd_ruby"
make allclean

echo ' -------------------------------------------------------------------------------- '
echo ' -----                --with-ruby --with-static-xm --with-gl --enable-snd-debug --with-alsa '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include -DXEN_DEBUGGING" --with-ruby --with-static-xm --with-gl --enable-snd-debug --with-alsa
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features ":clm, :alsa, :snd_ruby, :xm, :gl, :snd_debug"

make allclean
rm -f snd
rm -f config.cache

echo ' -------------------------------------------------------------------------------- '
echo ' ----                 --with-ruby --with-gtk                                 ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include" --with-ruby --with-gtk
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features ":clm, :snd_gtk, :snd_ruby"
make allclean

echo ' -------------------------------------------------------------------------------- '
echo ' ----                 g++ --with-ruby sample-width=24                        ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet CC=g++ LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include" --with-ruby --without-float-samples --with-sample-width=24
make
./snd --version
./snd -noinit --features ":clm, :snd_ruby"
make allclean

echo ' -------------------------------------------------------------------------------- '
echo ' -----                g++ --with-ruby --with-gtk --with-alsa                 ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet CC=g++ --with-ruby --with-gtk --with-alsa
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features ":clm, :alsa, :snd_gtk, :snd_ruby"
make allclean

echo ' -------------------------------------------------------------------------------- '
echo ' ----                 --with-ruby --with-static-xm --with-gtk --enable-snd-debug --without-gsl --without-xpm --without-xp '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include -DXEN_DEBUGGING" --with-ruby --with-static-xm --with-gtk --enable-snd-debug --without-gsl --without-xpm --without-xp
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features ":clm, :snd_ruby, :xg, :snd_gtk, :snd_debug"
make allclean

echo ' -------------------------------------------------------------------------------- '
echo ' ----                GTK_DISABLE_DEPRECATED G_DISABLE_DEPRECATED GDK_DISABLE_DEPRECATED --with-ruby --with-static-xm --with-gtk '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet --disable-deprecated LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include -D_FORTIFY_SOURCE" --with-ruby --with-static-xm --with-gtk
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features "'clm 'snd-gtk 'xg 'gl"

make allclean
rm -f snd
rm -f config.cache

echo ' -------------------------------------------------------------------------------- '
echo ' ----                 --with-ruby --with-no-gui --without-fftw                --- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include" --with-ruby --with-no-gui --without-fftw
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features ":clm, :snd_nogui, :snd_ruby"
make allclean

echo ' -------------------------------------------------------------------------------- '
echo ' -----                --with-ruby --with-no-gui --enable-snd-debug           ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include -DXEN_DEBUGGING" --with-ruby --with-no-gui --enable-snd-debug
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features ":clm, :snd_nogui, :snd_debug, :snd_ruby"
make allclean

echo ' -------------------------------------------------------------------------------- '
echo ' ----                g++ --with-ruby --with-no-gui --enable-snd-debug        ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet CC=g++ LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include -DXEN_DEBUGGING" --with-ruby --with-no-gui --enable-snd-debug
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features ":clm, :snd_nogui, :snd_ruby, :snd_debug"
make allclean

rm -f snd
rm -f config.cache

echo ' -------------------------------------------------------------------------------- '
echo ' ----                g++                                                      --- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet CC=g++ LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -Wextra -I/usr/X11R6/include"
make
./snd --version
./snd -noinit --features "'clm 'snd-s7 'snd-motif 'snd-ladspa 'sndlib"
make sndinfo
make audinfo
make sndplay
./audinfo
./sndinfo test.snd
make allclean

echo ' '
echo ' '
echo ' -------------------------------------------------------------------------------- '
echo ' ----                g++ --with-gtk                                          ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet CC=g++ --with-gtk
make
./snd --version
./snd -noinit --features "'clm 'snd-gtk"
make allclean

echo ' '
echo ' '
echo ' -------------------------------------------------------------------------------- '
echo ' ----                g++ --with-no-gui                                       ---- '
echo ' -------------------------------------------------------------------------------- '
./configure LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-I/usr/X11R6/include" --quiet CC=g++ --with-no-gui
make
./snd --version
./snd -noinit --features "'clm 'snd-nogui 'snd-s7"
make allclean

echo ' -------------------------------------------------------------------------------- '
echo ' -----                g++ --without-extension-language                     ---- '
echo ' -------------------------------------------------------------------------------- '
./configure LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-I/usr/X11R6/include" --quiet CC=g++ --without-extension-language
make
./snd --version
make allclean
echo ' '
echo ' '

echo ' -------------------------------------------------------------------------------- '
echo ' -----                g++ --with-static-xm --without-gsl --with-alsa '
echo ' -------------------------------------------------------------------------------- '
./configure LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-I/usr/X11R6/include" --quiet CC=g++ --with-static-xm --without-gsl --with-alsa
make
./snd --version
./snd -noinit --features "'clm 'alsa 'xm"
make allclean
echo ' '
echo ' '

make allclean
rm -f snd
rm -f config.cache
rm -f sndinfo
rm -f audinfo

echo ' -------------------------------------------------------------------------------- '
echo ' -----                sndlib                                                 ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include"
make sndinfo
sndinfo oboe.snd
make audinfo
audinfo
sndinfo test.snd

echo ' '
echo ' '
make allclean
echo ' -------------------------------------------------------------------------------- '
echo ' ----                --with-shared-sndlib                                    ---- '
echo ' -------------------------------------------------------------------------------- '
./configure LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-I/usr/X11R6/include" --quiet --with-shared-sndlib
make
./snd --version
./snd -noinit --features "'clm"

echo ' '
echo ' '
echo ' -------------------------------- no-gui test -------------------------------- '
make allclean
rm -f snd
echo ' -------------------------------------------------------------------------------- '
echo ' ----                 --with-no-gui                                          ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-Wall -I/usr/X11R6/include" --with-no-gui
make
echo ' '
echo ' '
./snd --version
./snd -noinit --features "'clm 'snd-nogui 'snd-s7"

make allclean
rm -f snd
rm -f config.cache
rm -f makefile
rm -f mus-config.h

echo ' '
echo ' '
echo ' -------------------------------------------------------------------------------- '
echo ' -----                --with-static-xm -DXM_DISABLE_DEPRECATED              ----- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet --with-static-xm LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-DXM_DISABLE_DEPRECATED -Wall -I/usr/X11R6/include"
make
./snd --version
./snd -noinit --features "'clm 'xm"
make allclean
echo ' '
echo ' '

echo ' -------------------------------------------------------------------------------- '
echo ' -----                --with-static-xm --with-ruby -DXM_DISABLE_DEPRECATED   ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet --with-static-xm --with-ruby LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-DXM_DISABLE_DEPRECATED -Wall -I/usr/X11R6/include"
make
./snd --version
./snd -noinit --features ":clm, :xm, :snd_ruby"
make allclean

echo ' '
echo ' '
echo ' -------------------------------------------------------------------------------- '
echo ' -----                --with-no-gui --without-extension-language          ----- '
echo ' -------------------------------------------------------------------------------- '
./configure LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-I/usr/X11R6/include" --with-no-gui --without-extension-language --quiet
make
./snd --version
make allclean
echo ' '
echo ' '

echo ' -------------------------------------------------------------------------------- '
echo ' ----                 --without-extension-language --with-static-xm --with-gl - '
echo ' -------------------------------------------------------------------------------- '
./configure LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-I/usr/X11R6/include" --without-extension-language --with-static-xm --with-gl --quiet
make
./snd --version
make allclean
echo ' '
echo ' '

echo ' -------------------------------------------------------------------------------- '
echo ' -----                --with-static-xm --with-just-gl --with-gl2ps         ------ '
echo ' -------------------------------------------------------------------------------- '
./configure LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-I/usr/X11R6/include" --with-static-xm --with-just-gl --quiet --with-gl2ps
make
./snd --version
./snd -noinit --features "'clm 'xm 'gl2ps"
make allclean
echo ' '
echo ' '

echo ' -------------------------------------------------------------------------------- '
echo ' -----                --without-extension-language --with-gtk --with-static-xg '
echo ' -------------------------------------------------------------------------------- '
./configure --without-extension-language --with-gtk --with-static-xg --quiet
make
./snd --version
make allclean
echo ' '
echo ' '

echo ' -------------------------------------------------------------------------------- '
echo ' -----                --without-fam                                          ---- '
echo ' -------------------------------------------------------------------------------- '
./configure LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-I/usr/X11R6/include" --without-fam --quiet
make
./snd --version
./snd -noinit --features "'clm 'snd-s7 'snd-motif 'sndlib"
make allclean
make allclean
echo ' '
echo ' '

echo ' -------------------------------------------------------------------------------- '
echo ' ----                 --without-fam --with-gtk                               ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --without-fam --with-gtk --quiet
make
./snd --version
./snd -noinit --features "'clm 'snd-gtk"
make allclean

echo ' '
echo ' '
echo ' -------------------------------------------------------------------------------- '
echo ' -----                --enable-threads                                       ---- '
echo ' -------------------------------------------------------------------------------- '
./configure LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-I/usr/X11R6/include" --enable-threads --quiet
make
./snd --version
./snd -noinit --features "'clm 'snd-s7 'snd-motif 'snd-threads"
make allclean

echo ' '
echo ' '
echo ' -------------------------------------------------------------------------------- '
echo ' ----                 --enable-threads g++                                   ---- '
echo ' -------------------------------------------------------------------------------- '
./configure LDFLAGS="-L/usr/X11R6/lib" CFLAGS="-I/usr/X11R6/include" --enable-threads --quiet CC=g++
make
./snd --version
./snd -noinit --features "'clm 'snd-s7 'snd-threads"
make allclean

echo ' '
echo ' '
echo ' -------------------------------------------------------------------------------- '
echo ' -----                --enable-threads --with-gtk --with-ruby                ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --enable-threads --with-gtk --with-ruby --quiet
make
./snd --version
./snd -noinit --features ":clm, :snd-gtk, :snd_ruby"
make allclean

echo ' -------------------------------------------------------------------------------- '
echo ' ----                 --with-portaudio                                       ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --with-portaudio --quiet
make
./snd --version
./snd -noinit --features "'clm 'snd-gtk"
make allclean



echo ' -------------------------------------------------------------------------------- '
echo ' ----                 --with-pulseaudio                                      ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --with-pulseaudio --quiet
make
./snd --version
./snd -noinit --features "'clm 'snd-gtk"
make allclean



echo ' -------------------------------------------------------------------------------- '
echo ' ----                 --with-portaudio                                      ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --with-portaudio --quiet
make
./snd --version
./snd -noinit --features "'clm 'snd-gtk"
make allclean



cp ~/sndlib/* .
echo ' -------------------------------------------------------------------------------- '
echo ' -----                sndlib tests                                           ---- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet CFLAGS="-Wall"
make

cp tools/exs7.c .
echo ' -------------------------------------------------------------------------------- '
echo ' -------------------------------- ex 1 -------------------------------- '
echo ' -------------------------------------------------------------------------------- '
gcc -o exs7 exs7.c s7.o -lm -DEX1
echo ' -------------------------------------------------------------------------------- '
echo ' -------------------------------- ex 2 -------------------------------- '
echo ' -------------------------------------------------------------------------------- '
gcc -o exs7 exs7.c s7.o -lm -DEX2
echo ' -------------------------------------------------------------------------------- '
echo ' -------------------------------- ex 3 -------------------------------- '
echo ' -------------------------------------------------------------------------------- '
gcc -o exs7 exs7.c s7.o -lm -DEX3
echo ' -------------------------------------------------------------------------------- '
echo ' -------------------------------- ex 4 -------------------------------- '
echo ' -------------------------------------------------------------------------------- '
gcc -o exs7 exs7.c s7.o -lm -DEX4
echo ' -------------------------------------------------------------------------------- '
echo ' -------------------------------- ex 5 -------------------------------- '
echo ' -------------------------------------------------------------------------------- '
gcc -o exs7 exs7.c s7.o -lm -DEX5
echo ' -------------------------------------------------------------------------------- '
echo ' -------------------------------- ex 6 -------------------------------- '
echo ' -------------------------------------------------------------------------------- '
gcc -o exs7 exs7.c s7.o -lm -DEX6

make clean
echo ' -------------------------------------------------------------------------------- '
echo ' -------------------------------- sndlib threads -------------------------------- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet --enable-threads
make
make clean
echo ' -------------------------------------------------------------------------------- '
echo ' -------------------------------- sndlib ruby -------------------------------- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet --with-ruby
make
make clean
echo ' -------------------------------------------------------------------------------- '
echo ' -------------------------------- sndlib forth -------------------------------- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet --with-forth
make
make clean
echo ' -------------------------------------------------------------------------------- '
echo ' -------------------------------- sndlib s7 c++ -------------------------------- '
echo ' -------------------------------------------------------------------------------- '
./configure --quiet CC=g++
make
echo ' -------------------------------------------------------------------------------- '
echo ' -------------------------------- ex 1 -------------------------------- '
echo ' -------------------------------------------------------------------------------- '
g++ -o exs7 exs7.c s7.o -lm -DEX1
echo ' -------------------------------------------------------------------------------- '
echo ' -------------------------------- ex 2 -------------------------------- '
echo ' -------------------------------------------------------------------------------- '
g++ -o exs7 exs7.c s7.o -lm -DEX2
echo ' -------------------------------------------------------------------------------- '
echo ' -------------------------------- ex 3 -------------------------------- '
echo ' -------------------------------------------------------------------------------- '
g++ -o exs7 exs7.c s7.o -lm -DEX3
echo ' -------------------------------------------------------------------------------- '
echo ' -------------------------------- ex 4 -------------------------------- '
echo ' -------------------------------------------------------------------------------- '
g++ -o exs7 exs7.c s7.o -lm -DEX4 /home/bil/test/sndlib/libsndlib.a -lgsl -lgslcblas -lasound
echo ' -------------------------------------------------------------------------------- '
echo ' -------------------------------- ex 5 -------------------------------- '
echo ' -------------------------------------------------------------------------------- '
g++ -o exs7 exs7.c s7.o -lm -DEX5
echo ' -------------------------------------------------------------------------------- '
echo ' -------------------------------- ex 6 -------------------------------- '
echo ' -------------------------------------------------------------------------------- '
g++ -o exs7 exs7.c s7.o -lm -DEX6
rm exs7
rm exs7.o
make clean

echo ' -------------------------------------------------------------------------------- '
echo ' -------------------------------- no read-line -------------------------------- '
echo ' -------------------------------------------------------------------------------- '
sed s7.c -e 's/#define WITH_READ_LINE 1/#define WITH_READ_LINE 0/' > tmp
mv tmp s7.c
make
make clean

echo ' -------------------------------------------------------------------------------- '
echo ' -------------------------------- with debugging -------------------------------- '
echo ' -------------------------------------------------------------------------------- '
sed s7.c -e 's/#define S7_DEBUGGING 0/#define S7_DEBUGGING 1/' > tmp
mv tmp s7.c
make
make clean

echo ' -------------------------------------------------------------------------------- '
echo ' -------------------------------- with int s7_Int -------------------------------- '
echo ' -------------------------------------------------------------------------------- '
sed s7.h -e 's/#define s7_Int long long int/#define s7_Int int/' > tmp
mv tmp s7.c
sed s7.h -e 's/#define s7_Int_d "%lld"/#define s7_Int_d "%d"/' > tmp
mv tmp s7.c
make
make clean
