From d6231142d2b883a8c3b253fa34992b5cdb4ac2fe Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Fri, 9 Sep 2011 23:25:38 -0700 Subject: zlib 1.2.3.2 --- configure | 41 +++++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) (limited to 'configure') diff --git a/configure b/configure index f1b769b..6e8060e 100755 --- a/configure +++ b/configure @@ -79,7 +79,7 @@ esac if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then CC="$cc" SFLAGS="${CFLAGS-"-O3"} -fPIC" - CFLAGS="$cflags" + CFLAGS="${CFLAGS-"-O3"}" case `(uname -s || echo unknown) 2>/dev/null` in Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map"};; CYGWIN* | Cygwin* | cygwin* | OS/2* ) @@ -184,8 +184,7 @@ if test $shared -eq 1; then # we must test in two steps (cc then ld), required at least on SunOS 4.x if test "`($CC -c $SFLAGS $test.c) 2>&1`" = "" && test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then - CFLAGS="$SFLAGS" - LIBS="$SHAREDLIBV" + LIBS="$LIBS $SHAREDLIBV" echo Building shared library $SHAREDLIBV with $CC. elif test -z "$old_cc" -a -z "$old_cflags"; then echo No shared library support. @@ -202,8 +201,29 @@ fi if test $shared -eq 0; then LDSHARED="$CC" echo Building static library $LIBS version $VER with $CC. +fi + +cat > zlibdefs.h << EOF +/* zlibdefs.h -- compile-time definitions for the zlib compression library + * Copyright (C) 1995-2006 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +EOF + +cat > $test.c < +off64_t dummy = 0; +EOF +if test "`($CC -c $CFLAGS -D_LARGEFILE64_SOURCE $test.c) 2>&1`" = ""; then + cat >> zlibdefs.h < $test.c < $test.c <&1`" = ""; then - sed < zconf.in.h "/HAVE_UNISTD_H/s%0%1%" > zconf.h + cat >> zlibdefs.h < /* for off_t */ +#include /* for SEEK_* and off_t */ +#ifdef VMS +# include /* for off_t */ +#endif +#ifndef z_off_t +# define z_off_t off_t +#endif +EOF echo "Checking for unistd.h... Yes." else - cp -p zconf.in.h zconf.h echo "Checking for unistd.h... No." fi @@ -462,6 +490,7 @@ rm -f $test.[co] $test $test$shared_ext sed < Makefile.in " /^CC *=/s#=.*#=$CC# /^CFLAGS *=/s#=.*#=$CFLAGS# +/^SFLAGS *=/s#=.*#=$SFLAGS# /^CPP *=/s#=.*#=$CPP# /^LDSHARED *=/s#=.*#=$LDSHARED# /^LIBS *=/s#=.*#=$LIBS# -- cgit v1.2.3-55-g6feb