#!/bin/sh -e
# Make xauth optional at runtime.
cmd='command -v xauth >/dev/null \&\&'
sed "s#\(enable_xauth\)=1#$cmd&||\1=0#" startx.cpp > _
mv -f _ startx.cpp
./configure \
--prefix=/usr \
--with-xinitdir=/etc/X11/xinit
make
make DESTDIR="$1" install