Add --warn option to ./configure, instead of environment variable.
This commit is contained in:
parent
7096424f23
commit
8b95fa19cd
4
configure
vendored
4
configure
vendored
@ -85,6 +85,7 @@ zprefix=0
|
|||||||
zconst=0
|
zconst=0
|
||||||
build64=0
|
build64=0
|
||||||
gcc=0
|
gcc=0
|
||||||
|
warn=0
|
||||||
old_cc="$CC"
|
old_cc="$CC"
|
||||||
old_cflags="$CFLAGS"
|
old_cflags="$CFLAGS"
|
||||||
OBJC='$(OBJZ) $(OBJG)'
|
OBJC='$(OBJZ) $(OBJG)'
|
||||||
@ -133,6 +134,7 @@ case "$1" in
|
|||||||
--sysconfdir=*) echo "ignored option: --sysconfdir" | tee -a configure.log; shift ;;
|
--sysconfdir=*) echo "ignored option: --sysconfdir" | tee -a configure.log; shift ;;
|
||||||
--localstatedir=*) echo "ignored option: --localstatedir" | tee -a configure.log; shift ;;
|
--localstatedir=*) echo "ignored option: --localstatedir" | tee -a configure.log; shift ;;
|
||||||
-c* | --const) zconst=1; shift ;;
|
-c* | --const) zconst=1; shift ;;
|
||||||
|
-w* | --warn) warn=1; shift ;;
|
||||||
*)
|
*)
|
||||||
echo "unknown option: $1" | tee -a configure.log
|
echo "unknown option: $1" | tee -a configure.log
|
||||||
echo "$0 --help for help" | tee -a configure.log
|
echo "$0 --help for help" | tee -a configure.log
|
||||||
@ -184,7 +186,7 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then
|
|||||||
CFLAGS="${CFLAGS} -m64"
|
CFLAGS="${CFLAGS} -m64"
|
||||||
SFLAGS="${SFLAGS} -m64"
|
SFLAGS="${SFLAGS} -m64"
|
||||||
fi
|
fi
|
||||||
if test "${ZLIBGCCWARN}" = "YES"; then
|
if test "$warn" -eq 1; then
|
||||||
if test "$zconst" -eq 1; then
|
if test "$zconst" -eq 1; then
|
||||||
CFLAGS="${CFLAGS} -Wall -Wextra -Wcast-qual -pedantic -DZLIB_CONST"
|
CFLAGS="${CFLAGS} -Wall -Wextra -Wcast-qual -pedantic -DZLIB_CONST"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user