diff --git a/configure.ac b/configure.ac index c15aaa933e..3ff4615596 100644 --- a/configure.ac +++ b/configure.ac @@ -1690,6 +1690,15 @@ if test "$have_colord" = "yes"; then fi AM_CONDITIONAL(HAVE_COLORD, test "x$have_colord" = "xyes") +################################################## +# Check for harfbuzz +################################################## + +PKG_CHECK_MODULES(HARFBUZZ, harfbuzz >= 0.9, have_harfbuzz=yes, have_harfbuzz=no) +AC_SUBST(HARFBUZZ_CFLAGS) +AC_SUBST(HARFBUZZ_LIBS) +AM_CONDITIONAL(BUILD_FONT_DEMO, [ test "x$have_harfbuzz" = xyes ]) + ################################################## # Checks for gtk-doc and docbook-tools ################################################## diff --git a/demos/gtk-demo/Makefile.am b/demos/gtk-demo/Makefile.am index 64cc8c4d71..60e4e13d39 100644 --- a/demos/gtk-demo/Makefile.am +++ b/demos/gtk-demo/Makefile.am @@ -70,12 +70,18 @@ demos_base = \ transparent.c \ tree_store.c -if OS_UNIX -demos = $(demos_base) font_features.c pagesetup.c -else -demos = $(demos_base) +demos_opt = + +if BUILD_FONT_DEMO +demos_opt += font_features.c endif +if OS_UNIX +demos_opt += pagesetup.c +endif + +demos = $(demos_base) $(demos_opt) + AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_builddir)/gdk \ @@ -94,6 +100,11 @@ LDADDS = \ $(GDK_DEP_LIBS) \ -lm +if BUILD_FONT_DEMO +AM_CPPFLAGS += $(HARFBUZZ_CFLAGS) +LDADDS += $(HARFBUZZ_LIBS) +endif + bin_PROGRAMS = gtk3-demo gtk3-demo-application desktopdir = $(datadir)/applications