fix locating of pythonXX.so, with thanks to Ricardo
[claws.git] / autogen.sh
blobe4a95f0bbf3a1cfbfa89bf11be72739a87cbd35c
1 #!/bin/sh
3 # ***** W32 build script *******
4 # Used to cross-compile for Windows.
5 if test "$1" = "--build-w32"; then
6 tmp=`dirname $0`
7 tsdir=`cd "$tmp"; pwd`
8 shift
9 if [ ! -f $tsdir/config/config.guess ]; then
10 echo "$tsdir/config/config.guess not found" >&2
11 exit 1
13 build=`$tsdir/config/config.guess`
15 [ -z "$w32root" ] && w32root="$HOME/w32root"
16 echo "Using $w32root as standard install directory" >&2
18 if i586-mingw32msvc-gcc --version >/dev/null 2>&1 ; then
19 host=i586-mingw32msvc
20 crossbindir=/usr/$host/bin
21 else
22 echo "Debian's mingw32 cross-compiler packet is required" >&2
23 exit 1
26 if [ -f "$tsdir/config.log" ]; then
27 if ! head $tsdir/config.log | grep "$host" >/dev/null; then
28 echo "Pease run a 'make distclean' first" >&2
29 exit 1
33 ./configure --enable-maintainer-mode --prefix=${w32root} \
34 --host=i586-mingw32msvc --build=${build} \
35 --with-lib-prefix=${w32root} \
36 --with-libiconv-prefix=${w32root} \
37 --with-gpg-error-prefix=${w32root} \
38 --with-gpgme-prefix=${w32root} \
39 --with-config-dir="Claws-mail" \
40 --disable-openssl --disable-dillo-viewer-plugin \
41 --disable-nls --disable-libetpan --disable-enchant \
42 --disable-trayicon-plugin --disable-spamassassin-plugin \
43 --disable-bogofilter-plugin --disable-valgrind \
44 PKG_CONFIG_LIBDIR="$w32root/lib/pkgconfig"
46 rc=$?
47 exit $rc
49 # ***** end W32 build script *******
51 bisonver=`bison --version`
53 if [ "$bisonver" = "" ]; then
54 echo Bison is needed to compile Claws Mail git
55 exit 1
58 if [ "$LEX" != "" ]; then
59 flexver=`$LEX --version|sed "s/.* //"`
60 else
61 flexver=`flex --version|sed "s/.* //"`
64 if [ "$flexver" = "" ]; then
65 echo Flex 2.5.31 or greater is needed to compile Claws Mail git
66 exit 1
67 else
68 flex_major=`echo $flexver|sed "s/\..*//"`
69 flex_minor=`echo $flexver|sed "s/$flex_major\.\(.*\)\..*/\1/"`
70 flex_micro=`echo $flexver|sed "s/$flex_major\.$flex_minor\.\(.*\)/\1/"`
71 if [ $flex_major -lt 2 -o $flex_minor -lt 5 -o $flex_micro -lt 31 ]; then
72 echo Flex 2.5.31 or greater is needed to compile Claws Mail git
73 exit 1
78 aclocal -I m4 \
79 && libtoolize --force --copy \
80 && autoheader \
81 && automake --add-missing --foreign --copy \
82 && autoconf \
83 && ./configure --enable-maintainer-mode $@