RSSyl: add a missing symbol to claws.def for Windows build.
[claws.git] / autogen.sh
1 #!/bin/sh
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.
6
7 # ***** W32 build script *******
8 # Used to cross-compile for Windows.
9 if test "$1" = "--build-w32"; then
10     tmp=`dirname $0`
11     tsdir=`cd "$tmp"; pwd`
12     shift
13     if [ ! -f $tsdir/config/config.guess ]; then
14         echo "$tsdir/config/config.guess not found" >&2
15         exit 1
16     fi
17     build=`$tsdir/config/config.guess`
18
19     [ -z "$w32root" ] && w32root="$HOME/w32root"
20     echo "Using $w32root as standard install directory" >&2
21     
22     if i586-mingw32msvc-gcc --version >/dev/null 2>&1 ; then
23         host=i586-mingw32msvc
24         crossbindir=/usr/$host/bin
25     else
26        echo "Debian's mingw32 cross-compiler packet is required" >&2
27        exit 1
28     fi
29    
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
33             exit 1
34         fi
35     fi
36
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"
49
50     rc=$?
51     exit $rc
52 fi
53 # ***** end W32 build script *******
54
55 bisonver=`bison --version`
56
57 if [ "$bisonver" = "" ]; then
58         echo Bison is needed to compile Claws Mail git
59         exit 1
60 fi
61
62 if [ "$LEX" != "" ]; then
63         flexver=`$LEX --version|sed "s/.* //"`
64 else
65         flexver=`flex --version|sed "s/.* //"`
66 fi
67
68 if [ "$flexver" = "" ]; then
69         echo Flex 2.5.31 or greater is needed to compile Claws Mail git
70         exit 1
71 else
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
77                 exit 1
78         fi
79 fi
80
81 aclocal -I m4 \
82   && libtoolize --force --copy \
83   && autoheader \
84   && automake --add-missing --foreign --copy \
85   && autoconf 
86 if test -z "$NOCONFIGURE"; then
87 exec ./configure --enable-maintainer-mode $@
88 fi