summaryrefslogtreecommitdiff
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
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
build64=0
gcc=0
warn=0
+debug=0
old_cc="$CC"
old_cflags="$CFLAGS"
OBJC='$(OBJZ) $(OBJG)'
@@ -135,6 +136,7 @@ case "$1" in
--localstatedir=*) echo "ignored option: --localstatedir" | tee -a configure.log; shift ;;
-c* | --const) zconst=1; shift ;;
-w* | --warn) warn=1; shift ;;
+ -d* | --debug) debug=1; shift ;;
*)
echo "unknown option: $1" | tee -a configure.log
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
CFLAGS="${CFLAGS} -Wall -Wextra -pedantic"
fi
fi
+ if test $debug -eq 1; then
+ CFLAGS="${CFLAGS} -DZLIB_DEBUG"
+ SFLAGS="${SFLAGS} -DZLIB_DEBUG"
+ fi
if test -z "$uname"; then
uname=`(uname -s || echo unknown) 2>/dev/null`
fi