#!/bin/sh

. config/options $1

cd $PKG_BUILD
mkdir -p .build-target

cd .build-target
../configure --host=$TARGET_NAME \
             --build=$HOST_NAME \
             --prefix=/usr \
             --sysconfdir=/etc \
             --disable-static \
             --enable-shared \
             --disable-ipv6 \
             --without-python \
             --with-zlib

make

$MAKEINSTALL

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

mv $SYSROOT_PREFIX/usr/bin/xml2-config $ROOT/$TOOLCHAIN/bin
