2 # Copyright 1999-2014 the Claws Mail team.
3 # This file is part of Claws Mail package, and distributed under the
4 # terms of the General Public License version 3 (or later).
5 # See COPYING file for license details.
7 # ***** W32 build script *******
8 # Used to cross-compile for Windows.
9 if test "$1" = "--build-w32"; then
11 tsdir
=`cd "$tmp"; pwd`
13 if [ ! -f $tsdir/config
/config.guess
]; then
14 echo "$tsdir/config/config.guess not found" >&2
17 build
=`$tsdir/config/config.guess`
19 [ -z "$w32root" ] && w32root
="$HOME/w32root"
20 echo "Using $w32root as standard install directory" >&2
22 if i586-mingw32msvc-gcc
--version >/dev
/null
2>&1 ; then
24 crossbindir
=/usr
/$host/bin
26 echo "Debian's mingw32 cross-compiler packet is required" >&2
30 if [ -f "$tsdir/config.log" ]; then
31 if ! head $tsdir/config.log |
grep "$host" >/dev
/null
; then
32 echo "Pease run a 'make distclean' first" >&2
37 .
/configure
--enable-maintainer-mode --prefix=${w32root} \
38 --host=i586-mingw32msvc
--build=${build} \
39 --with-lib-prefix=${w32root} \
40 --with-libiconv-prefix=${w32root} \
41 --with-gpg-error-prefix=${w32root} \
42 --with-gpgme-prefix=${w32root} \
43 --with-config-dir="Claws-mail" \
44 --disable-openssl --disable-dillo-viewer-plugin \
45 --disable-nls --disable-libetpan --disable-enchant \
46 --disable-trayicon-plugin --disable-spamassassin-plugin \
47 --disable-bogofilter-plugin --disable-valgrind \
48 PKG_CONFIG_LIBDIR
="$w32root/lib/pkgconfig"
53 # ***** end W32 build script *******
55 bisonver
=`bison --version`
57 if [ "$bisonver" = "" ]; then
58 echo Bison is needed to compile Claws Mail git
62 if [ "$LEX" != "" ]; then
63 flexver
=`$LEX --version|sed "s/.* //"`
65 flexver
=`flex --version|sed "s/.* //"`
68 if [ "$flexver" = "" ]; then
69 echo Flex
2.5.31 or greater is needed to compile Claws Mail git
72 flex_major
=`echo $flexver|sed "s/\..*//"`
73 flex_minor
=`echo $flexver|sed "s/$flex_major\.\(.*\)\..*/\1/"`
74 flex_micro
=`echo $flexver|sed "s/$flex_major\.$flex_minor\.\(.*\)/\1/"`
75 if [ $flex_major -lt 2 -o $flex_minor -lt 5 -o $flex_micro -lt 31 ]; then
76 echo Flex
2.5.31 or greater is needed to compile Claws Mail git
82 && libtoolize
--force --copy \
84 && automake
--add-missing --foreign --copy \
86 if test -z "$NOCONFIGURE"; then
87 exec .
/configure
--enable-maintainer-mode $@