Skip to content

Commit

Permalink
CONFIGURE: Add an environemt variable that discards the --host option
Browse files Browse the repository at this point in the history
In the previous commit we modified the configure script to silently
ignore some options, that are not needed for ScummVM, but are valid
for the configure script generated by GNU Autotools, so the configure
macro for RPM-based distributions can be used when building a rpm
package for them.

Unfortunately the configure script, as used by ScummVM uses the --host
option to determine the target system it will actually be build for.
Autotools based configure scripts have a --target option for such a
purpose, and use the --host option to determine the system the build
is performed on.

For that reason there should be a way to discard the parameters passed
to the configure script with the --host option.  The easiest approach
to achieve this goal, is to have an environment variable, which when
set influences the configure script to ignore the parameters of the
--host option.

Thus we introduced a variable called 'CONFIGURE_NO_HOST', that will
when set to anything, but an empty value, before invoking the configure
script, have the parameters of the --host option take no influence on
the configure stage (and the build stage as well).
  • Loading branch information
besser82 authored and sev- committed Feb 22, 2020
1 parent 826b7bf commit 8c28a2d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion configure
Expand Up @@ -1155,6 +1155,7 @@ Some influential environment variables:
AR archiver command
AS assembler command
ASFLAGS assembler flags
CONFIGURE_NO_HOST Ignore the cross-compile target set by the --host= option
CPPFLAGS C++ preprocessor flags, e.g. -I<include dir> if you have
headers in a nonstandard directory <include dir>
CXX C++ compiler command
Expand Down Expand Up @@ -1474,7 +1475,11 @@ for ac_option in $@; do
_xcodetoolspath=`echo $ac_option | cut -d '=' -f 2`
;;
--host=*)
_host=`echo $ac_option | cut -d '=' -f 2`
if test -z "$CONFIGURE_NO_HOST"; then
_host=`echo $ac_option | cut -d '=' -f 2`
else
echo "Ignoring --host option!" >&2
fi
;;
--prefix=*)
prefix=`echo $ac_option | cut -d '=' -f 2`
Expand Down

0 comments on commit 8c28a2d

Please sign in to comment.