emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r117043: autogen.sh: minor tweaks


From: Glenn Morris
Subject: [Emacs-diffs] trunk r117043: autogen.sh: minor tweaks
Date: Fri, 02 May 2014 17:40:12 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117043
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Fri 2014-05-02 13:40:09 -0400
message:
  autogen.sh: minor tweaks
  
  * autogen.sh (get_version): Handle no leading whitespace.
  (check_version, main): Handle program names with hyphens.
modified:
  ChangeLog                      changelog-20091113204419-o5vbwnq5f7feedwu-1538
  autogen.sh                     autogen.sh-20091113204419-o5vbwnq5f7feedwu-2495
=== modified file 'ChangeLog'
--- a/ChangeLog 2014-04-30 19:54:52 +0000
+++ b/ChangeLog 2014-05-02 17:40:09 +0000
@@ -1,3 +1,8 @@
+2014-05-02  Glenn Morris  <address@hidden>
+
+       * autogen.sh (get_version): Handle no leading whitespace.
+       (check_version, main): Handle program names with hyphens.
+
 2014-04-30  Glenn Morris  <address@hidden>
 
        * configure.ac: Treat MirBSD as OpenBSD.  (Bug#17339)

=== modified file 'autogen.sh'
--- a/autogen.sh        2014-04-14 05:35:45 +0000
+++ b/autogen.sh        2014-05-02 17:40:09 +0000
@@ -50,7 +50,7 @@
 get_version ()
 {
     ## Remove eg "./autogen.sh: line 50: autoconf: command not found".
-    $1 --version 2>&1 | sed -e '/not found/d' -n -e '1 s/.* 
\([1-9][0-9\.]*\).*/\1/p'
+    $1 --version 2>&1 | sed -e '/not found/d' -e 's/.* //' -n -e '1 
s/\([0-9][0-9\.]*\).*/\1/p'
 }
 
 ## $1 = version string, eg "2.59"
@@ -76,7 +76,7 @@
 check_version ()
 {
     ## Respect eg $AUTOMAKE if it is set, like autoreconf does.
-    uprog=`echo $1 | sed 
'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+    uprog=`echo $1 | sed -e 's/-/_/g' -e 
'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
 
     eval uprog=\$${uprog}
 
@@ -114,7 +114,9 @@
 
 for prog in $progs; do
 
-    eval min=\$${prog}_min
+    sprog=`echo "$prog" | sed 's/-/_/g'`
+
+    eval min=\$${sprog}_min
 
     echo "Checking for $prog (need at least version $min)..."
 
@@ -133,7 +135,7 @@
 
     if [ $retval -ne 0 ]; then
         missing="$missing $prog"
-        eval ${prog}_why=\""$stat"\"
+        eval ${sprog}_why=\""$stat"\"
     fi
 
 done
@@ -147,7 +149,9 @@
 EOF
 
     for prog in $progs; do
-        eval min=\$${prog}_min
+        sprog=`echo "$prog" | sed 's/-/_/g'`
+
+        eval min=\$${sprog}_min
 
         echo "$prog (minimum version $min)"
     done
@@ -159,7 +163,9 @@
 EOF
 
     for prog in $missing; do
-        eval why=\$${prog}_why
+        sprog=`echo "$prog" | sed 's/-/_/g'`
+
+        eval why=\$${sprog}_why
 
         echo "$prog ($why)"
     done


reply via email to

[Prev in Thread] Current Thread [Next in Thread]