build : Fix cross-compilation errors

Bundled pjproject and jansson must be configured with the host and build
parameters provided to the configure script.
Autotools do not permit to check for the existence of local header files, so
the control of hrirs.h must not be done when cross-compiling.

ASTERISK-28250

Change-Id: If0a76e52a87d4ab82b7d4c72d27d8759ca931880
This commit is contained in:
Jean Aunis 2019-01-23 14:59:00 +01:00
parent 884aaa5f72
commit d9fae4a824
4 changed files with 16 additions and 10 deletions

13
configure vendored
View File

@ -9278,10 +9278,10 @@ $as_echo "configuring" >&6; }
this_host=$(./config.sub $(./config.guess)) this_host=$(./config.sub $(./config.guess))
if test "$build" != "$this_host" ; then if test "$build" != "$this_host" ; then
JANSSON_CONFIGURE_OPTS+=" --build=$build" JANSSON_CONFIGURE_OPTS+=" --build=$build_alias"
fi fi
if test "$host" != "$this_host" ; then if test "$host" != "$this_host" ; then
JANSSON_CONFIGURE_OPTS+=" --host=$host" JANSSON_CONFIGURE_OPTS+=" --host=$host_alias"
fi fi
export TAR PATCH SED NM EXTERNALS_CACHE_DIR AST_DOWNLOAD_CACHE DOWNLOAD_TO_STDOUT DOWNLOAD_TIMEOUT DOWNLOAD MD5 CAT CUT GREP export TAR PATCH SED NM EXTERNALS_CACHE_DIR AST_DOWNLOAD_CACHE DOWNLOAD_TO_STDOUT DOWNLOAD_TIMEOUT DOWNLOAD MD5 CAT CUT GREP
@ -9399,10 +9399,10 @@ $as_echo "configuring" >&6; }
this_host=$(./config.sub $(./config.guess)) this_host=$(./config.sub $(./config.guess))
if test "$build" != "$this_host" ; then if test "$build" != "$this_host" ; then
PJPROJECT_CONFIGURE_OPTS+=" --build=$build" PJPROJECT_CONFIGURE_OPTS+=" --build=$build_alias"
fi fi
if test "$host" != "$this_host" ; then if test "$host" != "$this_host" ; then
PJPROJECT_CONFIGURE_OPTS+=" --host=$host" PJPROJECT_CONFIGURE_OPTS+=" --host=$host_alias"
fi fi
# This was a copy of the autoconf generated code from the root ./configure. # This was a copy of the autoconf generated code from the root ./configure.
# Hopefully, when you read this, the code is still the same. # Hopefully, when you read this, the code is still the same.
@ -34695,7 +34695,9 @@ else
fi fi
# conf_bridge (binaural rendering): check if HRIRs are available # conf_bridge (binaural rendering): check if HRIRs are available
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bridges/bridge_softmix/include/hrirs.h" >&5 # this check does not work when cross-compiling
if test "${cross_compiling}" = "no"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bridges/bridge_softmix/include/hrirs.h" >&5
$as_echo_n "checking for bridges/bridge_softmix/include/hrirs.h... " >&6; } $as_echo_n "checking for bridges/bridge_softmix/include/hrirs.h... " >&6; }
if ${ac_cv_file_bridges_bridge_softmix_include_hrirs_h+:} false; then : if ${ac_cv_file_bridges_bridge_softmix_include_hrirs_h+:} false; then :
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
@ -34718,6 +34720,7 @@ _ACEOF
fi fi
fi
ac_config_files="$ac_config_files build_tools/menuselect-deps makeopts" ac_config_files="$ac_config_files build_tools/menuselect-deps makeopts"

View File

@ -2815,7 +2815,10 @@ else
fi fi
# conf_bridge (binaural rendering): check if HRIRs are available # conf_bridge (binaural rendering): check if HRIRs are available
AC_CHECK_FILES([bridges/bridge_softmix/include/hrirs.h]) # this check does not work when cross-compiling
if test "${cross_compiling}" = "no"; then
AC_CHECK_FILES([bridges/bridge_softmix/include/hrirs.h])
fi
AC_CONFIG_FILES([build_tools/menuselect-deps makeopts]) AC_CONFIG_FILES([build_tools/menuselect-deps makeopts])
AST_CHECK_MANDATORY AST_CHECK_MANDATORY

View File

@ -49,10 +49,10 @@ AC_DEFUN([_JANSSON_CONFIGURE],
AC_ARG_VAR([JANSSON_CONFIGURE_OPTS],[Additional configure options to pass to bundled jansson]) AC_ARG_VAR([JANSSON_CONFIGURE_OPTS],[Additional configure options to pass to bundled jansson])
this_host=$(./config.sub $(./config.guess)) this_host=$(./config.sub $(./config.guess))
if test "$build" != "$this_host" ; then if test "$build" != "$this_host" ; then
JANSSON_CONFIGURE_OPTS+=" --build=$build" JANSSON_CONFIGURE_OPTS+=" --build=$build_alias"
fi fi
if test "$host" != "$this_host" ; then if test "$host" != "$this_host" ; then
JANSSON_CONFIGURE_OPTS+=" --host=$host" JANSSON_CONFIGURE_OPTS+=" --host=$host_alias"
fi fi
export TAR PATCH SED NM EXTERNALS_CACHE_DIR AST_DOWNLOAD_CACHE DOWNLOAD_TO_STDOUT DOWNLOAD_TIMEOUT DOWNLOAD MD5 CAT CUT GREP export TAR PATCH SED NM EXTERNALS_CACHE_DIR AST_DOWNLOAD_CACHE DOWNLOAD_TO_STDOUT DOWNLOAD_TIMEOUT DOWNLOAD MD5 CAT CUT GREP

View File

@ -49,10 +49,10 @@ AC_DEFUN([_PJPROJECT_CONFIGURE],
AC_ARG_VAR([PJPROJECT_CONFIGURE_OPTS],[Additional configure options to pass to bundled pjproject]) AC_ARG_VAR([PJPROJECT_CONFIGURE_OPTS],[Additional configure options to pass to bundled pjproject])
this_host=$(./config.sub $(./config.guess)) this_host=$(./config.sub $(./config.guess))
if test "$build" != "$this_host" ; then if test "$build" != "$this_host" ; then
PJPROJECT_CONFIGURE_OPTS+=" --build=$build" PJPROJECT_CONFIGURE_OPTS+=" --build=$build_alias"
fi fi
if test "$host" != "$this_host" ; then if test "$host" != "$this_host" ; then
PJPROJECT_CONFIGURE_OPTS+=" --host=$host" PJPROJECT_CONFIGURE_OPTS+=" --host=$host_alias"
fi fi
# This was a copy of the autoconf generated code from the root ./configure. # This was a copy of the autoconf generated code from the root ./configure.
# Hopefully, when you read this, the code is still the same. # Hopefully, when you read this, the code is still the same.