#!/bin/sh

if test -d /usr/local/cross/i686-pc-cygwin; then
  CROSSPATH=/usr/local/cross/i686-pc-cygwin/
else
  CROSSPATH=/usr/local/cygwin/i686-pc-cygwin/
fi
PATH=${CROSSPATH}/bin:${PATH}
CC=i686-pc-cygwin-gcc
AR=i686-pc-cygwin-ar
AS=i686-pc-cygwin-as
LD=i686-pc-cygwin-ld
RANLIB=i686-pc-cygwin-ranlib
DLLTOOL=i686-pc-cygwin-dlltool
WINDRES=i686-pc-cygwin-windres
CPPFLAGS="-mno-cygwin"
CFLAGS="-O2 -I${CROSSPATH}/gtk/include -I${CROSSPATH}/gtk/include/glib -I${CROSSPATH}/gtk/include/gdk -mno-cygwin -mpentium -fnative-struct"
LDFLAGS="-L${CROSSPATH}/gtk/lib -mno-cygwin"
export CC AS AR LD RANLIB DLLTOOL PATH CFLAGS CPPFLAGS LDFLAGS
dir=`dirname $0`
${dir}/configure --host=i686-pc-cygwin --disable-nls --enable-mmx $*
