From 7c2a874e50b871d04fbd19501f7b42cff55e5abc Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Fri, 9 Sep 2011 23:21:47 -0700 Subject: zlib 1.2.0 --- aix/README | 9 +++++++++ aix/configure.diff | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ aix/mkexps | 37 +++++++++++++++++++++++++++++++++++ 3 files changed, 103 insertions(+) create mode 100644 aix/README create mode 100644 aix/configure.diff create mode 100644 aix/mkexps (limited to 'aix') diff --git a/aix/README b/aix/README new file mode 100644 index 0000000..235ba59 --- /dev/null +++ b/aix/README @@ -0,0 +1,9 @@ +To make a shared library: + +1. Compile a static library +2. Use mkexps on that to create libz.exp +3. Apply the configure.diff patch to configure +4. Run the new configure to make a new Makefile +5. Use the new Makefile to make the shared library + +Courtesy of dbakker@arrayasolutions.com diff --git a/aix/configure.diff b/aix/configure.diff new file mode 100644 index 0000000..c699129 --- /dev/null +++ b/aix/configure.diff @@ -0,0 +1,57 @@ +*** ../orig/zlib-1.1.4/configure Wed Jul 8 14:19:35 1998 +--- configure Sun Feb 9 11:11:19 2003 +*************** +*** 18,23 **** +--- 18,24 ---- + # If you have problems, try without defining CC and CFLAGS before reporting + # an error. + ++ LDFLAGS="-L. -lz" + LIBS=libz.a + SHAREDLIB=libz.so + VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h` +*************** +*** 116,121 **** +--- 117,128 ---- + SFLAGS=${CFLAGS-"-Kconform_pic -O"} + CFLAGS=${CFLAGS-"-O"} + LDSHARED=${LDSHARED-"cc -G"};; ++ AIX*) ++ SFLAGS=${CFLAGS-"-O -qmaxmem=8192"} ++ CFLAGS=${CFLAGS-"-O -qmaxmem=8192"} ++ LDTESTSHARED=${LDSHARED-"cc -G"} ++ LDSHAREDFLAGS="-L. libz.so" ++ LDSHARED=${LDSHARED-"cc -G"};; + # send working options for other systems to support@gzip.org + *) SFLAGS=${CFLAGS-"-O"} + CFLAGS=${CFLAGS-"-O"} +*************** +*** 127,135 **** + echo Checking for shared library support... + # 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="$SHAREDLIB.$VER" + echo Building shared library $SHAREDLIB.$VER with $CC. + elif test -z "$old_cc" -a -z "$old_cflags"; then + echo No shared library suppport. +--- 134,143 ---- + echo Checking for shared library support... + # 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 "`($LDTESTSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then + CFLAGS="$SFLAGS" + LIBS="$SHAREDLIB.$VER" ++ LDFLAGS="$LDSHAREDFLAGS" + echo Building shared library $SHAREDLIB.$VER with $CC. + elif test -z "$old_cc" -a -z "$old_cflags"; then + echo No shared library suppport. +*************** +*** 209,212 **** +--- 217,221 ---- + /^exec_prefix *=/s%=.*%=$exec_prefix% + /^libdir *=/s%=.*%=$libdir% + /^includedir *=/s%=.*%=$includedir% ++ /^LDFLAGS *=/s%=.*%=$LDFLAGS% + " > Makefile diff --git a/aix/mkexps b/aix/mkexps new file mode 100644 index 0000000..6c55eae --- /dev/null +++ b/aix/mkexps @@ -0,0 +1,37 @@ +#!/bin/ksh +# +# mkexps - make export list +# This program creates an export list by combining all the "." and normal names +# into one list. +# +if [[ "$#" -ne 1 ]] +then + print "Usage: mkexps ArchiveFile" + exit -2 +fi +if [[ ! -f $1 ]] +then + print "mkexps: Cannot open file \"$1\"" + exit -1 +fi + +dump -g $1 | awk ' +BEGIN { + top = 1 +} +/^[ ]*[0-9][0-9]*/ { + if ( (n = index( $2, "." )) > 0 ) { + export_array[ top++ ] = substr( $2, n+1, length( $2 )) + } + else { + export_array[ top++ ] = $2 + } +} + +END { + for ( i = 1; i < top; i++ ) + { + print export_array[ i ] + } + +}' | sort | uniq -- cgit v1.2.3-55-g6feb