diff configure @ 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	Wed Jan 27 20:54:26 2021 +0000
+++ b/configure	Fri Jan 29 10:57:12 2021 +0000
@@ -716,6 +716,7 @@
 docdir
 oldincludedir
 includedir
+runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -740,6 +741,7 @@
 enable_option_checking
 with_dwcompat
 with_gtk2
+with_gtk4
 with_deprecated
 with_arch
 with_sdk
@@ -811,6 +813,7 @@
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE}'
@@ -1063,6 +1066,15 @@
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
+  -runstatedir | --runstatedir | --runstatedi | --runstated \
+  | --runstate | --runstat | --runsta | --runst | --runs \
+  | --run | --ru | --r)
+    ac_prev=runstatedir ;;
+  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+  | --run=* | --ru=* | --r=*)
+    runstatedir=$ac_optarg ;;
+
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1200,7 +1212,7 @@
 for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
 		datadir sysconfdir sharedstatedir localstatedir includedir \
 		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-		libdir localedir mandir
+		libdir localedir mandir runstatedir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -1353,6 +1365,7 @@
   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
@@ -1398,6 +1411,7 @@
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-dwcompat         specify this to build the optional dwcompat library
   --with-gtk2             specify this to build with GTK+ 2.x if available
+  --with-gtk4             specify this to build with GTK+ 4.x if available
   --with-deprecated       specify this to build with deprecated functions
   --with-arch             specify MacOS architecture: one of modern, classic, 32bit, intel, arm, powerpc
   --with-sdk              specify this to build with an alternate MacOS SDK location
@@ -3691,6 +3705,15 @@
 
 
 
+# Check whether --with-gtk4 was given.
+if test "${with_gtk4+set}" = set; then :
+  withval=$with_gtk4; with_gtk4=$withval
+else
+  with_gtk4=no
+fi
+
+
+
 # Check whether --with-deprecated was given.
 if test "${with_deprecated+set}" = set; then :
   withval=$with_deprecated; with_deprecated=$withval
@@ -5457,15 +5480,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