1 # This file is in the public domain for what it's worth.
2 # Written by Jānis Rūcis <parasti@gmail.com>
3 # Last updated in September, 2008.
7 # * If the date above seems too far back in the past, the stuff
8 # below is likely horribly outdated and only of historic relevance.
11 # * Some of the variables below will have to be modified for the
12 # script to be useful on your system. These include MINGW_PREFIX,
15 # * The script is deliberately minimalistic. Its primary purpose is
16 # to provide a proper cross-compilation environment for Neverball
17 # and its dependencies, so you will probably need to add more
18 # variables to get your own software to compile.
20 # * This script is designed to be as transparent as possible, so
21 # that no changes are necessary to a build system. However, due to
22 # there being no way to inform GCC of a non-standard library path
23 # when cross-compiling, a build system still has support the LDFLAGS
24 # environment variable.
26 MINGW_PREFIX
=~
/dev
/mingw
29 # This isn't plain 'wine' because in Debian the Wine in PATH is
30 # actually the Winelauncher script, which is a bit too slow and too
31 # helpful for our tastes.
33 # Useful for builds that use their own functionality half-way through.
34 WINE
=/usr
/lib
/wine
/wine.bin
37 # Some rationale for why some of the variables below have to be
38 # specified: it appears that configure scripts use different methods
39 # to determine whether cross-compilation is in effect. Some rely on
40 # the specified compiler, some require that --host be specified, some
41 # only work properly when both --build and --host are provided (which
42 # is strange considering that most of them are able to detect the
43 # build system automatically).
45 # config.guess is available in the autotools-dev package on Debian and
46 # in most autotools-based packages. You can probably use the script
47 # if you need some flexibility.
49 #BUILD=$(sh /usr/share/misc/config.guess)
51 # TARGET is the exact prefix of the cross binaries sans hyphen.
52 TARGET
=i586-mingw32msvc
55 # The variables above do not need to be exported.
56 # No exports here, move along!
64 # Appears to be used by libtool, although I haven't (yet) run into any
70 # When a project that uses libtool does not inform libtool that it has
71 # been ported to build native Windows DLLs (by using the
72 # AC_LIBTOOL_WIN32_DLL macro in configure.in or, since this macro has
73 # been deprecated recently, some other equivalent way), dynamic
74 # libraries fail to build. Although libtool documentation does
75 # mention this requirement, libtool itself does not seem to handle
76 # this cleanly and fails in obscure ways. Explicitly setting OBJDUMP
77 # is (sometimes) a sufficient work-around. (Note that this might have
78 # been fixed to some extent in recent libtool versions.)
80 # This is an incomplete list of binary utilies. Expand as needed.
82 OBJDUMP
=$TARGET-objdump
91 # CFLAGS and CPPFLAGS aren't always the best place for setting these.
92 # Instead, we inform GCC directly.
94 CPATH
="$MINGW_PREFIX/include:$CPATH"
97 # The LIBRARY_PATH environment variable would be the perfect way of
98 # letting GCC know in which directories to look for libraries, but
99 # unfortunately it is not used when cross compiling. The reason for
100 # this remains a mystery.
102 LDFLAGS
="-L$MINGW_PREFIX/lib $LDFLAGS"
105 # This particular PATH setting is seen often in cross compilation
106 # scripts, but I have only experienced problems with it and haven't
107 # yet come across a setup where it's actually necessary.
109 #PATH="$MINGW_PREFIX/bin:/usr/$TARGET/bin:$PATH" # Bad idea.
110 PATH
="$MINGW_PREFIX/bin:$PATH" # Good idea.
113 # If configure picks up build system's pkg-config, we politely ask it
114 # to look in all the right places. Might not work with an old
117 PKG_CONFIG_LIBDIR
="$MINGW_PREFIX/lib/pkgconfig"
118 export PKG_CONFIG_LIBDIR