#!/bin/sh

. config/options $1

export ac_cv_have_abstract_sockets=yes
export ac_cv_func_posix_getpwnam_r=yes
export have_abstract_sockets=yes

DBUS_DIR=`ls -d $BUILD/dbus-[0-9]*`

cd $PKG_BUILD
mkdir -p .build-target && cd .build-target
../configure --host=$TARGET_NAME \
             --build=$HOST_NAME \
             --prefix=/usr \
             --sysconfdir=/etc \
             --localstatedir=/var \
             --disable-static \
             --enable-shared \
             --disable-tests \
             --enable-asserts=no \
             --with-introspect-xml="$ROOT/$DBUS_DIR/.build-host/introspect.xml" \
             --with-dbus-binding-tool="$ROOT/$TOOLCHAIN/bin/dbus-binding-tool" \

make

$MAKEINSTALL
