tStart adding support for GTK+3 - vaccinewars - be a doctor and try to vaccinate the world
git clone git://src.adamsgaard.dk/vaccinewars
Log
Files
Refs
README
LICENSE
---
commit eb7917d92c669d0bbf977af3b867ad9a77654974
parent 9edaf873e8404d277113211ede9d866e9fcef06f
Author: Ben Webb 
Date:   Sun, 15 Nov 2020 18:12:56 -0800

Start adding support for GTK+3

Diffstat:
  M configure.ac                        |      22 +++++++++++++---------

1 file changed, 13 insertions(+), 9 deletions(-)
---
diff --git a/configure.ac b/configure.ac
t@@ -167,15 +167,19 @@ else
 
    gtk2_found="probe"
    if test "$GUI_CLIENT" != "no" -o "$GUI_SERVER" != "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
+      PKG_PROG_PKG_CONFIG()
+      PKG_CHECK_MODULES([GTK], [gtk+-3.0], gtk3_found="yes", gtk3_found="no")
+      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