From fe62c29c4a7530e4f5c01eed8388668d4f333c5f Mon Sep 17 00:00:00 2001 From: Jonathan Campbell Date: Tue, 15 May 2018 23:26:48 -0700 Subject: [PATCH] Add configure.ac option to force SDL drawn menus, even if the host OS provides menus --- build-mingw-sdldraw | 21 +++++++++++++++++++++ configure.ac | 9 +++++++++ include/build_timestamp.h | 2 +- 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 build-mingw-sdldraw diff --git a/build-mingw-sdldraw b/build-mingw-sdldraw new file mode 100644 index 000000000..8a14c0c91 --- /dev/null +++ b/build-mingw-sdldraw @@ -0,0 +1,21 @@ +#!/bin/bash + +# I'm sick and tired of all the churn the three versions of autoconf +# are causing in this repo. Stop committing the configure scripts +# and just autoregen. +./autogen.sh || exit 1 + +# fix +chmod +x vs2015/sdl/build-scripts/strip_fPIC.sh + +# prefer to compile against our own copy of SDL 1.x +echo Compiling our internal SDL 1.x +(cd vs2015/sdl && ./build-dosbox.sh) || exit 1 + +# now compile ourself +echo Compiling DOSBox-X +chmod +x configure +# FIXME: I would like MinGW builds to enable the debugger, eventually +./configure --enable-core-inline --enable-force-menu-sdldraw --prefix=/usr || exit 1 +make -j3 || exit 1 + diff --git a/configure.ac b/configure.ac index 698cd52cb..d246a9b9e 100644 --- a/configure.ac +++ b/configure.ac @@ -135,6 +135,10 @@ if test x$warn_cpp0x = x1; then AC_MSG_ERROR([ Your compiler must support C++11 or better ]) fi +dnl Yksoft1 wants a MinGW build for Windows that doesn't use the Windows menu system. +AH_TEMPLATE(C_FORCE_MENU_SDLDRAW,[Define to 1 to force SDL-drawn menus]) +AC_ARG_ENABLE(force-menu-sdldraw,AC_HELP_STRING([--enable-force-menu-sdldraw],[Force SDL drawn menus]),enable_force_menu_sdldraw=yes) + dnl This is how the build script can specify a HX DOS extender target AH_TEMPLATE(C_HX_DOS,[Define to 1 to target HX DOS]) AC_ARG_ENABLE(hx-dos,AC_HELP_STRING([--enable-hx-dos],[Enable HX target]),enable_hx=yes) @@ -149,6 +153,11 @@ case "$host" in ;; esac +if test x$enable_force_menu_sdldraw == xyes; then + CXXFLAGS="$CXXFLAGS -DFORCE_SDLDRAW" + AC_DEFINE(C_FORCE_MENU_SDLDRAW,1,[Force SDL drawn menus]) +fi + dnl TEST: Environ can be included AC_MSG_CHECKING(if environ can be included) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ diff --git a/include/build_timestamp.h b/include/build_timestamp.h index d7b70a0b9..8fed8a8e4 100644 --- a/include/build_timestamp.h +++ b/include/build_timestamp.h @@ -1,3 +1,3 @@ /*auto-generated*/ -#define UPDATED_STR "May 14, 2018 10:46:43pm" +#define UPDATED_STR "May 15, 2018 11:26:22pm" #define COPYRIGHT_END_YEAR "2018"