export ACLOCAL="aclocal -I ${PREFIX}/share/aclocal"
export PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig"
MAKE="make"
+CFGFLAGS=
modules="dri2proto \
libpthread-stubs \
pixman"
+setcfgflags()
+{
+ shift
+ CFGFLAGS=${1+"$@"}
+}
+
+
init()
{
mkdir -p xorg
{
# Build VNC
+ echo "*** Building VNC ***"
make distclean || true
- ./configure --prefix=${PREFIX}
+ ./configure ${CFGFLAGS} --prefix=${PREFIX}
make
# Build Xorg
+ echo "*** Building Xorg ***"
pushd xorg
for module in ${modules}; do
extraoptions=""
if [ "${module}" = "libX11" ]; then
extraoptions="${extraoptions} --without-xcb"
fi
- ./configure --prefix="${PREFIX}" ${extraoptions}
+ ./configure ${CFGFLAGS} --prefix="${PREFIX}" ${extraoptions}
echo ======================
echo building ${module}
echo ======================
done
# build mesa
+ echo "*** Building Mesa ***"
pushd Mesa-*
- ./configure --prefix=${PREFIX} --with-driver=dri --disable-glut --without-demos
+ ./configure ${CFGFLAGS} --prefix=${PREFIX} --with-driver=dri --disable-glut --without-demos
if [ $? -ne 0 ]; then
echo "Failed to configure Mesa."
exit
popd
# build xserver
+ echo "*** Building xserver ***"
cd xserver
- ./configure --prefix=${PREFIX} --disable-xinerama --disable-xvfb --disable-xnest --disable-xorg
+ ./configure ${CFGFLAGS} --prefix=${PREFIX} --disable-xinerama --disable-xvfb --disable-xnest --disable-xorg
if [ $? -ne 0 ]; then
echo "Failed to configure X server."
exit
cd ..
}
+if [ ! "$2" = "" ]; then
+ setcfgflags ${1+"$@"}
+fi
case "$1" in
init)
update_modules
;;
*)
- echo "Usage: $0 init | build | update"
+ echo "Usage: $0 init | build | update [additional configure flags]"
exit 3
esac