summaryrefslogtreecommitdiffstats
path: root/meta/packages/zlib/files/autotools.patch
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-08-25 20:39:55 +0000
committerRichard Purdie <richard@openedhand.com>2008-08-25 20:39:55 +0000
commit0f9c34a9723254d439239ab992893c4956711d53 (patch)
tree567777b1671444db9dab736ff1e8ba9f11130a51 /meta/packages/zlib/files/autotools.patch
parent603e247e23fe95f32a7ea45649c74878dfa49b21 (diff)
downloadpoky-0f9c34a9723254d439239ab992893c4956711d53.tar.gz
zlib: Upgrade from 1.2.3 to 1.2.3.3 to add 64 bit extensions and improve operation on recent 64 bit platforms
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5094 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/zlib/files/autotools.patch')
-rw-r--r--meta/packages/zlib/files/autotools.patch386
1 files changed, 292 insertions, 94 deletions
diff --git a/meta/packages/zlib/files/autotools.patch b/meta/packages/zlib/files/autotools.patch
index d1dc8dd8d4..d70c2f6892 100644
--- a/meta/packages/zlib/files/autotools.patch
+++ b/meta/packages/zlib/files/autotools.patch
@@ -1,7 +1,8 @@
1diff -Naur zlib-1.2.3/configure zlib-1.2.3new/configure 1Index: zlib-1.2.3/configure
2--- zlib-1.2.3/configure 2005-07-11 22:11:57.000000000 +0200 2===================================================================
3+++ zlib-1.2.3new/configure 1970-01-01 01:00:00.000000000 +0100 3--- zlib-1.2.3.orig/configure 2008-08-23 11:23:47.000000000 +0100
4@@ -1,459 +0,0 @@ 4+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
5@@ -1,558 +0,0 @@
5-#!/bin/sh 6-#!/bin/sh
6-# configure script for zlib. This script is needed only if 7-# configure script for zlib. This script is needed only if
7-# you wish to build a shared library and your system supports them, 8-# you wish to build a shared library and your system supports them,
@@ -27,7 +28,8 @@ diff -Naur zlib-1.2.3/configure zlib-1.2.3new/configure
27-VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h` 28-VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`
28-VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h` 29-VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h`
29-VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h` 30-VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h`
30-AR=${AR-"ar rc"} 31-AR=${AR-"ar"}
32-AR_RC="${AR} rc"
31-RANLIB=${RANLIB-"ranlib"} 33-RANLIB=${RANLIB-"ranlib"}
32-prefix=${prefix-/usr/local} 34-prefix=${prefix-/usr/local}
33-exec_prefix=${exec_prefix-'${prefix}'} 35-exec_prefix=${exec_prefix-'${prefix}'}
@@ -35,7 +37,8 @@ diff -Naur zlib-1.2.3/configure zlib-1.2.3new/configure
35-includedir=${includedir-'${prefix}/include'} 37-includedir=${includedir-'${prefix}/include'}
36-mandir=${mandir-'${prefix}/share/man'} 38-mandir=${mandir-'${prefix}/share/man'}
37-shared_ext='.so' 39-shared_ext='.so'
38-shared=0 40-shared=1
41-zprefix=0
39-gcc=0 42-gcc=0
40-old_cc="$CC" 43-old_cc="$CC"
41-old_cflags="$CFLAGS" 44-old_cflags="$CFLAGS"
@@ -43,20 +46,25 @@ diff -Naur zlib-1.2.3/configure zlib-1.2.3new/configure
43-while test $# -ge 1 46-while test $# -ge 1
44-do 47-do
45-case "$1" in 48-case "$1" in
46- -h* | --h*) 49- -h* | --help)
47- echo 'usage:' 50- echo 'usage:'
48- echo ' configure [--shared] [--prefix=PREFIX] [--exec_prefix=EXPREFIX]' 51- echo ' configure [--shared] [--prefix=PREFIX] [--exec_prefix=EXPREFIX]'
49- echo ' [--libdir=LIBDIR] [--includedir=INCLUDEDIR]' 52- echo ' [--libdir=LIBDIR] [--includedir=INCLUDEDIR] [--zprefix]'
50- exit 0;; 53- exit 0;;
51- -p*=* | --p*=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;; 54- -p*=* | --prefix=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
52- -e*=* | --e*=*) exec_prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;; 55- -e*=* | --eprefix=*) exec_prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
53- -l*=* | --libdir=*) libdir=`echo $1 | sed 's/[-a-z_]*=//'`; shift;; 56- -l*=* | --libdir=*) libdir=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
54- -i*=* | --includedir=*) includedir=`echo $1 | sed 's/[-a-z_]*=//'`;shift;; 57- -i*=* | --includedir=*) includedir=`echo $1 | sed 's/[-a-z_]*=//'`;shift;;
55- -p* | --p*) prefix="$2"; shift; shift;; 58- -u*=* | --uname=*) uname=`echo $1 | sed 's/[-a-z_]*=//'`;shift;;
56- -e* | --e*) exec_prefix="$2"; shift; shift;; 59- -p* | --prefix) prefix="$2"; shift; shift;;
57- -l* | --l*) libdir="$2"; shift; shift;; 60- -e* | --eprefix) exec_prefix="$2"; shift; shift;;
58- -i* | --i*) includedir="$2"; shift; shift;; 61- -l* | --libdir) libdir="$2"; shift; shift;;
59- -s* | --s*) shared=1; shift;; 62- -i* | --includedir) includedir="$2"; shift; shift;;
63- -s* | --shared | --enable-shared) shared=1; shift;;
64- -t | --static) shared=0; shift;;
65- -z* | --zprefix) zprefix=1; shift;;
66- --sysconfdir=*) echo "ignored option: --sysconfdir"; shift;;
67- --localstatedir=*) echo "ignored option: --localstatedir"; shift;;
60- *) echo "unknown option: $1"; echo "$0 --help for help"; exit 1;; 68- *) echo "unknown option: $1"; echo "$0 --help for help"; exit 1;;
61- esac 69- esac
62-done 70-done
@@ -77,10 +85,13 @@ diff -Naur zlib-1.2.3/configure zlib-1.2.3new/configure
77- 85-
78-if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then 86-if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
79- CC="$cc" 87- CC="$cc"
80- SFLAGS=${CFLAGS-"-fPIC -O3"} 88- SFLAGS="${CFLAGS-"-O3"} -fPIC"
81- CFLAGS="$cflags" 89- CFLAGS="${CFLAGS-"-O3"}"
82- case `(uname -s || echo unknown) 2>/dev/null` in 90- if test -z $uname; then
83- Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};; 91- uname=`(uname -s || echo unknown) 2>/dev/null`
92- fi
93- case "$uname" in
94- Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map"};;
84- CYGWIN* | Cygwin* | cygwin* | OS/2* ) 95- CYGWIN* | Cygwin* | cygwin* | OS/2* )
85- EXE='.exe';; 96- EXE='.exe';;
86- QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4 97- QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4
@@ -106,7 +117,10 @@ diff -Naur zlib-1.2.3/configure zlib-1.2.3new/configure
106-else 117-else
107- # find system name and corresponding cc options 118- # find system name and corresponding cc options
108- CC=${CC-cc} 119- CC=${CC-cc}
109- case `(uname -sr || echo unknown) 2>/dev/null` in 120- if test -z $uname; then
121- uname=`(uname -sr || echo unknown) 2>/dev/null`
122- fi
123- case "$uname" in
110- HP-UX*) SFLAGS=${CFLAGS-"-O +z"} 124- HP-UX*) SFLAGS=${CFLAGS-"-O +z"}
111- CFLAGS=${CFLAGS-"-O"} 125- CFLAGS=${CFLAGS-"-O"}
112-# LDSHARED=${LDSHARED-"ld -b +vnocompatwarnings"} 126-# LDSHARED=${LDSHARED-"ld -b +vnocompatwarnings"}
@@ -121,24 +135,30 @@ diff -Naur zlib-1.2.3/configure zlib-1.2.3new/configure
121- esac;; 135- esac;;
122- IRIX*) SFLAGS=${CFLAGS-"-ansi -O2 -rpath ."} 136- IRIX*) SFLAGS=${CFLAGS-"-ansi -O2 -rpath ."}
123- CFLAGS=${CFLAGS-"-ansi -O2"} 137- CFLAGS=${CFLAGS-"-ansi -O2"}
124- LDSHARED=${LDSHARED-"cc -shared"};; 138- LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so.1"};;
125- OSF1\ V4*) SFLAGS=${CFLAGS-"-O -std1"} 139- OSF1\ V4*) SFLAGS=${CFLAGS-"-O -std1"}
126- CFLAGS=${CFLAGS-"-O -std1"} 140- CFLAGS=${CFLAGS-"-O -std1"}
127- LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"};; 141- LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"};;
128- OSF1*) SFLAGS=${CFLAGS-"-O -std1"} 142- OSF1*) SFLAGS=${CFLAGS-"-O -std1"}
129- CFLAGS=${CFLAGS-"-O -std1"} 143- CFLAGS=${CFLAGS-"-O -std1"}
130- LDSHARED=${LDSHARED-"cc -shared"};; 144- LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so.1"};;
131- QNX*) SFLAGS=${CFLAGS-"-4 -O"} 145- QNX*) SFLAGS=${CFLAGS-"-4 -O"}
132- CFLAGS=${CFLAGS-"-4 -O"} 146- CFLAGS=${CFLAGS-"-4 -O"}
133- LDSHARED=${LDSHARED-"cc"} 147- LDSHARED=${LDSHARED-"cc"}
134- RANLIB=${RANLIB-"true"} 148- RANLIB=${RANLIB-"true"}
135- AR="cc -A";; 149- AR_RC="cc -A";;
136- SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "} 150- SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "}
137- CFLAGS=${CFLAGS-"-O3"} 151- CFLAGS=${CFLAGS-"-O3"}
138- LDSHARED=${LDSHARED-"cc -dy -KPIC -G"};; 152- LDSHARED=${LDSHARED-"cc -dy -KPIC -G"};;
139- SunOS\ 5*) SFLAGS=${CFLAGS-"-fast -xcg89 -KPIC -R."} 153- SunOS\ 5*) LDSHARED=${LDSHARED-"cc -G"}
140- CFLAGS=${CFLAGS-"-fast -xcg89"} 154- case `(uname -m || echo unknown) 2>/dev/null` in
141- LDSHARED=${LDSHARED-"cc -G"};; 155- i86*)
156- SFLAGS=${CFLAGS-"-xpentium -fast -KPIC -R."}
157- CFLAGS=${CFLAGS-"-xpentium -fast"};;
158- *)
159- SFLAGS=${CFLAGS-"-fast -xcg92 -KPIC -R."}
160- CFLAGS=${CFLAGS-"-fast -xcg92"};;
161- esac;;
142- SunOS\ 4*) SFLAGS=${CFLAGS-"-O2 -PIC"} 162- SunOS\ 4*) SFLAGS=${CFLAGS-"-O2 -PIC"}
143- CFLAGS=${CFLAGS-"-O2"} 163- CFLAGS=${CFLAGS-"-O2"}
144- LDSHARED=${LDSHARED-"ld"};; 164- LDSHARED=${LDSHARED-"ld"};;
@@ -177,22 +197,63 @@ diff -Naur zlib-1.2.3/configure zlib-1.2.3new/configure
177- # we must test in two steps (cc then ld), required at least on SunOS 4.x 197- # we must test in two steps (cc then ld), required at least on SunOS 4.x
178- if test "`($CC -c $SFLAGS $test.c) 2>&1`" = "" && 198- if test "`($CC -c $SFLAGS $test.c) 2>&1`" = "" &&
179- test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then 199- test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then
180- CFLAGS="$SFLAGS" 200- LIBS="$LIBS $SHAREDLIBV"
181- LIBS="$SHAREDLIBV"
182- echo Building shared library $SHAREDLIBV with $CC. 201- echo Building shared library $SHAREDLIBV with $CC.
183- elif test -z "$old_cc" -a -z "$old_cflags"; then 202- elif test -z "$old_cc" -a -z "$old_cflags"; then
184- echo No shared library support. 203- echo No shared library support.
185- shared=0; 204- shared=0;
186- else 205- else
206- echo Tested $CC -c $SFLAGS $test.c
207- $CC -c $SFLAGS $test.c
208- echo Tested $LDSHARED -o $test$shared_ext $test.o
209- $LDSHARED -o $test$shared_ext $test.o
187- echo 'No shared library support; try without defining CC and CFLAGS' 210- echo 'No shared library support; try without defining CC and CFLAGS'
188- shared=0; 211- shared=0;
189- fi 212- fi
190-fi 213-fi
191-if test $shared -eq 0; then 214-if test $shared -eq 0; then
192- LDSHARED="$CC" 215- LDSHARED="$CC"
216- ALL="allstatic"
217- TEST="teststatic"
193- echo Building static library $LIBS version $VER with $CC. 218- echo Building static library $LIBS version $VER with $CC.
194-else 219-else
195- LDFLAGS="-L. ${SHAREDLIBV}" 220- ALL="allstatic allshared"
221- TEST="teststatic testshared"
222-fi
223-
224-cat > zlibdefs.h << EOF
225-/* zlibdefs.h -- compile-time definitions for the zlib compression library
226- * Copyright (C) 1995-2006 Jean-loup Gailly.
227- * For conditions of distribution and use, see copyright notice in zlib.h
228- */
229-
230-EOF
231-
232-cat > $test.c <<EOF
233-#include <sys/types.h>
234-off64_t dummy = 0;
235-EOF
236-if test "`($CC -c $CFLAGS -D_LARGEFILE64_SOURCE=1 $test.c) 2>&1`" = ""; then
237- CFLAGS="${CFLAGS} -D_LARGEFILE64_SOURCE=1"
238- SFLAGS="${SFLAGS} -D_LARGEFILE64_SOURCE=1"
239- echo "Checking for off64_t... Yes."
240- echo "Checking for fseeko... Yes."
241-else
242- echo "Checking for off64_t... No."
243- cat > $test.c <<EOF
244-#include <stdio.h>
245-int main(void) {
246- fseeko(NULL, 0, 0);
247- return 0;
248-}
249-EOF
250- if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then
251- echo "Checking for fseeko... Yes."
252- else
253- CFLAGS="${CFLAGS} -DNO_FSEEKO"
254- SFLAGS="${SFLAGS} -DNO_FSEEKO"
255- echo "Checking for fseeko... No."
256- fi
196-fi 257-fi
197- 258-
198-cat > $test.c <<EOF 259-cat > $test.c <<EOF
@@ -200,13 +261,27 @@ diff -Naur zlib-1.2.3/configure zlib-1.2.3new/configure
200-int main() { return 0; } 261-int main() { return 0; }
201-EOF 262-EOF
202-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then 263-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
203- sed < zconf.in.h "/HAVE_UNISTD_H/s%0%1%" > zconf.h 264- cat >> zlibdefs.h <<EOF
265-#include <sys/types.h> /* for off_t */
266-#include <unistd.h> /* for SEEK_* and off_t */
267-#ifdef VMS
268-# include <unixio.h> /* for off_t */
269-#endif
270-#ifndef z_off_t
271-# define z_off_t off_t
272-#endif
273-EOF
204- echo "Checking for unistd.h... Yes." 274- echo "Checking for unistd.h... Yes."
205-else 275-else
206- cp -p zconf.in.h zconf.h
207- echo "Checking for unistd.h... No." 276- echo "Checking for unistd.h... No."
208-fi 277-fi
209- 278-
279-if test $zprefix -eq 1; then
280- sed < zconf.h "/#ifdef Z_PREFIX/s/def Z_PREFIX/ 1/" > zconf.temp.h
281- mv zconf.temp.h zconf.h
282- echo "Using z_ prefix on all symbols."
283-fi
284-
210-cat > $test.c <<EOF 285-cat > $test.c <<EOF
211-#include <stdio.h> 286-#include <stdio.h>
212-#include <stdarg.h> 287-#include <stdarg.h>
@@ -223,7 +298,7 @@ diff -Naur zlib-1.2.3/configure zlib-1.2.3new/configure
223-EOF 298-EOF
224- 299-
225-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then 300-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
226- echo "Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()" 301- echo "Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()."
227- 302-
228- cat > $test.c <<EOF 303- cat > $test.c <<EOF
229-#include <stdio.h> 304-#include <stdio.h>
@@ -320,7 +395,7 @@ diff -Naur zlib-1.2.3/configure zlib-1.2.3new/configure
320- fi 395- fi
321- fi 396- fi
322-else 397-else
323- echo "Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()" 398- echo "Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()."
324- 399-
325- cat >$test.c <<EOF 400- cat >$test.c <<EOF
326-#include <stdio.h> 401-#include <stdio.h>
@@ -445,13 +520,36 @@ diff -Naur zlib-1.2.3/configure zlib-1.2.3new/configure
445-sed < Makefile.in " 520-sed < Makefile.in "
446-/^CC *=/s#=.*#=$CC# 521-/^CC *=/s#=.*#=$CC#
447-/^CFLAGS *=/s#=.*#=$CFLAGS# 522-/^CFLAGS *=/s#=.*#=$CFLAGS#
523-/^SFLAGS *=/s#=.*#=$SFLAGS#
524-/^LDFLAGS *=/s#=.*#=$LDFLAGS#
525-/^LDSHARED *=/s#=.*#=$LDSHARED#
526-/^CPP *=/s#=.*#=$CPP#
527-/^LIBS *=/s#=.*#=$LIBS#
528-/^SHAREDLIB *=/s#=.*#=$SHAREDLIB#
529-/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV#
530-/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM#
531-/^AR *=/s#=.*#=$AR_RC#
532-/^RANLIB *=/s#=.*#=$RANLIB#
533-/^EXE *=/s#=.*#=$EXE#
534-/^prefix *=/s#=.*#=$prefix#
535-/^exec_prefix *=/s#=.*#=$exec_prefix#
536-/^libdir *=/s#=.*#=$libdir#
537-/^includedir *=/s#=.*#=$includedir#
538-/^mandir *=/s#=.*#=$mandir#
539-/^all: */s#:.*#: $ALL#
540-/^test: */s#:.*#: $TEST#
541-" > Makefile
542-
543-sed < zlib.pc.in "
544-/^CC *=/s#=.*#=$CC#
545-/^CFLAGS *=/s#=.*#=$CFLAGS#
448-/^CPP *=/s#=.*#=$CPP# 546-/^CPP *=/s#=.*#=$CPP#
449-/^LDSHARED *=/s#=.*#=$LDSHARED# 547-/^LDSHARED *=/s#=.*#=$LDSHARED#
450-/^LIBS *=/s#=.*#=$LIBS# 548-/^LIBS *=/s#=.*#=$LIBS#
451-/^SHAREDLIB *=/s#=.*#=$SHAREDLIB# 549-/^SHAREDLIB *=/s#=.*#=$SHAREDLIB#
452-/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV# 550-/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV#
453-/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM# 551-/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM#
454-/^AR *=/s#=.*#=$AR# 552-/^AR *=/s#=.*#=$AR_RC#
455-/^RANLIB *=/s#=.*#=$RANLIB# 553-/^RANLIB *=/s#=.*#=$RANLIB#
456-/^EXE *=/s#=.*#=$EXE# 554-/^EXE *=/s#=.*#=$EXE#
457-/^prefix *=/s#=.*#=$prefix# 555-/^prefix *=/s#=.*#=$prefix#
@@ -460,11 +558,14 @@ diff -Naur zlib-1.2.3/configure zlib-1.2.3new/configure
460-/^includedir *=/s#=.*#=$includedir# 558-/^includedir *=/s#=.*#=$includedir#
461-/^mandir *=/s#=.*#=$mandir# 559-/^mandir *=/s#=.*#=$mandir#
462-/^LDFLAGS *=/s#=.*#=$LDFLAGS# 560-/^LDFLAGS *=/s#=.*#=$LDFLAGS#
463-" > Makefile 561-" | sed -e "
464diff -Naur zlib-1.2.3/configure.ac zlib-1.2.3new/configure.ac 562-s/\@VERSION\@/$VER/g;
465--- zlib-1.2.3/configure.ac 1970-01-01 01:00:00.000000000 +0100 563-" > zlib.pc
466+++ zlib-1.2.3new/configure.ac 2006-08-07 20:38:31.612402750 +0200 564Index: zlib-1.2.3/configure.ac
467@@ -0,0 +1,14 @@ 565===================================================================
566--- /dev/null 1970-01-01 00:00:00.000000000 +0000
567+++ zlib-1.2.3/configure.ac 2008-08-23 12:01:15.000000000 +0100
568@@ -0,0 +1,48 @@
468+AC_INIT(zlib,1.2.3) 569+AC_INIT(zlib,1.2.3)
469+AC_CONFIG_SRCDIR(adler32.c) 570+AC_CONFIG_SRCDIR(adler32.c)
470+AM_INIT_AUTOMAKE(zlibs,1.2.3) 571+AM_INIT_AUTOMAKE(zlibs,1.2.3)
@@ -476,27 +577,63 @@ diff -Naur zlib-1.2.3/configure.ac zlib-1.2.3new/configure.ac
476+ 577+
477+AC_HEADER_STDC 578+AC_HEADER_STDC
478+ 579+
580+zlib_save_CPPFLAGS=$CPPFLAGS
581+CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
582+AC_CHECK_TYPES(off64_t)
583+CPPFLAGS=$zlib_save_CPPFLAGS
584+
585+AC_CACHE_CHECK([whether to enable -D_LARGEFILE64_SOURCE], [zlib_cv_use_lfs64], [
586+ zlib_cv_use_lfs64=yes
587+ if test "$ac_cv_off64_t" = "yes"; then
588+ zlib_cv_use_lfs64=yes
589+ fi
590+])
591+
592+if test "$zlib_cv_use_lfs64" = "yes"; then
593+ CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
594+ echo "eek"
595+ #APR_ADDTO(CPPFLAGS, [-D_LARGEFILE64_SOURCE])
596+fi
597+
598+cat > zlibdefs.h << EOF
599+/* zlibdefs.h -- compile-time definitions for the zlib compression library
600+ * Copyright (C) 1995-2006 Jean-loup Gailly.
601+ * For conditions of distribution and use, see copyright notice in zlib.h
602+ */
603+
604+#include <sys/types.h> /* for off_t */
605+#include <unistd.h> /* for SEEK_* and off_t */
606+#ifdef VMS
607+# include <unixio.h> /* for off_t */
608+#endif
609+#ifndef z_off_t
610+# define z_off_t off_t
611+#endif
612+EOF
613+
479+AC_CONFIG_FILES([Makefile]) 614+AC_CONFIG_FILES([Makefile])
480+ 615+
481+AC_OUTPUT 616+AC_OUTPUT
482diff -Naur zlib-1.2.3/Makefile.am zlib-1.2.3new/Makefile.am 617Index: zlib-1.2.3/Makefile.am
483--- zlib-1.2.3/Makefile.am 2006/10/14 05:35:40 1.1 618===================================================================
484+++ zlib-1.2.3new/Makefile.am 2006/10/14 05:36:49 619--- /dev/null 1970-01-01 00:00:00.000000000 +0000
620+++ zlib-1.2.3/Makefile.am 2008-08-23 11:23:47.000000000 +0100
485@@ -0,0 +1,8 @@ 621@@ -0,0 +1,8 @@
486+lib_LTLIBRARIES = libz.la 622+lib_LTLIBRARIES = libz.la
487+ 623+
488+libz_la_SOURCES = adler32.c compress.c crc32.c gzio.c uncompr.c deflate.c \ 624+libz_la_SOURCES = adler32.c compress.c crc32.c gzio.c uncompr.c deflate.c \
489+ trees.c zutil.c inflate.c infback.c inftrees.c inffast.c 625+ trees.c zutil.c inflate.c infback.c inftrees.c inffast.c
490+ 626+
491+libz_la_LDFLAGS = -version-number 1:2:3 627+libz_la_LDFLAGS = -version-number 1:2:3 --version-script zlib.map
492+ 628+
493+include_HEADERS = zconf.h zlib.h 629+include_HEADERS = zconf.h zlib.h zlibdefs.h
494diff -Naur zlib-1.2.3/Makefile.in zlib-1.2.3new/Makefile.in 630Index: zlib-1.2.3/Makefile.in
495--- zlib-1.2.3/Makefile.in 2005-07-18 04:25:21.000000000 +0200 631===================================================================
496+++ zlib-1.2.3new/Makefile.in 1970-01-01 01:00:00.000000000 +0100 632--- zlib-1.2.3.orig/Makefile.in 2008-08-23 11:23:47.000000000 +0100
497@@ -1,154 +0,0 @@ 633+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
634@@ -1,215 +0,0 @@
498-# Makefile for zlib 635-# Makefile for zlib
499-# Copyright (C) 1995-2005 Jean-loup Gailly. 636-# Copyright (C) 1995-2006 Jean-loup Gailly.
500-# For conditions of distribution and use, see copyright notice in zlib.h 637-# For conditions of distribution and use, see copyright notice in zlib.h
501- 638-
502-# To compile and test, type: 639-# To compile and test, type:
@@ -521,16 +658,18 @@ diff -Naur zlib-1.2.3/Makefile.in zlib-1.2.3new/Makefile.in
521-#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ 658-#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
522-# -Wstrict-prototypes -Wmissing-prototypes 659-# -Wstrict-prototypes -Wmissing-prototypes
523- 660-
661-SFLAGS=-O
662-
524-LDFLAGS=libz.a 663-LDFLAGS=libz.a
525-LDSHARED=$(CC) 664-LDSHARED=$(CC)
526-CPP=$(CC) -E 665-CPP=$(CC) -E
527- 666-
528-LIBS=libz.a 667-LIBS=libz.a
529-SHAREDLIB=libz.so 668-SHAREDLIB=libz.so
530-SHAREDLIBV=libz.so.1.2.3 669-SHAREDLIBV=libz.so.1.2.3.3
531-SHAREDLIBM=libz.so.1 670-SHAREDLIBM=libz.so.1
532- 671-
533-AR=ar rc 672-AR=ar
534-RANLIB=ranlib 673-RANLIB=ranlib
535-TAR=tar 674-TAR=tar
536-SHELL=/bin/sh 675-SHELL=/bin/sh
@@ -542,21 +681,28 @@ diff -Naur zlib-1.2.3/Makefile.in zlib-1.2.3new/Makefile.in
542-includedir = ${prefix}/include 681-includedir = ${prefix}/include
543-mandir = ${prefix}/share/man 682-mandir = ${prefix}/share/man
544-man3dir = ${mandir}/man3 683-man3dir = ${mandir}/man3
684-pkgconfigdir = ${libdir}/pkgconfig
545- 685-
546-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ 686-OBJC = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
547- zutil.o inflate.o infback.o inftrees.o inffast.o 687- zutil.o inflate.o infback.o inftrees.o inffast.o
548- 688-
549-OBJA = 689-OBJA =
550-# to use the asm code: make OBJA=match.o 690-# to use the asm code: make OBJA=match.o
551- 691-
692-OBJS = $(OBJC) $(OBJA)
693-
694-PIC_OBJS = $(OBJS:%.o=%.lo)
695-
552-TEST_OBJS = example.o minigzip.o 696-TEST_OBJS = example.o minigzip.o
553- 697-
554-all: example$(EXE) minigzip$(EXE) 698-allstatic: example$(EXE) minigzip$(EXE)
555- 699-
556-check: test 700-allshared: examplesh$(EXE) minigzipsh$(EXE)
557-test: all 701-
558- @LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \ 702-all: allstatic allshared
559- echo hello world | ./minigzip | ./minigzip -d || \ 703-
704-teststatic: allstatic
705- @echo hello world | ./minigzip | ./minigzip -d || \
560- echo ' *** minigzip test FAILED ***' ; \ 706- echo ' *** minigzip test FAILED ***' ; \
561- if ./example; then \ 707- if ./example; then \
562- echo ' *** zlib test OK ***'; \ 708- echo ' *** zlib test OK ***'; \
@@ -564,8 +710,24 @@ diff -Naur zlib-1.2.3/Makefile.in zlib-1.2.3new/Makefile.in
564- echo ' *** zlib test FAILED ***'; \ 710- echo ' *** zlib test FAILED ***'; \
565- fi 711- fi
566- 712-
567-libz.a: $(OBJS) $(OBJA) 713-testshared: allshared
568- $(AR) $@ $(OBJS) $(OBJA) 714- @LD_LIBRARY_PATH=`pwd`:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
715- DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \
716- SHLIB_PATH=`pwd`:$(SHLIB_PATH) ; export SHLIB_PATH; \
717- echo hello world | ./minigzipsh | ./minigzipsh -d || \
718- echo ' *** minigzip shared test FAILED ***' ; \
719- if ./examplesh; then \
720- echo ' *** zlib shared test OK ***'; \
721- else \
722- echo ' *** zlib shared test FAILED ***'; \
723- fi
724-
725-test: teststatic testshared
726-
727-check: test
728-
729-libz.a: $(OBJS)
730- $(AR) $@ $(OBJS)
569- -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 731- -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
570- 732-
571-match.o: match.S 733-match.o: match.S
@@ -574,8 +736,17 @@ diff -Naur zlib-1.2.3/Makefile.in zlib-1.2.3new/Makefile.in
574- mv _match.o match.o 736- mv _match.o match.o
575- rm -f _match.s 737- rm -f _match.s
576- 738-
577-$(SHAREDLIBV): $(OBJS) 739-match.lo: match.S
578- $(LDSHARED) -o $@ $(OBJS) 740- $(CPP) match.S > _match.s
741- $(CC) -c -fPIC _match.s
742- mv _match.o match.lo
743- rm -f _match.s
744-
745-%.lo: %.c
746- $(CC) $(SFLAGS) -DPIC -c $< -o $@
747-
748-$(SHAREDLIBV): $(PIC_OBJS)
749- $(LDSHARED) -o $@ $(PIC_OBJS) -lc
579- rm -f $(SHAREDLIB) $(SHAREDLIBM) 750- rm -f $(SHAREDLIB) $(SHAREDLIBM)
580- ln -s $@ $(SHAREDLIB) 751- ln -s $@ $(SHAREDLIB)
581- ln -s $@ $(SHAREDLIBM) 752- ln -s $@ $(SHAREDLIBM)
@@ -586,46 +757,60 @@ diff -Naur zlib-1.2.3/Makefile.in zlib-1.2.3new/Makefile.in
586-minigzip$(EXE): minigzip.o $(LIBS) 757-minigzip$(EXE): minigzip.o $(LIBS)
587- $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) 758- $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
588- 759-
589-install: $(LIBS) 760-examplesh$(EXE): example.o $(LIBS)
590- -@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi 761- $(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIB)
591- -@if [ ! -d $(includedir) ]; then mkdir -p $(includedir); fi 762-
592- -@if [ ! -d $(libdir) ]; then mkdir -p $(libdir); fi 763-minigzipsh$(EXE): minigzip.o $(LIBS)
593- -@if [ ! -d $(man3dir) ]; then mkdir -p $(man3dir); fi 764- $(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIB)
594- cp zlib.h zconf.h $(includedir) 765-
595- chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h 766-install-libs: $(LIBS)
596- cp $(LIBS) $(libdir) 767- -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
597- cd $(libdir); chmod 755 $(LIBS) 768- -@if [ ! -d $(DESTDIR)$(libdir) ]; then mkdir -p $(DESTDIR)$(libdir); fi
598- -@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1 769- -@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi
599- cd $(libdir); if test -f $(SHAREDLIBV); then \ 770- -@if [ ! -d $(DESTDIR)$(pkgconfigdir) ]; then mkdir -p $(DESTDIR)$(pkgconfigdir); fi
771- cp $(LIBS) $(DESTDIR)$(libdir)
772- cd $(DESTDIR)$(libdir); chmod 755 $(LIBS)
773- -@(cd $(DESTDIR)$(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
774- cd $(DESTDIR)$(libdir); if test -f $(SHAREDLIBV); then \
600- rm -f $(SHAREDLIB) $(SHAREDLIBM); \ 775- rm -f $(SHAREDLIB) $(SHAREDLIBM); \
601- ln -s $(SHAREDLIBV) $(SHAREDLIB); \ 776- ln -s $(SHAREDLIBV) $(SHAREDLIB); \
602- ln -s $(SHAREDLIBV) $(SHAREDLIBM); \ 777- ln -s $(SHAREDLIBV) $(SHAREDLIBM); \
603- (ldconfig || true) >/dev/null 2>&1; \ 778- (ldconfig || true) >/dev/null 2>&1; \
604- fi 779- fi
605- cp zlib.3 $(man3dir) 780- cp zlib.3 $(DESTDIR)$(man3dir)
606- chmod 644 $(man3dir)/zlib.3 781- chmod 644 $(DESTDIR)$(man3dir)/zlib.3
782- cp zlib.pc $(DESTDIR)$(pkgconfigdir)
783- chmod 644 $(DESTDIR)$(pkgconfigdir)/zlib.pc
607-# The ranlib in install is needed on NeXTSTEP which checks file times 784-# The ranlib in install is needed on NeXTSTEP which checks file times
608-# ldconfig is for Linux 785-# ldconfig is for Linux
609- 786-
787-install: install-libs
788- -@if [ ! -d $(DESTDIR)$(includedir) ]; then mkdir -p $(DESTDIR)$(includedir); fi
789- cp zlib.h zconf.h zlibdefs.h $(DESTDIR)$(includedir)
790- chmod 644 $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h $(DESTDIR)$(includedir)/zlibdefs.h
791-
610-uninstall: 792-uninstall:
611- cd $(includedir); \ 793- cd $(DESTDIR)$(includedir); rm -f zlib.h zconf.h zlibdefs.h
612- cd $(libdir); rm -f libz.a; \ 794- cd $(DESTDIR)$(libdir); rm -f libz.a; \
613- if test -f $(SHAREDLIBV); then \ 795- if test -f $(SHAREDLIBV); then \
614- rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \ 796- rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \
615- fi 797- fi
616- cd $(man3dir); rm -f zlib.3 798- cd $(DESTDIR)$(man3dir); rm -f zlib.3
799- cd $(DESTDIR)$(pkgconfigdir); rm -f zlib.pc
617- 800-
618-mostlyclean: clean 801-mostlyclean: clean
619-clean: 802-clean:
620- rm -f *.o *~ example$(EXE) minigzip$(EXE) \ 803- rm -f *.o *.lo *~ \
804- example$(EXE) minigzip$(EXE) examplesh$(EXE) minigzipsh$(EXE) \
621- libz.* foo.gz so_locations \ 805- libz.* foo.gz so_locations \
622- _match.s maketree contrib/infback9/*.o 806- _match.s maketree contrib/infback9/*.o
623- 807-
624-maintainer-clean: distclean 808-maintainer-clean: distclean
625-distclean: clean 809-distclean: clean
626- cp -p Makefile.in Makefile 810- cp -p Makefile.in Makefile
627- cp -p zconf.in.h zconf.h 811- rm zlibdefs.h
628- rm -f .DS_Store 812- touch -r configure zlibdefs.h
813- rm -f zlib.pc .DS_Store
629- 814-
630-tags: 815-tags:
631- etags *.[ch] 816- etags *.[ch]
@@ -635,17 +820,30 @@ diff -Naur zlib-1.2.3/Makefile.in zlib-1.2.3new/Makefile.in
635- 820-
636-# DO NOT DELETE THIS LINE -- make depend depends on it. 821-# DO NOT DELETE THIS LINE -- make depend depends on it.
637- 822-
638-adler32.o: zlib.h zconf.h 823-adler32.o: zlib.h zconf.h zlibdefs.h
639-compress.o: zlib.h zconf.h 824-compress.o: zlib.h zconf.h zlibdefs.h
640-crc32.o: crc32.h zlib.h zconf.h 825-crc32.o: crc32.h zlib.h zconf.h zlibdefs.h
641-deflate.o: deflate.h zutil.h zlib.h zconf.h 826-deflate.o: deflate.h zutil.h zlib.h zconf.h zlibdefs.h
642-example.o: zlib.h zconf.h 827-example.o: zlib.h zconf.h zlibdefs.h
643-gzio.o: zutil.h zlib.h zconf.h 828-gzio.o: zutil.h zlib.h zconf.h zlibdefs.h
644-inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h 829-inffast.o: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h inflate.h inffast.h
645-inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h 830-inflate.o: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h inflate.h inffast.h inffixed.h
646-infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h 831-infback.o: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h inflate.h inffast.h inffixed.h
647-inftrees.o: zutil.h zlib.h zconf.h inftrees.h 832-inftrees.o: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h
648-minigzip.o: zlib.h zconf.h 833-minigzip.o: zlib.h zconf.h zlibdefs.h
649-trees.o: deflate.h zutil.h zlib.h zconf.h trees.h 834-trees.o: deflate.h zutil.h zlib.h zconf.h zlibdefs.h trees.h
650-uncompr.o: zlib.h zconf.h 835-uncompr.o: zlib.h zconf.h zlibdefs.h
651-zutil.o: zutil.h zlib.h zconf.h 836-zutil.o: zutil.h zlib.h zconf.h zlibdefs.h
837-
838-adler32.lo: zlib.h zconf.h zlibdefs.h
839-compress.lo: zlib.h zconf.h zlibdefs.h
840-crc32.lo: crc32.h zlib.h zconf.h zlibdefs.h
841-deflate.lo: deflate.h zutil.h zlib.h zconf.h zlibdefs.h
842-gzio.lo: zutil.h zlib.h zconf.h zlibdefs.h
843-inffast.lo: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h inflate.h inffast.h
844-inflate.lo: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h inflate.h inffast.h inffixed.h
845-infback.lo: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h inflate.h inffast.h inffixed.h
846-inftrees.lo: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h
847-trees.lo: deflate.h zutil.h zlib.h zconf.h zlibdefs.h trees.h
848-uncompr.lo: zlib.h zconf.h zlibdefs.h
849-zutil.lo: zutil.h zlib.h zconf.h zlibdefs.h