#!/bin/sh
-# Used to setup the configure.in, autoheader and Makefile.in's if configure
+# Used to setup the configure.ac, autoheader and Makefile.in's if configure
# has not been generated. This script is only needed for developers when
# configure has not been run, or if a Makefile.am in a non-configured directory
# has been updated
# Autotool versions preferred. To override either edit the script
# to match the versions you want to use, or set the variables on
# the command line like "env acver=.. amver=... ./bootstrap.sh"
-acversions="${acver:-2.64 2.63 2.62 2.61}"
-amversions="${amver:-1.11 1.10 1.9}"
-ltversions="${ltver:-2.2}"
+acversions="${acver:-.}" # 2.68 2.67 2.66 2.65 2.64 2.63 2.62 2.61}"
+amversions="${amver:-.}" # 1.11 1.10 1.9}"
+ltversions="${ltver:-.}" # 2.2}"
check_version()
{
show_version()
{
tool=$1
- found="NOT_FOUND"
- shift
- versions="$*"
- for version in $versions; do
- for variant in "" "-${version}" "`echo $version | sed -e 's/\.//g'`"; do
- if check_version $tool ${tool}${variant} $version; then
- found="${version}"
- break
- fi
- done
- if [ "x$found" != "xNOT_FOUND" ]; then
- break
- fi
- done
- if [ "x$found" = "xNOT_FOUND" ]; then
- found="??"
- fi
- echo $found
+ variant=$2
+ ${tool}${variant} --version 2>/dev/null | head -1 | sed -e 's/.*) //'
}
find_variant()
# TODO: when we have libtool2, tell libtoolize where to put its files
# instead of manualy moving files from ltdl to lib/libLtdl
- if egrep -q '^[[:space:]]*AC_LIBLTDL_' configure.in
+ if egrep -q '^[[:space:]]*AC_LIBLTDL_' configure.ac
then
ltdl="--ltdl"
else
ltver=`find_variant libtool ${ltversions}`
# Produce debug output about what version actually found.
-amversion=`show_version automake ${amversions}`
-acversion=`show_version autoconf ${acversions}`
-ltversion=`show_version libtool ${ltversions}`
+amversion=`show_version automake "${amver}"`
+acversion=`show_version autoconf "${acver}"`
+ltversion=`show_version libtool "${ltver}"`
# Find the libtool path to get the right aclocal includes
ltpath=`find_path libtool$ltver`
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
- The file `configure.ac' (or `configure.in') is used to create
+ The file `configure.ac' is used to create
`configure' by a program called `autoconf'. You only need
`configure.ac' if you want to change it or regenerate `configure' using
a newer version of `autoconf'.
exit 1
fi
RELEASE=`echo $VERSION | cut -d. -f1,2 | cut -d- -f1`
-ed -s configure.in <<EOS
+ed -s configure.ac <<EOS
g/${VERSION}-BZR/ s//${VERSION}/
w
EOS
\par
* The storage types live in \em src/fs/. Each subdirectory corresponds
* to the name of the storage type. When a new storage type is implemented
- * configure.in must be updated to autogenerate a Makefile in
+ * configure.ac must be updated to autogenerate a Makefile in
* \em src/fs/foo/ from a Makefile.in file.
*
- \todo DOCS: add template addition to configure.in for storage module addition.
+ \todo DOCS: add template addition to configure.ac for storage module addition.
\todo DOCS: add template Makefile.am for storage module addition.
*
\par
MAKETEST="distcheck"
#
#
-# The options for this level can be easily generated semi-automatically from configure.in by:
-# grep -E "^AC_ARG_ENABLE" ./configure.in | grep -o -E "[0-9a-z\-]+[,]" | grep -o -E "[^,]+" >disable.opts
+# The options for this level can be easily generated semi-automatically from configure.ac by:
+# grep -E "^AC_ARG_ENABLE" ./configure.ac | grep -o -E "[0-9a-z\-]+[,]" | grep -o -E "[^,]+" >disable.opts
# followed by insertion of ' --disable-' and '\' strings
#
-# grep -E "^AC_ARG_WITH" ./configure.in | grep -o -E "[0-9a-z\-]+[,]" | grep -o -E "[^,]+" >without.opts
+# grep -E "^AC_ARG_WITH" ./configure.ac | grep -o -E "[0-9a-z\-]+[,]" | grep -o -E "[^,]+" >without.opts
# followed by insertion of ' --without-' and ' \' strings
#
# sometimes it's just too automatic.. Following options should be just stripped
MAKETEST="distcheck"
#
#
-# The options for this level can be easily generated semi-automatically from configure.in by:
-# grep -E "^AC_ARG_ENABLE" ./configure.in | grep -o -E "[0-9a-z\-]+[,]" | grep -o -E "[^,]+" >disable.opts
+# The options for this level can be easily generated semi-automatically from configure.ac by:
+# grep -E "^AC_ARG_ENABLE" ./configure.ac | grep -o -E "[0-9a-z\-]+[,]" | grep -o -E "[^,]+" >disable.opts
# followed by insertion of ' --enable-' and '\' strings
#
-# grep -E "^AC_ARG_WITH" ./configure.in | grep -o -E "[0-9a-z\-]+[,]" | grep -o -E "[^,]+" >without.opts
+# grep -E "^AC_ARG_WITH" ./configure.ac | grep -o -E "[0-9a-z\-]+[,]" | grep -o -E "[^,]+" >without.opts
# followed by insertion of ' --with-' and ' \' strings
#
# sometimes it's just too automatic..