[HarfBuzz] harfbuzz: Branch 'master' - 3 commits

Behdad Esfahbod behdad at kemper.freedesktop.org
Sun Mar 13 03:15:41 UTC 2016


 configure.ac    |   33 +++++++++++++++++++--------------
 src/Makefile.am |    7 +++++++
 src/hb-icu.cc   |    1 +
 3 files changed, 27 insertions(+), 14 deletions(-)

New commits:
commit fef5dd9a72f326c160a7194f558749d24bac7283
Merge: 01ea9ea 5f995db
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Sat Mar 12 19:15:15 2016 -0800

    Merge pull request #232 from c0nk/wip-icu
    
    Add --with-icu=builtin option; fix compile error

commit 5f995db10381172ec63fd7ffbb0acf2c6b3dae5e
Author: Kal Conley <kcconley at gmail.com>
Date:   Fri Feb 26 00:36:17 2016 +0100

    Fix missing ICU #include
    
    Fix compile error in hb-icu.cc when ICU configured with
    U_NO_DEFAULT_INCLUDE_UTF_HEADERS=1

diff --git a/src/hb-icu.cc b/src/hb-icu.cc
index 24cec9d..ee54721 100644
--- a/src/hb-icu.cc
+++ b/src/hb-icu.cc
@@ -36,6 +36,7 @@
 #include <unicode/uchar.h>
 #include <unicode/unorm.h>
 #include <unicode/ustring.h>
+#include <unicode/utf16.h>
 #include <unicode/uversion.h>
 
 
commit b424b6c372dfe4c0ed75a49761eb34a416819446
Author: Kal Conley <kcconley at gmail.com>
Date:   Fri Feb 26 00:35:15 2016 +0100

    Add --with-icu=builtin configure option

diff --git a/configure.ac b/configure.ac
index 91ccb70..38b976b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -197,17 +197,6 @@ m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [
 	AM_CONDITIONAL([HAVE_INTROSPECTION], false)
 ])
 
-dnl ===========================================================================
-
-have_ucdn=true
-if $have_glib; then
-	have_ucdn=false
-fi
-if $have_ucdn; then
-	AC_DEFINE(HAVE_UCDN, 1, [Have UCDN Unicode functions])
-fi
-AM_CONDITIONAL(HAVE_UCDN, $have_ucdn)
-
 dnl ==========================================================================
 
 AC_ARG_WITH(cairo,
@@ -256,11 +245,11 @@ AM_CONDITIONAL(HAVE_FONTCONFIG, $have_fontconfig)
 dnl ==========================================================================
 
 AC_ARG_WITH(icu,
-	[AS_HELP_STRING([--with-icu=@<:@yes/no/auto@:>@],
+	[AS_HELP_STRING([--with-icu=@<:@yes/no/builtin/auto@:>@],
 			[Use ICU @<:@default=auto@:>@])],,
 	[with_icu=auto])
 have_icu=false
-if test "x$with_icu" = "xyes" -o "x$with_icu" = "xauto"; then
+if test "x$with_icu" = "xyes" -o "x$with_icu" = "xbuiltin" -o "x$with_icu" = "xauto"; then
 	PKG_CHECK_MODULES(ICU, icu-uc, have_icu=true, :)
 
 	dnl Fallback to icu-config if ICU pkg-config files could not be found
@@ -282,14 +271,30 @@ if test "x$with_icu" = "xyes" -o "x$with_icu" = "xauto"; then
 		fi
 	fi
 fi
-if test "x$with_icu" = "xyes" -a "x$have_icu" != "xtrue"; then
+if test \( "x$with_icu" = "xyes" -o "x$with_icu" = "xbuiltin" \) -a "x$have_icu" != "xtrue"; then
 	AC_MSG_ERROR([icu support requested but icu-uc not found])
 fi
+
 if $have_icu; then
 	CXXFLAGS="$CXXFLAGS `$PKG_CONFIG --variable=CXXFLAGS icu-uc`"
 	AC_DEFINE(HAVE_ICU, 1, [Have ICU library])
+	if test "x$with_icu" = "xbuiltin"; then
+		AC_DEFINE(HAVE_ICU_BUILTIN, 1, [Use hb-icu Unicode callbacks])
+	fi
 fi
 AM_CONDITIONAL(HAVE_ICU, $have_icu)
+AM_CONDITIONAL(HAVE_ICU_BUILTIN, $have_icu && test "x$with_icu" = "xbuiltin")
+
+dnl ===========================================================================
+
+have_ucdn=true
+if $have_glib || $have_icu && test "x$with_icu" = "xbuiltin"; then
+	have_ucdn=false
+fi
+if $have_ucdn; then
+	AC_DEFINE(HAVE_UCDN, 1, [Have UCDN Unicode functions])
+fi
+AM_CONDITIONAL(HAVE_UCDN, $have_ucdn)
 
 dnl ==========================================================================
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 839f899..8cfe4ac 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -147,6 +147,12 @@ EXTRA_libharfbuzz_fuzzing_la_DEPENDENCIES = $(EXTRA_libharfbuzz_la_DEPENDENCIES)
 CLEANFILES += libharfbuzz-fuzzing.la
 
 if HAVE_ICU
+if HAVE_ICU_BUILTIN
+HBCFLAGS += $(ICU_CFLAGS)
+HBLIBS += $(ICU_LIBS)
+HBSOURCES += $(HB_ICU_sources)
+HBHEADERS += $(HB_ICU_headers)
+else
 lib_LTLIBRARIES += libharfbuzz-icu.la
 libharfbuzz_icu_la_SOURCES = $(HB_ICU_sources)
 libharfbuzz_icu_la_CPPFLAGS = $(ICU_CFLAGS)
@@ -155,6 +161,7 @@ libharfbuzz_icu_la_LIBADD = $(ICU_LIBS) libharfbuzz.la
 pkginclude_HEADERS += $(HB_ICU_headers)
 pkgconfig_DATA += harfbuzz-icu.pc
 endif
+endif
 EXTRA_DIST += harfbuzz-icu.pc.in
 
 if HAVE_GOBJECT


More information about the HarfBuzz mailing list