BuildSystem: When no download utility is available, display the explanation.

./configure --with-pjproject-bundled
did not display an explanation, when no download utility like wget, curl, or
fetch was installed beforehand, although an explanation existed in code. This
happened because the code expected the variable DOWNLOAD_TO_STDOUT to be empty.
However, the script ./configure set that variable always.

Change-Id: I64c99b76a03525c69471e5055bf124b36a51bbd4
This commit is contained in:
Alexander Traud
2018-03-09 13:26:40 +01:00
parent d5bfba60d2
commit f697025ae5
4 changed files with 22 additions and 14 deletions

View File

@@ -286,6 +286,9 @@ AC_PATH_PROG([PATCH], [patch], :)
AC_PATH_PROG([SED], [sed], :)
AC_PATH_PROG([NM], [nm], :)
DOWNLOAD=":"
DOWNLOAD_TO_STDOUT=
DOWNLOAD_TIMEOUT=
if test "${WGET}" != ":" ; then
DOWNLOAD=${WGET}
DOWNLOAD_TO_STDOUT="${WGET} -q -O-"
@@ -295,13 +298,14 @@ else if test "${CURL}" != ":" ; then
DOWNLOAD_TO_STDOUT="${CURL} -Ls"
DOWNLOAD_TIMEOUT='--max-time $(or $2,$1)'
else
AC_PATH_PROG([FETCH], [fetch], [:])
DOWNLOAD=${FETCH}
DOWNLOAD_TO_STDOUT="${FETCH} -o-"
DOWNLOAD_TIMEOUT='--timeout=$(or $2,$1)'
AC_PATH_PROG([FETCH], [fetch], :)
if test "${FETCH}" != ":" ; then
DOWNLOAD=${FETCH}
DOWNLOAD_TO_STDOUT="${FETCH} -o-"
DOWNLOAD_TIMEOUT='--timeout=$(or $2,$1)'
fi
fi
fi
AC_SUBST(DOWNLOAD)
AC_SUBST(DOWNLOAD_TO_STDOUT)
AC_SUBST(DOWNLOAD_TIMEOUT)