blob: ed0bc36b18855f3e317dc6c059b7277fd7ac041b [file] [log] [blame]
#!/bin/sh
# Make sure that we are in the right directory.
if test ! -f configure.ac; then
cat >&2 <<__EOF__
You must run bootstrap from the root of the distribution.
__EOF__
exit 1
fi
if [ -n "$AUTOMAKE" ] || [ -n "$ACLOCAL" ] ; then
if [ -z "$ACLOCAL" ] || [ -z "$AUTOMAKE" ] ; then
_present="AUTOMAKE"
_missing="ACLOCAL"
[ -n "$ACLOCAL" ] && _present="ACLOCAL" && _missing="AUTOMAKE"
cat >&2 <<__EOF__
[ERROR]: You are providing the path to ${_present}
through your environment but no reference to ${_missing}.
To fix this error please specify ${_missing} too.
As an example, if you are using automake-1.12 and have
available aclocal-1.12 you will want to do the following:
AUTOMAKE="/usr/local/bin/automake-1.12" \\
ACLOCAL="/usr/local/bin/aclocal-1.12" \\
./bootstrap
Your current environment has:
AUTOMAKE="$AUTOMAKE"
ACLOCAL="$ACLOCAL"
__EOF__
exit 1
fi
else
AUTOMAKE="$(which automake)"
fi
# Make sure that we have a version of automake that doesn't force
# 'subdir-objects'.
AUTOMAKE_VERSION="$($AUTOMAKE --version | head -1 | cut -d' ' -f4)"
case ${AUTOMAKE_VERSION} in
1.14)
cat >&2 <<__EOF__
Mesos requires automake < 1.14 due to incompatibility issues
with the 'subdir-objects' option.
See https://issues.apache.org/jira/browse/MESOS-577 and
please downgrade your automake installation.
__EOF__
exit 1
;;
esac
# Note that we don't use '--no-recursive' because older versions of
# autoconf/autoreconf bail with that option. Unfortunately this means
# that we'll modify a lot of files in 3rdparty/libprocess, but that
# may change in the future.
autoreconf --install -Wall --verbose "${@}"