]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Add --debug (-d) option to ./configure to define ZLIB_DEBUG.
authorMark Adler <madler@alumni.caltech.edu>
Sun, 30 Oct 2016 16:33:25 +0000 (09:33 -0700)
committerHans Kristian Rosbach <hk-git@circlestorm.org>
Wed, 1 Feb 2017 12:49:47 +0000 (13:49 +0100)
configure

index be2dbd9bc9b8d82123da3f3aa49b210106415aeb..215dd392ccec80a781f3e8ce64d6732901a7b483 100755 (executable)
--- 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