#!/bin/sh -e

# Disable udev as we use mdev.
./configure \
    --prefix=/usr \
    --disable-systemd-logind \
    --enable-glx \
    --enable-dri \
    --enable-dri2 \
    --enable-dri3 \
    --enable-xorg \
    --disable-config-udev \
    --disable-config-udev-kms

make
make DESTDIR="$1" install

rm -f "$1/usr/share/X11/xorg.conf.d/10-evdev.conf"