#!/bin/sh

. config/options

if [ "$DEBUG" = "yes" ]; then
  DEBUG_CONFIG="--enable-debug"
else
  DEBUG_CONFIG="--disable-debug"
fi
if [ "$DEVTOOLS" = "yes" ]; then
  DEVTOOLS_CONFIG="--enable-bccmd --enable-test --enable-tools"
else
  DEVTOOLS_CONFIG="--disable-bccmd --disable-test --disable-tools"
fi 

cd $PKG_BUILD
./configure --host=$TARGET_NAME \
            --build=$HOST_NAME \
            --prefix=/usr \
            --sysconfdir=/etc \
            --libexecdir=/usr/lib \
            --localstatedir=/var \
            --disable-dependency-tracking \
            --disable-silent-rules \
            --enable-shared \
            --disable-static \
            --enable-optimization \
            --enable-fortify \
            --disable-pie \
            --disable-network \
            --disable-serial \
            --enable-usb \
            --enable-input \
            --disable-audio \
            --enable-service \
            --disable-pnat \
            --disable-attrib \
            --disable-gstreamer \
            --enable-alsa \
            --disable-tracer \
            --enable-pcmcia \
            --enable-hid2hci \
            --enable-dfutool \
            --enable-hidd \
            --disable-pand \
            --disable-dund \
            --disable-cups \
            --enable-udevrules \
            --enable-configfiles \
            --disable-maemo6 \
            --disable-hal \
            --disable-capng \
            --with-gnu-ld \
            $DEBUG_CONFIG \
            $DEVTOOLS_CONFIG

make

$MAKEINSTALL
