#!/bin/csh -f

fgrep decrip *.html
fgrep accomoda *.html
fgrep pysical *.html
fgrep decrip *.c
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
va.scm
tools/check-gtk.scm

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
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

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

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

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

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

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

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

make clmclean
make sndinfo
make audinfo
make sndplay
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 -Wdeclaration-after-statement -Wmissing-field-initializers'
./configure --quiet CFLAGS="-Wall -Wextra" GUILE_CONFIG_path=/home/bil/test/bin
make
make xm
snd --version
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
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
# /usr/include/gmp.h:2073: declaration of C function `std::ostream& 
#   operator<<(std::ostream&, const __mpq_struct*)' conflicts with
# /usr/include/gmp.h:2072: previous declaration `std::ostream& 
#   operator<<(std::ostream&, const __mpz_struct*)' here
# make
# make xm
# snd --version
# make allclean
./configure --quiet --enable-snd-debug CC=g++ CFLAGS="-Wall"
make
make xm
snd --version

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

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

echo ' -------------------------------- gtk -------------------------------- '
make allclean
rm -f snd
rm -f config.cache
echo ' CFLAGS="-Wall -Wextra" --with-gtk '
./configure --quiet CFLAGS="-Wall" --with-gtk
make
echo ' '
echo ' '
./snd --version
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 ' CC=g++ CFLAGS="-Wall" --with-gtk --disable-deprecated '
./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
snd --version
make allclean
echo ' CC=g++ --with-gtk CFLAGS="-Wall -DHAVE_GFCDN=0" '
./configure --quiet CC=g++ --with-gtk CFLAGS="-Wall -DHAVE_GFCDN=0"
make
snd --version
make xg

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
rm -f sndinfo
make sndinfo
./sndinfo test.snd
make allclean
echo ' --without-guile --without-ruby --with-gtk --with-gl '
./configure --quiet --without-guile --without-ruby --with-gtk --with-gl
make
echo ' '
echo ' '
./snd --version
make allclean
echo ' --without-guile --without-ruby --with-just-gl '
./configure --quiet --without-guile --without-ruby --with-just-gl
make
echo ' '
echo ' '
./snd --version

echo ' '
echo ' -------------------------------- static gsl -------------------------------- '
make allclean
rm -f snd
rm -f config.cache
echo ' CFLAGS="-Wall" --with-static-gsl --with-alsa '
./configure --quiet CFLAGS="-Wall" --with-static-gsl --with-alsa
make
echo ' '
echo ' '
./snd --version

echo ' '
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
echo ' '
echo ' '
./snd --version

echo ' '
echo ' -------------------------------- configure --with-doubles test int samples -------------------------------- '
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 --without-float-samples
make
echo ' '
echo ' '
./snd --version

echo ' '
echo ' '
echo ' -------------------------------- configure --without-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"  --without-float-samples --without-ladspa --with-gl --with-modules --without-gsl --without-xpm '
./configure --quiet CFLAGS="-Wall"  --without-float-samples --without-ladspa --with-gl --with-modules --without-gsl --without-xpm
make
echo ' '
echo ' '
./snd --version
make clmclean

echo ' '
echo ' '
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"  --without-float-samples --with-sample-width=32 --with-just-gl --with-static-motif --without-fftw '
./configure --quiet CFLAGS="-Wall"  --without-float-samples --with-sample-width=32 --with-just-gl --with-static-motif --without-fftw
make
echo ' '
echo ' '
./snd --version

echo ' '
echo ' '
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"  --without-float-samples --with-sample-width=28 '
./configure --quiet CFLAGS="-Wall"  --without-float-samples --with-sample-width=28
make
echo ' '
echo ' '
./snd --version

echo ' '
echo ' '
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"  --without-float-samples --with-sample-width=16 '
./configure --quiet CFLAGS="-Wall"  --without-float-samples --with-sample-width=16
make
echo ' '
echo ' '
./snd --version

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
echo ' '
echo ' '
./snd --version
make allclean
rm -f snd
rm -f config.cache
echo ' CFLAGS="-Wall"  --with-gtk '
./configure --quiet CFLAGS="-Wall"  --with-gtk
make
echo ' '
echo ' '
./snd --version
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
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
echo ' '
echo ' '
snd --version
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 -DXEN_DEBUGGING" --enable-snd-debug --with-gsl
make
echo ' '
echo ' '
./snd --version
make allclean
echo ' CFLAGS="-Wall" --with-static-xm '
./configure --quiet CFLAGS="-Wall" --with-static-xm
make
rm xm.o
echo ' CC=g++ --with-static-xm '
./configure --quiet CC=g++ --with-static-xm
make xm

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

echo ' '
echo ' '
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
echo ' '
echo ' '
snd --version
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 -DXEN_DEBUGGING" --enable-snd-debug --with-gtk --with-gsl --with-gl
make
echo ' '
echo ' '
./snd --version

echo ' '
echo ' '
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
echo ' '
echo ' '
make xm
echo ' '
echo ' '
./snd --version
make allclean
echo ' CC=g++ CFLAGS="-Wall" --with-ruby '
./configure --quiet CC=g++ CFLAGS="-Wall" --with-ruby
make
snd --version
make allclean
echo ' CFLAGS="-Wall" --with-ruby --with-static-xm --with-gl --enable-snd-debug --with-alsa '
./configure --quiet CFLAGS="-Wall -DXEN_DEBUGGING" --with-ruby --with-static-xm --with-gl --enable-snd-debug --with-alsa
make
echo ' '
echo ' '
./snd --version
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
echo ' '
echo ' '
./snd --version
make allclean
echo ' CC=g++ --with-ruby --with-gtk --with-alsa '
./configure --quiet CC=g++ --with-ruby --with-gtk --with-alsa
make
echo ' '
echo ' '
snd --version
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 -DXEN_DEBUGGING" --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
echo ' '
echo ' '
snd --version
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 -DXEN_DEBUGGING" --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 -DXEN_DEBUGGING" --with-ruby --with-no-gui --enable-snd-debug
make
echo ' '
echo ' '
./snd --version
make allclean

echo ' -------------------------------- g++ test -------------------------------- '
rm -f snd
rm -f config.cache
echo ' CC=g++ CFLAGS="-Wall" '
./configure --quiet CC=g++ CFLAGS="-Wall"
make
snd --version
make sndinfo
make audinfo
make sndplay
make sndrecord
./audinfo
./sndinfo test.snd
make allclean
echo ' '
echo ' '
echo ' CC=g++ --with-gtk '
./configure --quiet CC=g++ --with-gtk
make
snd --version
make allclean
echo ' '
echo ' '
echo ' CC=g++ --with-no-gui '
./configure --quiet CC=g++ --with-no-gui
make
./snd --version
make allclean
echo ' CC=g++ --without-guile --without-ruby '
./configure --quiet CC=g++ --without-guile --without-ruby
make
./snd --version
make allclean
echo ' CC=g++ --with-static-xm --with-hobbit --without-gsl --with-alsa '
./configure --quiet CC=g++ --with-static-xm --without-gsl --with-alsa
make
./snd --version
make allclean
echo ' '
echo ' '
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
sndinfo test.snd

echo ' '
echo ' '
make allclean
./configure --quiet --with-shared-sndlib
make
./snd --version

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

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
./snd --version
make allclean
echo ' '
echo ' '
echo ' CC=g++ --with-gtk --disable-nls  '
./configure --quiet CC=g++ --with-gtk --disable-nls
make
./snd --version
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
./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
./snd --version
make allclean
cp makefile.gettext makefile.in

echo ' --with-static-xm CFLAGS="-DXM_DISABLE_DEPRECATED -Wall" '
./configure --quiet --with-static-xm CFLAGS="-DXM_DISABLE_DEPRECATED -Wall"
make
snd --version
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
./snd --version
make allclean

./configure --with-no-gui --without-guile --without-ruby --quiet
make
./snd --version
make allclean
./configure --without-guile --without-ruby --with-static-xm --with-gl --quiet
make
./snd --version
make allclean
./configure --without-guile --without-ruby --with-gtk --with-static-xg --with-gl --quiet
make
./snd --version
make allclean
./configure --without-fam --quiet
make
make allclean
make allclean
./configure --without-fam --with-gtk --quiet
make
make allclean

./configure --enable-threads --quiet
make
./snd --version
make allclean

./configure --enable-threads --quiet CC=g++
make
./snd --version
make allclean

./configure --enable-threads --with-gtk --with-ruby --quiet
make
./snd --version
make allclean

./configure --quiet --with-snd-as-pd-external --with-no-gui GUILE_CONFIG_path=/home/bil/test/bin
make
make allclean
