summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2017-08-18 17:56:44 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2018-03-30 12:22:41 +0800
commit18fb749d658e86edad8145a3032c4b6e3be48d72 (patch)
tree3cf516b1f3d49059dff8141ba041414cb767ecf7 /configure.ac
parent55afeeca8031ba74cbcdf569500334ebef6b61e0 (diff)
downloadpango-18fb749d658e86edad8145a3032c4b6e3be48d72.tar.gz
build: Add fallbacks for finding non-GNOME deps on MSVC
Many of Pango's dependencies do not support a build system for Visual Studio that would generate the pkg-config files for them, so we need to try to look for them using cc.has_header() and cc.find_library() for them, namely for Cairo, FreeType, FontConfig and HarfBuzz as fallbacks. For Cairo, things are more complicated as there are multiple build options and configurations for it, so we need to check for those that we need after we find the Cairo headers and libraries by: -Including the respective headers (for cairo-win32.h, cairo-ps.h, cairo-pdf.h, cairo-quartz.h and cairo-xlib.h, since these features must have been enabled when Cairo is built and installed in order for those headers to be succesfully included) -For pangocairo with FreeType support, we need to check whether the FontConfig support is built into Cairo as well, as FontConfig support is actually required in Cairo for this. -For Cairo/PNG output surface support, check whether Cairo is built with PNG output surface support. We also need to update how pangocairo.pc and pangoft2 are generated: -On builds where pkg-config files can be found for cairo, freetype, fontconfig and/or harfbuzz: Generate it with "Requires: pango <depedencies>" as before, otherwise for MSVC builds where we find these libraries manually, we don't put these packages under "Requires:..." or "Requires.private:...", but instead put them under "Libs:", linking to each dep as -l<.lib file name> This is so that pangocairo.pc and pangooft2.pc can be correctly used by items that need to make use of it, such as g-ir-scanner. https://bugzilla.gnome.org/show_bug.cgi?id=783274
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac19
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index cc76b4a7..bc152923 100644
--- a/configure.ac
+++ b/configure.ac
@@ -423,6 +423,25 @@ if $have_cairo ; then
AC_SUBST(PKGCONFIG_CAIRO_REQUIRES)
fi
+# To compensate for Meson builds on MSVC where pkg-config files may well not be
+# available for cairo, harfbuzz, freetype2 and fontconfig
+CAIRO_PC="cairo"
+FREETYPE2_PC="freetype2"
+FONTCONFIG_PC="fontconfig"
+HARFBUZZ_PC="harfbuzz"
+AC_SUBST(CAIRO_PC)
+AC_SUBST(FREETYPE2_PC)
+AC_SUBST(FONTCONFIG_PC)
+AC_SUBST(HARFBUZZ_PC)
+CAIRO_LIB=
+FREETYPE2_LIB=
+FONTCONFIG_LIB=
+HARFBUZZ_LIB=
+AC_SUBST(CAIRO_LIB)
+AC_SUBST(FREETYPE2_LIB)
+AC_SUBST(FONTCONFIG_LIB)
+AC_SUBST(HARFBUZZ_LIB)
+
AM_CONDITIONAL(HAVE_CAIRO, $have_cairo)
AM_CONDITIONAL(HAVE_CAIRO_PNG, $have_cairo_png)
AM_CONDITIONAL(HAVE_CAIRO_PS, $have_cairo_ps)