ICU-11023 merge from branch

X-SVN-Rev: 36425
This commit is contained in:
Steven R. Loomis 2014-09-10 02:20:50 +00:00
parent a7eb42956a
commit 68e82040f9
19 changed files with 506 additions and 23 deletions

View file

@ -246,7 +246,13 @@
In the future, passing "<tt>--enable-layout</tt>" to configure
will be required to
enable the layout engine.</p>
<p>
Note that the ParagraphLayout (layoutex) library is not deprecated.
There is a new option, <tt>--enable-layoutex</tt> which will build
the ParagraphLayout library using <a href="http://harfbuzz.org">HarfBuzz</a>
instead of ICU as the layout engine. See <a href="http://userguide.icu-project.org/layoutengine">
the users' guide</a> for more information about how to build.
</p>
<h3>Deprecation: Collation Short Strings</h3>
<p>The collation short naming scheme and its API functions are deprecated.
Use ucol_open() with language tag collation keywords instead (see <a href="http://userguide.icu-project.org/collation/api">Collation API Details</a>). For example, <code>ucol_open("de-u-co-phonebk-ka-shifted", &amp;errorCode)</code>

View file

@ -1,6 +1,6 @@
#******************************************************************************
#
# Copyright (C) 1998-2013, International Business Machines
# Copyright (C) 1998-2014, International Business Machines
# Corporation and others. All Rights Reserved.
#
#******************************************************************************
@ -29,7 +29,8 @@ subdir = .
#AUTOCONF = @AUTOCONF@
## Optional directory setup
@LAYOUT_TRUE@LAYOUT = layout layoutex
@LAYOUT_TRUE@LAYOUT = layout
@LAYOUTEX_TRUE@LAYOUTEX = layoutex
@ICUIO_TRUE@ICUIO = io
@EXTRAS_TRUE@EXTRA = extra
@TESTS_TRUE@TEST = test
@ -38,7 +39,8 @@ subdir = .
## pkgconfig setup. Always have uc and i18n. Others are optional.
ALL_PKGCONFIG_SUFFIX=uc i18n
@LAYOUT_TRUE@ALL_PKGCONFIG_SUFFIX+= le lx
@LAYOUT_TRUE@ALL_PKGCONFIG_SUFFIX+= le
@LAYOUTEX_TRUE@ALL_PKGCONFIG_SUFFIX+= lx
@ICUIO_TRUE@ALL_PKGCONFIG_SUFFIX+= io
DOXYGEN = @DOXYGEN@
@ -163,6 +165,11 @@ ifndef VERBOSE
endif
install-local: install-icu install-manx
# always installs. Used by layoutex.
install-pkgconfig: $(ALL_PKGCONFIG_FILES)
@$(MKINSTALLDIRS) $(DESTDIR)$(libdir)/pkgconfig
$(INSTALL_DATA) $(ALL_PKGCONFIG_FILES) $(DESTDIR)$(libdir)/pkgconfig/
install-icu: $(INSTALLED_BUILT_FILES)
@$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/config
@$(MKINSTALLDIRS) $(DESTDIR)$(pkglibdir)
@ -284,11 +291,22 @@ config/icu-le.pc: config/icu.pc Makefile icudefs.mk
@echo "Libs:" "${ICULIBS_LE}" >> $@
@echo $@ updated.
ICULEHB_LIBS=@ICULEHB_LIBS@
USING_HB=
ifneq ($(ICULEHB_LIBS),)
USING_HB=(Using HarfBuzz)
endif
config/icu-lx.pc: config/icu.pc Makefile icudefs.mk
@cat config/icu.pc > $@
@echo "Description: $(PACKAGE_ICU_DESCRIPTION): Paragraph Layout library" >> $@
@echo "Description: $(PACKAGE_ICU_DESCRIPTION): Paragraph Layout library $(USING_HB)" >> $@
@echo "Name: $(PACKAGE)-lx" >> $@
ifneq ($(ICULEHB_LIBS),)
@echo "Requires: icu-le-hb icu-uc" >> $@
else
@echo "Requires: icu-le" >> $@
endif
@echo "Libs:" "${ICULIBS_LX}" >> $@
@echo $@ updated.

View file

@ -11,4 +11,160 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
#
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
# ----------------------------------
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=m4_default([$1], [0.9.0])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
PKG_CONFIG=""
fi
fi[]dnl
])# PKG_PROG_PKG_CONFIG
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
#
# Check to see whether a particular set of modules exists. Similar
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
#
#
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
# this or PKG_CHECK_MODULES is called, or make sure to call
# PKG_CHECK_EXISTS manually
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
m4_ifval([$2], [$2], [:])
m4_ifvaln([$3], [else
$3])dnl
fi])
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
# ---------------------------------------------
m4_define([_PKG_CONFIG],
[if test -n "$$1"; then
pkg_cv_[]$1="$$1"
elif test -n "$PKG_CONFIG"; then
PKG_CHECK_EXISTS([$3],
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
[pkg_failed=yes])
else
pkg_failed=untried
fi[]dnl
])# _PKG_CONFIG
# _PKG_SHORT_ERRORS_SUPPORTED
# -----------------------------
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi[]dnl
])# _PKG_SHORT_ERRORS_SUPPORTED
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
# [ACTION-IF-NOT-FOUND])
#
#
# Note that if there is a possibility the first call to
# PKG_CHECK_MODULES might not happen, you should be sure to include an
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
#
#
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
AC_MSG_CHECKING([for $1])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.])
if test $pkg_failed = yes; then
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
ifelse([$4], , [AC_MSG_ERROR(dnl
[Package requirements ($2) were not met:
$$1_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
_PKG_TEXT
])],
[AC_MSG_RESULT([no])
$4])
elif test $pkg_failed = untried; then
ifelse([$4], , [AC_MSG_FAILURE(dnl
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
_PKG_TEXT
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
[$4])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
AC_MSG_RESULT([yes])
ifelse([$3], , :, [$3])
fi[]dnl
])# PKG_CHECK_MODULES
m4_include([acinclude.m4])

221
icu4c/source/configure vendored
View file

@ -644,6 +644,7 @@ DATA_PACKAGING_MODE
thepkgicudatadir
pkgicudatadir
TOOLS_TRUE
LAYOUTEX_TRUE
LAYOUT_TRUE
ICUIO_TRUE
EXTRAS_TRUE
@ -691,6 +692,9 @@ INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
CPP
ICULEHB_LIBS
ICULEHB_CFLAGS
PKG_CONFIG
ac_ct_CXX
CXXFLAGS
CXX
@ -778,6 +782,7 @@ enable_weak_threads
enable_extras
enable_icuio
enable_layout
enable_layoutex
enable_tools
with_data_packaging
with_library_suffix
@ -795,6 +800,9 @@ CPPFLAGS
CXX
CXXFLAGS
CCC
PKG_CONFIG
ICULEHB_CFLAGS
ICULEHB_LIBS
CPP'
@ -1426,6 +1434,9 @@ Optional Features:
--enable-extras build ICU extras default=yes
--enable-icuio build ICU's icuio library default=yes
--enable-layout build ICU's DEPRECATED layout library default=yes
--enable-layoutex build ICU's Paragraph Layout library default=same-as-layout.
If not building with the ICU Layout library, then icu-le-hb must be installed via pkg-config.
See http://harfbuzz.org
--enable-tools build ICU's tools default=yes
--enable-tests build ICU tests default=yes
--enable-samples build ICU samples default=yes
@ -1457,6 +1468,11 @@ Some influential environment variables:
you have headers in a nonstandard directory <include dir>
CXX C++ compiler command
CXXFLAGS C++ compiler flags
PKG_CONFIG path to pkg-config utility
ICULEHB_CFLAGS
C compiler flags for ICULEHB, overriding pkg-config
ICULEHB_LIBS
linker flags for ICULEHB, overriding pkg-config
CPP C preprocessor
Use these variables to override the choices made by `configure' or to help
@ -2569,6 +2585,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
PACKAGE="icu"
@ -3647,6 +3664,191 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
# pkg-config is needed for harfbuzz support
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test -z "$ac_cv_path_PKG_CONFIG"; then
ac_pt_PKG_CONFIG=$PKG_CONFIG
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $ac_pt_PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
if test -n "$ac_pt_PKG_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
$as_echo "$ac_pt_PKG_CONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$ac_pt_PKG_CONFIG" = x; then
PKG_CONFIG=""
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
PKG_CONFIG=$ac_pt_PKG_CONFIG
fi
else
PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
fi
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=0.20
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
PKG_CONFIG=""
fi
fi
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICULEHB" >&5
$as_echo_n "checking for ICULEHB... " >&6; }
if test -n "$ICULEHB_CFLAGS"; then
pkg_cv_ICULEHB_CFLAGS="$ICULEHB_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-le-hb\""; } >&5
($PKG_CONFIG --exists --print-errors "icu-le-hb") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_ICULEHB_CFLAGS=`$PKG_CONFIG --cflags "icu-le-hb" 2>/dev/null`
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$ICULEHB_LIBS"; then
pkg_cv_ICULEHB_LIBS="$ICULEHB_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-le-hb\""; } >&5
($PKG_CONFIG --exists --print-errors "icu-le-hb") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_ICULEHB_LIBS=`$PKG_CONFIG --libs "icu-le-hb" 2>/dev/null`
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test $pkg_failed = yes; then
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
ICULEHB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "icu-le-hb" 2>&1`
else
ICULEHB_PKG_ERRORS=`$PKG_CONFIG --print-errors "icu-le-hb" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$ICULEHB_PKG_ERRORS" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
:
elif test $pkg_failed = untried; then
:
else
ICULEHB_CFLAGS=$pkg_cv_ICULEHB_CFLAGS
ICULEHB_LIBS=$pkg_cv_ICULEHB_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
have_icu_le_hb=true
fi
# Ensure that if CXXFLAGS/CFLAGS were not set when calling configure, set it correctly based on (enable/disable) debug or release option
# The release mode use is the default one for autoconf
if test "$GCC" = yes; then
@ -7267,6 +7469,25 @@ else
LAYOUT_TRUE='#'
fi
# Enable/disable layoutex
# Check whether --enable-layoutex was given.
if test "${enable_layoutex+set}" = set; then :
enableval=$enable_layoutex; case "${enableval}" in
yes) layoutex=true ;;
no) layoutex=false ;;
*) as_fn_error $? "bad value ${enableval} for --enable-layoutex" "$LINENO" 5 ;;
esac
else
layoutex=$layout
fi
if test "$layoutex" = true; then
LAYOUTEX_TRUE=
else
LAYOUTEX_TRUE='#'
fi
# Enable/disable tools
# Check whether --enable-tools was given.
if test "${enable_tools+set}" = set; then :

View file

@ -13,6 +13,7 @@ AC_INIT([ICU],
[International Components for Unicode],
[http://icu-project.org])
AC_CONFIG_MACRO_DIR([config/m4])
AC_CONFIG_SRCDIR([common/unicode/utypes.h])
PACKAGE="icu"
@ -134,6 +135,10 @@ AC_PROG_CC([clang gcc cc c99 c89 xlc_r xlc cl.exe icc])
# The g++ compiler is less likely to support C++11.
AC_PROG_CXX([clang++ g++ c++ gpp xlC_r xlC aCC CC cxx cc++ cl.exe icc FCC KCC RCC])
# pkg-config is needed for harfbuzz support
PKG_PROG_PKG_CONFIG([0.20])
PKG_CHECK_MODULES(ICULEHB, icu-le-hb, have_icu_le_hb=true, :)
# Ensure that if CXXFLAGS/CFLAGS were not set when calling configure, set it correctly based on (enable/disable) debug or release option
# The release mode use is the default one for autoconf
if test "$GCC" = yes; then
@ -1069,6 +1074,19 @@ AC_ARG_ENABLE(layout,
layout=true)
ICU_CONDITIONAL(LAYOUT, test "$layout" = true)
# Enable/disable layoutex
AC_ARG_ENABLE(layoutex,
[ --enable-layoutex build ICU's Paragraph Layout library [default=same-as-layout].
If not building with the ICU Layout library, then icu-le-hb must be installed via pkg-config.
See http://harfbuzz.org],
[case "${enableval}" in
yes) layoutex=true ;;
no) layoutex=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-layoutex) ;;
esac],
layoutex=$layout)
ICU_CONDITIONAL(LAYOUTEX, test "$layoutex" = true)
# Enable/disable tools
AC_ARG_ENABLE(tools,
[ --enable-tools build ICU's tools [default=yes]],

View file

@ -2,12 +2,12 @@
#
# Yves Arrouye.
#
# Copyright (C) 2000-2013, International Business Machines Corporation and others.
# Copyright (C) 2000-2014, International Business Machines Corporation and others.
# All Rights Reserved.
#
# Some of these variables are overridden in the config/mh-* files.
#
#
# Please be sure to update config/Makefile.inc.in if you add something here.
#
@ -249,11 +249,27 @@ IO_STUBNAME = io
TOOLUTIL_STUBNAME = tu
CTESTFW_STUBNAME = test
# get these from pkg-config, if available
ICULEHB_CFLAGS=@ICULEHB_CFLAGS@
ICULEHB_LIBS=@ICULEHB_LIBS@
ifneq ($(ICULEHB_CFLAGS),)
USING_ICULEHB=yes
ICULEHB_TRUE=
ICULEHB_FALSE=#
ICULIBS_LE=$(ICULEHB_LIBS)
ICULE_CFLAGS=$(ICULEHB_CFLAGS) -DUSING_ICULEHB
else
USING_ICULEHB=no
ICULEHB_TRUE=#
ICULEHB_FALSE=
ICULIBS_LE = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUT_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
ICULE_CFLAGS=-I$(top_srcdir)
endif
# Just the libs.
ICULIBS_DT = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
ICULIBS_UC = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(COMMON_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
ICULIBS_I18N = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
ICULIBS_LE = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUT_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
ICULIBS_LX = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUTEX_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
ICULIBS_IO = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(IO_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
ICULIBS_CTESTFW = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(CTESTFW_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
@ -266,7 +282,7 @@ LCTESTFW = -L$(top_builddir)/tools/ctestfw
LIBICUDT = $(LLIBDIR) $(LSTUBDIR) $(ICULIBS_DT)
LIBICUUC = $(LLIBDIR) $(ICULIBS_UC) $(LSTUBDIR) $(ICULIBS_DT)
LIBICUI18N = $(LLIBDIR) $(ICULIBS_I18N)
LIBICULE = $(LLIBDIR) $(ICULIBS_LE)
LIBICULE = $(ICULEHB_CFLAGS) $(LLIBDIR) $(ICULIBS_LE)
LIBICULX = $(LLIBDIR) $(ICULIBS_LX)
LIBCTESTFW = $(LCTESTFW) $(ICULIBS_CTESTFW)
LIBICUTOOLUTIL = $(LLIBDIR) $(ICULIBS_TOOLUTIL)

View file

@ -1,6 +1,6 @@
#******************************************************************************
#
# Copyright (C) 1999-2011, International Business Machines
# Copyright (C) 1999-2014, International Business Machines
# Corporation and others. All Rights Reserved.
#
#******************************************************************************
@ -52,7 +52,15 @@ DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS)
CFLAGS += $(LIBCFLAGS)
CXXFLAGS += $(LIBCXXFLAGS)
CPPFLAGS += -I$(srcdir) -I$(srcdir)/unicode -I$(srcdir)/.. -I$(top_srcdir)/common $(LIBCPPFLAGS)
ifeq ($(USING_ICULEHB),no)
# cppflags: load .. so that #include <layout/...> works
ICULE_CFLAGS=-I$(srcdir)/..
else
ICULE_CFLAGS=$(ICULEHB_CFLAGS)
endif
CPPFLAGS += -I$(srcdir) -I$(srcdir)/unicode -I$(top_srcdir)/common $(ICULE_CFLAGS) $(LIBCPPFLAGS)
DEFS += -DU_LAYOUTEX_IMPLEMENTATION
LDFLAGS += $(LDFLAGSICULX)
LIBS = $(LIBICUUC) $(LIBICULE) $(DEFAULT_LIBS)
@ -93,6 +101,10 @@ check-exhaustive: check
all-local: $(ALL_TARGETS)
install-local: install-headers install-library
ifneq ($(ICULE_CFLAGS),)
@echo "Installing icu-lx.pc"
$(MAKE) ALL_PKGCONFIG_SUFFIX=lx -C .. install-pkgconfig
endif
install-library: all-local
$(MKINSTALLDIRS) $(DESTDIR)$(libdir)

View file

@ -38,11 +38,14 @@ U_NAMESPACE_BEGIN
* same font, script and direction, and will create a <code>LayoutEngine</code> object for each run.
* The <code>LayoutEngine</code> will transform the characters into glyph codes in visual order.
*
* Clients can use this to break a paragraph into lines, and to display the glyphs in each line.
* Clients can use this to break a paragraph into lines, and to display the glyphs in each line.
*
* Note that {@link icu::LayoutEngine} is deprecated, but this class is not.
* You may use this class with the HarfBuzz icu-le-hb wrapper,
* see http://www.freedesktop.org/wiki/Software/HarfBuzz/
*
* See http://userguide.icu-project.org/layoutengine for special build instructions.
*
* @see icu::LayoutEngine
*/
class U_LAYOUTEX_API ParagraphLayout : public UObject

View file

@ -14,7 +14,11 @@ include $(top_builddir)/icudefs.mk
subdir = test
@ICUIO_TRUE@IOTEST = iotest
@LAYOUT_TRUE@LETEST = letest
# the letest directory depends on layoutex.
# If you have layoutex but not layout, you will be using
# harfbuzz.
@LAYOUTEX_TRUE@LETEST = letest
# status dir
STATUS_TMP = tmp

View file

@ -31,7 +31,10 @@ BUILDDIR := $(BUILDDIR:test\\cintltst/../../=)
# Simplify the path for Windows 98
BUILDDIR := $(BUILDDIR:TEST\\CINTLTST/../../=)
CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/ctestfw -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/layout -I$(top_srcdir)/layoutex -I$(top_srcdir)
CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/ctestfw -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/layoutex $(ICULE_CFLAGS)
ifeq ($(USING_ICULEHB),no)
CPPFLAGS+=-I$(top_srcdir)/layout
endif
DEFS += -D'U_TOPSRCDIR="$(top_srcdir)/"' -D'U_TOPBUILDDIR="$(BUILDDIR)"'
LIBS = $(LIBICULX) $(LIBICULE) $(LIBICUUC) $(LIBICUI18N) $(LIBCTESTFW) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M)

View file

@ -17,7 +17,10 @@
#include "layout/LETypes.h"
#include "layout/LEFontInstance.h"
#ifndef USING_ICULEHB
#include "CanonShaping.h"
#endif
#include "SimpleFontInstance.h"
SimpleFontInstance::SimpleFontInstance(float pointSize, LEErrorCode &status)
@ -40,6 +43,7 @@ SimpleFontInstance::~SimpleFontInstance()
const void *SimpleFontInstance::getFontTable(LETag tableTag) const
{
#ifndef USING_ICULEHB
if (tableTag == LE_GSUB_TABLE_TAG) {
return CanonShaping::glyphSubstitutionTable;
}
@ -47,7 +51,7 @@ const void *SimpleFontInstance::getFontTable(LETag tableTag) const
if (tableTag == LE_GDEF_TABLE_TAG) {
return CanonShaping::glyphDefinitionTable;
}
#endif
return NULL;
}

View file

@ -1,10 +1,12 @@
/*
*
* (C) Copyright IBM Corp. 1998-2008 - All Rights Reserved
* (C) Copyright IBM Corp. 1998-2014 - All Rights Reserved
*
*/
#include "LETypes.h"
#ifndef USING_ICULEHB /* C API not available under HB */
#include "layout/LETypes.h"
#include "loengine.h"
#include "PortableFontInstance.h"
#include "SimpleFontInstance.h"
@ -67,3 +69,4 @@ le_uint32 le_getFontChecksum(le_font *font)
}
U_CDECL_END
#endif

View file

@ -1,9 +1,11 @@
/*
*
* (C) Copyright IBM Corp. 1998-2008 - All Rights Reserved
* (C) Copyright IBM Corp. 1998-2014 - All Rights Reserved
*
*/
#ifndef USING_ICULEHB /* C API not available under HB */
#ifndef __CFONTS_H
#define __CFONTS_H
@ -30,3 +32,4 @@ void le_deleteUnicodeNameString(le_font *font, const LEUnicode16 *name);
le_uint32 le_getFontChecksum(le_font *font);
#endif
#endif

View file

@ -7,6 +7,8 @@
*******************************************************************************
*/
#ifndef USING_ICULEHB /* C API not available under HB */
#include "unicode/utypes.h"
#include "unicode/ubidi.h"
#include "unicode/uscript.h"
@ -742,3 +744,4 @@ U_CFUNC void addCTests(TestNode **root)
}
#endif

View file

@ -972,7 +972,9 @@ static void addAllTests(TestNode **root)
addTest(root, &DataDrivenTest, "layout/DataDrivenTest");
addTest(root, &GlyphToCharTest, "paragraph/GlyphToCharTest");
#ifndef USING_ICULEHB
addCTests(root);
#endif
}
/* returns the path to icu/source/data/out */

View file

@ -1,7 +1,7 @@
/*
*******************************************************************************
*
* Copyright (C) 1999-2011, International Business Machines
* Copyright (C) 1999-2014, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@ -14,7 +14,12 @@
#ifndef __LETEST_H
#define __LETEST_H
#ifdef USING_ICULEHB
#include "layout/LETypes.h"
#else
#include "LETypes.h"
#endif
#include "unicode/ctest.h"
#include <stdlib.h>

View file

@ -1,7 +1,7 @@
/*
*******************************************************************************
*
* Copyright (C) 1999-2008, International Business Machines
* Copyright (C) 1999-2014, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@ -20,7 +20,9 @@
#include "layout/LayoutEngine.h"
#include "layout/LELanguages.h"
#ifndef USING_ICULEHB
#include "OpenTypeLayoutEngine.h"
#endif
#include "letest.h"
#include "letsutil.h"
@ -102,11 +104,13 @@ le_int32 getLanguageCode(const char *lang)
LETag langTag = (LETag) ((lang[0] << 24) + (lang[1] << 16) + (lang[2] << 8) + 0x20);
#ifndef USING_ICULEHB
for (le_int32 i = 0; i < languageCodeCount; i += 1) {
if (langTag == OpenTypeLayoutEngine::languageTags[i]) {
return i;
}
}
#endif
return -1;
}

View file

@ -1,7 +1,7 @@
/*
*******************************************************************************
*
* Copyright (C) 1999-2008, International Business Machines
* Copyright (C) 1999-2014, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@ -23,7 +23,9 @@
#include "layout/LayoutEngine.h"
#include "layout/LELanguages.h"
#ifndef USING_ICULEHB
#include "OpenTypeLayoutEngine.h"
#endif
#include "letest.h"

View file

@ -1,13 +1,13 @@
/*
*
* (C) Copyright IBM Corp. 1998-2007 - All Rights Reserved
* (C) Copyright IBM Corp. 1998-2014 - All Rights Reserved
*
*/
#ifndef __XMLREADER_H
#define __XMLREADER_H
#include "LETypes.h"
#include "layout/LETypes.h"
#include "letest.h"
typedef void (*TestCaseCallback) (const char *testID,