#! /bin/sh -e

# DP: disable the gnat testsuite. on ia64 the kernel "hangs" for unaligned
# DP: memory accesses.

dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
    pdir="-d $3"
    dir="$3/"
elif [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi
case "$1" in
    -patch)
        patch $pdir -f --no-backup-if-mismatch -p0 < $0
        #cd ${dir}gcc && autoconf
        ;;
    -unpatch)
        patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
        #rm ${dir}gcc/configure
        ;;
    *)
        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
        exit 1
esac
exit 0

--- gcc/ada/Make-lang.in~	2004-09-01 22:07:42.000000000 +0200
+++ gcc/ada/Make-lang.in	2004-10-12 05:42:39.000000000 +0200
@@ -915,9 +915,7 @@
 ACATSDIR = $(TESTSUITEDIR)/ada/acats
 
 check-gnat:
-	test -d $(ACATSDIR) || mkdir -p $(ACATSDIR)
-	testdir=`cd ${srcdir}/${ACATSDIR}; ${PWD_COMMAND}`; \
-	export testdir; cd $(ACATSDIR); $${testdir}/run_acats $(CHAPTERS)
+	echo "gnat testsuite disabled"
 
 .PHONY: check-gnat
 
