From 118ca492849a8548a77a140acf5e2be7d27792f8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 13 Sep 2023 20:59:40 +0200 Subject: [PATCH] Improve reporting of enabled wxWebView backends in configure Don't report "IE" backend as being enabled just because it's enabled by default under MSW. Also give a warning if any of MSW-specific backends is enabled when not building wxMSW. --- configure | 16 ++++++++++++++++ configure.ac | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/configure b/configure index 5c5d8bb099..8e95d364b6 100755 --- a/configure +++ b/configure @@ -12660,6 +12660,11 @@ fi eval "$wx_cv_use_wxdib" +if test "$wxUSE_MSW" != 1; then + DEFAULT_wxUSE_WEBVIEW_IE=no +fi + + enablestring= defaultval=$wxUSE_ALL_FEATURES if test -z "$defaultval"; then @@ -39696,6 +39701,17 @@ fi $as_echo "#define wxUSE_WEBVIEW_EDGE 1" >>confdefs.h fi + else + if test "$wxUSE_WEBVIEW_IE" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: wxWebView IE backend only available under MSW, ignoring --enable-webviewie" >&5 +$as_echo "$as_me: WARNING: wxWebView IE backend only available under MSW, ignoring --enable-webviewie" >&2;} + wxUSE_WEBVIEW_IE=no + fi + if test "$wxUSE_WEBVIEW_EDGE" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: wxWebView Edge backend only available under MSW, ignoring --enable-webviewedge" >&5 +$as_echo "$as_me: WARNING: wxWebView Edge backend only available under MSW, ignoring --enable-webviewedge" >&2;} + wxUSE_WEBVIEW_EDGE=no + fi fi if test "$wxUSE_WEBVIEW_CHROMIUM" = "yes"; then diff --git a/configure.ac b/configure.ac index c7c7e038cd..f263ed641b 100644 --- a/configure.ac +++ b/configure.ac @@ -1031,6 +1031,13 @@ WX_ARG_FEATURE(ownerdrawn, [ --enable-ownerdrawn use owner drawn controls WX_ARG_FEATURE(taskbarbutton,[ --enable-taskbarbutton enable wxTaskBarButton (Win32 only)], wxUSE_TASKBARBUTTON) WX_ARG_FEATURE(uxtheme, [ --enable-uxtheme enable support for Windows XP themed look (Win32 only)], wxUSE_UXTHEME) WX_ARG_FEATURE(wxdib, [ --enable-wxdib use wxDIB class (Win32 only)], wxUSE_DIB) + +dnl Turn off MSW-only IE webview backend here to avoid reporting it as "on" in +dnl the final summary message (Edge is turned off by default). +if test "$wxUSE_MSW" != 1; then + DEFAULT_wxUSE_WEBVIEW_IE=no +fi + WX_ARG_FEATURE(webviewie, [ --enable-webviewie use wxWebView IE backend (Win32 only)], wxUSE_WEBVIEW_IE) WX_ARG_FEATURE(webviewedge, [ --enable-webviewedge use wxWebView Edge backend (Win32 only)], wxUSE_WEBVIEW_EDGE) @@ -6885,6 +6892,15 @@ if test "$wxUSE_WEBVIEW" = "yes"; then wxUSE_WEBVIEW="yes" AC_DEFINE(wxUSE_WEBVIEW_EDGE) fi + else + if test "$wxUSE_WEBVIEW_IE" = "yes"; then + AC_MSG_WARN([wxWebView IE backend only available under MSW, ignoring --enable-webviewie]) + wxUSE_WEBVIEW_IE=no + fi + if test "$wxUSE_WEBVIEW_EDGE" = "yes"; then + AC_MSG_WARN([wxWebView Edge backend only available under MSW, ignoring --enable-webviewedge]) + wxUSE_WEBVIEW_EDGE=no + fi fi if test "$wxUSE_WEBVIEW_CHROMIUM" = "yes"; then