#!/bin/bash

test -z $MST_PREFIX && echo "  The MST_PREFIX must be set to proceed!!" && exit 0

echo "MST_PREFIX=$MST_PREFIX"

LD_LIB_PATH=" -L$MST_PREFIX/lib "

echo "LD_LIB_PATH=$LD_LIB_PATH"

echo "Running autoconf & automake"
autoreconf
autoconf
automake

CC=gcc
export CC

#--build=i386-linux \
./configure	--prefix=$MST_PREFIX \
		LDFLAGS="$LD_LIB_PATH" \
    CFLAGS="-Wall -I$MST_PREFIX/include "\
		--enable-shared \
		--disable-static \
		--disable-multi \
		--without-tests \
		--without-tools \
		--disable-fbdev \
		--enable-x11 \
		--disable-vnc \
		--disable-sdl \
		--disable-devmem \
		--disable-pmem \
		--disable-text \
		--disable-network \
		--enable-jpeg \
		--enable-png \
		--enable-gif \
		--enable-freetype \
		--enable-MVF  \
		--disable-mmx \
		--disable-gopc \
		--disable-OBAMA_BUILD \
		--disable-hwdecodejpeg \
		--with-gfxdrivers="none"  \
		--with-inputdrivers=linuxinput \
		--enable-video4linux=yes
