tAdd experimental support for GTK4 - vaccinewars - be a doctor and try to vaccinate the world
(HTM) git clone git://src.adamsgaard.dk/vaccinewars
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 23d277d41e6577856ff102654fe776e310e60b65
(DIR) parent 73a0da4f8a1d63dbb703e7523af9aae0b58319d7
(HTM) Author: Ben Webb <ben@salilab.org>
Date: Mon, 28 Dec 2020 23:58:49 -0800
Add experimental support for GTK4
Diffstat:
M configure.ac | 44 +++++++++++++++++++------------
1 file changed, 27 insertions(+), 17 deletions(-)
---
(DIR) diff --git a/configure.ac b/configure.ac
t@@ -52,6 +52,10 @@ AC_ARG_ENABLE(gui-server,
[ --enable-gui-server use a simple GTK+/Win32 GUI for the server],
[ GUI_SERVER="$enableval" ],[ GUI_SERVER="probe" ])
+AC_ARG_ENABLE(gtk4,
+[ --enable-gtk4 use GTK 4 if available (experimental)],
+[ USE_GTK4="$enableval" ],[ USE_GTK4="no" ])
+
AC_ARG_ENABLE(gtk3,
[ --disable-gtk3 use GTK+ 2.x, even if 3.x is found],
[ USE_GTK3="$enableval" ],[ USE_GTK3="yes" ])
t@@ -174,24 +178,30 @@ else
gtk2_found="probe"
if test "$GUI_CLIENT" != "no" -o "$GUI_SERVER" != "no"; then
PKG_PROG_PKG_CONFIG()
- gtk3_found="no"
- if test "$USE_GTK3" = "yes" ; then
- PKG_CHECK_MODULES([GTK], [gtk+-3.0], gtk3_found="yes", gtk3_found="no")
- if test "$gtk3_found" = "yes" ; then
- # We use GtkTable a lot so don't clutter the compiler output with
- # recommendations to use GtkGrid instead
- CPPFLAGS="$CPPFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS"
- fi
+ gtk4_found="no"
+ if test "$USE_GTK4" = "yes" ; then
+ PKG_CHECK_MODULES([GTK], [gtk4], gtk4_found="yes", gtk4_found="no")
fi
- if test "$gtk3_found" = "no" ; then
- AM_PATH_GTK_2_0(2.0.0,gtk2_found="yes",gtk2_found="no")
- if test "$gtk2_found" = "no" ; then
- if test "$GUI_CLIENT" = "yes" -o "$GUI_SERVER" = "yes" ; then
- AC_MSG_ERROR(Cannot find GTK+)
- else
- AC_MSG_WARN(Cannot find GTK+; not building GUI client or server)
- GUI_CLIENT="no"
- GUI_SERVER="no"
+ if test "$gtk4_found" = "no" ; then
+ gtk3_found="no"
+ if test "$USE_GTK3" = "yes" ; then
+ PKG_CHECK_MODULES([GTK], [gtk+-3.0], gtk3_found="yes", gtk3_found="no")
+ if test "$gtk3_found" = "yes" ; then
+ # We use GtkTable a lot so don't clutter the compiler output with
+ # recommendations to use GtkGrid instead
+ CPPFLAGS="$CPPFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS"
+ fi
+ fi
+ if test "$gtk3_found" = "no" ; then
+ AM_PATH_GTK_2_0(2.0.0,gtk2_found="yes",gtk2_found="no")
+ if test "$gtk2_found" = "no" ; then
+ if test "$GUI_CLIENT" = "yes" -o "$GUI_SERVER" = "yes" ; then
+ AC_MSG_ERROR(Cannot find GTK+)
+ else
+ AC_MSG_WARN(Cannot find GTK+; not building GUI client or server)
+ GUI_CLIENT="no"
+ GUI_SERVER="no"
+ fi
fi
fi
fi