# $Id: bootstrap,v 1.1.1.1.2.1 2004/11/05 03:28:07 mbrubeck Exp $

#!/bin/sh

if [ "$1" = "--clean" ]
then
	if [ -a Makefile ]
	then
		make maintainer-clean
	elif [ -a configure ]
	then
		configure && $0 --clean
	else 
		bootstrap && configure && $0 --clean
	fi

	rm -rf configure libtool aclocal.m4 `find . -name Makefile.in` autom4te*.cache config/config.guess config/config.h.in config/config.sub config/depcomp config/install-sh config/ltmain.sh config/missing config/mkinstalldirs config/stamp-h config/stamp-h.in

	#gettextize files
	#rm -f ABOUT-NLS config/config.rpath config/m4/codeset.m4 config/m4/gettext.m4 config/m4/glibc21.m4 config/m4/iconv.m4 config/m4/intdiv0.m4 config/m4/inttypes-pri.m4 config/m4/inttypes.m4 config/m4/inttypes_h.m4 config/m4/isc-posix.m4 config/m4/lcmessage.m4 config/m4/lib-ld.m4 config/m4/lib-link.m4 config/m4/lib-prefix.m4 config/m4/progtest.m4 config/m4/stdint_h.m4 config/m4/uintmax_t.m4 config/m4/ulonglong.m4 po/Makefile.in.in po/Rules-quot po/boldquot.sed po/en@boldquot.header po/en@quot.header po/insert-header.sin po/quot.sed po/remove-potcdate.sin 

else
	export AUTOMAKE="automake --add-missing --foreign"
	autoreconf -fisv && rm -f `find . -name "*~"` && rm -f ChangeLog
	exit $?
fi
