From 5ab654b317e170e4c7e7b814d0551a646d7111d3 Mon Sep 17 00:00:00 2001 From: infirit Date: Fri, 3 Jan 2014 14:57:21 +0100 Subject: Fix bashisms in mate-autogen Based on GNOME commit: https://git.gnome.org/browse/gnome-common/commit/?id=101362218645db3f0fbb55e1e6ea80c4bd70f97d --- macros/mate-autogen | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/macros/mate-autogen b/macros/mate-autogen index 63bf691..6907f6e 100644 --- a/macros/mate-autogen +++ b/macros/mate-autogen @@ -18,23 +18,23 @@ # along with this program. If not, see . #name of package -PKG_NAME=${PKG_NAME:-Package} -srcdir=${srcdir:-.} +test "PKG_NAME" || PKG_NAME=Package +test "$srcdir" || srcdir=. # default version requirements ... -REQUIRED_AUTOCONF_VERSION=${REQUIRED_AUTOCONF_VERSION:-2.53} -REQUIRED_AUTOMAKE_VERSION=${REQUIRED_AUTOMAKE_VERSION:-1.9} -REQUIRED_LIBTOOL_VERSION=${REQUIRED_LIBTOOL_VERSION:-1.4.3} -REQUIRED_GETTEXT_VERSION=${REQUIRED_GETTEXT_VERSION:-0.10.40} -REQUIRED_GLIB_GETTEXT_VERSION=${REQUIRED_GLIB_GETTEXT_VERSION:-2.2.0} -REQUIRED_INTLTOOL_VERSION=${REQUIRED_INTLTOOL_VERSION:-0.25} -REQUIRED_PKG_CONFIG_VERSION=${REQUIRED_PKG_CONFIG_VERSION:-0.14.0} -REQUIRED_GTK_DOC_VERSION=${REQUIRED_GTK_DOC_VERSION:-1.0} -REQUIRED_DOC_COMMON_VERSION=${REQUIRED_DOC_COMMON_VERSION:-1.1.0} +test "$REQUIRED_AUTOCONF_VERSION" || REQUIRED_AUTOCONF_VERSION=2.53 +test "$REQUIRED_AUTOMAKE_VERSION" || REQUIRED_AUTOMAKE_VERSION=1.9 +test "$REQUIRED_LIBTOOL_VERSION" || REQUIRED_LIBTOOL_VERSION=1.4.3 +test "$REQUIRED_GETTEXT_VERSION" || REQUIRED_GETTEXT_VERSION=0.10.40 +test "$REQUIRED_GLIB_GETTEXT_VERSION" || REQUIRED_GLIB_GETTEXT_VERSION=2.2.0 +test "$REQUIRED_INTLTOOL_VERSION" || REQUIRED_INTLTOOL_VERSION=0.25 +test "$REQUIRED_PKG_CONFIG_VERSION" || REQUIRED_PKG_CONFIG_VERSION=0.14.0 +test "$REQUIRED_GTK_DOC_VERSION" || REQUIRED_GTK_DOC_VERSION=1.0 +test "$REQUIRED_DOC_COMMON_VERSION" || REQUIRED_DOC_COMMON_VERSION=1.1.0 # a list of required m4 macros. Package can set an initial value -REQUIRED_M4MACROS=${REQUIRED_M4MACROS:-} -FORBIDDEN_M4MACROS=${FORBIDDEN_M4MACROS:-} +test "$REQUIRED_M4MACROS" || REQUIRED_M4MACROS= +test "$FORBIDDEN_M4MACROS" || FORBIDDEN_M4MACROS= # Not all echo versions allow -n, so we check what is possible. This test is # based on the one in autoconf. @@ -184,7 +184,8 @@ check_m4macros() { # but it contains only Automake's own macros, so we can ignore it. # Read the dirlist file, supported by Automake >= 1.7. - if compare_versions 1.7 $AUTOMAKE_VERSION && [ -s $cm_macrodirs/dirlist ]; then + # If AUTOMAKE was defined, no version was detected. + if [ -z "$AUTOMAKE_VERSION" ] || compare_versions 1.7 $AUTOMAKE_VERSION && [ -s $cm_macrodirs/dirlist ]; then cm_dirlist=`sed 's/[ ]*#.*//;/^$/d' $cm_macrodirs/dirlist` if [ -n "$cm_dirlist" ] ; then for cm_dir in $cm_dirlist; do -- cgit v1.2.1