4 [http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz],
6 [http://freedesktop.org/wiki/Software/harfbuzz])
8 AC_CONFIG_SRCDIR([harfbuzz.pc.in])
9 AC_CONFIG_HEADERS([config.h])
11 AM_INIT_AUTOMAKE([1.11.1 gnu dist-bzip2 no-dist-gzip -Wall no-define])
13 AM_SILENT_RULES([yes])
26 # Functions and headers
27 AC_CHECK_FUNCS(mprotect sysconf getpagesize)
28 AC_CHECK_HEADERS(unistd.h sys/mman.h)
31 if test "x$GCC" = "xyes"; then
33 # Make sure we don't link to libstdc++
34 CXXFLAGS="$CXXFLAGS -fno-rtti -fno-exceptions"
38 # Request byte alignment on arm
39 CXXFLAGS="$CXXFLAGS -mstructure-size-boundary=8"
44 dnl ==========================================================================
46 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, have_glib=true, have_glib=false)
48 AC_DEFINE(HAVE_GLIB, 1, [Have glib2 library])
50 AM_CONDITIONAL(HAVE_GLIB, $have_glib)
52 dnl ==========================================================================
54 PKG_CHECK_MODULES(CAIRO, cairo >= 1.8.0, have_cairo=true, have_cairo=false)
56 AC_DEFINE(HAVE_CAIRO, 1, [Have cairo graphics library])
58 AM_CONDITIONAL(HAVE_CAIRO, $have_cairo)
60 PKG_CHECK_MODULES(CAIRO_PNG, cairo-png, have_cairo_png=true, have_cairo_png=false)
61 if $have_cairo_png; then
62 AC_DEFINE(HAVE_CAIRO_PNG, 1, [Have cairo-png support in cairo graphics library])
64 AM_CONDITIONAL(HAVE_CAIRO_PNG, $have_cairo_png)
66 PKG_CHECK_MODULES(CAIRO_FT, cairo-ft, have_cairo_ft=true, have_cairo_ft=false)
67 if $have_cairo_ft; then
68 AC_DEFINE(HAVE_CAIRO_FT, 1, [Have cairo-ft support in cairo graphics library])
70 AM_CONDITIONAL(HAVE_CAIRO_FT, $have_cairo_ft)
72 dnl ==========================================================================
74 PKG_CHECK_MODULES(ICU, icu, have_icu=true, [
75 AC_CHECK_PROG([have_icu], [icu-config], [true], [false])
77 icu_cflags=`icu-config --cppflags`
78 icu_libs=`icu-config --ldflags-libsonly`
79 AC_SUBST(ICU_CFLAGS, [$icu_cflags])
80 AC_SUBST(ICU_LIBS, [$icu_libs])
84 AC_DEFINE(HAVE_ICU, 1, [Have ICU library])
86 AM_CONDITIONAL(HAVE_ICU, $have_icu)
88 dnl ==========================================================================
90 PKG_CHECK_MODULES(FREETYPE, freetype2, have_freetype=true, have_freetype=false)
91 if $have_freetype; then
92 AC_DEFINE(HAVE_FREETYPE, 1, [Have FreeType 2 library])
94 _save_cflags="$CFLAGS"
95 LIBS="$LIBS $FREETYPE_LIBS"
96 CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
97 AC_CHECK_FUNCS(FT_Face_GetCharVariantIndex)
99 CFLAGS="$_save_cflags"
101 AM_CONDITIONAL(HAVE_FREETYPE, $have_freetype)
103 dnl ==========================================================================