-: the following weeds options from ccflags that are of no interest to cpp
-case "$ccflags" in
-'');;
-*) set X $ccflags
- ccflags=''
- for flag do
- case $flag in
- -D*|-I*) ccflags="$ccflags $flag";;
- esac
- done
- ;;
+export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh \$0; kill \$\$)
+
+case $CONFIG in
+'')
+ if test -f config.sh; then TOP=.;
+ elif test -f ../config.sh; then TOP=..;
+ elif test -f ../../config.sh; then TOP=../..;
+ elif test -f ../../../config.sh; then TOP=../../..;
+ elif test -f ../../../../config.sh; then TOP=../../../..;
+ else
+ echo "Can't find config.sh."; exit 1
+ fi
+ . $TOP/config.sh
+ ;;