summaryrefslogtreecommitdiffstats
path: root/meta/packages/zlib/files/autotools.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/zlib/files/autotools.patch')
-rw-r--r--meta/packages/zlib/files/autotools.patch849
1 files changed, 0 insertions, 849 deletions
diff --git a/meta/packages/zlib/files/autotools.patch b/meta/packages/zlib/files/autotools.patch
deleted file mode 100644
index c2db0848f2..0000000000
--- a/meta/packages/zlib/files/autotools.patch
+++ /dev/null
@@ -1,849 +0,0 @@
1Index: zlib-1.2.3/configure
2===================================================================
3--- zlib-1.2.3.orig/configure 2008-08-23 11:23:47.000000000 +0100
4+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
5@@ -1,558 +0,0 @@
6-#!/bin/sh
7-# configure script for zlib. This script is needed only if
8-# you wish to build a shared library and your system supports them,
9-# of if you need special compiler, flags or install directory.
10-# Otherwise, you can just use directly "make test; make install"
11-#
12-# To create a shared library, use "configure --shared"; by default a static
13-# library is created. If the primitive shared library support provided here
14-# does not work, use ftp://prep.ai.mit.edu/pub/gnu/libtool-*.tar.gz
15-#
16-# To impose specific compiler or flags or install directory, use for example:
17-# prefix=$HOME CC=cc CFLAGS="-O4" ./configure
18-# or for csh/tcsh users:
19-# (setenv prefix $HOME; setenv CC cc; setenv CFLAGS "-O4"; ./configure)
20-# LDSHARED is the command to be used to create a shared library
21-
22-# Incorrect settings of CC or CFLAGS may prevent creating a shared library.
23-# If you have problems, try without defining CC and CFLAGS before reporting
24-# an error.
25-
26-LIBS=libz.a
27-LDFLAGS="-L. ${LIBS}"
28-VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`
29-VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h`
30-VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h`
31-AR=${AR-"ar"}
32-AR_RC="${AR} rc"
33-RANLIB=${RANLIB-"ranlib"}
34-prefix=${prefix-/usr/local}
35-exec_prefix=${exec_prefix-'${prefix}'}
36-libdir=${libdir-'${exec_prefix}/lib'}
37-includedir=${includedir-'${prefix}/include'}
38-mandir=${mandir-'${prefix}/share/man'}
39-shared_ext='.so'
40-shared=1
41-zprefix=0
42-gcc=0
43-old_cc="$CC"
44-old_cflags="$CFLAGS"
45-
46-while test $# -ge 1
47-do
48-case "$1" in
49- -h* | --help)
50- echo 'usage:'
51- echo ' configure [--shared] [--prefix=PREFIX] [--exec_prefix=EXPREFIX]'
52- echo ' [--libdir=LIBDIR] [--includedir=INCLUDEDIR] [--zprefix]'
53- exit 0;;
54- -p*=* | --prefix=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
55- -e*=* | --eprefix=*) exec_prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
56- -l*=* | --libdir=*) libdir=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
57- -i*=* | --includedir=*) includedir=`echo $1 | sed 's/[-a-z_]*=//'`;shift;;
58- -u*=* | --uname=*) uname=`echo $1 | sed 's/[-a-z_]*=//'`;shift;;
59- -p* | --prefix) prefix="$2"; shift; shift;;
60- -e* | --eprefix) exec_prefix="$2"; shift; shift;;
61- -l* | --libdir) libdir="$2"; shift; 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;;
68- *) echo "unknown option: $1"; echo "$0 --help for help"; exit 1;;
69- esac
70-done
71-
72-test=ztest$$
73-cat > $test.c <<EOF
74-extern int getchar();
75-int hello() {return getchar();}
76-EOF
77-
78-test -z "$CC" && echo Checking for gcc...
79-cc=${CC-gcc}
80-cflags=${CFLAGS-"-O3"}
81-# to force the asm version use: CFLAGS="-O3 -DASMV" ./configure
82-case "$cc" in
83- *gcc*) gcc=1;;
84-esac
85-
86-if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
87- CC="$cc"
88- SFLAGS="${CFLAGS-"-O3"} -fPIC"
89- CFLAGS="${CFLAGS-"-O3"}"
90- if test -z $uname; then
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"};;
95- CYGWIN* | Cygwin* | cygwin* | OS/2* )
96- EXE='.exe';;
97- QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4
98- # (alain.bonnefoy@icbt.com)
99- LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"};;
100- HP-UX*)
101- LDSHARED=${LDSHARED-"$cc -shared $SFLAGS"}
102- case `(uname -m || echo unknown) 2>/dev/null` in
103- ia64)
104- shared_ext='.so'
105- SHAREDLIB='libz.so';;
106- *)
107- shared_ext='.sl'
108- SHAREDLIB='libz.sl';;
109- esac;;
110- Darwin*) shared_ext='.dylib'
111- SHAREDLIB=libz$shared_ext
112- SHAREDLIBV=libz.$VER$shared_ext
113- SHAREDLIBM=libz.$VER1$shared_ext
114- LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER"};;
115- *) LDSHARED=${LDSHARED-"$cc -shared"};;
116- esac
117-else
118- # find system name and corresponding cc options
119- CC=${CC-cc}
120- if test -z $uname; then
121- uname=`(uname -sr || echo unknown) 2>/dev/null`
122- fi
123- case "$uname" in
124- HP-UX*) SFLAGS=${CFLAGS-"-O +z"}
125- CFLAGS=${CFLAGS-"-O"}
126-# LDSHARED=${LDSHARED-"ld -b +vnocompatwarnings"}
127- LDSHARED=${LDSHARED-"ld -b"}
128- case `(uname -m || echo unknown) 2>/dev/null` in
129- ia64)
130- shared_ext='.so'
131- SHAREDLIB='libz.so';;
132- *)
133- shared_ext='.sl'
134- SHAREDLIB='libz.sl';;
135- esac;;
136- IRIX*) SFLAGS=${CFLAGS-"-ansi -O2 -rpath ."}
137- CFLAGS=${CFLAGS-"-ansi -O2"}
138- LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so.1"};;
139- OSF1\ V4*) SFLAGS=${CFLAGS-"-O -std1"}
140- CFLAGS=${CFLAGS-"-O -std1"}
141- LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"};;
142- OSF1*) SFLAGS=${CFLAGS-"-O -std1"}
143- CFLAGS=${CFLAGS-"-O -std1"}
144- LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so.1"};;
145- QNX*) SFLAGS=${CFLAGS-"-4 -O"}
146- CFLAGS=${CFLAGS-"-4 -O"}
147- LDSHARED=${LDSHARED-"cc"}
148- RANLIB=${RANLIB-"true"}
149- AR_RC="cc -A";;
150- SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "}
151- CFLAGS=${CFLAGS-"-O3"}
152- LDSHARED=${LDSHARED-"cc -dy -KPIC -G"};;
153- SunOS\ 5*) LDSHARED=${LDSHARED-"cc -G"}
154- case `(uname -m || echo unknown) 2>/dev/null` in
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;;
162- SunOS\ 4*) SFLAGS=${CFLAGS-"-O2 -PIC"}
163- CFLAGS=${CFLAGS-"-O2"}
164- LDSHARED=${LDSHARED-"ld"};;
165- SunStudio\ 9*) SFLAGS=${CFLAGS-"-DUSE_MMAP -fast -xcode=pic32 -xtarget=ultra3 -xarch=v9b"}
166- CFLAGS=${CFLAGS-"-DUSE_MMAP -fast -xtarget=ultra3 -xarch=v9b"}
167- LDSHARED=${LDSHARED-"cc -xarch=v9b"};;
168- UNIX_System_V\ 4.2.0)
169- SFLAGS=${CFLAGS-"-KPIC -O"}
170- CFLAGS=${CFLAGS-"-O"}
171- LDSHARED=${LDSHARED-"cc -G"};;
172- UNIX_SV\ 4.2MP)
173- SFLAGS=${CFLAGS-"-Kconform_pic -O"}
174- CFLAGS=${CFLAGS-"-O"}
175- LDSHARED=${LDSHARED-"cc -G"};;
176- OpenUNIX\ 5)
177- SFLAGS=${CFLAGS-"-KPIC -O"}
178- CFLAGS=${CFLAGS-"-O"}
179- LDSHARED=${LDSHARED-"cc -G"};;
180- AIX*) # Courtesy of dbakker@arrayasolutions.com
181- SFLAGS=${CFLAGS-"-O -qmaxmem=8192"}
182- CFLAGS=${CFLAGS-"-O -qmaxmem=8192"}
183- LDSHARED=${LDSHARED-"xlc -G"};;
184- # send working options for other systems to support@gzip.org
185- *) SFLAGS=${CFLAGS-"-O"}
186- CFLAGS=${CFLAGS-"-O"}
187- LDSHARED=${LDSHARED-"cc -shared"};;
188- esac
189-fi
190-
191-SHAREDLIB=${SHAREDLIB-"libz$shared_ext"}
192-SHAREDLIBV=${SHAREDLIBV-"libz$shared_ext.$VER"}
193-SHAREDLIBM=${SHAREDLIBM-"libz$shared_ext.$VER1"}
194-
195-if test $shared -eq 1; then
196- echo Checking for shared library support...
197- # we must test in two steps (cc then ld), required at least on SunOS 4.x
198- if test "`($CC -c $SFLAGS $test.c) 2>&1`" = "" &&
199- test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then
200- LIBS="$LIBS $SHAREDLIBV"
201- echo Building shared library $SHAREDLIBV with $CC.
202- elif test -z "$old_cc" -a -z "$old_cflags"; then
203- echo No shared library support.
204- shared=0;
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
210- echo 'No shared library support; try without defining CC and CFLAGS'
211- shared=0;
212- fi
213-fi
214-if test $shared -eq 0; then
215- LDSHARED="$CC"
216- ALL="allstatic"
217- TEST="teststatic"
218- echo Building static library $LIBS version $VER with $CC.
219-else
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
257-fi
258-
259-cat > $test.c <<EOF
260-#include <unistd.h>
261-int main() { return 0; }
262-EOF
263-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
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
274- echo "Checking for unistd.h... Yes."
275-else
276- echo "Checking for unistd.h... No."
277-fi
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-
285-cat > $test.c <<EOF
286-#include <stdio.h>
287-#include <stdarg.h>
288-#include "zconf.h"
289-
290-int main()
291-{
292-#ifndef STDC
293- choke me
294-#endif
295-
296- return 0;
297-}
298-EOF
299-
300-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
301- echo "Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()."
302-
303- cat > $test.c <<EOF
304-#include <stdio.h>
305-#include <stdarg.h>
306-
307-int mytest(char *fmt, ...)
308-{
309- char buf[20];
310- va_list ap;
311-
312- va_start(ap, fmt);
313- vsnprintf(buf, sizeof(buf), fmt, ap);
314- va_end(ap);
315- return 0;
316-}
317-
318-int main()
319-{
320- return (mytest("Hello%d\n", 1));
321-}
322-EOF
323-
324- if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then
325- echo "Checking for vsnprintf() in stdio.h... Yes."
326-
327- cat >$test.c <<EOF
328-#include <stdio.h>
329-#include <stdarg.h>
330-
331-int mytest(char *fmt, ...)
332-{
333- int n;
334- char buf[20];
335- va_list ap;
336-
337- va_start(ap, fmt);
338- n = vsnprintf(buf, sizeof(buf), fmt, ap);
339- va_end(ap);
340- return n;
341-}
342-
343-int main()
344-{
345- return (mytest("Hello%d\n", 1));
346-}
347-EOF
348-
349- if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
350- echo "Checking for return value of vsnprintf()... Yes."
351- else
352- CFLAGS="$CFLAGS -DHAS_vsnprintf_void"
353- echo "Checking for return value of vsnprintf()... No."
354- echo " WARNING: apparently vsnprintf() does not return a value. zlib"
355- echo " can build but will be open to possible string-format security"
356- echo " vulnerabilities."
357- fi
358- else
359- CFLAGS="$CFLAGS -DNO_vsnprintf"
360- echo "Checking for vsnprintf() in stdio.h... No."
361- echo " WARNING: vsnprintf() not found, falling back to vsprintf(). zlib"
362- echo " can build but will be open to possible buffer-overflow security"
363- echo " vulnerabilities."
364-
365- cat >$test.c <<EOF
366-#include <stdio.h>
367-#include <stdarg.h>
368-
369-int mytest(char *fmt, ...)
370-{
371- int n;
372- char buf[20];
373- va_list ap;
374-
375- va_start(ap, fmt);
376- n = vsprintf(buf, fmt, ap);
377- va_end(ap);
378- return n;
379-}
380-
381-int main()
382-{
383- return (mytest("Hello%d\n", 1));
384-}
385-EOF
386-
387- if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
388- echo "Checking for return value of vsprintf()... Yes."
389- else
390- CFLAGS="$CFLAGS -DHAS_vsprintf_void"
391- echo "Checking for return value of vsprintf()... No."
392- echo " WARNING: apparently vsprintf() does not return a value. zlib"
393- echo " can build but will be open to possible string-format security"
394- echo " vulnerabilities."
395- fi
396- fi
397-else
398- echo "Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()."
399-
400- cat >$test.c <<EOF
401-#include <stdio.h>
402-
403-int mytest()
404-{
405- char buf[20];
406-
407- snprintf(buf, sizeof(buf), "%s", "foo");
408- return 0;
409-}
410-
411-int main()
412-{
413- return (mytest());
414-}
415-EOF
416-
417- if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then
418- echo "Checking for snprintf() in stdio.h... Yes."
419-
420- cat >$test.c <<EOF
421-#include <stdio.h>
422-
423-int mytest()
424-{
425- char buf[20];
426-
427- return snprintf(buf, sizeof(buf), "%s", "foo");
428-}
429-
430-int main()
431-{
432- return (mytest());
433-}
434-EOF
435-
436- if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
437- echo "Checking for return value of snprintf()... Yes."
438- else
439- CFLAGS="$CFLAGS -DHAS_snprintf_void"
440- echo "Checking for return value of snprintf()... No."
441- echo " WARNING: apparently snprintf() does not return a value. zlib"
442- echo " can build but will be open to possible string-format security"
443- echo " vulnerabilities."
444- fi
445- else
446- CFLAGS="$CFLAGS -DNO_snprintf"
447- echo "Checking for snprintf() in stdio.h... No."
448- echo " WARNING: snprintf() not found, falling back to sprintf(). zlib"
449- echo " can build but will be open to possible buffer-overflow security"
450- echo " vulnerabilities."
451-
452- cat >$test.c <<EOF
453-#include <stdio.h>
454-
455-int mytest()
456-{
457- char buf[20];
458-
459- return sprintf(buf, "%s", "foo");
460-}
461-
462-int main()
463-{
464- return (mytest());
465-}
466-EOF
467-
468- if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
469- echo "Checking for return value of sprintf()... Yes."
470- else
471- CFLAGS="$CFLAGS -DHAS_sprintf_void"
472- echo "Checking for return value of sprintf()... No."
473- echo " WARNING: apparently sprintf() does not return a value. zlib"
474- echo " can build but will be open to possible string-format security"
475- echo " vulnerabilities."
476- fi
477- fi
478-fi
479-
480-cat >$test.c <<EOF
481-#include <errno.h>
482-int main() { return 0; }
483-EOF
484-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
485- echo "Checking for errno.h... Yes."
486-else
487- echo "Checking for errno.h... No."
488- CFLAGS="$CFLAGS -DNO_ERRNO_H"
489-fi
490-
491-cat > $test.c <<EOF
492-#include <sys/types.h>
493-#include <sys/mman.h>
494-#include <sys/stat.h>
495-caddr_t hello() {
496- return mmap((caddr_t)0, (off_t)0, PROT_READ, MAP_SHARED, 0, (off_t)0);
497-}
498-EOF
499-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
500- CFLAGS="$CFLAGS -DUSE_MMAP"
501- echo Checking for mmap support... Yes.
502-else
503- echo Checking for mmap support... No.
504-fi
505-
506-CPP=${CPP-"$CC -E"}
507-case $CFLAGS in
508- *ASMV*)
509- if test "`nm $test.o | grep _hello`" = ""; then
510- CPP="$CPP -DNO_UNDERLINE"
511- echo Checking for underline in external names... No.
512- else
513- echo Checking for underline in external names... Yes.
514- fi;;
515-esac
516-
517-rm -f $test.[co] $test $test$shared_ext
518-
519-# udpate Makefile
520-sed < Makefile.in "
521-/^CC *=/s#=.*#=$CC#
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#
546-/^CPP *=/s#=.*#=$CPP#
547-/^LDSHARED *=/s#=.*#=$LDSHARED#
548-/^LIBS *=/s#=.*#=$LIBS#
549-/^SHAREDLIB *=/s#=.*#=$SHAREDLIB#
550-/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV#
551-/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM#
552-/^AR *=/s#=.*#=$AR_RC#
553-/^RANLIB *=/s#=.*#=$RANLIB#
554-/^EXE *=/s#=.*#=$EXE#
555-/^prefix *=/s#=.*#=$prefix#
556-/^exec_prefix *=/s#=.*#=$exec_prefix#
557-/^libdir *=/s#=.*#=$libdir#
558-/^includedir *=/s#=.*#=$includedir#
559-/^mandir *=/s#=.*#=$mandir#
560-/^LDFLAGS *=/s#=.*#=$LDFLAGS#
561-" | sed -e "
562-s/\@VERSION\@/$VER/g;
563-" > zlib.pc
564Index: zlib-1.2.3/configure.ac
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 @@
569+AC_INIT(zlib,1.2.3)
570+AC_CONFIG_SRCDIR(adler32.c)
571+AM_INIT_AUTOMAKE(zlibs,1.2.3)
572+
573+AC_PREREQ([2.59])
574+
575+AC_PROG_CC([gcc])
576+AC_PROG_LIBTOOL
577+
578+AC_HEADER_STDC
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=no
587+ if test "$ac_cv_type_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+
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+
614+AC_CONFIG_FILES([Makefile])
615+
616+AC_OUTPUT
617Index: zlib-1.2.3/Makefile.am
618===================================================================
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
621@@ -0,0 +1,8 @@
622+lib_LTLIBRARIES = libz.la
623+
624+libz_la_SOURCES = adler32.c compress.c crc32.c gzio.c uncompr.c deflate.c \
625+ trees.c zutil.c inflate.c infback.c inftrees.c inffast.c
626+
627+libz_la_LDFLAGS = -version-number 1:2:3 --version-script zlib.map
628+
629+include_HEADERS = zconf.h zlib.h zlibdefs.h
630Index: zlib-1.2.3/Makefile.in
631===================================================================
632--- zlib-1.2.3.orig/Makefile.in 2008-08-23 11:23:47.000000000 +0100
633+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
634@@ -1,215 +0,0 @@
635-# Makefile for zlib
636-# Copyright (C) 1995-2006 Jean-loup Gailly.
637-# For conditions of distribution and use, see copyright notice in zlib.h
638-
639-# To compile and test, type:
640-# ./configure; make test
641-# The call of configure is optional if you don't have special requirements
642-# If you wish to build zlib as a shared library, use: ./configure -s
643-
644-# To use the asm code, type:
645-# cp contrib/asm?86/match.S ./match.S
646-# make LOC=-DASMV OBJA=match.o
647-
648-# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type:
649-# make install
650-# To install in $HOME instead of /usr/local, use:
651-# make install prefix=$HOME
652-
653-CC=cc
654-
655-CFLAGS=-O
656-#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
657-#CFLAGS=-g -DDEBUG
658-#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
659-# -Wstrict-prototypes -Wmissing-prototypes
660-
661-SFLAGS=-O
662-
663-LDFLAGS=libz.a
664-LDSHARED=$(CC)
665-CPP=$(CC) -E
666-
667-LIBS=libz.a
668-SHAREDLIB=libz.so
669-SHAREDLIBV=libz.so.1.2.3.3
670-SHAREDLIBM=libz.so.1
671-
672-AR=ar
673-RANLIB=ranlib
674-TAR=tar
675-SHELL=/bin/sh
676-EXE=
677-
678-prefix = /usr/local
679-exec_prefix = ${prefix}
680-libdir = ${exec_prefix}/lib
681-includedir = ${prefix}/include
682-mandir = ${prefix}/share/man
683-man3dir = ${mandir}/man3
684-pkgconfigdir = ${libdir}/pkgconfig
685-
686-OBJC = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
687- zutil.o inflate.o infback.o inftrees.o inffast.o
688-
689-OBJA =
690-# to use the asm code: make OBJA=match.o
691-
692-OBJS = $(OBJC) $(OBJA)
693-
694-PIC_OBJS = $(OBJS:%.o=%.lo)
695-
696-TEST_OBJS = example.o minigzip.o
697-
698-allstatic: example$(EXE) minigzip$(EXE)
699-
700-allshared: examplesh$(EXE) minigzipsh$(EXE)
701-
702-all: allstatic allshared
703-
704-teststatic: allstatic
705- @echo hello world | ./minigzip | ./minigzip -d || \
706- echo ' *** minigzip test FAILED ***' ; \
707- if ./example; then \
708- echo ' *** zlib test OK ***'; \
709- else \
710- echo ' *** zlib test FAILED ***'; \
711- fi
712-
713-testshared: allshared
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)
731- -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
732-
733-match.o: match.S
734- $(CPP) match.S > _match.s
735- $(CC) -c _match.s
736- mv _match.o match.o
737- rm -f _match.s
738-
739-match.lo: match.S
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
750- rm -f $(SHAREDLIB) $(SHAREDLIBM)
751- ln -s $@ $(SHAREDLIB)
752- ln -s $@ $(SHAREDLIBM)
753-
754-example$(EXE): example.o $(LIBS)
755- $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
756-
757-minigzip$(EXE): minigzip.o $(LIBS)
758- $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
759-
760-examplesh$(EXE): example.o $(LIBS)
761- $(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIB)
762-
763-minigzipsh$(EXE): minigzip.o $(LIBS)
764- $(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIB)
765-
766-install-libs: $(LIBS)
767- -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
768- -@if [ ! -d $(DESTDIR)$(libdir) ]; then mkdir -p $(DESTDIR)$(libdir); fi
769- -@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi
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 \
775- rm -f $(SHAREDLIB) $(SHAREDLIBM); \
776- ln -s $(SHAREDLIBV) $(SHAREDLIB); \
777- ln -s $(SHAREDLIBV) $(SHAREDLIBM); \
778- (ldconfig || true) >/dev/null 2>&1; \
779- fi
780- cp zlib.3 $(DESTDIR)$(man3dir)
781- chmod 644 $(DESTDIR)$(man3dir)/zlib.3
782- cp zlib.pc $(DESTDIR)$(pkgconfigdir)
783- chmod 644 $(DESTDIR)$(pkgconfigdir)/zlib.pc
784-# The ranlib in install is needed on NeXTSTEP which checks file times
785-# ldconfig is for Linux
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-
792-uninstall:
793- cd $(DESTDIR)$(includedir); rm -f zlib.h zconf.h zlibdefs.h
794- cd $(DESTDIR)$(libdir); rm -f libz.a; \
795- if test -f $(SHAREDLIBV); then \
796- rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \
797- fi
798- cd $(DESTDIR)$(man3dir); rm -f zlib.3
799- cd $(DESTDIR)$(pkgconfigdir); rm -f zlib.pc
800-
801-mostlyclean: clean
802-clean:
803- rm -f *.o *.lo *~ \
804- example$(EXE) minigzip$(EXE) examplesh$(EXE) minigzipsh$(EXE) \
805- libz.* foo.gz so_locations \
806- _match.s maketree contrib/infback9/*.o
807-
808-maintainer-clean: distclean
809-distclean: clean
810- cp -p Makefile.in Makefile
811- rm zlibdefs.h
812- touch -r configure zlibdefs.h
813- rm -f zlib.pc .DS_Store
814-
815-tags:
816- etags *.[ch]
817-
818-depend:
819- makedepend -- $(CFLAGS) -- *.[ch]
820-
821-# DO NOT DELETE THIS LINE -- make depend depends on it.
822-
823-adler32.o: zlib.h zconf.h zlibdefs.h
824-compress.o: zlib.h zconf.h zlibdefs.h
825-crc32.o: crc32.h zlib.h zconf.h zlibdefs.h
826-deflate.o: deflate.h zutil.h zlib.h zconf.h zlibdefs.h
827-example.o: zlib.h zconf.h zlibdefs.h
828-gzio.o: zutil.h zlib.h zconf.h zlibdefs.h
829-inffast.o: zutil.h zlib.h zconf.h zlibdefs.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
831-infback.o: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h inflate.h inffast.h inffixed.h
832-inftrees.o: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h
833-minigzip.o: zlib.h zconf.h zlibdefs.h
834-trees.o: deflate.h zutil.h zlib.h zconf.h zlibdefs.h trees.h
835-uncompr.o: zlib.h zconf.h zlibdefs.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