diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2021-11-25 18:30:02 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2021-11-29 12:25:53 +0800 |
commit | 720e335246531bf1a9e59745d9721638ac92ba64 (patch) | |
tree | 7a84bb6a839e4d94cb1e9727fab83c72e9769bea /configure.ac | |
parent | b8e78f83ce3482b2be3eb69ecc481b810cf42d05 (diff) | |
download | gtk+-720e335246531bf1a9e59745d9721638ac92ba64.tar.gz |
configure.ac: Check for Pango 1.44.0 or later
...and HarfBuzz 2.2.0 or later so that we can enable the font feature
demo even if we do not have PangoFT2.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 5830d962fd..412ddbf6d7 100644 --- a/configure.ac +++ b/configure.ac @@ -1395,17 +1395,35 @@ fi ################################################## # Check for harfbuzz and pangoft2 ################################################## - PKG_CHECK_MODULES(GTK_FONT_CHOOSER_WIDGET, - harfbuzz >= 0.9 pangoft2, + harfbuzz >= 2.2.0 pango >= 1.44.0, build_font_demo=yes, build_font_demo=no) + +PKG_CHECK_MODULES(GTK_FONT_CHOOSER_WIDGET_FT, + harfbuzz >= 0.9 pangoft2, + build_font_demo_ft=yes, + build_font_demo_ft=no) + +if test "x$build_font_demo" = xno; then + if test "x$build_font_demo_ft" = xyes; then + build_font_demo=yes + else + build_font_demo=no + fi +fi + AM_CONDITIONAL(BUILD_FONT_DEMO, [ test "x$build_font_demo" = xyes ]) if test "x$build_font_demo" = xyes; then AC_DEFINE([HAVE_HARFBUZZ], 1, [defines whether we have HarfBuzz]) - AC_DEFINE([HAVE_PANGOFT], 1, [defines whether we have pangoft2]) - GTK_DEP_CFLAGS="$GTK_DEP_CFLAGS $GTK_FONT_CHOOSER_WIDGET_CFLAGS" - GTK_DEP_LIBS="$GTK_DEP_LIBS $GTK_FONT_CHOOSER_WIDGET_LIBS" + if test "x$build_font_demo_ft" = xyes; then + AC_DEFINE([HAVE_PANGOFT], 1, [defines whether we have pangoft2]) + GTK_DEP_CFLAGS="$GTK_DEP_CFLAGS $GTK_FONT_CHOOSER_WIDGET_FT_CFLAGS" + GTK_DEP_LIBS="$GTK_DEP_LIBS $GTK_FONT_CHOOSER_WIDGET_FT_LIBS" + else + GTK_DEP_CFLAGS="$GTK_DEP_CFLAGS $GTK_FONT_CHOOSER_WIDGET_CFLAGS" + GTK_DEP_LIBS="$GTK_DEP_LIBS $GTK_FONT_CHOOSER_WIDGET_LIBS" + fi fi if $PKG_CONFIG --exists x11; then |