From 0545759b2ed9b69e3f21fd0ac954bee78f3104b6 Mon Sep 17 00:00:00 2001 From: Evgenii Kliuchnikov Date: Fri, 28 Aug 2020 10:14:08 +0200 Subject: [PATCH] Address issues noted in #833 --- bootstrap | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/bootstrap b/bootstrap index 92d458f..3352589 100755 --- a/bootstrap +++ b/bootstrap @@ -1,4 +1,4 @@ -# !/bin/sh -e +#!/bin/sh -e if [ `uname -s` = "Darwin" ]; then echo "WARNING: OSX autogen build is not supported" @@ -13,20 +13,22 @@ autoreconf --version >/dev/null 2>&1 || { echo >&2 "'autoconf' $REQUIRED"; exit # If libtool is not installed -> "error: Libtool library used but 'LIBTOOL' is undefined" +if [ ! -e "./m4" ]; then mkdir m4 2>/dev/null +fi BROTLI_ABI_HEX=`sed -n 's/#define BROTLI_ABI_VERSION 0x//p' c/common/version.h` BROTLI_ABI_INT=`echo "ibase=16;$BROTLI_ABI_HEX" | bc` -BROTLI_ABI_CURRENT=`expr $BROTLI_ABI_INT / 16777216` -BROTLI_ABI_REVISION=`expr $BROTLI_ABI_INT / 4096 % 4096` -BROTLI_ABI_AGE=`expr $BROTLI_ABI_INT % 4096` +BROTLI_ABI_CURRENT=`echo "$BROTLI_ABI_INT / 16777216" | bc` +BROTLI_ABI_REVISION=`echo "$BROTLI_ABI_INT / 4096 % 4096" | bc` +BROTLI_ABI_AGE=`echo "$BROTLI_ABI_INT % 4096" | bc` BROTLI_ABI_INFO="$BROTLI_ABI_CURRENT:$BROTLI_ABI_REVISION:$BROTLI_ABI_AGE" BROTLI_VERSION_HEX=`sed -n 's/#define BROTLI_VERSION 0x//p' c/common/version.h` BROTLI_VERSION_INT=`echo "ibase=16;$BROTLI_VERSION_HEX" | bc` -BROTLI_VERSION_MAJOR=`expr $BROTLI_VERSION_INT / 16777216` -BROTLI_VERSION_MINOR=`expr $BROTLI_VERSION_INT / 4096 % 4096` -BROTLI_VERSION_PATCH=`expr $BROTLI_VERSION_INT % 4096` +BROTLI_VERSION_MAJOR=`echo "$BROTLI_VERSION_INT / 16777216" | bc` +BROTLI_VERSION_MINOR=`echo "$BROTLI_VERSION_INT / 4096 % 4096" | bc` +BROTLI_VERSION_PATCH=`echo "$BROTLI_VERSION_INT % 4096" | bc` BROTLI_VERSION="$BROTLI_VERSION_MAJOR.$BROTLI_VERSION_MINOR.$BROTLI_VERSION_PATCH" sed -i.bak -r "s/[0-9]+:[0-9]+:[0-9]+/$BROTLI_ABI_INFO/" Makefile.am