diff options
author | László Németh <nemeth@numbertext.org> | 2018-02-20 11:38:24 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2018-05-03 11:42:20 +0200 |
commit | f1579d3d6c5f5f3a651825e035b93bee7a4f43c6 (patch) | |
tree | 302e93db63f5029f521a0dba446e2c7b91d08a10 /configure.ac | |
parent | f5a56c367fba1c42b4f9719b10ff3e86ad5e2ab1 (diff) |
tdf#117171 support localized number name numbering styles
in page number, chapter and outline numbering
in ~30 languages by integrating libnumbertext library.
- offapi: add linguistic2::NumberText
New NumberingType constants:
- ordinal indicators (1st, 2nd, 3rd...)
- cardinal number names (One, Two, Three...)
- ordinal number names (First, Second, Third...)
Note: these numberings are parts of OOXML, too.
Plain text files of Libnumbertext's language data
are installed in share/numbertext (similar to
share/fingerprint), allowing further customization.
Change-Id: I4034da0a40a8c926f14a3f591749a89a8d807d5a
Reviewed-on: https://gerrit.libreoffice.org/53313
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index e57333f7963c..15cd5bb408c7 100644 --- a/configure.ac +++ b/configure.ac @@ -9651,6 +9651,32 @@ if test "$with_system_libexttextcat" = "yes"; then fi AC_SUBST(SYSTEM_LIBEXTTEXTCAT_DATA) +dnl =================================================================== +dnl Checking for libnumbertext +dnl =================================================================== +ENABLE_LIBNUMBERTEXT=TRUE +LIBNUMBERTEXT_CFLAGS="-DENABLE_LIBNUMBERTEXT" +libo_CHECK_SYSTEM_MODULE([libnumbertext],[LIBNUMBERTEXT],[libnumbertext >= 1.0.0]) +if test "$with_system_libnumbertext" = "yes"; then + SYSTEM_LIBNUMBERTEXT_DATA=file://`$PKG_CONFIG --variable=pkgdatadir libnumbertext` +else + AC_LANG_PUSH([C++]) + save_CXXFLAGS=$CXXFLAGS + CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11" + AC_CHECK_HEADERS([codecvt regex]) + AS_IF([test "x$ac_cv_header_codecvt" != xyes -o "x$ac_cv_header_regex" != xyes], + [ ENABLE_LIBNUMBERTEXT='' + LIBNUMBERTEXT_CFLAGS='' + AC_MSG_WARN([No system-provided libnumbertext or codecvt/regex C++11 headers (min. libstdc++ 4.9). + Enable libnumbertext fallback (missing number to number name conversion).]) + ]) + CXXFLAGS=$save_CXXFLAGS + AC_LANG_POP([C++]) +fi +AC_SUBST(SYSTEM_LIBNUMBERTEXT_DATA) +AC_SUBST(ENABLE_LIBNUMBERTEXT) +AC_SUBST(LIBNUMBERTEXT_CFLAGS) + dnl *************************************** dnl testing libc version for Linux... dnl *************************************** |