#!/bin/sh

. config/options $1

$SCRIPTS/unpack glib

setup_toolchain host
export ZLIB_CFLAGS=""
export ZLIB_LIBS=""

cd $BUILD/glib*

do_autoreconf
mkdir -p .build-host && cd .build-host
../configure --prefix=$ROOT/$TOOLCHAIN \
             --enable-shared \
             --disable-static \
             --with-gnu-ld \
             --with-libiconv=no \
             --enable-debug=no \
             --disable-man \
             --disable-rebuilds \
             --disable-gtk-doc \

make
make install

cp -f gobject/.libs/glib-genmarshal $ROOT/$TOOLCHAIN/bin
cp -f gobject/glib-mkenums $ROOT/$TOOLCHAIN/bin
