autogen.sh 2.3 KB

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