Removed simple-gettext.c, as it is not being used at all.
[claws.git] / autogen.sh
old mode 100644 (file)
new mode 100755 (executable)
index 8e182ae..093adb3
@@ -1,56 +1,46 @@
 #!/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.
 
-# ***** 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`
+bisonver=`bison --version`
 
-    [ -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="Sylpheed-claws" \
-             --disable-openssl --disable-dillo-viewer-plugin \
-             --disable-nls --disable-libetpan --disable-aspell \
-             --disable-trayicon-plugin --disable-spamassassin-plugin \
-             PKG_CONFIG_LIBDIR="$w32root/lib/pkgconfig"
+if [ "$bisonver" = "" ]; then
+       echo Bison is needed to compile Claws Mail git
+       exit 1
+fi
 
-    rc=$?
-    exit $rc
+if [ "$LEX" != "" ]; then
+       flexver=`$LEX --version|sed "s/.* //"`
+else
+       flexver=`flex --version|sed "s/.* //"`
 fi
-# ***** end W32 build script *******
 
+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
 
 aclocal -I m4 \
   && libtoolize --force --copy \
   && autoheader \
   && automake --add-missing --foreign --copy \
-  && autoconf \
-  && ./configure --enable-maintainer-mode $@
+  && autoconf 
+if test -z "$NOCONFIGURE"; then
+exec ./configure --enable-maintainer-mode $@
+fi