#!/bin/sh

. config/options

$SCRIPTS/build toolchain
$SCRIPTS/build libX11
$SCRIPTS/build libSM

cd $PKG_BUILD
./configure --host=$TARGET_NAME \
            --build=$HOST_NAME \
            --prefix=/usr \
            --sysconfdir=/etc \
            --localstatedir=/var \
            --disable-static \
            --enable-shared \
            --with-gnu-ld \
            --enable-malloc0returnsnull \

make -C util CC=$HOST_CC CFLAGS=$HOST_CFLAGS LDFLAGS=$HOST_LDFLAGS makestrs
make

$MAKEINSTALL
