From 817d267a10b69261586956d4a243b8f9a864cca6 Mon Sep 17 00:00:00 2001 From: Moritz Grimm Date: Sat, 20 Aug 2022 23:00:47 +0200 Subject: [PATCH] Add FreeBSD DEFAULT_AUTOCONF variable support --- autogen.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/autogen.sh b/autogen.sh index a9b491e..c47c152 100755 --- a/autogen.sh +++ b/autogen.sh @@ -10,6 +10,11 @@ if [ ! -f "./$(basename $0)" ]; then exit 1 fi +test -n "${AUTOCONF_VERSION}" || AUTOCONF_VERSION="${_ac_version}" +test -n "${AUTOMAKE_VERSION}" || AUTOMAKE_VERSION="${_am_version}" +test -n "${DEFAULT_AUTOCONF}" || DEFAULT_AUTOCONF="${_ac_version}" +export AUTOCONF_VERSION AUTOMAKE_VERSION DEFAULT_AUTOCONF + USE_LIBTOOL="$(grep ^LT_INIT ./configure.* 2> /dev/null)" EXTRA= @@ -21,18 +26,13 @@ if [ -d /usr/local/share/aclocal ]; then EXTRA="${EXTRA} -I /usr/local/share/aclocal" fi -AUTOCONF_VERSION="${_ac_version}" AUTOMAKE_VERSION="${_am_version}" \ - aclocal ${EXTRA} || exit 1 -AUTOCONF_VERSION="${_ac_version}" AUTOMAKE_VERSION="${_am_version}" \ - autoconf || exit 1 -AUTOCONF_VERSION="${_ac_version}" AUTOMAKE_VERSION="${_am_version}" \ - autoheader || exit 1 +aclocal ${EXTRA} || exit 1 +autoconf || exit 1 +autoheader || exit 1 if [ -n "${USE_LIBTOOL}" ]; then - AUTOCONF_VERSION="${_ac_version}" AUTOMAKE_VERSION="${_am_version}" \ - libtoolize --automake -c -f || exit 1 + libtoolize --automake -c -f || exit 1 fi -AUTOCONF_VERSION="${_ac_version}" AUTOMAKE_VERSION="${_am_version}" \ - automake -a -c || exit 1 +automake -a -c || exit 1 rm -r autom4te.cache