#!/bin/sh

. config/options

$SCRIPTS/build toolchain
$SCRIPTS/build util-macros
$SCRIPTS/build libXrandr
$SCRIPTS/build libXrender
$SCRIPTS/build libXext
$SCRIPTS/build libpciaccess
$SCRIPTS/build libdrm
$SCRIPTS/build udev

cd $PKG_BUILD

xorg_drv_configure_prepend

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

make
