# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1640613813 0 # Node ID c83d6261ce3e742f34c8d91bf60bfe122eac3251 # Parent 0ce46809e95d055b06f630fd8b882ec3ecabc2a9 GTK4: Change configure tests, and try to support webkit. Try gtk4-x11 first then just gtk4 (wayland)... so if the X11 version is available we can use Xlib functions if on the X11 backend. If requesting GTK4 use webkitgtk-5.0 the package reported for GTK4. I was unable to build webkit for GTK4 due to dependency nightmares. Will try to build it on Fedora and see if I can actuall test this. diff -r 0ce46809e95d -r c83d6261ce3e configure --- a/configure Wed Dec 22 09:54:41 2021 +0000 +++ b/configure Mon Dec 27 14:03:33 2021 +0000 @@ -5485,12 +5485,21 @@ GTK_PACKAGES="gtk+-2.0 gthread-2.0" GTK_LIBS=`$PKG_CFG --silence-errors --libs $GTK_PACKAGES` fi + # Default WebKitGTK test is 4.0 for GTK3 + WEBKIT_PKG="webkit2gtk-4.0" if test $with_gtk4 = "yes"; then DW_DIR=gtk4 - GTK_PACKAGES="gtk4" + # First try the X11 version so we can call Xlib directly + # to fill in the holes not available with Wayland + GTK_PACKAGES="gtk4-x11" GTK_LIBS=`$PKG_CFG --silence-errors --libs $GTK_PACKAGES` + if test x"$GTK_LIBS" = x; then + GTK_PACKAGES="gtk4" + GTK_LIBS=`$PKG_CFG --silence-errors --libs $GTK_PACKAGES` + fi + # WebKitGTK built for GTK4 becomes 5.0 + WEBKIT_PKG="webkitgtk-5.0" fi - WEBKIT_PKG="webkit2gtk-4.0" if test x"$GTK_LIBS" = x; then GTK_PACKAGES="gtk+-3.0" GTK_LIBS=`$PKG_CFG --silence-errors --libs $GTK_PACKAGES` diff -r 0ce46809e95d -r c83d6261ce3e configure.in --- a/configure.in Wed Dec 22 09:54:41 2021 +0000 +++ b/configure.in Mon Dec 27 14:03:33 2021 +0000 @@ -219,12 +219,21 @@ GTK_PACKAGES="gtk+-2.0 gthread-2.0" GTK_LIBS=`$PKG_CFG --silence-errors --libs $GTK_PACKAGES` fi + # Default WebKitGTK test is 4.0 for GTK3 + WEBKIT_PKG="webkit2gtk-4.0" if test $with_gtk4 = "yes"; then DW_DIR=gtk4 - GTK_PACKAGES="gtk4" + # First try the X11 version so we can call Xlib directly + # to fill in the holes not available with Wayland + GTK_PACKAGES="gtk4-x11" GTK_LIBS=`$PKG_CFG --silence-errors --libs $GTK_PACKAGES` + if test x"$GTK_LIBS" = x; then + GTK_PACKAGES="gtk4" + GTK_LIBS=`$PKG_CFG --silence-errors --libs $GTK_PACKAGES` + fi + # WebKitGTK built for GTK4 becomes 5.0 + WEBKIT_PKG="webkitgtk-5.0" fi - WEBKIT_PKG="webkit2gtk-4.0" if test x"$GTK_LIBS" = x; then GTK_PACKAGES="gtk+-3.0" GTK_LIBS=`$PKG_CFG --silence-errors --libs $GTK_PACKAGES`