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

14
configure vendored
View File

@@ -7816,6 +7816,9 @@ fi
DOWNLOAD=":"
DOWNLOAD_TO_STDOUT=
DOWNLOAD_TIMEOUT=
if test "${WGET}" != ":" ; then if test "${WGET}" != ":" ; then
DOWNLOAD=${WGET} DOWNLOAD=${WGET}
DOWNLOAD_TO_STDOUT="${WGET} -q -O-" DOWNLOAD_TO_STDOUT="${WGET} -q -O-"
@@ -7866,16 +7869,17 @@ $as_echo "no" >&6; }
fi fi
DOWNLOAD=${FETCH} if test "${FETCH}" != ":" ; then
DOWNLOAD_TO_STDOUT="${FETCH} -o-" DOWNLOAD=${FETCH}
DOWNLOAD_TIMEOUT='--timeout=$(or $2,$1)' DOWNLOAD_TO_STDOUT="${FETCH} -o-"
DOWNLOAD_TIMEOUT='--timeout=$(or $2,$1)'
fi
fi fi
fi fi
# Extract the first word of "ldconfig", so it can be a program name with args. # Extract the first word of "ldconfig", so it can be a program name with args.
set dummy ldconfig; ac_word=$2 set dummy ldconfig; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -9204,7 +9208,7 @@ $as_echo_n "checking for embedded pjproject (may have to download)... " >&6; }
$as_echo "configuring" >&6; } $as_echo "configuring" >&6; }
if test "x${DOWNLOAD_TO_STDOUT}" = "x" ; then if test "x${DOWNLOAD_TO_STDOUT}" = "x" ; then
as_fn_error $? "A download utility (wget, curl or fetch) is required to download bundled pjproject" "$LINENO" 5 as_fn_error $? "A download utility (wget, curl, or fetch) is required to download bundled pjproject" "$LINENO" 5
fi fi
if test "${BZIP2}" = ":" ; then if test "${BZIP2}" = ":" ; then
as_fn_error $? "bzip2 is required to extract the pjproject tar file" "$LINENO" 5 as_fn_error $? "bzip2 is required to extract the pjproject tar file" "$LINENO" 5

View File

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

View File

@@ -127,9 +127,9 @@ have_download:
@if test "$(DOWNLOAD)" = ":" ; then \ @if test "$(DOWNLOAD)" = ":" ; then \
echo "**************************************************"; \ echo "**************************************************"; \
echo "*** ***"; \ echo "*** ***"; \
echo "*** You must have either wget or fetch to be ***"; \ echo "*** You must have either wget, curl, or fetch ***"; \
echo "*** able to automatically download and install ***"; \ echo "*** to be able to automatically download and ***"; \
echo "*** the requested sound packages. ***"; \ echo "*** install the requested sound packages. ***"; \
echo "*** ***"; \ echo "*** ***"; \
echo "*** Please install one of these, or remove any ***"; \ echo "*** Please install one of these, or remove any ***"; \
echo "*** extra sound package selections in ***"; \ echo "*** extra sound package selections in ***"; \

View File

@@ -16,7 +16,7 @@ AC_DEFUN([_PJPROJECT_CONFIGURE],
AC_MSG_RESULT(configuring) AC_MSG_RESULT(configuring)
if test "x${DOWNLOAD_TO_STDOUT}" = "x" ; then if test "x${DOWNLOAD_TO_STDOUT}" = "x" ; then
AC_MSG_ERROR(A download utility (wget, curl or fetch) is required to download bundled pjproject) AC_MSG_ERROR(A download utility (wget, curl, or fetch) is required to download bundled pjproject)
fi fi
if test "${BZIP2}" = ":" ; then if test "${BZIP2}" = ":" ; then
AC_MSG_ERROR(bzip2 is required to extract the pjproject tar file) AC_MSG_ERROR(bzip2 is required to extract the pjproject tar file)