Skip to content
Browse files

Autotools: define GP_GTK3 as an AM conditional

This allows plugins to have conditionals in their Makefiles depending
on whether they are built against GTK2 or GTK3.
  • Loading branch information...
1 parent 819bb00 commit 58d089708aea4e2f1488f88d7d63236efba9b104 @b4n b4n committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 build/gtk.m4
View
4 build/gtk.m4
@@ -1,6 +1,6 @@
dnl checks for the GTK version to build against (2 or 3)
dnl defines GP_GTK_PACKAGE (e.g. "gtk+-2.0"), GP_GTK_VERSION (e.g. "2.24") and
-dnl GP_GTK_VERSION_MAJOR (e.g. "2")
+dnl GP_GTK_VERSION_MAJOR (e.g. "2"); and defines the GP_GTK3 AM conditional
AC_DEFUN([GP_CHECK_GTK_VERSION],
[
AC_REQUIRE([AC_PROG_AWK])
@@ -13,6 +13,8 @@ AC_DEFUN([GP_CHECK_GTK_VERSION],
AC_SUBST([GP_GTK_PACKAGE])
AC_SUBST([GP_GTK_VERSION])
AC_SUBST([GP_GTK_VERSION_MAJOR])
+
+ AM_CONDITIONAL([GP_GTK3], [test "x$GP_GTK_VERSION_MAJOR" = x3])
])
dnl executes $1 if GTK3 is used, and $2 otherwise

0 comments on commit 58d0897

Please sign in to comment.
Something went wrong with that request. Please try again.