From d40073f017ffb3dee2266f356c127ef587c40b71 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 11 Jan 2017 15:01:28 -0500 Subject: [PATCH] * autogen.sh: Add --no-check option. (Bug#25359) --- autogen.sh | 89 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 47 insertions(+), 42 deletions(-) diff --git a/autogen.sh b/autogen.sh index 2021c771fc8..8679db78fd5 100755 --- a/autogen.sh +++ b/autogen.sh @@ -103,6 +103,7 @@ check_version () return 2 } +do_check=true do_autoconf=false test $# -eq 0 && do_autoconf=true do_git=false @@ -111,6 +112,9 @@ for arg; do case $arg in --help) exec echo "$0: usage: $0 [all|autoconf|git]";; + --no-check) + do_check=false + test $# -eq 1 && do_autoconf=true;; all) do_autoconf=true test -e .git && do_git=true;; @@ -128,66 +132,68 @@ done if $do_autoconf; then - echo 'Checking whether you have the necessary tools... + if $do_check; then + + echo 'Checking whether you have the necessary tools... (Read INSTALL.REPO for more details on building Emacs)' - missing= + missing= - for prog in $progs; do + for prog in $progs; do - sprog=`echo "$prog" | sed 's/-/_/g'` + sprog=`echo "$prog" | sed 's/-/_/g'` - eval min=\$${sprog}_min + eval min=\$${sprog}_min - echo "Checking for $prog (need at least version $min)..." + echo "Checking for $prog (need at least version $min)..." - check_version $prog $min + check_version $prog $min - retval=$? + retval=$? - case $retval in - 0) stat="ok" ;; - 1) stat="missing" ;; - 2) stat="too old" ;; - *) stat="unable to check" ;; - esac + case $retval in + 0) stat="ok" ;; + 1) stat="missing" ;; + 2) stat="too old" ;; + *) stat="unable to check" ;; + esac - echo $stat + echo $stat - if [ $retval -ne 0 ]; then - missing="$missing $prog" - eval ${sprog}_why=\""$stat"\" - fi + if [ $retval -ne 0 ]; then + missing="$missing $prog" + eval ${sprog}_why=\""$stat"\" + fi - done + done - if [ x"$missing" != x ]; then + if [ x"$missing" != x ]; then - echo ' + echo ' Building Emacs from the repository requires the following specialized programs:' - for prog in $progs; do - sprog=`echo "$prog" | sed 's/-/_/g'` + for prog in $progs; do + sprog=`echo "$prog" | sed 's/-/_/g'` - eval min=\$${sprog}_min + eval min=\$${sprog}_min - echo "$prog (minimum version $min)" - done + echo "$prog (minimum version $min)" + done - echo ' + echo ' Your system seems to be missing the following tool(s):' - for prog in $missing; do - sprog=`echo "$prog" | sed 's/-/_/g'` + for prog in $missing; do + sprog=`echo "$prog" | sed 's/-/_/g'` - eval why=\$${sprog}_why + eval why=\$${sprog}_why - echo "$prog ($why)" - done + echo "$prog ($why)" + done - echo ' + echo ' If you think you have the required tools, please add them to your PATH and re-run this script. @@ -208,18 +214,17 @@ make install. Add the installation directory to your PATH and re-run this script. If you know that the required versions are in your PATH, but this -script has made an error, then you can simply run - -autoreconf -fi -I m4 - -instead of this script. +script has made an error, then you can simply re-run this script with +the --no-check option. Please report any problems with this script to bug-gnu-emacs@gnu.org .' - exit 1 - fi + exit 1 + fi + + echo 'Your system has the required tools.' - echo 'Your system has the required tools.' + fi # do_check ## Create nt/gnulib.mk if it doesn't exist, as autoreconf will need it. if test ! -f nt/gnulib.mk; then -- 2.39.5