BUILD: Change engine configuration options
This changes the set of engine options to ./configure to:
--enable-all-engines
--disable-all-engines
--enable-engine=<engine name>[,<engine name>...]
And if plugins are enabled:
--enable-engine-static=<engine name>[,<engine name>...]
--enable-engine-dynamic=<engine name>[,<engine name>...]
(cherry picked from commit dd6c6a36ea
)
This commit is contained in:
parent
864a751b17
commit
8d82e826b5
1 changed files with 36 additions and 24 deletions
60
configure
vendored
60
configure
vendored
|
@ -411,8 +411,13 @@ get_system_exe_extension() {
|
||||||
|
|
||||||
# Show the configure help line for an option
|
# Show the configure help line for an option
|
||||||
option_help() {
|
option_help() {
|
||||||
|
if test "${3}" != "" ; then
|
||||||
|
tmpopt_prefix="${3}"
|
||||||
|
else
|
||||||
|
tmpopt_prefix="--"
|
||||||
|
fi
|
||||||
tmpopt=`echo $1 | sed 's/_/-/g'`
|
tmpopt=`echo $1 | sed 's/_/-/g'`
|
||||||
option=`echo "--${tmpopt} " | sed "s/\(.\{23\}\).*/\1/"`
|
option=`echo "${tmpopt_prefix}${tmpopt} " | sed "s/\(.\{23\}\).*/\1/"`
|
||||||
echo " ${option} ${2}"
|
echo " ${option} ${2}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -474,9 +479,9 @@ engine_disable_all() {
|
||||||
# Enable the given engine
|
# Enable the given engine
|
||||||
engine_enable() {
|
engine_enable() {
|
||||||
# Get the parameter
|
# Get the parameter
|
||||||
if ( echo $1 | grep '=' ) 2> /dev/null > /dev/null ; then
|
if ( echo $1 | grep ':' ) 2> /dev/null > /dev/null ; then
|
||||||
eng=`echo $1 | cut -d '=' -f 1`
|
eng=`echo $1 | cut -d ':' -f 1`
|
||||||
opt=`echo $1 | cut -d '=' -f 2`
|
opt=`echo $1 | cut -d ':' -f 2`
|
||||||
else
|
else
|
||||||
eng=$1
|
eng=$1
|
||||||
opt=yes
|
opt=yes
|
||||||
|
@ -518,15 +523,8 @@ engine_disable() {
|
||||||
|
|
||||||
# Show the configure help line for a given engine
|
# Show the configure help line for a given engine
|
||||||
show_engine_help() {
|
show_engine_help() {
|
||||||
if test `get_engine_build $1` = yes ; then
|
|
||||||
option="disable"
|
|
||||||
do="don't "
|
|
||||||
else
|
|
||||||
option="enable"
|
|
||||||
do=""
|
|
||||||
fi
|
|
||||||
name=`get_engine_name $1`
|
name=`get_engine_name $1`
|
||||||
option_help ${option}-${1} "${do}build the ${name} engine"
|
option_help "${1}" "${name} engine" " "
|
||||||
for sub in `get_engine_subengines $1`; do
|
for sub in `get_engine_subengines $1`; do
|
||||||
show_subengine_help $sub $1
|
show_subengine_help $sub $1
|
||||||
done
|
done
|
||||||
|
@ -534,16 +532,9 @@ show_engine_help() {
|
||||||
|
|
||||||
# Show the configure help line for a given subengine
|
# Show the configure help line for a given subengine
|
||||||
show_subengine_help() {
|
show_subengine_help() {
|
||||||
if test `get_engine_build $1` = yes ; then
|
|
||||||
option="disable"
|
|
||||||
do="exclude"
|
|
||||||
else
|
|
||||||
option="enable"
|
|
||||||
do="include"
|
|
||||||
fi
|
|
||||||
name=`get_engine_name $1`
|
name=`get_engine_name $1`
|
||||||
parent=`get_engine_name $2`
|
parent=`get_engine_name $2`
|
||||||
option_help ${option}-${1} "${do} the ${name} in ${parent} engine"
|
option_help "${1}" "${name} in ${parent} engine" " "
|
||||||
}
|
}
|
||||||
|
|
||||||
# Prepare the strings about the engines to build
|
# Prepare the strings about the engines to build
|
||||||
|
@ -766,6 +757,13 @@ Game engines:
|
||||||
--enable-all-engines enable all engines, including those which are
|
--enable-all-engines enable all engines, including those which are
|
||||||
broken or unsupported
|
broken or unsupported
|
||||||
--disable-all-engines disable all engines
|
--disable-all-engines disable all engines
|
||||||
|
--enable-engine=<engine name>[,<engine name>...] enable engine(s) listed
|
||||||
|
--disable-engine=<engine name>[,<engine name>...] disable engine(s) listed
|
||||||
|
--enable-engine-static=<engine name>[,<engine name>...]
|
||||||
|
enable engine(s) listed as static builtin (when plugins are enabled)
|
||||||
|
--enable-engine-dynamic=<engine name>[,<engine name>...]
|
||||||
|
enable engine(s) listed as dynamic plugin (when plugins are enabled)
|
||||||
|
The values of <engine name> for these options are as follows:
|
||||||
$engines_help
|
$engines_help
|
||||||
Optional Features:
|
Optional Features:
|
||||||
--disable-debug disable building with debugging symbols
|
--disable-debug disable building with debugging symbols
|
||||||
|
@ -1068,11 +1066,25 @@ for ac_option in $@; do
|
||||||
--disable-all-engines)
|
--disable-all-engines)
|
||||||
engine_disable_all
|
engine_disable_all
|
||||||
;;
|
;;
|
||||||
--enable-*)
|
--enable-engine=*)
|
||||||
engine_enable `echo $ac_option | cut -d '-' -f 4-`
|
for engine_name in `echo $ac_option | cut -d '=' -f 2- | tr ',' '\n'`; do
|
||||||
|
engine_enable "${engine_name}"
|
||||||
|
done
|
||||||
;;
|
;;
|
||||||
--disable-*)
|
--enable-engine-static=*)
|
||||||
engine_disable `echo $ac_option | cut -d '-' -f 4-`
|
for engine_name in `echo $ac_option | cut -d '=' -f 2- | tr ',' '\n'`; do
|
||||||
|
engine_enable "${engine_name}:static"
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
--enable-engine-dynamic=*)
|
||||||
|
for engine_name in `echo $ac_option | cut -d '=' -f 2- | tr ',' '\n'`; do
|
||||||
|
engine_enable "${engine_name}:dynamic"
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
--disable-engine=*)
|
||||||
|
for engine_name in `echo $ac_option | cut -d '=' -f 2 | tr ',' '\n'`; do
|
||||||
|
engine_disable ${engine_name}
|
||||||
|
done
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
option_error
|
option_error
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue