aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:19:55 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:19:55 -0700
commit965fe72aed580d518c979c9a33b49e7df28205f7 (patch)
treed2471c968f71224c415a9b6cb3b4ca01bd0a94ab /configure
parentb8c9ecb0765fc39423c07613d909c5193378bdfd (diff)
downloadzlib-965fe72aed580d518c979c9a33b49e7df28205f7.tar.gz
zlib-965fe72aed580d518c979c9a33b49e7df28205f7.tar.bz2
zlib-965fe72aed580d518c979c9a33b49e7df28205f7.zip
zlib 1.1.0v1.1.0
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure19
1 files changed, 18 insertions, 1 deletions
diff --git a/configure b/configure
index bde53b1..43fc26b 100755
--- a/configure
+++ b/configure
@@ -27,6 +27,7 @@ prefix=${prefix-/usr/local}
27exec_prefix=${exec_prefix-$prefix} 27exec_prefix=${exec_prefix-$prefix}
28shared_ext='.so' 28shared_ext='.so'
29shared=0 29shared=0
30gcc=0
30old_cc="$CC" 31old_cc="$CC"
31old_cflags="$CFLAGS" 32old_cflags="$CFLAGS"
32 33
@@ -114,7 +115,6 @@ if test $shared -eq 0; then
114 LDSHARED="$CC" 115 LDSHARED="$CC"
115 echo Building static library $LIBS version $VER with $CC. 116 echo Building static library $LIBS version $VER with $CC.
116fi 117fi
117rm -f $test.[co] $test$shared_ext
118 118
119if test -f /usr/include/unistd.h; then 119if test -f /usr/include/unistd.h; then
120 CFLAGS="$CFLAGS -DHAVE_UNISTD_H" 120 CFLAGS="$CFLAGS -DHAVE_UNISTD_H"
@@ -124,6 +124,23 @@ if test ! -f /usr/include/errno.h; then
124 CFLAGS="$CFLAGS -DNO_ERRNO_H" 124 CFLAGS="$CFLAGS -DNO_ERRNO_H"
125fi 125fi
126 126
127cat > $test.c <<EOF
128#include <sys/types.h>
129#include <sys/mman.h>
130#include <sys/stat.h>
131caddr_t hello() {
132 return mmap((caddr_t)0, (off_t)0, PROT_READ, MAP_SHARED, 0, (off_t)0);
133}
134EOF
135if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
136 CFLAGS="$CFLAGS -DUSE_MMAP"
137 echo Checking for mmap support... Yes.
138else
139 echo Checking for mmap support... No.
140fi
141
142rm -f $test.[co] $test$shared_ext
143
127# udpate Makefile 144# udpate Makefile
128sed < Makefile.in " 145sed < Makefile.in "
129/^CC *=/s%=.*%=$CC% 146/^CC *=/s%=.*%=$CC%