Evas: Added harfbuzz detection (it's optional, just like fribidi).
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 30 Jan 2011 10:34:56 +0000 (10:34 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 30 Jan 2011 10:34:56 +0000 (10:34 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@56440 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

configure.ac
src/lib/Makefile.am

index 8067f8d..29774a4 100644 (file)
@@ -89,6 +89,7 @@ AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")
 
 want_fontconfig="auto"
 want_fribidi="auto"
+want_harfbuzz="auto"
 want_evas_cserve="yes"
 
 want_evas_engine_buffer="yes"
@@ -302,6 +303,38 @@ if test "x${have_fribidi}" = "xno"; then
   HAS_BIDI=0
 fi
 
+# harfbuzz support
+have_harfbuzz="no"
+AC_ARG_ENABLE([harfbuzz],
+   AC_HELP_STRING([--disable-harfbuzz],
+      [disable complex text shaping and layouting support. @<:@default=enabled@:>@]),
+   [
+    if test "x${enableval}" = "xyes" ; then
+       want_harfbuzz="yes"
+    else
+       want_harfbuzz="no"
+    fi
+   ])
+
+if test "x${want_harfbuzz}" = "xyes" -o "x${want_harfbuzz}" = "xauto" ; then
+   PKG_CHECK_MODULES([HARFBUZZ],
+      [harfbuzz >= 0.2],
+      [
+       have_harfbuzz="yes"
+       AC_DEFINE(HAVE_HARFBUZZ, 1, [have harfbuzz support])
+       requirement_evas="harfbuzz ${requirement_evas}"
+      ],
+      [
+       if test "x$want_harfbuzz" = "xyes" -a "x$use_strict" = "xyes" ; then
+          AC_MSG_ERROR([Harfbuzz not found (strict dependencies checking)])
+       fi
+      ])
+fi
+
+if test "x${have_harfbuzz}" = "xno"; then
+  HAS_HARFBUZZ=0
+fi
+
 ### Checks for header files
 AC_HEADER_STDC
 AC_CHECK_HEADERS([unistd.h stdint.h sys/param.h])
@@ -1639,7 +1672,10 @@ echo "  EET.....................: $have_evas_font_loader_eet"
 echo
 echo "Font Searching Systems:"
 echo "  Fontconfig..............: $have_fontconfig"
+echo
+echo "Font Rendering Helpers:"
 echo "  Fribidi.................: $have_fribidi"
+echo "  Harfbuzz................: $have_harfbuzz"
 # FIXME: add non freetype2 font engine support
 # FIXME: make freetype2 optional
 echo
index 16e0def..90287e4 100644 (file)
@@ -185,6 +185,7 @@ AM_CPPFLAGS = \
 @EINA_CFLAGS@ \
 @FREETYPE_CFLAGS@ \
 @FRIBIDI_CFLAGS@ \
+@HARFBUZZ_CFLAGS@ \
 @EET_CFLAGS@ \
 @FONTCONFIG_CFLAGS@ \
 @pthread_cflags@
@@ -212,6 +213,7 @@ $(libevas_cserve_la) \
 engines/common/libevas_engine_common.la \
 @FREETYPE_LIBS@ \
 @FRIBIDI_LIBS@ \
+@HARFBUZZ_LIBS@ \
 @EET_LIBS@ \
 @FONTCONFIG_LIBS@ \
 @pthread_libs@ \