<p>Jean Aunis - Prescom has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/10914">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">build : Fix cross-compilation errors<br><br>Bundled pjproject and jansson must be configured with the host and build<br>parameters provided to the configure script.<br>Autotools do not permit to check for the existence of local header files, so<br>the control of hrirs.h must not be done when cross-compiling.<br><br>ASTERISK-28250<br><br>Change-Id: If0a76e52a87d4ab82b7d4c72d27d8759ca931880<br>---<br>M configure<br>M configure.ac<br>M third-party/jansson/configure.m4<br>M third-party/pjproject/configure.m4<br>4 files changed, 16 insertions(+), 10 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/14/10914/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/configure b/configure</span><br><span>index e739e40..d0d60f8 100755</span><br><span>--- a/configure</span><br><span>+++ b/configure</span><br><span>@@ -9278,10 +9278,10 @@</span><br><span> </span><br><span>    this_host=$(./config.sub $(./config.guess))</span><br><span>  if test "$build" != "$this_host" ; then</span><br><span style="color: hsl(0, 100%, 40%);">-             JANSSON_CONFIGURE_OPTS+=" --build=$build"</span><br><span style="color: hsl(120, 100%, 40%);">+           JANSSON_CONFIGURE_OPTS+=" --build=$build_alias"</span><br><span>    fi</span><br><span>   if test "$host" != "$this_host" ; then</span><br><span style="color: hsl(0, 100%, 40%);">-              JANSSON_CONFIGURE_OPTS+=" --host=$host"</span><br><span style="color: hsl(120, 100%, 40%);">+             JANSSON_CONFIGURE_OPTS+=" --host=$host_alias"</span><br><span>      fi</span><br><span> </span><br><span>       export TAR PATCH SED NM EXTERNALS_CACHE_DIR AST_DOWNLOAD_CACHE DOWNLOAD_TO_STDOUT DOWNLOAD_TIMEOUT DOWNLOAD MD5 CAT CUT GREP</span><br><span>@@ -9399,10 +9399,10 @@</span><br><span> </span><br><span>   this_host=$(./config.sub $(./config.guess))</span><br><span>  if test "$build" != "$this_host" ; then</span><br><span style="color: hsl(0, 100%, 40%);">-             PJPROJECT_CONFIGURE_OPTS+=" --build=$build"</span><br><span style="color: hsl(120, 100%, 40%);">+         PJPROJECT_CONFIGURE_OPTS+=" --build=$build_alias"</span><br><span>  fi</span><br><span>   if test "$host" != "$this_host" ; then</span><br><span style="color: hsl(0, 100%, 40%);">-              PJPROJECT_CONFIGURE_OPTS+=" --host=$host"</span><br><span style="color: hsl(120, 100%, 40%);">+           PJPROJECT_CONFIGURE_OPTS+=" --host=$host_alias"</span><br><span>    fi</span><br><span>   # This was a copy of the autoconf generated code from the root ./configure.</span><br><span>  # Hopefully, when you read this, the code is still the same.</span><br><span>@@ -34695,7 +34695,9 @@</span><br><span> fi</span><br><span> </span><br><span> # conf_bridge (binaural rendering): check if HRIRs are available</span><br><span style="color: hsl(0, 100%, 40%);">-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bridges/bridge_softmix/include/hrirs.h" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+# this check does not work when cross-compiling</span><br><span style="color: hsl(120, 100%, 40%);">+if test "${cross_compiling}" = "no"; then</span><br><span style="color: hsl(120, 100%, 40%);">+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bridges/bridge_softmix/include/hrirs.h" >&5</span><br><span> $as_echo_n "checking for bridges/bridge_softmix/include/hrirs.h... " >&6; }</span><br><span> if ${ac_cv_file_bridges_bridge_softmix_include_hrirs_h+:} false; then :</span><br><span>   $as_echo_n "(cached) " >&6</span><br><span>@@ -34718,6 +34720,7 @@</span><br><span> </span><br><span> fi</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span> </span><br><span> ac_config_files="$ac_config_files build_tools/menuselect-deps makeopts"</span><br><span> </span><br><span>diff --git a/configure.ac b/configure.ac</span><br><span>index 5383747..1ec7765 100644</span><br><span>--- a/configure.ac</span><br><span>+++ b/configure.ac</span><br><span>@@ -2815,7 +2815,10 @@</span><br><span> fi</span><br><span> </span><br><span> # conf_bridge (binaural rendering): check if HRIRs are available</span><br><span style="color: hsl(0, 100%, 40%);">-AC_CHECK_FILES([bridges/bridge_softmix/include/hrirs.h])</span><br><span style="color: hsl(120, 100%, 40%);">+# this check does not work when cross-compiling</span><br><span style="color: hsl(120, 100%, 40%);">+if test "${cross_compiling}" = "no"; then</span><br><span style="color: hsl(120, 100%, 40%);">+    AC_CHECK_FILES([bridges/bridge_softmix/include/hrirs.h])</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span> </span><br><span> AC_CONFIG_FILES([build_tools/menuselect-deps makeopts])</span><br><span> AST_CHECK_MANDATORY</span><br><span>diff --git a/third-party/jansson/configure.m4 b/third-party/jansson/configure.m4</span><br><span>index 9b10cad..4570de1 100644</span><br><span>--- a/third-party/jansson/configure.m4</span><br><span>+++ b/third-party/jansson/configure.m4</span><br><span>@@ -49,10 +49,10 @@</span><br><span>   AC_ARG_VAR([JANSSON_CONFIGURE_OPTS],[Additional configure options to pass to bundled jansson])</span><br><span>       this_host=$(./config.sub $(./config.guess))</span><br><span>  if test "$build" != "$this_host" ; then</span><br><span style="color: hsl(0, 100%, 40%);">-             JANSSON_CONFIGURE_OPTS+=" --build=$build"</span><br><span style="color: hsl(120, 100%, 40%);">+           JANSSON_CONFIGURE_OPTS+=" --build=$build_alias"</span><br><span>    fi</span><br><span>   if test "$host" != "$this_host" ; then</span><br><span style="color: hsl(0, 100%, 40%);">-              JANSSON_CONFIGURE_OPTS+=" --host=$host"</span><br><span style="color: hsl(120, 100%, 40%);">+             JANSSON_CONFIGURE_OPTS+=" --host=$host_alias"</span><br><span>      fi</span><br><span> </span><br><span>       export TAR PATCH SED NM EXTERNALS_CACHE_DIR AST_DOWNLOAD_CACHE DOWNLOAD_TO_STDOUT DOWNLOAD_TIMEOUT DOWNLOAD MD5 CAT CUT GREP</span><br><span>diff --git a/third-party/pjproject/configure.m4 b/third-party/pjproject/configure.m4</span><br><span>index d021152..bdbae31 100644</span><br><span>--- a/third-party/pjproject/configure.m4</span><br><span>+++ b/third-party/pjproject/configure.m4</span><br><span>@@ -49,10 +49,10 @@</span><br><span>      AC_ARG_VAR([PJPROJECT_CONFIGURE_OPTS],[Additional configure options to pass to bundled pjproject])</span><br><span>   this_host=$(./config.sub $(./config.guess))</span><br><span>  if test "$build" != "$this_host" ; then</span><br><span style="color: hsl(0, 100%, 40%);">-             PJPROJECT_CONFIGURE_OPTS+=" --build=$build"</span><br><span style="color: hsl(120, 100%, 40%);">+         PJPROJECT_CONFIGURE_OPTS+=" --build=$build_alias"</span><br><span>  fi</span><br><span>   if test "$host" != "$this_host" ; then</span><br><span style="color: hsl(0, 100%, 40%);">-              PJPROJECT_CONFIGURE_OPTS+=" --host=$host"</span><br><span style="color: hsl(120, 100%, 40%);">+           PJPROJECT_CONFIGURE_OPTS+=" --host=$host_alias"</span><br><span>    fi</span><br><span>   # This was a copy of the autoconf generated code from the root ./configure.</span><br><span>  # Hopefully, when you read this, the code is still the same.</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/10914">change 10914</a>. To unsubscribe, or for help writing mail filters, 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/10914"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: If0a76e52a87d4ab82b7d4c72d27d8759ca931880 </div>
<div style="display:none"> Gerrit-Change-Number: 10914 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Jean Aunis - Prescom <jean.aunis@prescom.fr> </div>