#! /bin/sh 
#
# $Id: CVSMake,v 1.11 2002/02/12 18:14:36 amai Exp $
# These are the steps that must be done after a "make maintainer-clean"
# in order to ./configure this package.

echo "$0 running"

# Get m4 from current PATH!
M4_=`which m4`
if test -x "$M4_"
then
   M4="$M4_"
   export M4
else
   echo "No m4 found. Exiting"
   exit 1
fi

# Check for some options
if test "x$1" = "xnodist" || test "x$2" = "xnodist" ; then
  distflag=" "
else
  distflag="-i"
fi


# Clean up old files which could hurt otherwise
rm -f config.cache config.guess config.log config.status config.sub \
      libtool ltmain.sh aclocal.m4 Makefile

# Our 'canonical' sequence:
libtoolize --copy --force --automake
aclocal -I .
autoconf
autoheader
automake -a -c --foreign $distflag
