font chooser widget: Add missing build flags

If we detect HarfBuzz and PangoFT2, GtkFontChooserWidget uses them. So
we need to add CFLAGS and LIBS of them to GTK_DEP_CFLAGS/LIBS. If we
don't add them, MinGW build fails to link.
This commit is contained in:
Kouhei Sutou 2018-08-06 16:15:48 +09:00
parent ac030fd5e1
commit 4c94a76237
2 changed files with 16 additions and 18 deletions

View File

@ -1426,6 +1426,22 @@ if test x"$os_win32" = xyes; then
GTK_EXTRA_CFLAGS="$msnative_struct"
fi
##################################################
# Check for harfbuzz and pangoft2
##################################################
PKG_CHECK_MODULES(GTK_FONT_CHOOSER_WIDGET,
harfbuzz >= 0.9 pangoft2,
build_font_demo=yes,
build_font_demo=no)
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"
fi
if $PKG_CONFIG --exists x11; then
X11_PREFIX="`$PKG_CONFIG --variable=prefix x11`"
elif test x"$prefix" != xNONE; then
@ -1777,19 +1793,6 @@ if test "$have_colord" = "yes"; then
fi
AM_CONDITIONAL(HAVE_COLORD, test "x$have_colord" = "xyes")
##################################################
# Check for harfbuzz and pangoft2
##################################################
PKG_CHECK_MODULES(FONTDEMO, harfbuzz >= 0.9 pangoft2, build_font_demo=yes, build_font_demo=no)
AC_SUBST(FONTDEMO_CFLAGS)
AC_SUBST(FONTDEMO_LIBS)
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])
fi
##################################################
# Checks for gtk-doc and docbook-tools
##################################################

View File

@ -104,11 +104,6 @@ LDADDS = \
$(GDK_DEP_LIBS) \
-lm
if BUILD_FONT_DEMO
AM_CPPFLAGS += $(FONTDEMO_CFLAGS)
LDADDS += $(FONTDEMO_LIBS)
endif
bin_PROGRAMS = gtk3-demo gtk3-demo-application
desktopdir = $(datadir)/applications