Teach configure to search for multiple commands-with-similar-names. Add NaturalDocs (vs. naturaldocs).

This commit is contained in:
Graydon Hoare 2012-01-19 13:08:01 -08:00
parent 0c237254b3
commit 0d7df062f4
1 changed files with 17 additions and 16 deletions

33
configure vendored
View File

@ -61,25 +61,30 @@ putvar() {
probe() { probe() {
local V=$1 local V=$1
local P=$2 shift
local P
local T local T
T=$(which $P 2>&1) for P
if [ $? -ne 0 ] do
then T=$(which $P 2>&1)
T="" if [ $? -eq 0 ]
fi then
break
else
T=""
fi
done
eval $V=\$T eval $V=\$T
putvar $V putvar $V
} }
probe_need() { probe_need() {
local V=$1 local V=$1
local P=$2 probe $*
probe $V $P
eval VV=\$$V eval VV=\$$V
if [ -z "$VV" ] if [ -z "$VV" ]
then then
err "required program '$P' not found" err "needed, but unable to find any of: $*"
fi fi
} }
@ -275,7 +280,7 @@ fi
step_msg "looking for build programs" step_msg "looking for build programs"
probe_need CFG_PERL perl probe_need CFG_PERL perl
probe_need CFG_PYTHON python probe_need CFG_PYTHON python python2.6 python2 python3
probe_need CFG_CURL curl probe_need CFG_CURL curl
probe CFG_GIT git probe CFG_GIT git
@ -285,18 +290,14 @@ probe CFG_LLVM_CONFIG llvm-config
probe CFG_VALGRIND valgrind probe CFG_VALGRIND valgrind
probe CFG_PERF perf probe CFG_PERF perf
probe CFG_MAKENSIS makensis probe CFG_MAKENSIS makensis
probe CFG_NATURALDOCS naturaldocs probe CFG_NATURALDOCS NaturalDocs naturaldocs
probe CFG_LLNEXTGEN LLnextgen probe CFG_LLNEXTGEN LLnextgen
probe CFG_PANDOC pandoc probe CFG_PANDOC pandoc
probe CFG_PDFLATEX pdflatex probe CFG_PDFLATEX pdflatex
probe CFG_XETEX xetex probe CFG_XETEX xetex
probe CFG_LUATEX luatex probe CFG_LUATEX luatex
probe CFG_NODE node probe CFG_NODE nodejs node
if [ -z "$CFG_NODE" ]
then
probe CFG_NODE nodejs
fi
if [ ! -z "$CFG_PANDOC" ] if [ ! -z "$CFG_PANDOC" ]
then then