#!/bin/sh
#
# Install patches to gcl-2.1 for Linux ELF
#
# W. Metzenthen  <billm@jacobi.maths.monash.edu.au>  18 July 1995
#

if [ -d gcl-2.1 ]; then
  basedir=gcl-2.1
  patchp=p
else
  if [ -d mp ]; then
    basedir=.
    patchp=p1
  else
    echo "Can't find gcl directories"
    exit 1
  fi
fi

# We will install a version which needs to be pre-processed,
# and is called mp/mpi-386d.S
rm -f $basedir/mp/mpi-386d.s

patch -$patchp -s < gcl-2.1-wm-elf-diffs

# find $basedir -name '*.orig' -exec rm {} \;
