2 dnl Checks whether the GTK stack is available and new enough. Sets GTK_CFLAGS and GTK_LIBS.
3 AC_DEFUN([GEANY_CHECK_GTK],
5 gtk_modules="gtk+-3.0 >= 3.24 glib-2.0 >= 2.32"
6 gtk_modules_private="gio-2.0 >= 2.32 gmodule-no-export-2.0 gthread-2.0"
8 PKG_CHECK_MODULES([GTK], [$gtk_modules $gtk_modules_private])
9 AC_SUBST([DEPENDENCIES], [$gtk_modules])
10 AS_VAR_APPEND([GTK_CFLAGS], [" -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32"])
11 dnl Disable all GTK deprecations
12 AS_VAR_APPEND([GTK_CFLAGS], [" -DGDK_DISABLE_DEPRECATION_WARNINGS"])
13 AC_SUBST([GTK_CFLAGS])
15 AC_SUBST([GTK_VERSION],[`$PKG_CONFIG --modversion gtk+-3.0`])
17 GEANY_STATUS_ADD([Using GTK version], [${GTK_VERSION}])
20 dnl GEANY_CHECK_GTK_FUNCS
21 dnl Like AC_CHECK_FUNCS but adds GTK flags so that tests for GLib/GTK functions may succeed.
22 AC_DEFUN([GEANY_CHECK_GTK_FUNCS],
24 AC_REQUIRE([GEANY_CHECK_GTK])