autogen.sh: Improve autoconf/automake detection on OpenBSD

OpenBSD needs the enviroment variables `AUTOCONF_VERSION` and
`AUTOMAKE_VERSION` to be set in order to find these tools.

The script now tests (individually) if they are already set and if they
aren't sets them to something that is known to work on OpenBSD 5.8
This commit is contained in:
Erik de Castro Lopo 2016-01-26 12:47:58 +11:00
parent d6c774c108
commit 906ccc3901
1 changed files with 14 additions and 4 deletions

View File

@ -40,10 +40,20 @@ set -e
if test $(uname -s) = "OpenBSD" ; then if test $(uname -s) = "OpenBSD" ; then
# OpenBSD needs these environment variables set. # OpenBSD needs these environment variables set.
if test -z "$AUTOCONF_VERSION" ; then
AUTOCONF_VERSION=2.69 AUTOCONF_VERSION=2.69
AUTOMAKE_VERSION=1.11
export AUTOCONF_VERSION export AUTOCONF_VERSION
echo "Defaulting to use AUTOCONF_VERSION version ${AUTOCONF_VERSION}."
else
echo "Using AUTOCONF_VERSION version ${AUTOCONF_VERSION}."
fi
if test -z "$AUTOMAKE_VERSION" ; then
AUTOMAKE_VERSION=1.15
export AUTOMAKE_VERSION export AUTOMAKE_VERSION
echo "Defaulting to use AUTOMAKE_VERSION version ${AUTOMAKE_VERSION}."
else
echo "Using AUTOMAKE_VERSION version ${AUTOMAKE_VERSION}."
fi
fi fi
srcdir=`dirname $0` srcdir=`dirname $0`