From db846f15ab98637cc2fd46599ec6a07c4da95a19 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 15 Nov 2019 17:09:43 +0100 Subject: [PATCH] Disable wxMediaCtrl and wxWebView when OLE is disabled in wxMSW Avoid errors in wx/msw/chkconf.h during compilation by proactively turning these options off in configure if wxUSE_OLE==0. --- configure | 14 +++++++++++++- configure.in | 12 ++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 6f3c9128f4..1083e1d8a5 100755 --- a/configure +++ b/configure @@ -35450,9 +35450,21 @@ if test "$USE_WIN32" = 1 ; then SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS oleauto" else - wxUSE_CLIPBOARD=no + wxUSE_CLIPBOARD=no wxUSE_DRAG_AND_DROP=no wxUSE_DATAOBJ=no + + if test "$wxUSE_MEDIACTRL" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: wxMediaCtrl requires wxUSE_OLE... disabled" >&5 +$as_echo "$as_me: WARNING: wxMediaCtrl requires wxUSE_OLE... disabled" >&2;} + wxUSE_MEDIACTRL=no + fi + + if test "$wxUSE_WEBVIEW" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: wxWebView requires wxUSE_OLE... disabled" >&5 +$as_echo "$as_me: WARNING: wxWebView requires wxUSE_OLE... disabled" >&2;} + wxUSE_WEBVIEW=no + fi fi fi diff --git a/configure.in b/configure.in index d50f3a40ad..8bb9d71a20 100644 --- a/configure.in +++ b/configure.in @@ -6526,9 +6526,21 @@ if test "$USE_WIN32" = 1 ; then AC_DEFINE(wxUSE_ACTIVEX) SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS oleauto" else + dnl Turn off features depending on OLE directly... wxUSE_CLIPBOARD=no wxUSE_DRAG_AND_DROP=no wxUSE_DATAOBJ=no + + dnl ... or indirectly (via wxUSE_ACTIVEX) + if test "$wxUSE_MEDIACTRL" = "yes"; then + AC_MSG_WARN(wxMediaCtrl requires wxUSE_OLE... disabled) + wxUSE_MEDIACTRL=no + fi + + if test "$wxUSE_WEBVIEW" = "yes"; then + AC_MSG_WARN(wxWebView requires wxUSE_OLE... disabled) + wxUSE_WEBVIEW=no + fi fi fi