summaryrefslogtreecommitdiff
path: root/Build/source/libs/zlib/zlib-src/configure
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/zlib/zlib-src/configure')
-rwxr-xr-xBuild/source/libs/zlib/zlib-src/configure26
1 files changed, 16 insertions, 10 deletions
diff --git a/Build/source/libs/zlib/zlib-src/configure b/Build/source/libs/zlib/zlib-src/configure
index fa4d5daaba9..cc867c94474 100755
--- a/Build/source/libs/zlib/zlib-src/configure
+++ b/Build/source/libs/zlib/zlib-src/configure
@@ -44,8 +44,6 @@ STATICLIB=libz.a
# extract zlib version numbers from zlib.h
VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < ${SRCDIR}zlib.h`
-VER3=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\\.[0-9]*\).*/\1/p' < ${SRCDIR}zlib.h`
-VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < ${SRCDIR}zlib.h`
VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < ${SRCDIR}zlib.h`
# establish commands for library building
@@ -90,7 +88,8 @@ build64=0
gcc=0
warn=0
debug=0
-sanitize=0
+address=0
+memory=0
old_cc="$CC"
old_cflags="$CFLAGS"
OBJC='$(OBJZ) $(OBJG)'
@@ -102,7 +101,7 @@ leave()
if test "$*" != "0"; then
echo "** $0 aborting." | tee -a configure.log
fi
- rm -f $test.[co] $test $test$shared_ext $test.gcno ./--version
+ rm -rf $test.[co] $test $test$shared_ext $test.gcno $test.dSYM ./--version
echo -------------------- >> configure.log
echo >> configure.log
echo >> configure.log
@@ -141,7 +140,9 @@ case "$1" in
-c* | --const) zconst=1; shift ;;
-w* | --warn) warn=1; shift ;;
-d* | --debug) debug=1; shift ;;
- --sanitize) sanitize=1; shift ;;
+ --sanitize) address=1; shift ;;
+ --address) address=1; shift ;;
+ --memory) memory=1; shift ;;
*)
echo "unknown option: $1" | tee -a configure.log
echo "$0 --help for help" | tee -a configure.log
@@ -211,8 +212,11 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then
CFLAGS="${CFLAGS} -Wall -Wextra"
fi
fi
- if test $sanitize -eq 1; then
- CFLAGS="${CFLAGS} -g -fsanitize=address"
+ if test $address -eq 1; then
+ CFLAGS="${CFLAGS} -g -fsanitize=address -fno-omit-frame-pointer"
+ fi
+ if test $memory -eq 1; then
+ CFLAGS="${CFLAGS} -g -fsanitize=memory -fno-omit-frame-pointer"
fi
if test $debug -eq 1; then
CFLAGS="${CFLAGS} -DZLIB_DEBUG"
@@ -259,8 +263,10 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then
SHAREDLIB=libz$shared_ext
SHAREDLIBV=libz.$VER$shared_ext
SHAREDLIBM=libz.$VER1$shared_ext
- LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER3"}
- if libtool -V 2>&1 | grep Apple > /dev/null; then
+ LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER"}
+ if "${CROSS_PREFIX}libtool" -V 2>&1 | grep Apple > /dev/null; then
+ AR="${CROSS_PREFIX}libtool"
+ elif libtool -V 2>&1 | grep Apple > /dev/null; then
AR="libtool"
else
AR="/usr/bin/libtool"
@@ -860,7 +866,7 @@ echo prefix = $prefix >> configure.log
echo sharedlibdir = $sharedlibdir >> configure.log
echo uname = $uname >> configure.log
-# udpate Makefile with the configure results
+# update Makefile with the configure results
sed < ${SRCDIR}Makefile.in "
/^CC *=/s#=.*#=$CC#
/^CFLAGS *=/s#=.*#=$CFLAGS#