2003-08-25 07:15:39 -04:00
|
|
|
#! /bin/sh
|
2003-09-09 08:07:48 -04:00
|
|
|
|
|
|
|
## bootstrap file for Elk -- Sam Hocevar <sam@zoy.org>
|
|
|
|
## $Id$
|
|
|
|
|
2003-08-25 07:15:39 -04:00
|
|
|
set -x
|
|
|
|
set -e
|
|
|
|
|
2003-09-09 08:07:48 -04:00
|
|
|
# Get a sane environment, just in case
|
|
|
|
LANG=C
|
|
|
|
export LANG
|
|
|
|
CYGWIN=binmode
|
|
|
|
export CYGWIN
|
|
|
|
|
2003-08-25 07:15:39 -04:00
|
|
|
# Check for automake
|
2003-09-09 08:07:48 -04:00
|
|
|
amvers="no"
|
2005-11-01 13:59:20 -05:00
|
|
|
if automake-1.9 --version >/dev/null 2>&1; then
|
|
|
|
amvers="-1.9"
|
|
|
|
elif automake-1.8 --version >/dev/null 2>&1; then
|
|
|
|
amvers="-1.8"
|
|
|
|
elif automake-1.7 --version >/dev/null 2>&1; then
|
2003-08-25 07:15:39 -04:00
|
|
|
amvers="-1.7"
|
2003-09-09 08:07:48 -04:00
|
|
|
elif automake-1.6 --version >/dev/null 2>&1; then
|
|
|
|
amvers="-1.6"
|
|
|
|
elif automake-1.5 --version >/dev/null 2>&1; then
|
|
|
|
amvers="-1.5"
|
|
|
|
elif automake --version > /dev/null 2>&1; then
|
|
|
|
amvers="`automake --version | sed -e '1s/[^0-9]*//' -e q`"
|
|
|
|
if expr "$amvers" "<" "1.5" > /dev/null 2>&1; then
|
|
|
|
amvers="no"
|
2003-08-25 07:15:39 -04:00
|
|
|
else
|
2003-09-09 08:07:48 -04:00
|
|
|
amvers=""
|
2003-08-25 07:15:39 -04:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2003-09-09 08:07:48 -04:00
|
|
|
if test "$amvers" = "no"; then
|
2003-08-25 07:15:39 -04:00
|
|
|
set +x
|
2003-09-09 08:07:48 -04:00
|
|
|
echo "$0: you need automake version 1.5 or later"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Check for libtool
|
|
|
|
libtoolize="no"
|
|
|
|
if libtoolize --version >/dev/null 2>&1; then
|
|
|
|
libtoolize="libtoolize"
|
|
|
|
elif glibtoolize --version >/dev/null 2>&1; then
|
|
|
|
libtoolize="glibtoolize"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$libtoolize" = "no"; then
|
|
|
|
set +x
|
|
|
|
echo "$0: you need libtool"
|
2003-08-25 07:15:39 -04:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Remove old cruft
|
2003-09-24 05:19:40 -04:00
|
|
|
rm -f aclocal.m4 configure config.guess config.log config.sub config.cache config.h.in config.h compile ltmain.sh libtool ltconfig missing mkinstalldirs depcomp install-sh INSTALL
|
2004-08-09 16:08:52 -04:00
|
|
|
rm -Rf autom4te.cache autotools
|
|
|
|
mkdir autotools
|
2003-08-25 07:15:39 -04:00
|
|
|
|
2003-09-09 08:07:48 -04:00
|
|
|
${libtoolize} --copy --force
|
|
|
|
if test -f "ltmain.sh"; then
|
|
|
|
echo "$0: working around a minor libtool issue"
|
|
|
|
mv ltmain.sh autotools/
|
|
|
|
fi
|
|
|
|
|
2004-08-09 16:08:52 -04:00
|
|
|
aclocal${amvers}
|
2003-08-25 07:15:39 -04:00
|
|
|
autoconf
|
|
|
|
autoheader
|
|
|
|
automake${amvers} --add-missing --copy
|
2003-09-09 08:07:48 -04:00
|
|
|
|