From c0a52d070912108e277f873836cdf32f15861f15 Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com> Date: Tue, 17 Apr 2007 12:49:20 -0500 Subject: [PATCH] Added some comments --- mingw-configure | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/mingw-configure b/mingw-configure index 1b14a68f..8a1f4537 100755 --- a/mingw-configure +++ b/mingw-configure @@ -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" \