medit/mingw-configure

75 lines
2.4 KiB
Plaintext
Raw Normal View History

2005-06-22 11:20:32 -07:00
#!/bin/sh
PKG_CONFIG_PROGRAM=${PKG_CONFIG_PROGRAM:-/usr/bin/pkg-config}
MINGW_TOOL_PREFIX=${MINGW_TOOL_PREFIX:-/usr/bin/i586-mingw32msvc}
2005-06-22 11:20:32 -07:00
if [ -z $GTK_PREFIX ]; then
2006-02-11 17:57:24 -08:00
export GTK_PREFIX=/usr/local/win/gtk
2005-06-22 11:20:32 -07:00
fi
2005-11-03 20:32:30 -08:00
export PKG_CONFIG_PATH=$GTK_PREFIX/lib/pkgconfig
export PKG_CONFIG_LIBDIR=$GTK_PREFIX/lib/pkgconfig
2005-06-22 11:20:32 -07:00
############################################################################
if [ x`basename $0` = xfake-pkg-config ]; then
2006-04-30 18:55:01 -07:00
if [ "x$1" = "x--atleast-pkgconfig-version" ]; then
exec $PKG_CONFIG_PROGRAM --atleast-pkgconfig-version $2
2005-06-22 11:20:32 -07:00
else
exec $PKG_CONFIG_PROGRAM --define-variable=prefix=$GTK_PREFIX $*
2005-06-22 11:20:32 -07:00
fi
fi
############################################################################
if [ x$CONFIGURE = x ]; then
CONFIGURE="configure"
if [ ! -e $CONFIGURE ]; then
CONFIGURE=`dirname $0`/configure
fi
if [ ! -e $CONFIGURE ]; then
echo "Can't find configure script"
exit 1
fi
2006-06-08 08:48:20 -07:00
configure_dir=`dirname "$CONFIGURE"`
configure_dir=`cd "$configure_dir" && pwd`
CONFIGURE="$configure_dir"/configure
2005-06-22 11:20:32 -07:00
fi
export ADDR2LINE="$MINGW_TOOL_PREFIX-addr2line"
export AR="$MINGW_TOOL_PREFIX-ar"
export AS="$MINGW_TOOL_PREFIX-as"
export CC="$MINGW_TOOL_PREFIX-gcc"
export CPP="$MINGW_TOOL_PREFIX-cpp"
export CPPFILT="$MINGW_TOOL_PREFIX-c++filt"
export CXX="$MINGW_TOOL_PREFIX-g++"
export DLLTOOL="$MINGW_TOOL_PREFIX-dlltool"
export DLLWRAP="$MINGW_TOOL_PREFIX-dllwrap"
export GCOV="$MINGW_TOOL_PREFIX-gcov"
export LD="$MINGW_TOOL_PREFIX-ld"
export NM="$MINGW_TOOL_PREFIX-nm"
export OBJCOPY="$MINGW_TOOL_PREFIX-objcopy"
export OBJDUMP="$MINGW_TOOL_PREFIX-objdump"
export RANLIB="$MINGW_TOOL_PREFIX-ranlib"
export READELF="$MINGW_TOOL_PREFIX-readelf"
export SIZE="$MINGW_TOOL_PREFIX-size"
export STRINGS="$MINGW_TOOL_PREFIX-strings"
export STRIP="$MINGW_TOOL_PREFIX-strip"
export WINDRES="$MINGW_TOOL_PREFIX-windres"
2005-06-22 11:20:32 -07:00
2006-04-09 15:16:13 -07:00
export CPATH=$GTK_PREFIX/include
export LDFLAGS="-L$GTK_PREFIX/lib $LDFLAGS"
export CFLAGS="${CFLAGS:-"-O2 -g"} -I$GTK_PREFIX/include -mms-bitfields -march=i686"
export CXXFLAGS="${CFLAGS:-"-O2 -g"} -I$GTK_PREFIX/include -mms-bitfields -march=i686"
2005-06-22 11:20:32 -07:00
export PATH=$MINGW_BIN:/usr/i586-mingw32msvc/bin:/usr/local/mingw32/bin:$PATH
2005-06-22 11:20:32 -07:00
if [ -L fake-pkg-config ]; then
rm fake-pkg-config
fi
ln -s $0 fake-pkg-config
export PKG_CONFIG="./fake-pkg-config"
TARGET=i586-pc-mingw32msvc
2005-06-22 11:20:32 -07:00
exec sh $CONFIGURE --target=$TARGET --host=$TARGET --enable-all-gcc-warnings $*