#!/bin/sh

. config/options $1

cd $PKG_BUILD
ac_cv_file__usr_share_pci_ids="yes" \
ac_cv_file__usr_share_hwdata_pci_ids="no" \
ac_cv_file__usr_share_misc_pci_ids="no" \
LDFLAGS="$LDFLAGS -I$SYSROOT_PREFIX/usr/include/glib-2.0" \
./configure --host=$TARGET_NAME \
            --build=$HOST_NAME \
            --prefix=/usr \
            --sysconfdir=/etc \
            --sbindir=/sbin \
            --libexecdir=/lib/udev \
            --localstatedir=/var \
            --disable-silent-rules \
            --disable-static \
            --enable-shared \
            --disable-gtk-doc \
            --disable-gtk-doc-html \
            --disable-gtk-doc-pdf \
            --disable-debug \
            --disable-logging \
            --enable-extras \
            --without-selinux \
            --without-systemdsystemunitdir \
            --with-firmware-path=/lib/firmware \
            --with-pci-ids-path=/usr/share/pci.ids \
            --disable-introspection \
            --with-gnu-ld \

make

$STRIP udev/udevd
$STRIP udev/udevadm

$MAKEINSTALL
