-
Notifications
You must be signed in to change notification settings - Fork 2
/
autogen.sh
executable file
·59 lines (51 loc) · 1.38 KB
/
autogen.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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.
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
${LIBTOOL} \
&& aclocal -I m4 \
&& autoconf \
&& autoheader \
&& automake --add-missing --foreign --copy
if test -z "$NOCONFIGURE"; then
exec ./configure --enable-maintainer-mode "$@"
fi