#!/bin/sh
#
# THIS SCRIPT GENERATE CONFIGURE FILE. 
#

rm -rf *cache 

ACLOCAL_INC=""
if [ -d /usr/gnome/share/aclocal ] ; then
	ACLOCAL_INC="$ACLOCAL_INC -I /usr/gnome/share/aclocal"
fi
if [ -d /usr/gnu/share/aclocal ] ; then
	ACLOCAL_INC="$ACLOCAL_INC -I /usr/gnu/share/aclocal"
fi
if [ -d /usr/local/share/aclocal ] ; then
	ACLOCAL_INC="$ACLOCAL_INC -I /usr/local/share/aclocal"
fi
if [ -d /usr/X11R6/share/aclocal ] ; then
	ACLOCAL_INC="$ACLOCAL_INC -I /usr/X11R6/share/aclocal"
fi
if [ -d /usr/share/aclocal ] ; then
	ACLOCAL_INC="$ACLOCAL_INC -I /usr/share/aclocal"
fi
aclocal $ACLOCAL_INC -I macros

autoheader 

libtoolize --force --copy --automake
automake --gnu --force-missing --copy 

# for debian
if test -x /usr/bin/autoconf2.50 ; then
	autoconf2.50
else
	autoconf
fi

if [ -d /pub/local ] ; then
	PREFIX="--prefix /pub/local"
fi
if ./configure $PREFIX ; then
	exit 0 ;
else
	exit 1 ;
fi

