]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
BuildSystem: When no download utility is available, display the explanation.
authorAlexander Traud <pabstraud@compuserve.com>
Fri, 9 Mar 2018 12:26:40 +0000 (13:26 +0100)
committerAlexander Traud <pabstraud@compuserve.com>
Sat, 17 Mar 2018 13:16:41 +0000 (07:16 -0600)
./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

configure
configure.ac
sounds/Makefile
third-party/pjproject/configure.m4

index 62439c70a07a742e84f1795c0ebe46f3350f5217..9202d7bb91b0d8cbf56d6911706d5ce94615e7ae 100755 (executable)
--- a/configure
+++ b/configure
@@ -7812,6 +7812,9 @@ fi
 
 
 
+DOWNLOAD=":"
+DOWNLOAD_TO_STDOUT=
+DOWNLOAD_TIMEOUT=
 if test "${WGET}" != ":" ; then
   DOWNLOAD=${WGET}
   DOWNLOAD_TO_STDOUT="${WGET} -q -O-"
@@ -7862,16 +7865,17 @@ $as_echo "no" >&6; }
 fi
 
 
-  DOWNLOAD=${FETCH}
-  DOWNLOAD_TO_STDOUT="${FETCH} -o-"
-  DOWNLOAD_TIMEOUT='--timeout=$(or $2,$1)'
+  if test "${FETCH}" != ":" ; then
+    DOWNLOAD=${FETCH}
+    DOWNLOAD_TO_STDOUT="${FETCH} -o-"
+    DOWNLOAD_TIMEOUT='--timeout=$(or $2,$1)'
+  fi
 fi
 fi
 
 
 
 
-
 # Extract the first word of "ldconfig", so it can be a program name with args.
 set dummy ldconfig; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -9200,7 +9204,7 @@ $as_echo_n "checking for embedded pjproject (may have to download)... " >&6; }
 $as_echo "configuring" >&6; }
 
        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
        if test "${BZIP2}" = ":" ; then
                as_fn_error $? "bzip2 is required to extract the pjproject tar file" "$LINENO" 5
index 6ec90f698c75f39a982a8c92058dfa19ef0ffaf4..eae5a3c086b38abb9695f9ec6def43d105539547 100644 (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)
index 779d52a8e370de6b5d539992899b1bb2159d0445..606bbdcec2f3c7bce66257c7f6356a5fce11a8a7 100644 (file)
@@ -127,9 +127,9 @@ have_download:
        @if test "$(DOWNLOAD)" = ":" ; then \
                echo "**************************************************"; \
                echo "***                                            ***"; \
-               echo "*** You must have either wget or fetch to be   ***"; \
-               echo "*** able to automatically download and install ***"; \
-               echo "*** the requested sound packages.              ***"; \
+               echo "*** You must have either wget, curl, or fetch  ***"; \
+               echo "*** to be able to automatically download and   ***"; \
+               echo "*** install the requested sound packages.      ***"; \
                echo "***                                            ***"; \
                echo "*** Please install one of these, or remove any ***"; \
                echo "*** extra sound package selections in          ***"; \
index c1edaf9aaa2c0903469c1404b7614cc76c0f146b..42482b2e5e6ba758a382f3c8375098df500ddcc4 100644 (file)
@@ -16,7 +16,7 @@ AC_DEFUN([_PJPROJECT_CONFIGURE],
        AC_MSG_RESULT(configuring)
 
        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
        if test "${BZIP2}" = ":" ; then
                AC_MSG_ERROR(bzip2 is required to extract the pjproject tar file)