X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=blobdiff_plain;f=autogen.sh;h=f2f62c93d10437f9055c16a2e80a638f1933c81a;hp=94d58e34fd5d04cc3247bd88622224082b6377b8;hb=11ca74eea4a04a3815ab6c6cef0df561d6fb6bb1;hpb=732e1bb51df3568ffb9321d1f03d748b67a3a679 diff --git a/autogen.sh b/autogen.sh index 94d58e34f..f2f62c93d 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,52 +1,8 @@ #!/bin/sh - -# ***** W32 build script ******* -# Used to cross-compile for Windows. -if test "$1" = "--build-w32"; then - tmp=`dirname $0` - tsdir=`cd "$tmp"; pwd` - shift - if [ ! -f $tsdir/config/config.guess ]; then - echo "$tsdir/config/config.guess not found" >&2 - exit 1 - fi - build=`$tsdir/config/config.guess` - - [ -z "$w32root" ] && w32root="$HOME/w32root" - echo "Using $w32root as standard install directory" >&2 - - if i586-mingw32msvc-gcc --version >/dev/null 2>&1 ; then - host=i586-mingw32msvc - crossbindir=/usr/$host/bin - else - echo "Debian's mingw32 cross-compiler packet is required" >&2 - exit 1 - fi - - if [ -f "$tsdir/config.log" ]; then - if ! head $tsdir/config.log | grep "$host" >/dev/null; then - echo "Pease run a 'make distclean' first" >&2 - exit 1 - fi - fi - - ./configure --enable-maintainer-mode --prefix=${w32root} \ - --host=i586-mingw32msvc --build=${build} \ - --with-lib-prefix=${w32root} \ - --with-libiconv-prefix=${w32root} \ - --with-gpg-error-prefix=${w32root} \ - --with-gpgme-prefix=${w32root} \ - --with-config-dir="Claws-mail" \ - --disable-openssl --disable-dillo-viewer-plugin \ - --disable-nls --disable-libetpan --disable-enchant \ - --disable-trayicon-plugin --disable-spamassassin-plugin \ - --disable-bogofilter-plugin --disable-valgrind \ - PKG_CONFIG_LIBDIR="$w32root/lib/pkgconfig" - - rc=$? - exit $rc -fi -# ***** end W32 build script ******* +# Copyright 1999-2014 the Claws Mail team. +# This file is part of Claws Mail package, and distributed under the +# terms of the General Public License version 3 (or later). +# See COPYING file for license details. bisonver=`bison --version` @@ -56,9 +12,9 @@ if [ "$bisonver" = "" ]; then fi if [ "$LEX" != "" ]; then - flexver=`$LEX --version|sed "s/.* //"` + flexver=`$LEX --version|awk '{print $2}'` else - flexver=`flex --version|sed "s/.* //"` + flexver=`flex --version|awk '{print $2}'` fi if [ "$flexver" = "" ]; then @@ -68,17 +24,36 @@ else flex_major=`echo $flexver|sed "s/\..*//"` flex_minor=`echo $flexver|sed "s/$flex_major\.\(.*\)\..*/\1/"` flex_micro=`echo $flexver|sed "s/$flex_major\.$flex_minor\.\(.*\)/\1/"` - if [ $flex_major -lt 2 -o $flex_minor -lt 5 -o $flex_micro -lt 31 ]; then + + flex_numversion=$(expr \ + $flex_major \* 10000 + \ + $flex_minor \* 100 + \ + $flex_micro) + + if [ $flex_numversion -lt 20531 ]; then echo Flex 2.5.31 or greater is needed to compile Claws Mail git exit 1 fi fi +case `uname` in + Darwin*) + if [ "`glibtoolize --version`" = "" ]; then + echo MacOS requires glibtool from either Macport or brew + exit 1 + fi + LIBTOOL="glibtoolize --force --copy" + ;; + *) + LIBTOOL="libtoolize --force --copy" + ;; +esac aclocal -I m4 \ - && libtoolize --force --copy \ + && ${LIBTOOL} \ && autoheader \ && automake --add-missing --foreign --copy \ - && autoconf \ - && intltoolize -f \ - && ./configure --enable-maintainer-mode $@ + && autoconf +if test -z "$NOCONFIGURE"; then +exec ./configure --enable-maintainer-mode $@ +fi