aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2013-03-23 22:27:43 -0700
committerMark Adler <madler@alumni.caltech.edu>2013-03-23 22:30:09 -0700
commit03ff48cc67937fbb026a7952c0351615ef9be4e5 (patch)
tree3050209fccaad5c9f29f9495f053f9dacde92d6f /configure
parent66fcefbb2fb867f3f941b71140532de8593f29d6 (diff)
downloadzlib-03ff48cc67937fbb026a7952c0351615ef9be4e5.tar.gz
zlib-03ff48cc67937fbb026a7952c0351615ef9be4e5.tar.bz2
zlib-03ff48cc67937fbb026a7952c0351615ef9be4e5.zip
Remove runtime check in configure for four-byte integer type.
That didn't work when cross-compiling. Simply rely on limits.h. If a compiler does not have limits.h, then zconf.h.in should be modified to define Z_U4 as an unsiged four-byte integer type in order for crc32() to be fast. This also simplifies and makes more portable to check for a four- byte type using limits.h.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure26
1 files changed, 0 insertions, 26 deletions
diff --git a/configure b/configure
index bb5b1b8..b77a8a8 100755
--- a/configure
+++ b/configure
@@ -740,32 +740,6 @@ EOF
740 fi 740 fi
741fi 741fi
742 742
743echo >> configure.log
744
745# find a four-byte unsiged integer type for crc calculations
746cat > $test.c <<EOF
747#include <stdio.h>
748#define is32(n,t) for(n=1,k=0;n;n<<=1,k++);if(k==32){puts(t);return 0;}
749int main() {
750 int k;
751 unsigned i;
752 unsigned long l;
753 unsigned short s;
754 is32(i, "unsigned")
755 is32(l, "unsigned long")
756 is32(s, "unsigned short")
757 return 1;
758}
759EOF
760Z_U4=""
761if try $CC $CFLAGS $test.c -o $test && Z_U4=`./$test` && test -n "$Z_U4"; then
762 sed < zconf.h "/#define Z_U4/s/\/\* \.\/configure may/#define Z_U4 $Z_U4 \/* .\/configure put the/" > zconf.temp.h
763 mv zconf.temp.h zconf.h
764 echo "Looking for a four-byte integer type... Found." | tee -a configure.log
765else
766 echo "Looking for a four-byte integer type... Not found." | tee -a configure.log
767fi
768
769# show the results in the log 743# show the results in the log
770echo >> configure.log 744echo >> configure.log
771echo ALL = $ALL >> configure.log 745echo ALL = $ALL >> configure.log