GNOME Bugzilla – Bug 642479
Allow checking for GDK backends
Last modified: 2011-02-16 18:49:59 UTC
Third party code used to rely on the target variable in pkg-config to conditionally compile. Since the target variable has been replaced by the targets one, listing multiple backends, this is not possible any more. GTK+ should ship a simple m4 macro to achieve the same results.
Created attachment 181018 [details] [review] Allow checking for GDK backends Now that a single shared object can contain multiple backends we also need to provide a simple way for third party code to verify that the copy of GDK they are linking to supports their backend. The simplest way to verify is an m4 macro, GTK_CHECK_BACKEND(), shipped with the gtk+ m4 macros. The usage is pretty basic: GTK_CHECK_BACKEND([x11], [gtk_has_x11=yes], [gtk_has_x11=no]) AM_CONDITIONAL(BUILD_X11_CODE, test "x$gtk_has_x11" = "xno")
Review of attachment 181018 [details] [review]: Looks good to me; would be good to mention in the docs, both in the migration guide for backend-specific code, and in the 'compiling applications' section
Created attachment 181026 [details] [review] Allow checking for GDK backends / v2.0 Same patch, but with the macro documented in the migration guide. The "Compiling" section does mention autotools, so I'm not really sure how to bring the macro up.
Pushed a fixed version of the patch, thanks to mitch