zlib 1.1.0

This commit is contained in:
Mark Adler
2011-09-09 23:19:55 -07:00
parent b8c9ecb076
commit 965fe72aed
17 changed files with 262 additions and 68 deletions

19
configure vendored
View File

@@ -27,6 +27,7 @@ prefix=${prefix-/usr/local}
exec_prefix=${exec_prefix-$prefix}
shared_ext='.so'
shared=0
gcc=0
old_cc="$CC"
old_cflags="$CFLAGS"
@@ -114,7 +115,6 @@ if test $shared -eq 0; then
LDSHARED="$CC"
echo Building static library $LIBS version $VER with $CC.
fi
rm -f $test.[co] $test$shared_ext
if test -f /usr/include/unistd.h; then
CFLAGS="$CFLAGS -DHAVE_UNISTD_H"
@@ -124,6 +124,23 @@ if test ! -f /usr/include/errno.h; then
CFLAGS="$CFLAGS -DNO_ERRNO_H"
fi
cat > $test.c <<EOF
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/stat.h>
caddr_t hello() {
return mmap((caddr_t)0, (off_t)0, PROT_READ, MAP_SHARED, 0, (off_t)0);
}
EOF
if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
CFLAGS="$CFLAGS -DUSE_MMAP"
echo Checking for mmap support... Yes.
else
echo Checking for mmap support... No.
fi
rm -f $test.[co] $test$shared_ext
# udpate Makefile
sed < Makefile.in "
/^CC *=/s%=.*%=$CC%