3
# Author: Francesco Montorsi
4
# RCS-ID: $Id: acregen.sh 3904 2007-04-28 19:48:09Z byo $
5
# Creation date: 14/9/2005
7
# A simple script to generate the configure script for a wxCode component
8
# Some features of this version:
9
# - automatic test for aclocal version
10
# - able to be called from any folder
11
# (i.e. you can call it typing 'build/acregen.sh', not only './acregen.sh')
14
# called when an old version of aclocal is found
17
echo "Your aclocal version is $aclocal_maj.$aclocal_min.$aclocal_rel"
18
echo "Your automake installation is too old; please install automake >= $aclocal_minimal_maj.$aclocal_minimal_min.$aclocal_minimal_rel"
19
echo "You can download automake from ftp://sources.redhat.com/pub/automake/"
23
# first check if we have an ACLOCAL version recent enough
24
aclocal_verfull=$(aclocal --version)
25
aclocal_maj=`echo $aclocal_verfull | sed 's/aclocal (GNU automake) \([0-9]*\).\([0-9]*\).\([0-9]*\).*/\1/'`
26
aclocal_min=`echo $aclocal_verfull | sed 's/aclocal (GNU automake) \([0-9]*\).\([0-9]*\).\([0-9]*\).*/\2/'`
27
aclocal_rel=`echo $aclocal_verfull | sed 's/aclocal (GNU automake) \([0-9]*\).\([0-9]*\).\([0-9]*\).*/\3/'`
33
majok=$(expr $aclocal_maj \>= $aclocal_minimal_maj)
34
minok=$(expr $aclocal_min \>= $aclocal_minimal_min)
35
relok=$(expr $aclocal_rel \>= $aclocal_minimal_rel)
37
if [[ "$majok" = "0" ]]; then aclocalold; fi
38
if [[ "$majok" = "1" && "$minok" = "0" ]]; then aclocalold; fi
39
if [[ "$majok" = "1" && "$minok" = "1" && "$relok" = 0 ]]; then aclocalold; fi
41
# we can safely proceed
43
path=${0%%/$me} # path from which the script has been launched
46
aclocal -I /usr/local/share/aclocal && autoconf && mv configure ..