From 965fe72aed580d518c979c9a33b49e7df28205f7 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Fri, 9 Sep 2011 23:19:55 -0700 Subject: zlib 1.1.0 --- configure | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index bde53b1..43fc26b 100755 --- a/configure +++ b/configure @@ -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 < +#include +#include +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% -- cgit v1.2.3-55-g6feb