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
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