#! /bin/sh -e

# DP: Find gc.h header in /usr/include/gc for --enable-objc-gc enabled builds.


if [ $# -eq 3 -a "$2" = '-d' ]; then
    pdir="-d $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;;
    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
    *)
	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
	exit 1
esac
exit 0

--- libobjc/Makefile.in~	Fri Jul 21 13:16:47 2000
+++ libobjc/Makefile.in	Fri Jul 21 13:20:23 2000
@@ -76,7 +76,7 @@
   -I$(srcdir)/$(MULTISRCTOP)../gcc/config -I$(MULTIBUILDTOP)../../gcc \
   -I$(srcdir)/$(MULTISRCTOP)../include
 
-OBJC_GCFLAGS=-DOBJC_WITH_GC=1
+OBJC_GCFLAGS=-I/usr/include/gc -DOBJC_WITH_GC=1
 OBJC_THREAD_FILE=thr-objc
 
 .SUFFIXES:
