#!/bin/sh

. config/options

$SCRIPTS/build toolchain

setup_toolchain host

cd $PKG_BUILD
./configure --host=$TARGET_NAME \
            --build=$HOST_NAME \
            --prefix=$ROOT/$TOOLCHAIN \
            --with-mapdir=$XORG_PATH_MAPS

make
make install-binPROGRAMS

mkdir -p $SYSROOT_PREFIX/usr/lib/pkgconfig
  cp *.pc $SYSROOT_PREFIX/usr/lib/pkgconfig

mkdir -p $SYSROOT_PREFIX/usr/share/aclocal
  cp *.m4 $SYSROOT_PREFIX/usr/share/aclocal
