X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=blobdiff_plain;f=autogen.sh;h=f2f62c93d10437f9055c16a2e80a638f1933c81a;hp=517d398b48f2b3f819e9ed48702c794b70a23908;hb=11ca74eea4a04a3815ab6c6cef0df561d6fb6bb1;hpb=5aff4c331ec7f3c08583bfc2c0fb54b89e78cf9b diff --git a/autogen.sh b/autogen.sh old mode 100644 new mode 100755 index 517d398b4..f2f62c93d --- a/autogen.sh +++ b/autogen.sh @@ -1,8 +1,59 @@ #!/bin/sh +# 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. -aclocal -I ac \ - && libtoolize --force --copy \ +bisonver=`bison --version` + +if [ "$bisonver" = "" ]; then + echo Bison is needed to compile Claws Mail git + exit 1 +fi + +if [ "$LEX" != "" ]; then + flexver=`$LEX --version|awk '{print $2}'` +else + flexver=`flex --version|awk '{print $2}'` +fi + +if [ "$flexver" = "" ]; then + echo Flex 2.5.31 or greater is needed to compile Claws Mail git + exit 1 +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/"` + + 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 \ + && ${LIBTOOL} \ && autoheader \ && automake --add-missing --foreign --copy \ - && autoconf \ - && ./configure --enable-maintainer-mode $@ + && autoconf +if test -z "$NOCONFIGURE"; then +exec ./configure --enable-maintainer-mode $@ +fi