autogen.sh 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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-aspell \
  37. --disable-trayicon-plugin --disable-spamassassin-plugin \
  38. PKG_CONFIG_LIBDIR="$w32root/lib/pkgconfig"
  39. rc=$?
  40. exit $rc
  41. fi
  42. # ***** end W32 build script *******
  43. bisonver=`bison --version`
  44. if [ "$bisonver" = "" ]; then
  45. echo Bison is needed to compile Claws Mail CVS
  46. exit 1
  47. fi
  48. flexver=`flex --version|sed "s/.* //"`
  49. if [ "$flexver" = "" ]; then
  50. echo Flex 2.5.31 or greater is needed to compile Claws Mail CVS
  51. exit 1
  52. else
  53. flex_major=`echo $flexver|sed "s/\..*//"`
  54. flex_minor=`echo $flexver|sed "s/$flex_major\.\(.*\)\..*/\1/"`
  55. flex_micro=`echo $flexver|sed "s/$flex_major\.$flex_minor\.\(.*\)/\1/"`
  56. if [ $flex_major -lt 2 -o $flex_minor -lt 5 -o $flex_micro -lt 31 ]; then
  57. echo Flex 2.5.31 or greater is needed to compile Claws Mail CVS
  58. exit 1
  59. fi
  60. fi
  61. aclocal -I m4 \
  62. && libtoolize --force --copy \
  63. && autoheader \
  64. && automake --add-missing --foreign --copy \
  65. && autoconf \
  66. && ./configure --enable-maintainer-mode $@