Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
configure: allow to override gzip binary, fixes #2852
  • Loading branch information
perexg committed May 17, 2015
1 parent ea70c10 commit 36c638b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile.webui
Expand Up @@ -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 =
Expand Down
5 changes: 3 additions & 2 deletions configure
Expand Up @@ -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-*)
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions support/configure.inc
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -455,6 +459,8 @@ ifeq (\$(origin CC),default)
CC = ${CC}
endif
PYTHON ?= ${PYTHON}
GZIP ?= ${GZIP}
BZIP2 ?= ${BZIP2}
CFLAGS += ${CFLAGS}
LDFLAGS += ${LDFLAGS}
prefix = ${prefix}
Expand Down

0 comments on commit 36c638b

Please sign in to comment.