aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2016-10-30 09:33:25 -0700
committerMark Adler <madler@alumni.caltech.edu>2016-12-04 07:39:37 -0800
commitfc130cdd9fcb0ea4decaf003be6ddf4c5dfd5760 (patch)
tree6a421fa21f7359071bd0b7e2137f840e63db63c3 /configure
parenta456d898bb5d81a5e33705bfe2d476af8d4fee98 (diff)
downloadzlib-fc130cdd9fcb0ea4decaf003be6ddf4c5dfd5760.tar.gz
zlib-fc130cdd9fcb0ea4decaf003be6ddf4c5dfd5760.tar.bz2
zlib-fc130cdd9fcb0ea4decaf003be6ddf4c5dfd5760.zip
Add --debug (-d) option to ./configure to define ZLIB_DEBUG.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure b/configure
index 4fc7e48..9f2e82e 100755
--- a/configure
+++ b/configure
@@ -86,6 +86,7 @@ zconst=0
86build64=0 86build64=0
87gcc=0 87gcc=0
88warn=0 88warn=0
89debug=0
89old_cc="$CC" 90old_cc="$CC"
90old_cflags="$CFLAGS" 91old_cflags="$CFLAGS"
91OBJC='$(OBJZ) $(OBJG)' 92OBJC='$(OBJZ) $(OBJG)'
@@ -135,6 +136,7 @@ case "$1" in
135 --localstatedir=*) echo "ignored option: --localstatedir" | tee -a configure.log; shift ;; 136 --localstatedir=*) echo "ignored option: --localstatedir" | tee -a configure.log; shift ;;
136 -c* | --const) zconst=1; shift ;; 137 -c* | --const) zconst=1; shift ;;
137 -w* | --warn) warn=1; shift ;; 138 -w* | --warn) warn=1; shift ;;
139 -d* | --debug) debug=1; shift ;;
138 *) 140 *)
139 echo "unknown option: $1" | tee -a configure.log 141 echo "unknown option: $1" | tee -a configure.log
140 echo "$0 --help for help" | tee -a configure.log 142 echo "$0 --help for help" | tee -a configure.log
@@ -193,6 +195,10 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then
193 CFLAGS="${CFLAGS} -Wall -Wextra -pedantic" 195 CFLAGS="${CFLAGS} -Wall -Wextra -pedantic"
194 fi 196 fi
195 fi 197 fi
198 if test $debug -eq 1; then
199 CFLAGS="${CFLAGS} -DZLIB_DEBUG"
200 SFLAGS="${SFLAGS} -DZLIB_DEBUG"
201 fi
196 if test -z "$uname"; then 202 if test -z "$uname"; then
197 uname=`(uname -s || echo unknown) 2>/dev/null` 203 uname=`(uname -s || echo unknown) 2>/dev/null`
198 fi 204 fi