#!/bin/sh

. config/options $1

setup_toolchain host

cd $PKG_BUILD

libtoolize
autoreconf

mkdir -p objdir
cd objdir

../configure --host=$HOST_NAME \
             --build=$HOST_NAME \
             --target=$TARGET_NAME \
             --prefix=$ROOT/$TOOLCHAIN \
             --enable-shared \
             --with-gmp-lib="$ROOT/$TOOLCHAIN/lib" \
             --with-gmp-include="$ROOT/$TOOLCHAIN/include" \

make
make install
