recursive="false"
dryrun="false"
self="$(basename "$0")"
-autogen_version="0.4.4"
+autogen_version="0.4.5"
########################################################################
${self} depends on automake, autoconf, libtool and gettext.
-You may want to set AUTOCONF, AUTOHEADER, AUTOMAKE, ACLOCAL,
+You may want to set AUTOCONF, AUTOHEADER, AUTOMAKE, AUTORECONF, ACLOCAL,
AUTOPOINT, LIBTOOLIZE to use specific version of these tools, and
AUTORECONF_OPTS to add options to the call to autoreconf.
+
+If none of these variables are set, ${self} tries to find the most
+adequate version in \$PATH.
__HELP_EOF__
}
if test "$status" -ne 0; then exit "$status"; fi
fi
if "$recursive"; then :; else
- if execute_command autoreconf --install --symlink ${AUTORECONF_OPTS}; then
+ if execute_command ${AUTORECONF-"autoreconf"} --install --symlink ${AUTORECONF_OPTS}; then
:; else
status="$?"
echo "autoreconf quit with exit code $status, aborting."
dirs="$pdirs"
fi
+
+########################################################################
+# If not explicitly given, try to find most convenient tools in $PATH
+#
+# This method only works for tools made for parallel installation with
+# a version suffix, i.e. autoconf and automake.
+#
+# libtool and gettext do not support that, so you'll still have to
+# manually set the respective variables if the default does not work
+# for you.
+
+skip="false"
+oldversion="oldversion"
+while read flag variable binary version restofline; do
+ case "$flag" in
+ +)
+ if "$skip"; then skip=false; fi
+ if test -n "`eval echo \$\{$variable+"set"\}`"; then
+ skip=:
+ else
+ if test -x "`which ${binary}${version}`"; then
+ export "$variable"="${binary}${version}"
+ oldversion="${version}"
+ else
+ skip=:
+ fi
+ fi
+ ;;
+ -)
+ if "$skip"; then :; else
+ export "$variable"="${binary}${oldversion}"
+ fi
+ ;;
+ esac
+done<<EOF
++ AUTOMAKE automake -1.9
+- ACLOCAL aclocal
++ AUTOMAKE automake -1.8
+- ACLOCAL aclocal
++ AUTOCONF autoconf 2.59
+- AUTOHEADER autoheader
+- AUTORECONF autoreconf
++ AUTOCONF autoconf 2.50
+- AUTOHEADER autoheader
+- AUTORECONF autoreconf
+EOF
+
+
+########################################################################
+# Check that tool versions satisfy our needs
+
if "$check_versions"; then
# check tool versions
errors=false