+ refactoring fixes for expr package based on code review (see bug #4)
[cvc5.git] / autogen.sh
1 #!/bin/sh
2
3 # Expected versions of tools.
4 #
5 # If the installed autotools aren't these versions, issue a warning
6 # about checking results into subversion.
7 libtoolize_version='libtoolize (GNU libtool) 2.2.6'
8 aclocal_version='aclocal (GNU automake) 1.11'
9 autoheader_version='autoheader (GNU Autoconf) 2.64'
10 autoconf_version='autoconf (GNU Autoconf) 2.64'
11 automake_version='automake (GNU automake) 1.11'
12
13 # first, check versions of tools
14
15 warning=
16 for tool in libtoolize autoheader aclocal autoconf automake; do
17 version=`eval echo '${'$tool'_version}'`
18 if $tool --version | grep -Fq "$version"; then :; else
19 echo "WARNING: [$tool] Expected $version."
20 warning=yes
21 fi
22 done
23
24 if test -n "$warning"; then
25 echo "WARNING:"
26 echo "WARNING: Due to the above unexpected versions of autotools, please do not commit"
27 echo "WARNING: the files these tools generate to CVC4 svn."
28 echo
29 fi
30
31 # now do a standard autogen
32
33 set -ex
34
35 cd "$(dirname "$0")"
36 libtoolize -c -f || glibtoolize -c -f
37 aclocal -I config --force --install -Wall || aclocal -I config --force
38 autoheader -I config -f -Wall
39 touch NEWS README AUTHORS ChangeLog
40 touch stamp-h
41 autoconf -I config --force -Wall
42 automake -acf --foreign -Woverride -Wall