cfe76583f5078ceb208a69333f5c921e31c111fb
[claws.git] / autogen.sh
1 #!/bin/sh
2
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
12     fi
13     build=`$tsdir/config/config.guess`
14
15     [ -z "$w32root" ] && w32root="$HOME/w32root"
16     echo "Using $w32root as standard install directory" >&2
17     
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
24     fi
25    
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
30         fi
31     fi
32
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="Sylpheed-claws" \
40              --disable-openssl --disable-dillo-viewer-plugin \
41              --disable-nls --disable-libetpan --disable-aspell \
42              --disable-trayicon-plugin \
43              PKG_CONFIG_LIBDIR="$w32root/lib/pkgconfig"
44
45     rc=$?
46     exit $rc
47 fi
48 # ***** end W32 build script *******
49
50
51 aclocal -I m4 \
52   && libtoolize --force --copy \
53   && autoheader \
54   && automake --add-missing --foreign --copy \
55   && autoconf \
56   && ./configure --enable-maintainer-mode $@