summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDaniel Hirt <daniel.hirt@samsung.com>2015-10-13 10:59:19 +0300
committerDaniel Hirt <daniel.hirt@samsung.com>2015-11-24 14:31:05 +0200
commit40dfc4a45dd076465ea36cfb9e7229da58a907f4 (patch)
treecbf2aff64737079760861e8675741fd43d64a6fd /configure.ac
parent89ef4b70b8b6a04a911da8ef94c2124fab031032 (diff)
Evas textblock: add support for hyphenation wrap style
We now support hyphenation in style. Use "wrap=hyphenation" to use this wrap option. It will hyphenate based on explicit SOFT HYPHEN (&shy;) placement in the text, and with the (optional) assistance of dictionaries compatible with Hunspell's "hyphen" library. This wrap mode favors breaking at hyphen positions in a word, over moving the whole word to the next line. It will put an additional "-" at the break position if it was hyphened. Enabling the hyphen dictionaries is done by adding these configure options: --enable-hyphen (requires Hunspell's "hyphen" library installed) --with-dictionaries-hyphen-dir=DIR (specifies the install location of the actual .dic dictionary files e.g. /usr/share/hyphen) Note that dictionary files are expected to be in the form of "en_US.dic" or anything that ends with it e.g. "hyph_en_US.dic" (this how they are named in Arch Linux). @feature
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac34
1 files changed, 34 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 5c46f8f..d6933be 100644
--- a/configure.ac
+++ b/configure.ac
@@ -878,6 +878,9 @@ EINA_CONFIG([MAGIC_DEBUG], [test "x${have_magic_debug}" = "xyes"])
878AC_ARG_WITH([xattr-tests-path], 878AC_ARG_WITH([xattr-tests-path],
879 [AS_HELP_STRING([--with-xattr-tests-path=DIR],[path of xattr enabled directory to create test files])],[XATTR_TEST_DIR=${withval}][AC_DEFINE_UNQUOTED([XATTR_TEST_DIR],["$withval"], [xattr enabled directory])]) 879 [AS_HELP_STRING([--with-xattr-tests-path=DIR],[path of xattr enabled directory to create test files])],[XATTR_TEST_DIR=${withval}][AC_DEFINE_UNQUOTED([XATTR_TEST_DIR],["$withval"], [xattr enabled directory])])
880 880
881AC_ARG_WITH([dictionaries-hyphen-dir],
882 [AS_HELP_STRING([--with-dictionaries-hyphen-dir=DIR],[path of hunspell-compatible hyphen dictionaries])],[EVAS_DICTS_HYPHEN_DIR=${withval}][AC_DEFINE_UNQUOTED([EVAS_DICTS_HYPHEN_DIR],["$withval"], [Hunspell-compatible hyphen dictionaries install directory])])
883
881### Checks for programs 884### Checks for programs
882 885
883### Checks for libraries 886### Checks for libraries
@@ -1609,6 +1612,18 @@ AC_ARG_ENABLE([harfbuzz],
1609 ], 1612 ],
1610 [want_harfbuzz="no"]) 1613 [want_harfbuzz="no"])
1611 1614
1615# Hyphenation
1616AC_ARG_ENABLE([hyphen],
1617 [AS_HELP_STRING([--enable-hyphen],[enable text hyphenation support. @<:@default=disabled@:>@])],
1618 [
1619 if test "x${enableval}" = "xyes" ; then
1620 want_hyphen="yes"
1621 else
1622 want_hyphen="no"
1623 fi
1624 ],
1625 [want_hyphen="no"])
1626
1612# Egl 1627# Egl
1613AC_ARG_ENABLE([egl], 1628AC_ARG_ENABLE([egl],
1614 [AS_HELP_STRING([--enable-egl],[enable EGL rendering. @<:@default=disabled@:>@])], 1629 [AS_HELP_STRING([--enable-egl],[enable EGL rendering. @<:@default=disabled@:>@])],
@@ -2066,6 +2081,25 @@ EFL_EVAL_PKGS([EVAS])
2066 2081
2067### Checks for header files 2082### Checks for header files
2068 2083
2084if test "x$want_hyphen" = "xyes" ; then
2085
2086 EFL_CHECK_LIB_CODE([EVAS], [-lhyphen], [have_fct], [[
2087 #include <string.h>
2088 #include <stdlib.h>
2089 #include <ctype.h>
2090 #include <stdio.h>
2091 #include <hyphen.h>
2092 ]], [[
2093 HyphenDict *dict;
2094 ]])
2095
2096 if test "${have_fct}" = "no"; then
2097 AC_MSG_ERROR([Cannot find the hyphen library.])
2098 else
2099 AC_DEFINE([HAVE_HYPHEN], [1], [have hunspell hyphen support])
2100 fi
2101fi
2102
2069if test "x$have_harfbuzz" = "xyes" ; then 2103if test "x$have_harfbuzz" = "xyes" ; then
2070 2104
2071 CPPFLAGS_SAVE="$CPPFLAGS" 2105 CPPFLAGS_SAVE="$CPPFLAGS"