From: Mark Adler Date: Sun, 30 Oct 2016 16:33:25 +0000 (-0700) Subject: Add --debug (-d) option to ./configure to define ZLIB_DEBUG. X-Git-Tag: 1.9.9-b1~728 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5cd24ec5f2416ba0d331394dc540eec7f379222a;p=thirdparty%2Fzlib-ng.git Add --debug (-d) option to ./configure to define ZLIB_DEBUG. --- diff --git a/configure b/configure index be2dbd9bc..215dd392c 100755 --- a/configure +++ b/configure @@ -108,6 +108,7 @@ without_optimizations=0 without_new_strategies=0 gcc=0 warn=0 +debug=0 old_cc="$CC" old_cflags="$CFLAGS" OBJC='$(OBJZ)' @@ -162,6 +163,7 @@ case "$1" in -noopt | --without-optimizations) without_optimizations=1; shift;; -oldstrat | --without-new-strategies) without_new_strategies=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 @@ -231,6 +233,10 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then if test "$warn" -eq 1; then CFLAGS="${CFLAGS} -Wextra -pedantic" 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