summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2009-10-11 01:57:57 +0200
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2009-10-11 01:57:57 +0200
commit9e41eb5e6272b6c08f79ee0cb73fd363dd1d30fd (patch)
tree2434ac542e5a583bd4476d5cd3d9ace420cf0310
parentee895815c8f924a9d54420cca07d2e8dc3ddf9e0 (diff)
downloadlibrcc-9e41eb5e6272b6c08f79ee0cb73fd363dd1d30fd.tar.gz
librcc-9e41eb5e6272b6c08f79ee0cb73fd363dd1d30fd.tar.bz2
librcc-9e41eb5e6272b6c08f79ee0cb73fd363dd1d30fd.tar.xz
librcc-9e41eb5e6272b6c08f79ee0cb73fd363dd1d30fd.zip
Automake version detection in autogen.sh
-rw-r--r--VERSION2
-rwxr-xr-xautogen.sh18
2 files changed, 19 insertions, 1 deletions
diff --git a/VERSION b/VERSION
index 56f54a8..1866a36 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.2.9CVS
+0.2.9
diff --git a/autogen.sh b/autogen.sh
index e04ab90..98a4d5c 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -81,6 +81,23 @@ die() {
exit 1
}
+compare_versions() {
+ ch_min_version=$1
+ ch_actual_version=$2
+ ch_status=0
+ IFS="${IFS= }"; ch_save_IFS="$IFS"; IFS="."
+ set $ch_actual_version
+ for ch_min in $ch_min_version; do
+ ch_cur=`echo $1 | sed 's/[^0-9].*$//'`; shift # remove letter suffixes
+ if [ -z "$ch_min" ]; then break; fi
+ if [ -z "$ch_cur" ]; then ch_status=1; break; fi
+ if [ $ch_cur -gt $ch_min ]; then break; fi
+ if [ $ch_cur -lt $ch_min ]; then ch_status=1; break; fi
+ done
+ IFS="$ch_save_IFS"
+ return $ch_status
+}
+
REQUIRED_M4MACROS=${REQUIRED_M4MACROS:-}
FORBIDDEN_M4MACROS=${FORBIDDEN_M4MACROS:-}
require_m4macro() {
@@ -110,6 +127,7 @@ check_m4macros() {
# aclocal also searches a version specific dir, eg. /usr/share/aclocal-1.9
# but it contains only Automake's own macros, so we can ignore it.
+ AUTOMAKE_VERSION=`$AUTOMAKE --version | sed -e '2,$ d' -e 's/ *([^()]*)$//' -e 's/.* \(.*\)/\1/' -e 's/-p[0-9]\+//'`
# Read the dirlist file, supported by Automake >= 1.7.
if compare_versions 1.7 $AUTOMAKE_VERSION && [ -s $cm_macrodirs/dirlist ]; then
cm_dirlist=`sed 's/[ ]*#.*//;/^$/d' $cm_macrodirs/dirlist`