]> git.eshelyaron.com Git - emacs.git/commitdiff
Make autogen.sh report relevant environment variables
authorGlenn Morris <rgm@gnu.org>
Thu, 8 Jun 2017 16:48:59 +0000 (12:48 -0400)
committerGlenn Morris <rgm@gnu.org>
Thu, 8 Jun 2017 16:48:59 +0000 (12:48 -0400)
* autogen.sh (check_version):
Indicate if using an environment variable.

autogen.sh

index 2297bdc8c49f06189952ed876e54de34311047c6..0153f896a172011427d94064c3b3ca9743c30925 100755 (executable)
@@ -72,11 +72,15 @@ minor_version ()
 check_version ()
 {
     ## Respect, e.g., $AUTOCONF if it is set, like autoreconf does.
-    uprog=`echo $1 | sed -e 's/-/_/g' -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+    uprog0=`echo $1 | sed -e 's/-/_/g' -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
 
-    eval uprog=\$${uprog}
+    eval uprog=\$${uprog0}
 
-    [ x"$uprog" = x ] && uprog=$1
+    if [ x"$uprog" = x ]; then
+        uprog=$1
+    else
+        printf '%s' "(using $uprog0=$uprog) "
+    fi
 
     have_version=`get_version $uprog`