diff options
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 94 |
1 files changed, 92 insertions, 2 deletions
@@ -97,7 +97,9 @@ add_feature() { _srcdir=`dirname $0` # Read list of engines -. $_srcdir/engines/configure.engines +for i in $_srcdir/engines/*/configure.engine; do + . "$i" +done # # Default settings @@ -2421,8 +2423,11 @@ if test -n "$_host"; then CXXFLAGS="$CXXFLAGS -fschedule-insns2" CXXFLAGS="$CXXFLAGS -fomit-frame-pointer" CXXFLAGS="$CXXFLAGS -fdelete-null-pointer-checks" + # no-delayed-branch is a workaround for GCC bug #42841 - "SH: Assembler complains pcrel too far." + CXXFLAGS="$CXXFLAGS -fno-delayed-branch" _backend="dc" _build_scalers=no + _taskbar=no _mad=yes _zlib=yes add_line_to_config_mk 'ronindir = /usr/local/ronin' @@ -3666,6 +3671,25 @@ fi if test "$_readline" = yes ; then LIBS="$LIBS $READLINE_LIBS $_READLINE_LIBS" INCLUDES="$INCLUDES $READLINE_CFLAGS" + + # + # Check the type of rl_completion_entry_function. + # It can be int(*)(const char *, int) or char *(*)(const char *, int). + # + cat > $TMPC << EOF +#include <stdio.h> +#include <readline/readline.h> +#include <readline/history.h> + +int readline_completionFunction(const char *, int); + +int main(void) { + char *x = readline(""); + rl_completion_entry_function = &readline_completionFunction; +} +EOF + cc_check -c && add_line_to_config_h '#define USE_READLINE_INT_COMPLETION' + fi define_in_config_h_if_yes "$_readline" 'USE_READLINE' @@ -4198,8 +4222,18 @@ for engine in $_engines; do fi done -# Prepare the information to be shown +# Sort engines to place our headline engine at start... +# No technical reason, just historical convention +headline_engine=scumm +_sorted_engines="${headline_engine}" for engine in $_engines; do + if test "${engine}" != "${headline_engine}" ; then + _sorted_engines="${_sorted_engines} ${engine}" + fi +done + +# Prepare the information to be shown +for engine in $_sorted_engines; do if test "`get_engine_sub $engine`" = "no" ; then # It's a main engine prepare_engine_build_strings $engine @@ -4381,3 +4415,59 @@ include \$(srcdir)/Makefile EOF fi + +# Ensure engines folder exists prior to trying to generate +# files into it (used for out-of-tree-builds) +mkdir -p engines + +echo "Creating engines/engines.mk" +cat > engines/engines.mk << EOF +# This file is automatically generated by configure +# DO NOT EDIT MANUALLY +# This file is being included by "Makefile.common" +EOF + +for engine in $_sorted_engines; do + j=`echo $engine | tr '[:lower:]' '[:upper:]'` + if test "`get_engine_sub $engine`" = "no" ; then + # main engine + cat >> engines/engines.mk << EOF + +ifdef ENABLE_$j +DEFINES += -DENABLE_$j=\$(ENABLE_$j) +MODULES += engines/$engine +EOF + + for subeng in `get_engine_subengines $engine` ; do + k=`echo $subeng | tr '[:lower:]' '[:upper:]'` + cat >> engines/engines.mk << EOF + +ifdef ENABLE_$k +DEFINES += -DENABLE_$k +endif +EOF + done + + cat >> engines/engines.mk << EOF +endif +EOF + fi +done + +echo "Creating engines/plugins_table.h" +cat > engines/plugins_table.h << EOF +/* This file is automatically generated by configure */ +/* DO NOT EDIT MANUALLY */ +// This file is being included by "base/plugins.cpp" +EOF + +for engine in $_sorted_engines; do + if test "`get_engine_sub $engine`" = "no" ; then + j=`echo $engine | tr '[:lower:]' '[:upper:]'` + cat >> engines/plugins_table.h << EOF +#if PLUGIN_ENABLED_STATIC($j) +LINK_PLUGIN($j) +#endif +EOF + fi +done |
