From 8ed74043fa657def03633161f7a0822ad107753d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 29 Aug 2023 22:59:30 +0200 Subject: [PATCH] Fix configure option for enabling CEF backend Remove space between WX_ARG_ENABLE and the opening parenthesis, this is not allowed in m4 syntax. Also give an error, not a warning, if CEF header is not found as it should exist if this option was explicitly specified. --- configure | 24 ++++++++++++------------ configure.ac | 7 +++++-- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/configure b/configure index 293a579b18..7f5e66c055 100755 --- a/configure +++ b/configure @@ -1241,7 +1241,7 @@ enable_postscript enable_printarch enable_svg enable_webview -enable_ +enable_webviewchromium enable_graphics_ctx enable_graphics_d2d enable_clipboard @@ -2211,7 +2211,7 @@ Optional Features: --enable-printarch use printing architecture --enable-svg use wxSVGFileDC device context --enable-webview use wxWebView library - + --enable-webviewchromium use wxWebView Chromium backend --enable-graphics_ctx use graphics context 2D drawing API --enable-graphics-d2d use Direct2D-based graphics context --enable-clipboard use wxClipboard class @@ -8829,6 +8829,7 @@ fi eval "$wx_cv_use_webview" + enablestring= defaultval= if test -z "$defaultval"; then @@ -8839,24 +8840,24 @@ fi fi fi - # Check whether --enable- was given. -if test "${enable_+set}" = set; then : - enableval=$enable_; + # Check whether --enable-webviewchromium was given. +if test "${enable_webviewchromium+set}" = set; then : + enableval=$enable_webviewchromium; if test "$enableval" = yes; then - wx_cv_use_='=yes' + wx_cv_use_webviewchromium='wxUSE_WEBVIEW_CHROMIUM=yes' else - wx_cv_use_='=no' + wx_cv_use_webviewchromium='wxUSE_WEBVIEW_CHROMIUM=no' fi else - wx_cv_use_='=${'DEFAULT_":-$defaultval}" + wx_cv_use_webviewchromium='wxUSE_WEBVIEW_CHROMIUM=${'DEFAULT_wxUSE_WEBVIEW_CHROMIUM":-$defaultval}" fi - eval "$wx_cv_use_" - (webviewchromium, --enable-webviewchromium use wxWebView Chromium backend, wxUSE_WEBVIEW_CHROMIUM) + eval "$wx_cv_use_webviewchromium" + if test "$wxUSE_MAC" != 1; then @@ -39689,8 +39690,7 @@ if test "x$ac_cv_header_include_cef_version_h" = xyes; then : else wxUSE_WEBVIEW_CHROMIUM="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Chromium headers not found" >&5 -$as_echo "$as_me: WARNING: Chromium headers not found" >&2;} + as_fn_error $? "Chromium headers not found" "$LINENO" 5 fi diff --git a/configure.ac b/configure.ac index 93dedf6c79..0a8fbe27df 100644 --- a/configure.ac +++ b/configure.ac @@ -784,7 +784,10 @@ WX_ARG_FEATURE(postscript, [ --enable-postscript use wxPostscriptDC device WX_ARG_FEATURE(printarch, [ --enable-printarch use printing architecture], wxUSE_PRINTING_ARCHITECTURE) WX_ARG_FEATURE(svg, [ --enable-svg use wxSVGFileDC device context], wxUSE_SVG) WX_ARG_FEATURE(webview, [ --enable-webview use wxWebView library], wxUSE_WEBVIEW) -WX_ARG_ENABLE (webviewchromium, [ --enable-webviewchromium use wxWebView Chromium backend], wxUSE_WEBVIEW_CHROMIUM) + +dnl This one is not enabled by default as it requires CEF to be available under +dnl 3rdparty/cef. +WX_ARG_ENABLE(webviewchromium, [ --enable-webviewchromium use wxWebView Chromium backend], wxUSE_WEBVIEW_CHROMIUM) dnl wxDC is implemented in terms of wxGraphicsContext in wxOSX so the latter dnl can't be disabled, don't even provide an option to do it @@ -6882,7 +6885,7 @@ if test "$wxUSE_WEBVIEW" = "yes"; then ], [ wxUSE_WEBVIEW_CHROMIUM="no" - AC_MSG_WARN([Chromium headers not found]) + AC_MSG_ERROR([Chromium headers not found]) ], []) CPPFLAGS="$old_CPPFLAGS"