+
+dnl ******************************************
+dnl Check whether to build examples/demos
+dnl ******************************************
+AC_ARG_ENABLE([examples],
+ [AS_HELP_STRING([--enable-examples],
+ [enable the building examples (default=yes)])],
+ [enable_examples=$enableval], [enable_examples=yes])
+AC_MSG_CHECKING([if examples should be built])
+AC_MSG_RESULT([$enable_examples])
+if test "x$enable_examples" = xyes; then
+ PKG_CHECK_MODULES([EXAMPLES],
+ [gtk+-3.0 >= 3.10 glib-2.0 >= 2.38],,
+ [AC_MSG_ERROR([
+ Some packages were not available to build the example program(s).
+
+ If you want to disable examples, please
+ append --disable-examples to configure.
+ ])])
+
+ AC_DEFINE(BUILD_EXAMPLES, 1, [Define to 1 if the examples should be built.])
+fi
+AM_CONDITIONAL(BUILD_EXAMPLES, [test x$enable_examples = xyes])
+
+