#!/bin/sh

. config/options $1

# ensure we dont use fast-math optimization.
  CFLAGS=`echo $CFLAGS | sed -e "s|-ffast-math||"`
  CXXFLAGS=`echo $CXXFLAGS | sed -e "s|-ffast-math||"`

# hack for wrong ar implementatition
  unset AR

cd $PKG_BUILD
./configure --host=$TARGET_NAME \
            --build=$HOST_NAME \
            --prefix=/usr/games/$1 \
            --with-sdl-prefix="$ROOT/$TOOLCHAIN" \
            --with-vorbis="$SYSROOT_PREFIX/usr" \
            --with-ogg="$SYSROOT_PREFIX/usr" \
            --with-libOpenAL="$SYSROOT_PREFIX/usr" \
            --with-lua="$SYSROOT_PREFIX/usr" \
            --with-wx-config=/bin/true \

jam
