Changeset 8158421 in rtems for cpukit/zlib


Ignore:
Timestamp:
Mar 18, 2011, 10:11:24 AM (9 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.11, master
Children:
fb25694c
Parents:
657322f
Message:

Import from zlib-1.2.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/zlib/configure

    r657322f r8158421  
    11#!/bin/sh
    2 # configure script for zlib. This script is needed only if
    3 # you wish to build a shared library and your system supports them,
    4 # of if you need special compiler, flags or install directory.
    5 # Otherwise, you can just use directly "make test; make install"
     2# configure script for zlib.
    63#
    7 # To create a shared library, use "configure --shared"; by default a static
    8 # library is created. If the primitive shared library support provided here
    9 # does not work, use ftp://prep.ai.mit.edu/pub/gnu/libtool-*.tar.gz
     4# Normally configure builds both a static and a shared library.
     5# If you want to build just a static library, use: ./configure --static
    106#
    117# To impose specific compiler or flags or install directory, use for example:
     
    139# or for csh/tcsh users:
    1410#    (setenv prefix $HOME; setenv CC cc; setenv CFLAGS "-O4"; ./configure)
    15 # LDSHARED is the command to be used to create a shared library
    1611
    1712# Incorrect settings of CC or CFLAGS may prevent creating a shared library.
     
    1914# an error.
    2015
    21 LIBS=libz.a
    22 LDFLAGS="-L. ${LIBS}"
     16STATICLIB=libz.a
     17LDFLAGS="${LDFLAGS} -L. ${STATICLIB}"
    2318VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`
     19VER3=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\\.[0-9]*\).*/\1/p' < zlib.h`
    2420VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h`
    2521VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h`
    26 AR=${AR-"ar rc"}
     22AR=${AR-"ar"}
     23AR_RC="${AR} rc"
    2724RANLIB=${RANLIB-"ranlib"}
    2825prefix=${prefix-/usr/local}
     
    3229mandir=${mandir-'${prefix}/share/man'}
    3330shared_ext='.so'
    34 shared=0
     31shared=1
     32zprefix=0
     33build64=0
    3534gcc=0
    3635old_cc="$CC"
     
    4039do
    4140case "$1" in
    42     -h* | --h*)
     41    -h* | --help)
    4342      echo 'usage:'
    44       echo '  configure [--shared] [--prefix=PREFIX]  [--exec_prefix=EXPREFIX]'
    45       echo '     [--libdir=LIBDIR] [--includedir=INCLUDEDIR]'
    46         exit 0;;
    47     -p*=* | --p*=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
    48     -e*=* | --e*=*) exec_prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
    49     -l*=* | --libdir=*) libdir=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
    50     -i*=* | --includedir=*) includedir=`echo $1 | sed 's/[-a-z_]*=//'`;shift;;
    51     -p* | --p*) prefix="$2"; shift; shift;;
    52     -e* | --e*) exec_prefix="$2"; shift; shift;;
    53     -l* | --l*) libdir="$2"; shift; shift;;
    54     -i* | --i*) includedir="$2"; shift; shift;;
    55     -s* | --s*) shared=1; shift;;
    56     *) echo "unknown option: $1"; echo "$0 --help for help"; exit 1;;
     43      echo '  configure [--zprefix] [--prefix=PREFIX]  [--eprefix=EXPREFIX]'
     44      echo '    [--static] [--64] [--libdir=LIBDIR] [--includedir=INCLUDEDIR]'
     45        exit 0 ;;
     46    -p*=* | --prefix=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift ;;
     47    -e*=* | --eprefix=*) exec_prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift ;;
     48    -l*=* | --libdir=*) libdir=`echo $1 | sed 's/[-a-z_]*=//'`; shift ;;
     49    -i*=* | --includedir=*) includedir=`echo $1 | sed 's/[-a-z_]*=//'`;shift ;;
     50    -u*=* | --uname=*) uname=`echo $1 | sed 's/[-a-z_]*=//'`;shift ;;
     51    -p* | --prefix) prefix="$2"; shift; shift ;;
     52    -e* | --eprefix) exec_prefix="$2"; shift; shift ;;
     53    -l* | --libdir) libdir="$2"; shift; shift ;;
     54    -i* | --includedir) includedir="$2"; shift; shift ;;
     55    -s* | --shared | --enable-shared) shared=1; shift ;;
     56    -t | --static) shared=0; shift ;;
     57    -z* | --zprefix) zprefix=1; shift ;;
     58    -6* | --64) build64=1; shift ;;
     59    --sysconfdir=*) echo "ignored option: --sysconfdir"; shift ;;
     60    --localstatedir=*) echo "ignored option: --localstatedir"; shift ;;
     61    *) echo "unknown option: $1"; echo "$0 --help for help"; exit 1 ;;
    5762    esac
    5863done
     
    6974# to force the asm version use: CFLAGS="-O3 -DASMV" ./configure
    7075case "$cc" in
    71   *gcc*) gcc=1;;
     76  *gcc*) gcc=1 ;;
    7277esac
    7378
    7479if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
    7580  CC="$cc"
    76   SFLAGS=${CFLAGS-"-fPIC -O3"}
    77   CFLAGS="$cflags"
    78   case `(uname -s || echo unknown) 2>/dev/null` in
    79   Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};;
     81  SFLAGS="${CFLAGS-"-O3"} -fPIC"
     82  CFLAGS="${CFLAGS-"-O3"}"
     83  if test $build64 -eq 1; then
     84    CFLAGS="${CFLAGS} -m64"
     85    SFLAGS="${SFLAGS} -m64"
     86  fi
     87  if test "${ZLIBGCCWARN}" = "YES"; then
     88    CFLAGS="${CFLAGS} -Wall -Wextra -pedantic"
     89  fi
     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/* | *BSD | DragonFly) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map"} ;;
    8095  CYGWIN* | Cygwin* | cygwin* | OS/2* )
    81              EXE='.exe';;
     96             EXE='.exe' ;;
    8297  QNX*)  # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4
    8398         # (alain.bonnefoy@icbt.com)
    84                  LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"};;
     99                 LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"} ;;
    85100  HP-UX*)
    86101         LDSHARED=${LDSHARED-"$cc -shared $SFLAGS"}
     
    88103         ia64)
    89104                 shared_ext='.so'
    90                  SHAREDLIB='libz.so';;
     105                 SHAREDLIB='libz.so' ;;
    91106         *)
    92107                 shared_ext='.sl'
    93                  SHAREDLIB='libz.sl';;
    94          esac;;
     108                 SHAREDLIB='libz.sl' ;;
     109         esac ;;
    95110  Darwin*)   shared_ext='.dylib'
    96111             SHAREDLIB=libz$shared_ext
    97112             SHAREDLIBV=libz.$VER$shared_ext
    98113             SHAREDLIBM=libz.$VER1$shared_ext
    99              LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER"};;
    100   *)             LDSHARED=${LDSHARED-"$cc -shared"};;
     114             LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER3"} ;;
     115  *)             LDSHARED=${LDSHARED-"$cc -shared"} ;;
    101116  esac
    102117else
    103118  # find system name and corresponding cc options
    104119  CC=${CC-cc}
    105   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
    106124  HP-UX*)    SFLAGS=${CFLAGS-"-O +z"}
    107125             CFLAGS=${CFLAGS-"-O"}
     
    111129         ia64)
    112130             shared_ext='.so'
    113              SHAREDLIB='libz.so';;
     131             SHAREDLIB='libz.so' ;;
    114132         *)
    115133             shared_ext='.sl'
    116              SHAREDLIB='libz.sl';;
    117          esac;;
     134             SHAREDLIB='libz.sl' ;;
     135         esac ;;
    118136  IRIX*)     SFLAGS=${CFLAGS-"-ansi -O2 -rpath ."}
    119137             CFLAGS=${CFLAGS-"-ansi -O2"}
    120              LDSHARED=${LDSHARED-"cc -shared"};;
     138             LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so.1"} ;;
    121139  OSF1\ V4*) SFLAGS=${CFLAGS-"-O -std1"}
    122140             CFLAGS=${CFLAGS-"-O -std1"}
    123              LDSHARED=${LDSHARED-"cc -shared  -Wl,-soname,libz.so -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"};;
     141             LDFLAGS="${LDFLAGS} -Wl,-rpath,."
     142             LDSHARED=${LDSHARED-"cc -shared  -Wl,-soname,libz.so -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"} ;;
    124143  OSF1*)     SFLAGS=${CFLAGS-"-O -std1"}
    125144             CFLAGS=${CFLAGS-"-O -std1"}
    126              LDSHARED=${LDSHARED-"cc -shared"};;
     145             LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so.1"} ;;
    127146  QNX*)      SFLAGS=${CFLAGS-"-4 -O"}
    128147             CFLAGS=${CFLAGS-"-4 -O"}
    129148             LDSHARED=${LDSHARED-"cc"}
    130149             RANLIB=${RANLIB-"true"}
    131              AR="cc -A";;
     150             AR_RC="cc -A" ;;
    132151  SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "}
    133152             CFLAGS=${CFLAGS-"-O3"}
    134              LDSHARED=${LDSHARED-"cc -dy -KPIC -G"};;
    135   SunOS\ 5*) SFLAGS=${CFLAGS-"-fast -xcg89 -KPIC -R."}
    136              CFLAGS=${CFLAGS-"-fast -xcg89"}
    137              LDSHARED=${LDSHARED-"cc -G"};;
     153             LDSHARED=${LDSHARED-"cc -dy -KPIC -G"} ;;
     154  SunOS\ 5*) LDSHARED=${LDSHARED-"cc -G"}
     155         case `(uname -m || echo unknown) 2>/dev/null` in
     156         i86*)
     157             SFLAGS=${CFLAGS-"-xpentium -fast -KPIC -R."}
     158             CFLAGS=${CFLAGS-"-xpentium -fast"} ;;
     159         *)
     160             SFLAGS=${CFLAGS-"-fast -xcg92 -KPIC -R."}
     161             CFLAGS=${CFLAGS-"-fast -xcg92"} ;;
     162         esac ;;
    138163  SunOS\ 4*) SFLAGS=${CFLAGS-"-O2 -PIC"}
    139164             CFLAGS=${CFLAGS-"-O2"}
    140              LDSHARED=${LDSHARED-"ld"};;
    141   SunStudio\ 9*) SFLAGS=${CFLAGS-"-DUSE_MMAP -fast -xcode=pic32 -xtarget=ultra3 -xarch=v9b"}
    142              CFLAGS=${CFLAGS-"-DUSE_MMAP -fast -xtarget=ultra3 -xarch=v9b"}
    143              LDSHARED=${LDSHARED-"cc -xarch=v9b"};;
     165             LDSHARED=${LDSHARED-"ld"} ;;
     166  SunStudio\ 9*) SFLAGS=${CFLAGS-"-fast -xcode=pic32 -xtarget=ultra3 -xarch=v9b"}
     167             CFLAGS=${CFLAGS-"-fast -xtarget=ultra3 -xarch=v9b"}
     168             LDSHARED=${LDSHARED-"cc -xarch=v9b"} ;;
    144169  UNIX_System_V\ 4.2.0)
    145170             SFLAGS=${CFLAGS-"-KPIC -O"}
    146171             CFLAGS=${CFLAGS-"-O"}
    147              LDSHARED=${LDSHARED-"cc -G"};;
     172             LDSHARED=${LDSHARED-"cc -G"} ;;
    148173  UNIX_SV\ 4.2MP)
    149174             SFLAGS=${CFLAGS-"-Kconform_pic -O"}
    150175             CFLAGS=${CFLAGS-"-O"}
    151              LDSHARED=${LDSHARED-"cc -G"};;
     176             LDSHARED=${LDSHARED-"cc -G"} ;;
    152177  OpenUNIX\ 5)
    153178             SFLAGS=${CFLAGS-"-KPIC -O"}
    154179             CFLAGS=${CFLAGS-"-O"}
    155              LDSHARED=${LDSHARED-"cc -G"};;
     180             LDSHARED=${LDSHARED-"cc -G"} ;;
    156181  AIX*)  # Courtesy of dbakker@arrayasolutions.com
    157182             SFLAGS=${CFLAGS-"-O -qmaxmem=8192"}
    158183             CFLAGS=${CFLAGS-"-O -qmaxmem=8192"}
    159              LDSHARED=${LDSHARED-"xlc -G"};;
    160   # send working options for other systems to support@gzip.org
     184             LDSHARED=${LDSHARED-"xlc -G"} ;;
     185  # send working options for other systems to zlib@gzip.org
    161186  *)         SFLAGS=${CFLAGS-"-O"}
    162187             CFLAGS=${CFLAGS-"-O"}
    163              LDSHARED=${LDSHARED-"cc -shared"};;
     188             LDSHARED=${LDSHARED-"cc -shared"} ;;
    164189  esac
    165190fi
     
    172197  echo Checking for shared library support...
    173198  # we must test in two steps (cc then ld), required at least on SunOS 4.x
    174   if test "`($CC -c $SFLAGS $test.c) 2>&1`" = "" &&
    175      test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then
    176     CFLAGS="$SFLAGS"
    177     LIBS="$SHAREDLIBV"
     199  if test "`($CC -w -c $SFLAGS $test.c) 2>&1`" = "" &&
     200     test "`($LDSHARED $SFLAGS -o $test$shared_ext $test.o) 2>&1`" = ""; then
    178201    echo Building shared library $SHAREDLIBV with $CC.
    179202  elif test -z "$old_cc" -a -z "$old_cflags"; then
     
    181204    shared=0;
    182205  else
     206    echo Tested $CC -w -c $SFLAGS $test.c
     207    $CC -w -c $SFLAGS $test.c
     208    echo Tested $LDSHARED $SFLAGS -o $test$shared_ext $test.o
     209    $LDSHARED $SFLAGS -o $test$shared_ext $test.o
    183210    echo 'No shared library support; try without defining CC and CFLAGS'
    184211    shared=0;
     
    187214if test $shared -eq 0; then
    188215  LDSHARED="$CC"
    189   echo Building static library $LIBS version $VER with $CC.
     216  ALL="static"
     217  TEST="all teststatic"
     218  SHAREDLIB=""
     219  SHAREDLIBV=""
     220  SHAREDLIBM=""
     221  echo Building static library $STATICLIB version $VER with $CC.
    190222else
    191   LDFLAGS="-L. ${SHAREDLIBV}"
    192 fi
     223  ALL="static shared"
     224  TEST="all teststatic testshared"
     225fi
     226
     227cat > $test.c <<EOF
     228#include <sys/types.h>
     229off64_t dummy = 0;
     230EOF
     231if test "`($CC -c $CFLAGS -D_LARGEFILE64_SOURCE=1 $test.c) 2>&1`" = ""; then
     232  CFLAGS="${CFLAGS} -D_LARGEFILE64_SOURCE=1"
     233  SFLAGS="${SFLAGS} -D_LARGEFILE64_SOURCE=1"
     234  ALL="${ALL} all64"
     235  TEST="${TEST} test64"
     236  echo "Checking for off64_t... Yes."
     237  echo "Checking for fseeko... Yes."
     238else
     239  echo "Checking for off64_t... No."
     240  cat > $test.c <<EOF
     241#include <stdio.h>
     242int main(void) {
     243  fseeko(NULL, 0, 0);
     244  return 0;
     245}
     246EOF
     247  if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then
     248    echo "Checking for fseeko... Yes."
     249  else
     250    CFLAGS="${CFLAGS} -DNO_FSEEKO"
     251    SFLAGS="${SFLAGS} -DNO_FSEEKO"
     252    echo "Checking for fseeko... No."
     253  fi
     254fi
     255
     256cp -p zconf.h.in zconf.h
    193257
    194258cat > $test.c <<EOF
     
    197261EOF
    198262if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
    199   sed < zconf.in.h "/HAVE_UNISTD_H/s%0%1%" > zconf.h
     263  sed < zconf.h "/^#ifdef HAVE_UNISTD_H.* may be/s/def HAVE_UNISTD_H\(.*\) may be/ 1\1 was/" > zconf.temp.h
     264  mv zconf.temp.h zconf.h
    200265  echo "Checking for unistd.h... Yes."
    201266else
    202   cp -p zconf.in.h zconf.h
    203267  echo "Checking for unistd.h... No."
     268fi
     269
     270if test $zprefix -eq 1; then
     271  sed < zconf.h "/#ifdef Z_PREFIX.* may be/s/def Z_PREFIX\(.*\) may be/ 1\1 was/" > zconf.temp.h
     272  mv zconf.temp.h zconf.h
     273  echo "Using z_ prefix on all symbols."
    204274fi
    205275
     
    220290
    221291if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
    222   echo "Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()"
     292  echo "Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()."
    223293
    224294  cat > $test.c <<EOF
     
    226296#include <stdarg.h>
    227297
    228 int mytest(char *fmt, ...)
     298int mytest(const char *fmt, ...)
    229299{
    230300  char buf[20];
     
    250320#include <stdarg.h>
    251321
    252 int mytest(char *fmt, ...)
     322int mytest(const char *fmt, ...)
    253323{
    254324  int n;
     
    272342    else
    273343      CFLAGS="$CFLAGS -DHAS_vsnprintf_void"
     344      SFLAGS="$SFLAGS -DHAS_vsnprintf_void"
    274345      echo "Checking for return value of vsnprintf()... No."
    275346      echo "  WARNING: apparently vsnprintf() does not return a value. zlib"
     
    279350  else
    280351    CFLAGS="$CFLAGS -DNO_vsnprintf"
     352    SFLAGS="$SFLAGS -DNO_vsnprintf"
    281353    echo "Checking for vsnprintf() in stdio.h... No."
    282354    echo "  WARNING: vsnprintf() not found, falling back to vsprintf(). zlib"
     
    288360#include <stdarg.h>
    289361
    290 int mytest(char *fmt, ...)
     362int mytest(const char *fmt, ...)
    291363{
    292364  int n;
     
    310382    else
    311383      CFLAGS="$CFLAGS -DHAS_vsprintf_void"
     384      SFLAGS="$SFLAGS -DHAS_vsprintf_void"
    312385      echo "Checking for return value of vsprintf()... No."
    313386      echo "  WARNING: apparently vsprintf() does not return a value. zlib"
     
    317390  fi
    318391else
    319   echo "Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()"
     392  echo "Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()."
    320393
    321394  cat >$test.c <<EOF
     
    359432    else
    360433      CFLAGS="$CFLAGS -DHAS_snprintf_void"
     434      SFLAGS="$SFLAGS -DHAS_snprintf_void"
    361435      echo "Checking for return value of snprintf()... No."
    362436      echo "  WARNING: apparently snprintf() does not return a value. zlib"
     
    366440  else
    367441    CFLAGS="$CFLAGS -DNO_snprintf"
     442    SFLAGS="$SFLAGS -DNO_snprintf"
    368443    echo "Checking for snprintf() in stdio.h... No."
    369444    echo "  WARNING: snprintf() not found, falling back to sprintf(). zlib"
     
    391466    else
    392467      CFLAGS="$CFLAGS -DHAS_sprintf_void"
     468      SFLAGS="$SFLAGS -DHAS_sprintf_void"
    393469      echo "Checking for return value of sprintf()... No."
    394470      echo "  WARNING: apparently sprintf() does not return a value. zlib"
     
    408484  echo "Checking for errno.h... No."
    409485  CFLAGS="$CFLAGS -DNO_ERRNO_H"
    410 fi
    411 
    412 cat > $test.c <<EOF
    413 #include <sys/types.h>
    414 #include <sys/mman.h>
    415 #include <sys/stat.h>
    416 caddr_t hello() {
    417   return mmap((caddr_t)0, (off_t)0, PROT_READ, MAP_SHARED, 0, (off_t)0);
    418 }
    419 EOF
    420 if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
    421   CFLAGS="$CFLAGS -DUSE_MMAP"
    422   echo Checking for mmap support... Yes.
    423 else
    424   echo Checking for mmap support... No.
     486  SFLAGS="$SFLAGS -DNO_ERRNO_H"
    425487fi
    426488
     
    433495    else
    434496      echo Checking for underline in external names... Yes.
    435     fi;;
     497    fi ;;
    436498esac
    437499
     
    442504/^CC *=/s#=.*#=$CC#
    443505/^CFLAGS *=/s#=.*#=$CFLAGS#
     506/^SFLAGS *=/s#=.*#=$SFLAGS#
     507/^LDFLAGS *=/s#=.*#=$LDFLAGS#
     508/^LDSHARED *=/s#=.*#=$LDSHARED#
    444509/^CPP *=/s#=.*#=$CPP#
    445 /^LDSHARED *=/s#=.*#=$LDSHARED#
    446 /^LIBS *=/s#=.*#=$LIBS#
     510/^STATICLIB *=/s#=.*#=$STATICLIB#
    447511/^SHAREDLIB *=/s#=.*#=$SHAREDLIB#
    448512/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV#
    449513/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM#
    450 /^AR *=/s#=.*#=$AR#
     514/^AR *=/s#=.*#=$AR_RC#
     515/^RANLIB *=/s#=.*#=$RANLIB#
     516/^EXE *=/s#=.*#=$EXE#
     517/^prefix *=/s#=.*#=$prefix#
     518/^exec_prefix *=/s#=.*#=$exec_prefix#
     519/^libdir *=/s#=.*#=$libdir#
     520/^includedir *=/s#=.*#=$includedir#
     521/^mandir *=/s#=.*#=$mandir#
     522/^all: */s#:.*#: $ALL#
     523/^test: */s#:.*#: $TEST#
     524" > Makefile
     525
     526sed < zlib.pc.in "
     527/^CC *=/s#=.*#=$CC#
     528/^CFLAGS *=/s#=.*#=$CFLAGS#
     529/^CPP *=/s#=.*#=$CPP#
     530/^LDSHARED *=/s#=.*#=$LDSHARED#
     531/^STATICLIB *=/s#=.*#=$STATICLIB#
     532/^SHAREDLIB *=/s#=.*#=$SHAREDLIB#
     533/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV#
     534/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM#
     535/^AR *=/s#=.*#=$AR_RC#
    451536/^RANLIB *=/s#=.*#=$RANLIB#
    452537/^EXE *=/s#=.*#=$EXE#
     
    457542/^mandir *=/s#=.*#=$mandir#
    458543/^LDFLAGS *=/s#=.*#=$LDFLAGS#
    459 " > Makefile
     544" | sed -e "
     545s/\@VERSION\@/$VER/g;
     546" > zlib.pc
Note: See TracChangeset for help on using the changeset viewer.