#!/bin/sh

. config/options $1

xorg_drv_configure_prepend

PKG_CONFIG="$PKG_CONFIG --define-variable=sdkdir=$SYSROOT_PREFIX/usr/include/xorg"
CFLAGS="$CFLAGS -I$SYSROOT_PREFIX/usr/include/xorg/"

cd $PKG_BUILD
./configure --host=$TARGET_NAME \
            --build=$HOST_NAME \
            --prefix=/usr \
            --sysconfdir=/etc \
            --enable-shared \
            --disable-static \
            --enable-dri \
            --enable-kms-only \
            --disable-xvmc \
            --with-xorg-module-dir=$XORG_PATH_MODULES

make

$MAKEINSTALL
