#!/bin/sh

. config/options $1

cd $PKG_BUILD
ac_cv_lib_z_zlibVersion=yes \
./configure --host=$TARGET_NAME \
            --build=$HOST_NAME \
            --prefix=/usr \
            --sysconfdir=/etc \
            --enable-static \
            --enable-shared \

make

$MAKEINSTALL

$SED "s:\([\"'= ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" \
  $SYSROOT_PREFIX/usr/bin/libpng*-config

cp -P $SYSROOT_PREFIX/usr/bin/libpng*-config $ROOT/$TOOLCHAIN/bin
