Added some comments

This commit is contained in:
Yevgen Muntyan 2007-04-17 12:49:20 -05:00
parent f503b4fdbd
commit c0a52d0709

View File

@ -20,11 +20,17 @@ ENDSRIPT
chmod +x $1
}
# Path to host pkg-config
PKG_CONFIG_PROGRAM=${PKG_CONFIG_PROGRAM:-/usr/bin/pkg-config}
# Prefix of mingw tools. prefix + tool should make up full path
# to the tool, e.g. prefix is '/usr/bin/i586-mingw32msvc-' on Debian
# or '/usr/local/mingw32/bin/' on FreeBSD.
MINGW_TOOL_PREFIX=${MINGW_TOOL_PREFIX:-/usr/bin/i586-mingw32msvc-}
# Where gtk libraries are installed
export GTK_PREFIX=${GTK_PREFIX:-/usr/local/win/gtk}
# These python variables are medit-only
if [ "x$1" = "x--with-python=2.5" -o "x$2" = "x--with-python=2.5" ]; then
export PYTHON_PREFIX=${PYTHON_PREFIX:-/usr/local/win/Python25}
export PYTHON25_HOME=$PYTHON_PREFIX
@ -32,11 +38,11 @@ else
export PYTHON_PREFIX=${PYTHON_PREFIX:-/usr/local/win/Python24}
export PYTHON24_HOME=$PYTHON_PREFIX
fi
export PYTHON_HOME=$PYTHON_PREFIX
export PYTHON24_HOME=${PYTHON24_HOME:-/usr/local/win/Python24}
export PYTHON25_HOME=${PYTHON25_HOME:-/usr/local/win/Python25}
# Find configure script to run
if [ x$CONFIGURE = x ]; then
CONFIGURE="configure"
if [ ! -e $CONFIGURE ]; then
@ -82,13 +88,24 @@ export CPPFLAGS="-I$GTK_PREFIX/include $CPPFLAGS"
export CFLAGS="-I$GTK_PREFIX/include -mno-cygwin -mms-bitfields -march=i686 ${CFLAGS:-"-O2"}"
export CXXFLAGS="-I$GTK_PREFIX/include -mno-cygwin -mms-bitfields -march=i686 ${CFLAGS:-"-O2"}"
# Set up pkg-config invocation. Some broken packages do not use PKG_CONFIG macros
# to find pkg-config, so the script must be named 'pkg-config'. Hence it's put
# into a separate directory and the directory is pushed in front of PATH
mkdir -p fake-bin
write_pkg_config fake-bin/pkg-config
export PKG_CONFIG="`pwd`/fake-bin/pkg-config"
# Some stupid packages try to run stuff like 'gcc' and 'ld' even when cross-compiling, so
# cross-tools bin directory should better be in PATH. /usr/i586-mingw32msvc/bin and
# /usr/local/mingw32/bin are Debian's and FreeBSD's, add yours if needed.
export PATH=`pwd`/fake-bin:$MINGW_BIN:/usr/i586-mingw32msvc/bin:/usr/local/mingw32/bin:$PATH
TARGET=i586-pc-mingw32msvc
# Now actually run configure. FOO=foo arguments *must* be there if you
# want automatic re-configuring (which happens if you modify configure.ac and
# run make) work.
# NOTE: --build *must* be here, it's autoconf bug (aka 'feature'), confirmed and
# *documented*.
echo sh $CONFIGURE --build=`$CONFIG_GUESS` --host=$TARGET --target=$TARGET \
--enable-all-warnings --enable-maintainer-mode \
PKG_CONFIG="$PKG_CONFIG" GTK_PREFIX="$GTK_PREFIX" \