# this script correctly configure TeXmacs with the
# mingw-cross-env cross-compling environment
# see http://mingw-cross-env.nongnu.org/

# you have to modify BASEDIR to suit your needs.

# mingw-cross-env packages needed: 
# qt freetype guile

export TARGET=i686-pc-mingw32 
export CROSSENVDIR=$PWD/../mingw-cross-env-2.18
export QMAKE=$TARGET-qmake 
export MOC=$TARGET-moc 
export RCC=$TARGET-rcc 
export UIC=$TARGET-uic 
export GUILE_LDFLAGS=`$TARGET-pkg-config guile-1.8 --libs`
export GUILE_CFLAGS=`$TARGET-pkg-config guile-1.8 --cflags`
export FREETYPE_LDFLAGS=`$TARGET-pkg-config freetype2 --libs`
export FREETYPE_CFLAGS=`$TARGET-pkg-config freetype2 --cflags`
export CFLAGS="-I$CROSSENVDIR/usr/include/"
export CPPFLAGS="-I$CROSSENVDIR/usr/include/"
export CXXFLAGS="-I$CROSSENVDIR/usr/include/"
export LDFLAGS="-L$CROSSENVDIR/usr/include/"
export PATH=$CROSSENVDIR/usr/bin:$PATH
./configure --enable-qt --prefix=$PWD/../local --host=$TARGET
