summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2018-12-11 01:11:38 -0800
committerMark Adler <madler@alumni.caltech.edu>2018-12-26 12:26:52 -0800
commitf8719f5ae5acdc31d3794ddfea8ac963359de41e (patch)
tree70327ff8a4953abd605665ecd458a3c4b1a66443 /configure
parent41d86c73b21191a3fa9ea5f476fc9f1fc5e4f8b3 (diff)
downloadzlib-f8719f5ae5acdc31d3794ddfea8ac963359de41e.tar.gz
Speed up software CRC-32 computation by a factor of 1.5 to 3.
Use the interleaved method of Kadatch and Jenkins in order to make use of pipelined instructions through multiple ALUs in a single core. This also speeds up and simplifies the combination of CRCs, and updates the functions to pre-calculate and use an operator for CRC combination.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure33
1 files changed, 14 insertions, 19 deletions
diff --git a/configure b/configure
index f412795..1cd4fe5 100755
--- a/configure
+++ b/configure
@@ -367,8 +367,11 @@ else
try()
{
show $*
- ( $* ) >> configure.log 2>&1
+ got=`( $* ) 2>&1`
ret=$?
+ if test "$got" != ""; then
+ printf "%s\n" "$got" >> configure.log
+ fi
if test $ret -ne 0; then
echo "(exit code "$ret")" >> configure.log
fi
@@ -381,8 +384,11 @@ tryboth()
show $*
got=`( $* ) 2>&1`
ret=$?
- printf %s "$got" >> configure.log
+ if test "$got" != ""; then
+ printf "%s\n" "$got" >> configure.log
+ fi
if test $ret -ne 0; then
+ echo "(exit code "$ret")" >> configure.log
return $ret
fi
test "$got" = ""
@@ -457,17 +463,11 @@ size_t dummy = 0;
EOF
if try $CC -c $CFLAGS $test.c; then
echo "Checking for size_t... Yes." | tee -a configure.log
- need_sizet=0
else
echo "Checking for size_t... No." | tee -a configure.log
- need_sizet=1
-fi
-
-echo >> configure.log
-
-# find the size_t integer type, if needed
-if test $need_sizet -eq 1; then
- cat > $test.c <<EOF
+ # find a size_t integer type
+ # check for long long
+ cat > $test.c << EOF
long long dummy = 0;
EOF
if try $CC -c $CFLAGS $test.c; then
@@ -495,17 +495,13 @@ EOF
if try $CC $CFLAGS -o $test $test.c; then
sizet=`./$test`
echo "Checking for a pointer-size integer type..." $sizet"." | tee -a configure.log
+ CFLAGS="${CFLAGS} -DNO_SIZE_T=${sizet}"
+ SFLAGS="${SFLAGS} -DNO_SIZE_T=${sizet}"
else
- echo "Failed to find a pointer-size integer type." | tee -a configure.log
- leave 1
+ echo "Checking for a pointer-size integer type... not found." | tee -a configure.log
fi
fi
-if test $need_sizet -eq 1; then
- CFLAGS="${CFLAGS} -DNO_SIZE_T=${sizet}"
- SFLAGS="${SFLAGS} -DNO_SIZE_T=${sizet}"
-fi
-
echo >> configure.log
# check for large file support, and if none, check for fseeko()
@@ -849,7 +845,6 @@ echo SHAREDLIBV = $SHAREDLIBV >> configure.log
echo STATICLIB = $STATICLIB >> configure.log
echo TEST = $TEST >> configure.log
echo VER = $VER >> configure.log
-echo Z_U4 = $Z_U4 >> configure.log
echo SRCDIR = $SRCDIR >> configure.log
echo exec_prefix = $exec_prefix >> configure.log
echo includedir = $includedir >> configure.log