2001-12-29 04:34:02 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2002-01-17 16:22:29 +00:00
|
|
|
OSTYPE=`uname -s`
|
|
|
|
MACHINE=`uname -m`
|
2002-09-03 01:12:26 +00:00
|
|
|
AUTO_MAKE_VERSION=`automake --version | head -1 | awk '{print $4}' | sed -e 's/\.\([0-9]*\).*/\1/'`
|
2002-09-03 21:30:37 +00:00
|
|
|
if test $AUTO_MAKE_VERSION -lt 15; then
|
|
|
|
echo ""
|
|
|
|
echo "You need to upgrade to automake version 1.5 or greater."
|
|
|
|
echo "Most distributions have packages available to install or you can"
|
|
|
|
echo "find the source for the most recent version at"
|
|
|
|
echo "ftp://ftp.gnu.org/gnu/automake"
|
|
|
|
exit 1
|
|
|
|
fi
|
2002-01-17 16:22:29 +00:00
|
|
|
|
|
|
|
echo "Host info: $OSTYPE $MACHINE"
|
|
|
|
echo -n " automake: `automake --version | head -1 | awk '{print $4}'`"
|
|
|
|
echo " ($AUTO_MAKE_VERSION)"
|
|
|
|
echo ""
|
|
|
|
|
2002-01-19 14:58:49 +00:00
|
|
|
ACLOCAL_OPTS=""
|
|
|
|
if [ $AUTO_MAKE_VERSION -ge 14 ]; then
|
|
|
|
if [ $OSTYPE = "IRIX" -o $OSTYPE = "IRIX64" ]; then echo " -I ."
|
|
|
|
ACLOCAL_OPTS="-I ."
|
|
|
|
fi
|
2002-01-17 16:22:29 +00:00
|
|
|
fi
|
2002-01-19 14:58:49 +00:00
|
|
|
echo "Running aclocal $ACLOCAL_OPTS"
|
2002-08-24 20:23:59 +00:00
|
|
|
aclocal $ACLOCAL_OPTS
|
2001-12-29 04:34:02 +00:00
|
|
|
|
|
|
|
echo "Running autoheader"
|
2002-08-24 20:23:59 +00:00
|
|
|
autoheader
|
2002-08-24 05:54:33 +00:00
|
|
|
if [ ! -e src/Include/config.h.in ]; then
|
|
|
|
echo "ERROR: autoheader didn't create simgear/simgear_config.h.in!"
|
|
|
|
exit 1
|
|
|
|
fi
|
2001-12-29 04:34:02 +00:00
|
|
|
|
2002-01-17 16:22:29 +00:00
|
|
|
echo -n "Running automake"
|
|
|
|
if [ $OSTYPE = "IRIX" -o $OSTYPE = "IRIX64" ]; then
|
|
|
|
echo " --add-missing --include-deps"
|
2002-08-24 20:23:59 +00:00
|
|
|
automake --add-missing --include-deps
|
2002-01-17 16:22:29 +00:00
|
|
|
else
|
|
|
|
echo " --add-missing"
|
2002-08-24 20:23:59 +00:00
|
|
|
automake --add-missing
|
2002-01-17 16:22:29 +00:00
|
|
|
fi
|
2001-12-29 04:34:02 +00:00
|
|
|
|
|
|
|
echo "Running autoconf"
|
2002-08-24 20:23:59 +00:00
|
|
|
autoconf
|
2002-08-24 05:54:33 +00:00
|
|
|
|
|
|
|
if [ ! -e configure ]; then
|
|
|
|
echo "ERROR: configure was not created!"
|
|
|
|
exit 1
|
|
|
|
fi
|
2001-12-29 04:34:02 +00:00
|
|
|
|
2002-01-17 16:22:29 +00:00
|
|
|
# fixup Makefiles for Irix
|
2002-01-17 17:58:31 +00:00
|
|
|
if test "$OSTYPE" = "IRIX" -o "$OSTYPE" = "IRIX64"; then
|
2002-01-17 16:22:29 +00:00
|
|
|
echo "Fixing Makefiles for Irix"
|
|
|
|
for n in `find . -name Makefile.in`; do \
|
|
|
|
mv -f $n $n.ar-new; \
|
2002-08-29 17:21:42 +00:00
|
|
|
sed 's/$(AR) cru/$(AR) -o/g' $n.ar-new > $n; \
|
2002-01-17 16:22:29 +00:00
|
|
|
rm -f $n.ar-new; \
|
|
|
|
done;
|
|
|
|
fi
|
|
|
|
|
2001-12-29 04:34:02 +00:00
|
|
|
echo ""
|
|
|
|
echo "======================================"
|
|
|
|
|
|
|
|
if [ -f config.cache ]; then
|
|
|
|
echo "config.cache exists. Removing the config.cache file will force"
|
|
|
|
echo "the ./configure script to rerun all it's tests rather than using"
|
|
|
|
echo "the previously cached values."
|
|
|
|
echo ""
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Now you are ready to run './configure'"
|
|
|
|
echo "======================================"
|