From 36c638b189166419d20aa55abd578a83d29bd792 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Sun, 17 May 2015 21:04:36 +0200 Subject: [PATCH] configure: allow to override gzip binary, fixes #2852 --- Makefile.webui | 2 +- configure | 5 +++-- support/configure.inc | 6 ++++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Makefile.webui b/Makefile.webui index 686688cf3..efe24218f 100644 --- a/Makefile.webui +++ b/Makefile.webui @@ -32,7 +32,7 @@ EXTJSPATH = $(ROOTPATH)/extjs CSS_PY = PYTHONIOENCODING=utf-8 $(PYTHON) support/css.py RUN_JS = PYTHONIOENCODING=utf-8 $(PYTHON) vendor/rjsmin-1.0.10/rjsmin.py RUN_CSS = PYTHONIOENCODING=utf-8 $(PYTHON) vendor/rcssmin-1.0.5/rcssmin.py -GZIP = gzip -n +GZIP += -n ifeq ($(WEBUI),std) DEBUG = diff --git a/configure b/configure index 40b51e8ff..61f7d3684 100755 --- a/configure +++ b/configure @@ -73,7 +73,7 @@ for opt do *dir|prefix) eval "$opt=$val" ;; - cc|cflags|ldflags|arch|cpu|platform|python) + cc|cflags|ldflags|arch|cpu|platform|python|gzip|bzip2) eval "$(toupper $opt)=\"$val\"" ;; enable-*) @@ -235,7 +235,8 @@ check_py_import gzip # # Binaries # -check_bin bzip2 || echo 'WARN: no bzip2 binary found' +check_bin ${GZIP} || die 'WARN: no gzip binary found' +check_bin ${BZIP2} || echo 'WARN: no bzip2 binary found' # # SSL diff --git a/support/configure.inc b/support/configure.inc index 7c878fd67..f733844da 100755 --- a/support/configure.inc +++ b/support/configure.inc @@ -17,6 +17,8 @@ CONFIGURE_ARGS="$*" [ -z "$ARCH" ] && ARCH=$(uname -m) [ -z "$OSENV" ] && OSENV=posix [ -z "$PYTHON" ] && PYTHON=python +[ -z "$GZIP" ] && GZIP=gzip +[ -z "$BZIP2" ] && BZIP2=bzip2 # Paths [ -z "$prefix" ] && prefix=/usr/local @@ -398,6 +400,8 @@ print_config () echo "Binaries:" printf "$fmt" "Using PYTHON:" "${PYTHON}" + printf "$fmt" "Using GZIP:" "${GZIP}" + printf "$fmt" "Using BZIP2:" "${BZIP2}" echo "" # Options @@ -455,6 +459,8 @@ ifeq (\$(origin CC),default) CC = ${CC} endif PYTHON ?= ${PYTHON} +GZIP ?= ${GZIP} +BZIP2 ?= ${BZIP2} CFLAGS += ${CFLAGS} LDFLAGS += ${LDFLAGS} prefix = ${prefix} -- 2.47.2