2001-03-10 10:41:50 -05:00
|
|
|
#! /bin/sh
|
|
|
|
|
2002-06-01 18:55:22 -04:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# autoconf 2.52 or newer
|
2001-03-10 10:41:50 -05:00
|
|
|
#
|
2002-06-01 18:55:22 -04:00
|
|
|
ac_version="`${AUTOCONF:-autoconf} --version 2> /dev/null | head -1 | sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`"
|
|
|
|
if test -z "$ac_version"; then
|
|
|
|
echo "ERROR: autoconf not found."
|
|
|
|
echo " You need autoconf version 2.52 or newer installed."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
IFS=.; set $ac_version; IFS=' '
|
|
|
|
if test "$1" = "2" -a "$2" -lt "52" || test "$1" -lt "2"; then
|
|
|
|
echo "ERROR: autoconf version $ac_version found."
|
|
|
|
echo " You need autoconf version 2.52 or newer installed."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "found: autoconf version $ac_version (ok)"
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# libtool 1.4 or newer
|
2001-03-10 10:41:50 -05:00
|
|
|
#
|
2001-07-24 15:54:20 -04:00
|
|
|
|
2001-03-10 10:41:50 -05:00
|
|
|
#
|
2001-08-23 07:27:26 -04:00
|
|
|
# find libtoolize, or glibtoolize on MacOS X
|
|
|
|
#
|
|
|
|
libtoolize=`conftools/PrintPath glibtoolize libtoolize`
|
|
|
|
if [ "x$libtoolize" = "x" ]; then
|
2002-06-01 18:55:22 -04:00
|
|
|
echo "ERROR: libtoolize not found."
|
|
|
|
echo " You need libtool version 1.4 or newer installed"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
lt_pversion="`$libtoolize --version 2> /dev/null | sed -e 's/^[^0-9]*//'`"
|
|
|
|
|
|
|
|
# convert something like 1.4p1 to 1.4.p1
|
|
|
|
lt_version="`echo $lt_pversion | sed -e 's/\([a-z]*\)$/.\1/'`"
|
|
|
|
|
|
|
|
IFS=.; set $lt_version; IFS=' '
|
|
|
|
if test "$1" = "1" -a "$2" -lt "4"; then
|
|
|
|
echo "ERROR: libtool version $lt_pversion found."
|
|
|
|
echo " You need libtool version 1.4 or newer installed"
|
|
|
|
exit 1
|
2001-08-23 07:27:26 -04:00
|
|
|
fi
|
|
|
|
|
2002-06-01 18:55:22 -04:00
|
|
|
echo "found: libtool version $lt_pversion (ok)"
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
|
2002-06-01 18:29:30 -04:00
|
|
|
# Remove any libtool files so one can switch between libtool 1.3
|
|
|
|
# and libtool 1.4 by simply rerunning the buildconf script.
|
|
|
|
(cd conftools/; rm -f ltmain.sh ltconfig)
|
|
|
|
|
2002-06-01 18:55:22 -04:00
|
|
|
#
|
|
|
|
# Create the libtool helper files
|
|
|
|
#
|
|
|
|
echo "Copying libtool helper files ..."
|
|
|
|
|
2002-06-01 18:29:30 -04:00
|
|
|
#
|
|
|
|
# Note: we don't use --force (any more) since we have a special
|
|
|
|
# config.guess/config.sub that we want to ensure is used.
|
2001-03-10 10:41:50 -05:00
|
|
|
#
|
2001-08-23 07:27:26 -04:00
|
|
|
# --copy to avoid symlinks; we want originals for the distro
|
|
|
|
# --automake to make it shut up about "things to do"
|
2001-03-10 10:41:50 -05:00
|
|
|
#
|
2002-06-01 18:29:30 -04:00
|
|
|
$libtoolize --copy --automake
|
2001-08-23 07:27:26 -04:00
|
|
|
|
2003-06-17 21:11:45 -04:00
|
|
|
#
|
|
|
|
# Find the libtool.m4 file. The developer/packager can set the LIBTOOL_M4
|
|
|
|
# environment variable to specify its location. If that variable is not
|
|
|
|
# set, then we'll assume a "standard" libtool installation and try to
|
|
|
|
# derive its location.
|
|
|
|
#
|
2001-08-23 07:27:26 -04:00
|
|
|
ltpath=`dirname $libtoolize`
|
2003-06-17 21:11:45 -04:00
|
|
|
ltfile=${LIBTOOL_M4-`cd $ltpath/../share/aclocal ; pwd`/libtool.m4}
|
2001-08-23 07:27:26 -04:00
|
|
|
cp $ltfile conftools/libtool.m4
|
|
|
|
|
2003-06-17 21:11:45 -04:00
|
|
|
echo "Using libtool.m4 from ${ltfile}."
|
|
|
|
|
2002-06-01 18:55:22 -04:00
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
|
2001-08-23 07:27:26 -04:00
|
|
|
### for a little while... remove stray aclocal.m4 files from
|
|
|
|
### developers' working copies. we no longer use it. (nothing else
|
|
|
|
### will remove it, and leaving it creates big problems)
|
|
|
|
rm -f aclocal.m4
|
2001-03-10 10:41:50 -05:00
|
|
|
|
|
|
|
#
|
2002-05-17 17:38:44 -04:00
|
|
|
# Generate the autoconf header template (expat_config.h.in) and ./configure
|
2001-03-10 10:41:50 -05:00
|
|
|
#
|
2002-05-17 17:38:44 -04:00
|
|
|
echo "Creating expat_config.h.in ..."
|
2002-05-09 20:10:57 -04:00
|
|
|
${AUTOHEADER:-autoheader}
|
2001-03-10 10:41:50 -05:00
|
|
|
|
|
|
|
echo "Creating configure ..."
|
|
|
|
### do some work to toss config.cache?
|
2002-05-09 20:10:57 -04:00
|
|
|
${AUTOCONF:-autoconf}
|
2001-08-23 07:27:26 -04:00
|
|
|
|
2001-12-07 05:19:31 -05:00
|
|
|
# toss this; it gets created by autoconf on some systems
|
2002-05-09 20:10:57 -04:00
|
|
|
rm -rf autom4te*.cache
|
2001-12-07 05:19:31 -05:00
|
|
|
|
2001-08-23 07:27:26 -04:00
|
|
|
# exit with the right value, so any calling script can continue
|
|
|
|
exit 0
|