diff configure.in @ 2264:5c981407b0f3

GTK4: Add experimental support for GTK4... This is in progress and doesn't compile yet. GTK4 support will likely be less full than GTK3 due to architectural decisions by the GTK team. Certain features have been removed with no replacements, such as status icon support. Additionally all of the thread safety has been removed and everything MUST run on the main thread. I will likely implement a similar solution to what I did on MacOS where threads will call into the main thread to do API calls, passing the arguments between threads. Copied from GTK3 removing all existing now dead thread safety, all deprecated code and everything supporting earlier versions of GTK3. GTK4 is not available in any mainstream distributions yet... hoping to have it at least functional by the time there are any.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 29 Jan 2021 10:57:12 +0000
parents 4020bdb806dc
children 7ac85e938b71
line wrap: on
line diff
--- a/configure.in	Wed Jan 27 20:54:26 2021 +0000
+++ b/configure.in	Fri Jan 29 10:57:12 2021 +0000
@@ -55,6 +55,13 @@
    [with_gtk2=no],
 )
 
+dnl ---------------------- check for '--with-gtk4' switch -----------------
+AC_ARG_WITH(gtk4,
+   [  --with-gtk4             specify this to build with GTK+ 4.x if available],
+   [with_gtk4=$withval],
+   [with_gtk4=no],
+)
+
 dnl ---------------------- check for '--with-deprecated' switch -----------------
 AC_ARG_WITH(deprecated,
    [  --with-deprecated       specify this to build with deprecated functions],
@@ -208,15 +215,20 @@
    if test x"$PKG_CFG" != x; then
       GTK_LIBS=""
       if test $with_gtk2 = "yes"; then
+         DW_DIR=gtk
          GTK_PACKAGES="gtk+-2.0 gthread-2.0"
          GTK_LIBS=`$PKG_CFG --silence-errors --libs $GTK_PACKAGES`
       fi
+      if test $with_gtk4 = "yes"; then
+         DW_DIR=gtk4
+         GTK_PACKAGES="gtk4"
+         GTK_LIBS=`$PKG_CFG --silence-errors --libs $GTK_PACKAGES`
+      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`
       else
-         DW_DIR=gtk
          WEBKIT_PKG="webkit-1.1"
       fi
       # test for webkit2gtk or webkitgtk packages