From 7f5f3bdd3a308a13083836e90d6f5a499dc6f1c5 Mon Sep 17 00:00:00 2001
From: Marcus Comstedt <marcus@mc.pp.se>
Date: Sat, 20 May 2006 16:05:35 +0200
Subject: [PATCH] Ignore letters when comparing autoconf version numbers.

Rev: src/aclocal.m4:1.118
Rev: src/run_autoconfig:1.44
---
 src/aclocal.m4     | 10 +++++-----
 src/run_autoconfig | 16 ++++++++--------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/aclocal.m4 b/src/aclocal.m4
index a0635e5419..bc0bb5a156 100644
--- a/src/aclocal.m4
+++ b/src/aclocal.m4
@@ -1,4 +1,4 @@
-dnl $Id: aclocal.m4,v 1.117 2006/03/18 17:05:19 grubba Exp $
+dnl $Id: aclocal.m4,v 1.118 2006/05/20 14:05:35 marcus Exp $
 
 dnl Some compatibility with Autoconf 2.50+. Not complete.
 dnl newer Autoconf calls substr m4_substr
@@ -19,10 +19,10 @@ define([require_autoconf_2_50],[AC_PREREQ(2.50)])
 
 define([if_autoconf],
 [ifelse(ifelse(index(AC_ACVERSION,.),-1,0,[m4_eval(
-  substr(AC_ACVERSION, 0, index(AC_ACVERSION,.))-0 >= $1 &&
+  translit(substr(AC_ACVERSION, 0, index(AC_ACVERSION,.)),[A-Za-z])-0 >= $1 &&
   (
-   substr(AC_ACVERSION, 0, index(AC_ACVERSION,.))-0 > $1 ||
-   substr(AC_ACVERSION, index(+AC_ACVERSION,.))-0 >= $2
+   translit(substr(AC_ACVERSION, 0, index(AC_ACVERSION,.)),[A-Za-z])-0 > $1 ||
+   translit(substr(AC_ACVERSION, index(+AC_ACVERSION,.)),[A-Za-z])-0 >= $2
   )
 )]),1,$3,$4)])
 
@@ -378,7 +378,7 @@ define(PIKE_FEATURE_OK,[
 
 define([AC_LOW_MODULE_INIT],
 [
-  # $Id: aclocal.m4,v 1.117 2006/03/18 17:05:19 grubba Exp $
+  # $Id: aclocal.m4,v 1.118 2006/05/20 14:05:35 marcus Exp $
 
   MY_AC_PROG_CC
 
diff --git a/src/run_autoconfig b/src/run_autoconfig
index 7a96fe1c7d..f63a7f5714 100755
--- a/src/run_autoconfig
+++ b/src/run_autoconfig
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $Id: run_autoconfig,v 1.43 2004/05/05 13:16:29 vida Exp $
+# $Id: run_autoconfig,v 1.44 2006/05/20 14:05:35 marcus Exp $
 #
 # Bootstrap script
 
@@ -69,22 +69,22 @@ autom4te_polluted="no"
 
 autoconf_version="`\"$autoconf\" --version $ac_args|head -n 1|awk '{ print $NF }'`"
 
-if [ "`echo \"$autoconf_version\"|awk -F. '{ print $1 }'`" -ne "2" -o \
-     "`echo \"$autoconf_version\"|awk -F. '{ print $2 }'`" -le "10" -o \
-     "`echo \"$autoconf_version\"|awk -F. '{ print $2 }'`" -ge "50" ]; then
-  if [ "`echo \"$autoconf_version\"|awk -F. '{ print $2 }'`" -le "51" ]; then
+if [ "`echo \"$autoconf_version\"|awk -F. '{ print $1 }'|sed -e 's/[A-Za-z]//g'`" -ne "2" -o \
+     "`echo \"$autoconf_version\"|awk -F. '{ print $2 }'|sed -e 's/[A-Za-z]//g'`" -le "10" -o \
+     "`echo \"$autoconf_version\"|awk -F. '{ print $2 }'|sed -e 's/[A-Za-z]//g'`" -ge "50" ]; then
+  if [ "`echo \"$autoconf_version\"|awk -F. '{ print $2 }'|sed -e 's/[A-Za-z]//g'`" -le "51" ]; then
     # Autoconf 2.50 and 2.51 are seriously broken.
     echo "Autoconf version $autoconf_version is not supported." >&2
     echo >&2
     echo "Get and install autoconf 2.52 or later." >&2
     # Abort
     exit 1
-  elif [ "`echo \"$autoconf_version\"|awk -F. '{ print $1 }'`" = "2" -a \
-         "`echo \"$autoconf_version\"|awk -F. '{ print $2 }'`" -ge "53" ]; then
+  elif [ "`echo \"$autoconf_version\"|awk -F. '{ print $1 }'|sed -e 's/[A-Za-z]//g'`" = "2" -a \
+         "`echo \"$autoconf_version\"|awk -F. '{ print $2 }'|sed -e 's/[A-Za-z]//g'`" -ge "53" ]; then
     # NB: autoheader 2.53 is stupid, and has broken handling of warnings.
     #     1) The warning flags are not passed along to autoconf.
     #     2) The option --warnings is misspelled by missing the last 's'.
-    if [ "`echo \"$autoconf_version\"|awk -F. '{ print $2 }'`" -le "53" ]; then
+    if [ "`echo \"$autoconf_version\"|awk -F. '{ print $2 }'|sed -e 's/[A-Za-z]//g'`" -le "53" ]; then
       # autoconf 2.53 doesn't have --prepend-include.
       ac_args="-Wno-obsolete --include=$localdir"
       ah_args="--include=$localdir"
-- 
GitLab