<p>Alexander Traud has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/8497">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">BuildSystem: Add the tool ftp to alternatively download external parts.<br><br>The build system supports the tools wget, curl (mainly for macOS), and fetch<br>(mainly for FreeBSD) to download external parts, for example the PJProject. On<br>NetBSD and OpenBSD, the default tool for HTTP(s) downloads is called ftp.<br><br>Beside adding ftp, this change fixes the test for the variable<br>DOWNLOAD_TO_STDOUT in the file third-party/pjproject/configure.m4, because that<br>test expects an empty variable. However, that variable was never empty.<br><br>ASTERISK-27732<br><br>Change-Id: Ibf9120a918bec75d5a571c0f0c9b7f2eec636f87<br>---<br>M configure<br>M configure.ac<br>2 files changed, 71 insertions(+), 8 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/97/8497/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/configure b/configure<br>index 2456b0c..1576d6c 100755<br>--- a/configure<br>+++ b/configure<br>@@ -1230,6 +1230,7 @@<br> DOWNLOAD_TIMEOUT<br> DOWNLOAD_TO_STDOUT<br> DOWNLOAD<br>+FTP<br> FETCH<br> NM<br> PATCH<br>@@ -7799,6 +7800,9 @@<br> <br> <br> <br>+DOWNLOAD=<br>+DOWNLOAD_TO_STDOUT=<br>+DOWNLOAD_TIMEOUT=<br> if test "${WGET}" != ":" ; then<br>   DOWNLOAD=${WGET}<br>   DOWNLOAD_TO_STDOUT="${WGET} -q -O-"<br>@@ -7849,13 +7853,61 @@<br> fi<br> <br> <br>-  DOWNLOAD=${FETCH}<br>-  DOWNLOAD_TO_STDOUT="${FETCH} -o-"<br>-  DOWNLOAD_TIMEOUT='--timeout=$(or $2,$1)'<br>+  if test "${FETCH}" != ":" ; then<br>+    DOWNLOAD=${FETCH}<br>+    DOWNLOAD_TO_STDOUT="${FETCH} -o-"<br>+    DOWNLOAD_TIMEOUT='--timeout=$(or $2,$1)'<br>+  else<br>+    # Extract the first word of "ftp", so it can be a program name with args.<br>+set dummy ftp; ac_word=$2<br>+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5<br>+$as_echo_n "checking for $ac_word... " >&6; }<br>+if ${ac_cv_path_FTP+:} false; then :<br>+  $as_echo_n "(cached) " >&6<br>+else<br>+  case $FTP in<br>+  [\\/]* | ?:[\\/]*)<br>+  ac_cv_path_FTP="$FTP" # Let the user override the test with a path.<br>+  ;;<br>+  *)<br>+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR<br>+for as_dir in $PATH<br>+do<br>+  IFS=$as_save_IFS<br>+  test -z "$as_dir" && as_dir=.<br>+    for ac_exec_ext in '' $ac_executable_extensions; do<br>+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then<br>+    ac_cv_path_FTP="$as_dir/$ac_word$ac_exec_ext"<br>+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5<br>+    break 2<br>+  fi<br>+done<br>+  done<br>+IFS=$as_save_IFS<br>+<br>+  test -z "$ac_cv_path_FTP" && ac_cv_path_FTP=":"<br>+  ;;<br>+esac<br> fi<br>+FTP=$ac_cv_path_FTP<br>+if test -n "$FTP"; then<br>+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FTP" >&5<br>+$as_echo "$FTP" >&6; }<br>+else<br>+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5<br>+$as_echo "no" >&6; }<br> fi<br> <br> <br>+    if test "${FTP}" != ":" ; then<br>+      DOWNLOAD=${FTP}<br>+      DOWNLOAD_TO_STDOUT="${FTP} -o-"<br>+      DOWNLOAD_TIMEOUT='-q $(or $2,$1)'<br>+    fi<br>+  fi<br>+fi<br>+fi<br>+<br> <br> <br> <br>diff --git a/configure.ac b/configure.ac<br>index 571987c..9c6c25a 100644<br>--- a/configure.ac<br>+++ b/configure.ac<br>@@ -281,6 +281,9 @@<br> AC_PATH_PROG([SED], [sed], :)<br> AC_PATH_PROG([NM], [nm], :)<br> <br>+DOWNLOAD=<br>+DOWNLOAD_TO_STDOUT=<br>+DOWNLOAD_TIMEOUT=<br> if test "${WGET}" != ":" ; then<br>   DOWNLOAD=${WGET}<br>   DOWNLOAD_TO_STDOUT="${WGET} -q -O-"<br>@@ -290,13 +293,21 @@<br>   DOWNLOAD_TO_STDOUT="${CURL} -Ls"<br>   DOWNLOAD_TIMEOUT='--max-time $(or $2,$1)'<br> else<br>-  AC_PATH_PROG([FETCH], [fetch], [:])<br>-  DOWNLOAD=${FETCH}<br>-  DOWNLOAD_TO_STDOUT="${FETCH} -o-"<br>-  DOWNLOAD_TIMEOUT='--timeout=$(or $2,$1)'<br>+  AC_PATH_PROG([FETCH], [fetch], :)<br>+  if test "${FETCH}" != ":" ; then<br>+    DOWNLOAD=${FETCH}<br>+    DOWNLOAD_TO_STDOUT="${FETCH} -o-"<br>+    DOWNLOAD_TIMEOUT='--timeout=$(or $2,$1)'<br>+  else<br>+    AC_PATH_PROG([FTP], [ftp], :)<br>+    if test "${FTP}" != ":" ; then<br>+      DOWNLOAD=${FTP}<br>+      DOWNLOAD_TO_STDOUT="${FTP} -o-"<br>+      DOWNLOAD_TIMEOUT='-q $(or $2,$1)'<br>+    fi<br>+  fi<br> fi<br> fi<br>-<br> AC_SUBST(DOWNLOAD)<br> AC_SUBST(DOWNLOAD_TO_STDOUT)<br> AC_SUBST(DOWNLOAD_TIMEOUT)<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/8497">change 8497</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/8497"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ibf9120a918bec75d5a571c0f0c9b7f2eec636f87 </div>
<div style="display:none"> Gerrit-Change-Number: 8497 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexander Traud <pabstraud@compuserve.com> </div>