aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2016-10-11 22:21:04 -0700
committerMark Adler <madler@alumni.caltech.edu>2016-10-11 22:21:04 -0700
commit8b95fa19cd7bb62af05ccec1e408a33ec30d54fc (patch)
treef1cc153f510b797514a2d973024f8a6d8879982c /configure
parent7096424f23df1b1813237fb5f8bc8f34cfcedd0c (diff)
downloadzlib-8b95fa19cd7bb62af05ccec1e408a33ec30d54fc.tar.gz
zlib-8b95fa19cd7bb62af05ccec1e408a33ec30d54fc.tar.bz2
zlib-8b95fa19cd7bb62af05ccec1e408a33ec30d54fc.zip
Add --warn option to ./configure, instead of environment variable.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure4
1 files changed, 3 insertions, 1 deletions
diff --git a/configure b/configure
index 6438438..4fc7e48 100755
--- a/configure
+++ b/configure
@@ -85,6 +85,7 @@ zprefix=0
85zconst=0 85zconst=0
86build64=0 86build64=0
87gcc=0 87gcc=0
88warn=0
88old_cc="$CC" 89old_cc="$CC"
89old_cflags="$CFLAGS" 90old_cflags="$CFLAGS"
90OBJC='$(OBJZ) $(OBJG)' 91OBJC='$(OBJZ) $(OBJG)'
@@ -133,6 +134,7 @@ case "$1" in
133 --sysconfdir=*) echo "ignored option: --sysconfdir" | tee -a configure.log; shift ;; 134 --sysconfdir=*) echo "ignored option: --sysconfdir" | tee -a configure.log; shift ;;
134 --localstatedir=*) echo "ignored option: --localstatedir" | tee -a configure.log; shift ;; 135 --localstatedir=*) echo "ignored option: --localstatedir" | tee -a configure.log; shift ;;
135 -c* | --const) zconst=1; shift ;; 136 -c* | --const) zconst=1; shift ;;
137 -w* | --warn) warn=1; shift ;;
136 *) 138 *)
137 echo "unknown option: $1" | tee -a configure.log 139 echo "unknown option: $1" | tee -a configure.log
138 echo "$0 --help for help" | tee -a configure.log 140 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
184 CFLAGS="${CFLAGS} -m64" 186 CFLAGS="${CFLAGS} -m64"
185 SFLAGS="${SFLAGS} -m64" 187 SFLAGS="${SFLAGS} -m64"
186 fi 188 fi
187 if test "${ZLIBGCCWARN}" = "YES"; then 189 if test "$warn" -eq 1; then
188 if test "$zconst" -eq 1; then 190 if test "$zconst" -eq 1; then
189 CFLAGS="${CFLAGS} -Wall -Wextra -Wcast-qual -pedantic -DZLIB_CONST" 191 CFLAGS="${CFLAGS} -Wall -Wextra -Wcast-qual -pedantic -DZLIB_CONST"
190 else 192 else