[HarfBuzz] Buildfix for non pkg-config ICU installations

Dominik Röttsches dominik.rottsches at intel.com
Tue Nov 6 06:10:55 PST 2012


Hi Behdad,

I am attaching a buildfix proposal for systems that don't have 
pkg-config files for ICU, such as Ubuntu 12.04 or Debian up until recently.
It'd be great if you can merge this one. This would really help us, 
bumping the Harfbuzz dependency version for WebKit-EFL and WebKit-GTK.

Thanks,

Dominik

=== 8< === *snip*

diff --git a/configure.ac b/configure.ac
index 93b659b..26876b3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -184,6 +184,31 @@ fi
  AM_CONDITIONAL(HAVE_ICU_LE, $have_icu_le)

  dnl 
==========================================================================
+dnl Fallback to icu-config if ICU pkg-config files could not be found
+dnl 
==========================================================================
+
+if test "$have_icu" != "true"; then
+    AC_PATH_PROG(icu_config, icu-config, no)
+    AC_MSG_CHECKING([for ICU by using icu-config fallback])
+    if test "$icu_config" != "no"; then
+        # We don't use --cflags as this gives us a lot of things that 
we don't
+        # necessarily want, like debugging and optimization flags
+        # See man (1) icu-config for more info.
+        ICU_CFLAGS=`$icu_config --cppflags`
+        ICU_LIBS=`$icu_config --ldflags-libsonly --ldflags-layout`
+        AC_SUBST(ICU_CFLAGS)
+        AC_SUBST(ICU_LIBS)
+        AC_DEFINE(HAVE_ICU_LE, 1, [Have ICU Layout Engine library])
+        AC_DEFINE(HAVE_ICU, 1, [Have ICU library])
+        AM_CONDITIONAL(HAVE_ICU, true)
+        AM_CONDITIONAL(HAVE_ICU_LE, true)
+        AC_MSG_RESULT([yes])
+    else
+        AC_MSG_RESULT([no])
+    fi
+fi
+
+dnl 
==========================================================================

  PKG_CHECK_MODULES(GRAPHITE2, graphite2, have_graphite=true, 
have_graphite=false)
  if $have_graphite; then
-- 
1.7.9.5




More information about the HarfBuzz mailing list