2001-04-19 14:21:46 +02:00
|
|
|
#!/bin/sh
|
2014-06-28 01:13:22 +02:00
|
|
|
# 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).
|
2014-06-24 19:37:28 +02:00
|
|
|
# See COPYING file for license details.
|
2001-04-19 14:21:46 +02:00
|
|
|
|
2007-02-20 18:42:49 +01:00
|
|
|
bisonver=`bison --version`
|
|
|
|
|
|
|
|
if [ "$bisonver" = "" ]; then
|
2013-05-02 20:00:17 +02:00
|
|
|
echo Bison is needed to compile Claws Mail git
|
2007-02-20 18:42:49 +01:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2012-10-10 10:04:50 +02:00
|
|
|
if [ "$LEX" != "" ]; then
|
2017-06-16 11:05:15 +02:00
|
|
|
flexver=`$LEX --version|awk '{print $2}'`
|
2012-10-10 10:04:50 +02:00
|
|
|
else
|
2017-06-16 11:05:15 +02:00
|
|
|
flexver=`flex --version|awk '{print $2}'`
|
2012-10-10 10:04:50 +02:00
|
|
|
fi
|
2007-02-20 18:42:49 +01:00
|
|
|
|
|
|
|
if [ "$flexver" = "" ]; then
|
2013-05-02 20:00:17 +02:00
|
|
|
echo Flex 2.5.31 or greater is needed to compile Claws Mail git
|
2007-02-20 18:42:49 +01:00
|
|
|
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/"`
|
2015-12-01 18:50:29 +01:00
|
|
|
|
|
|
|
flex_numversion=$(expr \
|
|
|
|
$flex_major \* 10000 + \
|
|
|
|
$flex_minor \* 100 + \
|
|
|
|
$flex_micro)
|
|
|
|
|
|
|
|
if [ $flex_numversion -lt 20531 ]; then
|
2013-05-02 20:00:17 +02:00
|
|
|
echo Flex 2.5.31 or greater is needed to compile Claws Mail git
|
2007-02-20 18:42:49 +01:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2017-06-16 11:05:15 +02:00
|
|
|
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
|
|
|
|
|
2018-11-06 07:14:37 +01:00
|
|
|
${LIBTOOL} \
|
|
|
|
&& aclocal -I m4 \
|
|
|
|
&& autoconf \
|
2001-04-19 14:21:46 +02:00
|
|
|
&& autoheader \
|
2018-11-06 07:14:37 +01:00
|
|
|
&& automake --add-missing --foreign --copy
|
2014-06-22 21:32:57 +02:00
|
|
|
if test -z "$NOCONFIGURE"; then
|
2018-11-06 07:15:38 +01:00
|
|
|
exec ./configure --enable-maintainer-mode "$@"
|
2014-06-22 21:32:57 +02:00
|
|
|
fi
|