#!/bin/sh

. config/options $1

setup_toolchain host

export CFLAGS="$CFLAGS -fPIC"
export CPPFLAGS="$CPPFLAGS -fexceptions"

cd $PKG_BUILD

mkdir -p objdir
cd objdir

../configure --host=$HOST_NAME \
             --build=$HOST_NAME \
             --prefix=$ROOT/$TOOLCHAIN \
             --enable-shared \
             --disable-static \
             --enable-mpbsd \
             --enable-cxx \

#             --target=$TARGET_NAME \
make
make check
make install
