From e820095ca870b45b0ce42d073f9eae53739b359c Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Tue, 4 Dec 2012 13:11:31 +0000 Subject: libs/graphite2: Added for future XeTeX git-svn-id: svn://tug.org/texlive/trunk@28442 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/Makefile.in | 3 + Build/source/aclocal.m4 | 1 + Build/source/configure | 81 + Build/source/libs/Makefile.in | 2 + Build/source/libs/README | 3 + Build/source/libs/aclocal.m4 | 1 + Build/source/libs/configure | 47 + Build/source/libs/graphite2/ChangeLog | 3 + Build/source/libs/graphite2/Makefile.am | 138 + Build/source/libs/graphite2/Makefile.in | 1479 ++ Build/source/libs/graphite2/ac/graphite2.ac | 10 + Build/source/libs/graphite2/ac/withenable.ac | 7 + Build/source/libs/graphite2/aclocal.m4 | 988 + Build/source/libs/graphite2/config.h.in | 71 + Build/source/libs/graphite2/configure | 17903 +++++++++++++++++++ Build/source/libs/graphite2/configure.ac | 63 + .../graphite2/graphite2-1.2.0-PATCHES/ChangeLog | 9 + .../graphite2/graphite2-1.2.0-PATCHES/TL-Changes | 10 + .../patch-01-case-sensitive | 14 + .../graphite2-1.2.0-PATCHES/patch-02-attribute-hot | 14 + .../graphite2-1.2.0-PATCHES/patch-03-old-gcc | 44 + .../graphite2/graphite2-1.2.0/.hg_archival.txt | 5 + Build/source/libs/graphite2/graphite2-1.2.0/.hgeol | 15 + .../libs/graphite2/graphite2-1.2.0/.hgignore | 34 + .../source/libs/graphite2/graphite2-1.2.0/.hgtags | 27 + .../libs/graphite2/graphite2-1.2.0/CMakeLists.txt | 73 + .../source/libs/graphite2/graphite2-1.2.0/COPYING | 26 + .../libs/graphite2/graphite2-1.2.0/ChangeLog | 89 + .../libs/graphite2/graphite2-1.2.0/Graphite.cmake | 99 + .../source/libs/graphite2/graphite2-1.2.0/LICENSE | 510 + .../source/libs/graphite2/graphite2-1.2.0/Todo.txt | 9 + .../libs/graphite2/graphite2-1.2.0/graphite2.pc.in | 7 + .../graphite2-1.2.0/include/graphite2/Font.h | 389 + .../graphite2-1.2.0/include/graphite2/Log.h | 85 + .../graphite2-1.2.0/include/graphite2/Segment.h | 400 + .../graphite2-1.2.0/include/graphite2/Types.h | 69 + .../libs/graphite2/graphite2-1.2.0/src/Bidi.cpp | 578 + .../graphite2/graphite2-1.2.0/src/CMakeLists.txt | 139 + .../graphite2/graphite2-1.2.0/src/CachedFace.cpp | 127 + .../graphite2/graphite2-1.2.0/src/CmapCache.cpp | 152 + .../libs/graphite2/graphite2-1.2.0/src/Code.cpp | 609 + .../libs/graphite2/graphite2-1.2.0/src/Face.cpp | 254 + .../graphite2/graphite2-1.2.0/src/FeatureMap.cpp | 279 + .../graphite2/graphite2-1.2.0/src/FileFace.cpp | 118 + .../libs/graphite2/graphite2-1.2.0/src/Font.cpp | 62 + .../graphite2/graphite2-1.2.0/src/GlyphCache.cpp | 344 + .../graphite2/graphite2-1.2.0/src/GlyphFace.cpp | 48 + .../graphite2/graphite2-1.2.0/src/Justifier.cpp | 267 + .../graphite2/graphite2-1.2.0/src/NameTable.cpp | 222 + .../libs/graphite2/graphite2-1.2.0/src/Pass.cpp | 586 + .../libs/graphite2/graphite2-1.2.0/src/Rule.cpp | 31 + .../graphite2/graphite2-1.2.0/src/SegCache.cpp | 224 + .../graphite2-1.2.0/src/SegCacheEntry.cpp | 106 + .../graphite2-1.2.0/src/SegCacheStore.cpp | 47 + .../libs/graphite2/graphite2-1.2.0/src/Segment.cpp | 453 + .../libs/graphite2/graphite2-1.2.0/src/Silf.cpp | 385 + .../libs/graphite2/graphite2-1.2.0/src/Slot.cpp | 388 + .../libs/graphite2/graphite2-1.2.0/src/Sparse.cpp | 59 + .../libs/graphite2/graphite2-1.2.0/src/TtfUtil.cpp | 1982 ++ .../graphite2/graphite2-1.2.0/src/UtfCodec.cpp | 45 + .../graphite2/graphite2-1.2.0/src/call_machine.cpp | 135 + .../graphite2-1.2.0/src/direct_machine.cpp | 117 + .../libs/graphite2/graphite2-1.2.0/src/files.mk | 115 + .../graphite2/graphite2-1.2.0/src/gr_char_info.cpp | 65 + .../libs/graphite2/graphite2-1.2.0/src/gr_face.cpp | 255 + .../graphite2/graphite2-1.2.0/src/gr_features.cpp | 138 + .../libs/graphite2/graphite2-1.2.0/src/gr_font.cpp | 72 + .../graphite2/graphite2-1.2.0/src/gr_logging.cpp | 193 + .../graphite2/graphite2-1.2.0/src/gr_segment.cpp | 174 + .../libs/graphite2/graphite2-1.2.0/src/gr_slot.cpp | 173 + .../graphite2/graphite2-1.2.0/src/inc/CachedFace.h | 56 + .../graphite2/graphite2-1.2.0/src/inc/CharInfo.h | 67 + .../graphite2/graphite2-1.2.0/src/inc/CmapCache.h | 82 + .../libs/graphite2/graphite2-1.2.0/src/inc/Code.h | 175 + .../graphite2/graphite2-1.2.0/src/inc/Endian.h | 107 + .../libs/graphite2/graphite2-1.2.0/src/inc/Face.h | 209 + .../graphite2/graphite2-1.2.0/src/inc/FeatureMap.h | 187 + .../graphite2/graphite2-1.2.0/src/inc/FeatureVal.h | 68 + .../graphite2/graphite2-1.2.0/src/inc/FileFace.h | 80 + .../libs/graphite2/graphite2-1.2.0/src/inc/Font.h | 92 + .../graphite2/graphite2-1.2.0/src/inc/GlyphCache.h | 93 + .../graphite2/graphite2-1.2.0/src/inc/GlyphFace.h | 83 + .../libs/graphite2/graphite2-1.2.0/src/inc/List.h | 155 + .../graphite2/graphite2-1.2.0/src/inc/Machine.h | 197 + .../libs/graphite2/graphite2-1.2.0/src/inc/Main.h | 75 + .../graphite2/graphite2-1.2.0/src/inc/NameTable.h | 65 + .../libs/graphite2/graphite2-1.2.0/src/inc/Pass.h | 97 + .../graphite2/graphite2-1.2.0/src/inc/Position.h | 59 + .../libs/graphite2/graphite2-1.2.0/src/inc/Rule.h | 307 + .../graphite2/graphite2-1.2.0/src/inc/SegCache.h | 320 + .../graphite2-1.2.0/src/inc/SegCacheEntry.h | 121 + .../graphite2-1.2.0/src/inc/SegCacheStore.h | 127 + .../graphite2/graphite2-1.2.0/src/inc/Segment.h | 273 + .../libs/graphite2/graphite2-1.2.0/src/inc/Silf.h | 126 + .../libs/graphite2/graphite2-1.2.0/src/inc/Slot.h | 167 + .../graphite2/graphite2-1.2.0/src/inc/Sparse.h | 147 + .../graphite2/graphite2-1.2.0/src/inc/TtfTypes.h | 419 + .../graphite2/graphite2-1.2.0/src/inc/TtfUtil.h | 206 + .../graphite2/graphite2-1.2.0/src/inc/UtfCodec.h | 207 + .../libs/graphite2/graphite2-1.2.0/src/inc/bits.h | 87 + .../libs/graphite2/graphite2-1.2.0/src/inc/debug.h | 78 + .../libs/graphite2/graphite2-1.2.0/src/inc/json.h | 165 + .../graphite2-1.2.0/src/inc/locale2lcid.h | 444 + .../graphite2-1.2.0/src/inc/opcode_table.h | 120 + .../graphite2/graphite2-1.2.0/src/inc/opcodes.h | 644 + .../libs/graphite2/graphite2-1.2.0/src/json.cpp | 126 + .../libs/graphite2/include/graphite2/Makefile.am | 18 + .../libs/graphite2/include/graphite2/Makefile.in | 414 + Build/source/libs/graphite2/version.ac | 11 + Build/source/libs/harfbuzz/Makefile.am | 8 +- Build/source/libs/harfbuzz/Makefile.in | 31 +- Build/source/libs/harfbuzz/ac/withenable.ac | 2 +- Build/source/libs/harfbuzz/aclocal.m4 | 1 + Build/source/libs/harfbuzz/configure | 156 +- Build/source/libs/harfbuzz/configure.ac | 5 +- Build/source/libs/harfbuzz/include/Makefile.in | 5 + Build/source/m4/ChangeLog | 6 + Build/source/m4/kpse-graphite2-flags.m4 | 43 + Build/source/m4/kpse-harfbuzz-flags.m4 | 9 +- Build/source/m4/kpse-pkgs.m4 | 2 + Build/source/texk/Makefile.in | 2 + Build/source/texk/aclocal.m4 | 1 + Build/source/texk/configure | 33 + Build/source/texk/web2c/Makefile.in | 4 + Build/source/texk/web2c/aclocal.m4 | 1 + Build/source/texk/web2c/configure | 31 + Build/source/texk/web2c/doc/Makefile.in | 4 + Build/source/texk/web2c/lib/Makefile.in | 4 + Build/source/texk/web2c/man/Makefile.in | 4 + Build/source/texk/web2c/omegafonts/Makefile.in | 4 + Build/source/texk/web2c/otps/Makefile.in | 4 + Build/source/texk/web2c/otps/win32/Makefile.in | 4 + Build/source/texk/web2c/window/Makefile.in | 4 + Build/source/utils/Makefile.in | 2 + Build/source/utils/aclocal.m4 | 1 + Build/source/utils/configure | 33 + 136 files changed, 38529 insertions(+), 19 deletions(-) create mode 100644 Build/source/libs/graphite2/ChangeLog create mode 100644 Build/source/libs/graphite2/Makefile.am create mode 100644 Build/source/libs/graphite2/Makefile.in create mode 100644 Build/source/libs/graphite2/ac/graphite2.ac create mode 100644 Build/source/libs/graphite2/ac/withenable.ac create mode 100644 Build/source/libs/graphite2/aclocal.m4 create mode 100644 Build/source/libs/graphite2/config.h.in create mode 100755 Build/source/libs/graphite2/configure create mode 100644 Build/source/libs/graphite2/configure.ac create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0-PATCHES/ChangeLog create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0-PATCHES/TL-Changes create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0-PATCHES/patch-01-case-sensitive create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0-PATCHES/patch-02-attribute-hot create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0-PATCHES/patch-03-old-gcc create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/.hg_archival.txt create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/.hgeol create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/.hgignore create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/.hgtags create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/CMakeLists.txt create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/COPYING create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/ChangeLog create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/Graphite.cmake create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/LICENSE create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/Todo.txt create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/graphite2.pc.in create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/include/graphite2/Font.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/include/graphite2/Log.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/include/graphite2/Segment.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/include/graphite2/Types.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/Bidi.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/CMakeLists.txt create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/CachedFace.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/CmapCache.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/Code.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/Face.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/FeatureMap.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/FileFace.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/Font.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/GlyphCache.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/GlyphFace.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/Justifier.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/NameTable.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/Pass.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/Rule.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/SegCache.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/SegCacheEntry.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/SegCacheStore.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/Segment.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/Silf.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/Slot.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/Sparse.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/TtfUtil.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/UtfCodec.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/call_machine.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/direct_machine.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/files.mk create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/gr_char_info.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/gr_face.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/gr_features.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/gr_font.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/gr_logging.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/gr_segment.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/gr_slot.cpp create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/CachedFace.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/CharInfo.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/CmapCache.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Code.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Endian.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Face.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/FeatureMap.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/FeatureVal.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/FileFace.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Font.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/GlyphCache.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/GlyphFace.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/List.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Machine.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Main.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/NameTable.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Pass.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Position.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Rule.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/SegCache.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/SegCacheEntry.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/SegCacheStore.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Segment.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Silf.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Slot.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Sparse.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/TtfTypes.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/TtfUtil.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/UtfCodec.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/bits.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/debug.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/json.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/locale2lcid.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/opcode_table.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/inc/opcodes.h create mode 100644 Build/source/libs/graphite2/graphite2-1.2.0/src/json.cpp create mode 100644 Build/source/libs/graphite2/include/graphite2/Makefile.am create mode 100644 Build/source/libs/graphite2/include/graphite2/Makefile.in create mode 100644 Build/source/libs/graphite2/version.ac create mode 100644 Build/source/m4/kpse-graphite2-flags.m4 (limited to 'Build/source') diff --git a/Build/source/Makefile.in b/Build/source/Makefile.in index 6f46e99c47f..5aa52b81493 100644 --- a/Build/source/Makefile.in +++ b/Build/source/Makefile.in @@ -67,6 +67,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/kpse-cairo-flags.m4 \ $(top_srcdir)/m4/kpse-freetype2-flags.m4 \ $(top_srcdir)/m4/kpse-gd-flags.m4 \ $(top_srcdir)/m4/kpse-graphite-flags.m4 \ + $(top_srcdir)/m4/kpse-graphite2-flags.m4 \ $(top_srcdir)/m4/kpse-harfbuzz-flags.m4 \ $(top_srcdir)/m4/kpse-icu-flags.m4 \ $(top_srcdir)/m4/kpse-kpathsea-flags.m4 \ @@ -145,6 +146,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/kpse-cairo-flags.m4 \ $(top_srcdir)/libs/harfbuzz/ac/withenable.ac \ $(top_srcdir)/libs/icu/ac/withenable.ac \ $(top_srcdir)/libs/teckit/ac/withenable.ac \ + $(top_srcdir)/libs/graphite2/ac/withenable.ac \ $(top_srcdir)/libs/graphite/ac/withenable.ac \ $(top_srcdir)/libs/zziplib/ac/withenable.ac \ $(top_srcdir)/libs/xpdf/ac/withenable.ac \ @@ -174,6 +176,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/kpse-cairo-flags.m4 \ $(top_srcdir)/libs/xpdf/ac/xpdf.ac \ $(top_srcdir)/libs/zziplib/ac/zziplib.ac \ $(top_srcdir)/libs/graphite/ac/graphite.ac \ + $(top_srcdir)/libs/graphite2/ac/graphite2.ac \ $(top_srcdir)/libs/teckit/ac/teckit.ac \ $(top_srcdir)/libs/icu/ac/icu.ac \ $(top_srcdir)/libs/harfbuzz/ac/harfbuzz.ac \ diff --git a/Build/source/aclocal.m4 b/Build/source/aclocal.m4 index 8b5da7d5404..87a00ca1b1c 100644 --- a/Build/source/aclocal.m4 +++ b/Build/source/aclocal.m4 @@ -987,6 +987,7 @@ m4_include([m4/kpse-freetype-flags.m4]) m4_include([m4/kpse-freetype2-flags.m4]) m4_include([m4/kpse-gd-flags.m4]) m4_include([m4/kpse-graphite-flags.m4]) +m4_include([m4/kpse-graphite2-flags.m4]) m4_include([m4/kpse-harfbuzz-flags.m4]) m4_include([m4/kpse-icu-flags.m4]) m4_include([m4/kpse-kpathsea-flags.m4]) diff --git a/Build/source/configure b/Build/source/configure index 24f74956332..67a44a109d1 100755 --- a/Build/source/configure +++ b/Build/source/configure @@ -889,6 +889,7 @@ with_system_icu with_system_teckit with_teckit_includes with_teckit_libdir +with_system_graphite2 with_graphite with_system_graphite with_system_zziplib @@ -1742,6 +1743,8 @@ Optional Packages: teckit headers installed in DIR --with-teckit-libdir=DIR teckit library installed in DIR + --with-system-graphite2 use installed graphite2 headers and library + (requires pkg-config) --without-graphite build XeTeX without graphite support --with-system-graphite use installed silgraphite headers and library (requires pkg-config) @@ -5496,6 +5499,14 @@ $as_echo "$as_me: -> installed \`freetype2' headers and library" >&6;} elif test "x$with_system_freetype2" != xyes; then as_fn_error $? "Sorry, \`--with-system-harfbuzz' requires \`--with-system-freetype2'" "$LINENO" 5 fi + if test "x$with_system_graphite2" = x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: -> installed \`graphite2' headers and library" >&5 +$as_echo "$as_me: -> installed \`graphite2' headers and library" >&6;} + with_system_graphite2=yes + ac_configure_args="$ac_configure_args '--with-system-graphite2'" + elif test "x$with_system_graphite2" != xyes; then + as_fn_error $? "Sorry, \`--with-system-harfbuzz' requires \`--with-system-graphite2'" "$LINENO" 5 + fi if test "x$with_system_icu" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: -> installed \`icu' headers and library" >&5 $as_echo "$as_me: -> installed \`icu' headers and library" >&6;} @@ -5508,6 +5519,7 @@ fi test "x$need_harfbuzz" = xyes && { need_freetype2=yes + need_graphite2=yes need_icu=yes } @@ -5598,6 +5610,37 @@ test "x$need_teckit" = xyes && { } +## libs/graphite2/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/graphite2/ +## configure options and TL libraries required for graphite2 + +# Check whether --with-system-graphite2 was given. +if test "${with_system_graphite2+set}" = set; then : + withval=$with_system_graphite2; +fi +if test "x$with_system_graphite2" = x; then + if test -f $srcdir/libs/graphite2/configure; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`graphite2' headers and library from TL tree" >&5 +$as_echo "$as_me: Assuming \`graphite2' headers and library from TL tree" >&6;} + with_system_graphite2=no + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming installed \`graphite2' headers and library" >&5 +$as_echo "$as_me: Assuming installed \`graphite2' headers and library" >&6;} + with_system_graphite2=yes + fi + ac_configure_args="$ac_configure_args '--with-system-graphite2=$with_system_graphite2'" +elif test "x$with_system_graphite2" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Using installed \`graphite2' headers and library" >&5 +$as_echo "$as_me: Using installed \`graphite2' headers and library" >&6;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: Using \`graphite2' headers and library from TL tree" >&5 +$as_echo "$as_me: Using \`graphite2' headers and library from TL tree" >&6;} + if test "x$with_system_graphite2" != xno; then + with_system_graphite2=no + ac_configure_args="$ac_configure_args '--without-system-graphite2'" + fi +fi + + ## libs/graphite/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/graphite/ ## XeTeX can be built without graphite support @@ -20357,6 +20400,13 @@ elif test "x$need_graphite:$with_system_graphite" = xyes:yes; then as_fn_error $? "did not find silgraphite 2.3 or better" "$LINENO" 5 fi +if $PKG_CONFIG graphite2; then + GRAPHITE2_INCLUDES=`$PKG_CONFIG graphite2 --cflags` + GRAPHITE2_LIBS=`$PKG_CONFIG graphite2 --libs` +elif test "x$need_graphite2:$with_system_graphite2" = xyes:yes; then + as_fn_error $? "did not find graphite2" "$LINENO" 5 +fi + if test "x$with_teckit_includes" != x && test "x$with_teckit_includes" != xyes; then TECKIT_INCLUDES="-I$with_teckit_includes" fi @@ -20936,6 +20986,37 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu +## libs/graphite2/ac/graphite2.ac: configure.ac fragment for the TeX Live subdirectory libs/graphite2/ +## basic check of system graphite2 +if test "x$need_graphite2:$with_system_graphite2" = xyes:yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking requested system \`graphite2' library" >&5 +$as_echo_n "checking requested system \`graphite2' library... " >&6; } + CPPFLAGS="$GRAPHITE2_INCLUDES $CPPFLAGS" + LIBS="$GRAPHITE2_LIBS $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +int *nMajor, int *nMinor, int *nBugFix; +gr_engine_version(nMajor, nMinor, nBugFix); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + syslib_used=yes kpse_res=ok +else + syslib_status=no kpse_res=failed +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5 +$as_echo "$kpse_res" >&6; } +fi + + ## libs/teckit/ac/teckit.ac: configure.ac fragment for the TeX Live subdirectory libs/teckit/ ## basic check of system teckit ac_ext=cpp diff --git a/Build/source/libs/Makefile.in b/Build/source/libs/Makefile.in index 0cf3b1cec62..ea98e4abc19 100644 --- a/Build/source/libs/Makefile.in +++ b/Build/source/libs/Makefile.in @@ -67,6 +67,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../m4/kpse-cairo-flags.m4 \ $(top_srcdir)/../m4/kpse-freetype2-flags.m4 \ $(top_srcdir)/../m4/kpse-gd-flags.m4 \ $(top_srcdir)/../m4/kpse-graphite-flags.m4 \ + $(top_srcdir)/../m4/kpse-graphite2-flags.m4 \ $(top_srcdir)/../m4/kpse-harfbuzz-flags.m4 \ $(top_srcdir)/../m4/kpse-icu-flags.m4 \ $(top_srcdir)/../m4/kpse-kpathsea-flags.m4 \ @@ -141,6 +142,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../m4/kpse-cairo-flags.m4 \ $(top_srcdir)/../libs/harfbuzz/ac/withenable.ac \ $(top_srcdir)/../libs/icu/ac/withenable.ac \ $(top_srcdir)/../libs/teckit/ac/withenable.ac \ + $(top_srcdir)/../libs/graphite2/ac/withenable.ac \ $(top_srcdir)/../libs/graphite/ac/withenable.ac \ $(top_srcdir)/../libs/zziplib/ac/withenable.ac \ $(top_srcdir)/../libs/xpdf/ac/withenable.ac \ diff --git a/Build/source/libs/README b/Build/source/libs/README index 281a302ecf7..1b4ccc0a4fe 100644 --- a/Build/source/libs/README +++ b/Build/source/libs/README @@ -27,6 +27,9 @@ graphite 2.4 - checked 15may12 http://scripts.sil.org/svn-public/graphite/graphite/trunk (svn r1333 2012-05-14 14:47:16 UTC, omitting changes in test/). +graphite2 1.2.0 - checked 4dec12 + http://sourceforge.net/projects/silgraphite/files/graphite2/ + harfbuzz 0.9.7 - checked 30nov12 http://cgit.freedesktop.org/harfbuzz/ diff --git a/Build/source/libs/aclocal.m4 b/Build/source/libs/aclocal.m4 index ba6b5e7db3b..c61e839ee0a 100644 --- a/Build/source/libs/aclocal.m4 +++ b/Build/source/libs/aclocal.m4 @@ -987,6 +987,7 @@ m4_include([../m4/kpse-freetype-flags.m4]) m4_include([../m4/kpse-freetype2-flags.m4]) m4_include([../m4/kpse-gd-flags.m4]) m4_include([../m4/kpse-graphite-flags.m4]) +m4_include([../m4/kpse-graphite2-flags.m4]) m4_include([../m4/kpse-harfbuzz-flags.m4]) m4_include([../m4/kpse-icu-flags.m4]) m4_include([../m4/kpse-kpathsea-flags.m4]) diff --git a/Build/source/libs/configure b/Build/source/libs/configure index e012d158156..da57d86c6a6 100755 --- a/Build/source/libs/configure +++ b/Build/source/libs/configure @@ -800,6 +800,7 @@ with_system_icu with_system_teckit with_teckit_includes with_teckit_libdir +with_system_graphite2 with_graphite with_system_graphite with_system_zziplib @@ -848,6 +849,7 @@ CPPFLAGS' ac_subdirs_all='harfbuzz icu teckit +graphite2 graphite zziplib xpdf @@ -1635,6 +1637,8 @@ Optional Packages: teckit headers installed in DIR --with-teckit-libdir=DIR teckit library installed in DIR + --with-system-graphite2 use installed graphite2 headers and library + (requires pkg-config) --without-graphite build XeTeX without graphite support --with-system-graphite use installed silgraphite headers and library (requires pkg-config) @@ -4683,6 +4687,14 @@ $as_echo "$as_me: -> installed \`freetype2' headers and library" >&6;} elif test "x$with_system_freetype2" != xyes; then as_fn_error $? "Sorry, \`--with-system-harfbuzz' requires \`--with-system-freetype2'" "$LINENO" 5 fi + if test "x$with_system_graphite2" = x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: -> installed \`graphite2' headers and library" >&5 +$as_echo "$as_me: -> installed \`graphite2' headers and library" >&6;} + with_system_graphite2=yes + ac_configure_args="$ac_configure_args '--with-system-graphite2'" + elif test "x$with_system_graphite2" != xyes; then + as_fn_error $? "Sorry, \`--with-system-harfbuzz' requires \`--with-system-graphite2'" "$LINENO" 5 + fi if test "x$with_system_icu" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: -> installed \`icu' headers and library" >&5 $as_echo "$as_me: -> installed \`icu' headers and library" >&6;} @@ -4695,6 +4707,7 @@ fi test "x$need_harfbuzz" = xyes && { need_freetype2=yes + need_graphite2=yes need_icu=yes } @@ -4765,6 +4778,27 @@ test "x$need_teckit" = xyes && { } +## libs/graphite2/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/graphite2/ +## configure options and TL libraries required for graphite2 + +# Check whether --with-system-graphite2 was given. +if test "${with_system_graphite2+set}" = set; then : + withval=$with_system_graphite2; +fi +if test "x$with_system_graphite2" = x; then + if test -f $srcdir/../libs/graphite2/configure; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`graphite2' headers and library from TL tree" >&5 +$as_echo "$as_me: Assuming \`graphite2' headers and library from TL tree" >&6;} + with_system_graphite2=no + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming installed \`graphite2' headers and library" >&5 +$as_echo "$as_me: Assuming installed \`graphite2' headers and library" >&6;} + with_system_graphite2=yes + fi + ac_configure_args="$ac_configure_args '--with-system-graphite2=$with_system_graphite2'" +fi + + ## libs/graphite/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/graphite/ ## XeTeX can be built without graphite support @@ -6027,6 +6061,19 @@ if test -x $srcdir/teckit/configure; then fi +if test -x $srcdir/graphite2/configure; then + if test "x$with_system_graphite2" != xyes && \ + test "x$need_graphite2" = xyes; then + SUBLIBS="graphite2 $SUBLIBS" + fi + DIST_SUBLIBS="graphite2 $DIST_SUBLIBS" + if false; then + subdirs="$subdirs graphite2" + + fi +fi + + if test -x $srcdir/graphite/configure; then if test "x$with_system_graphite" != xyes && \ test "x$need_graphite" = xyes; then diff --git a/Build/source/libs/graphite2/ChangeLog b/Build/source/libs/graphite2/ChangeLog new file mode 100644 index 00000000000..dc0733e6d1d --- /dev/null +++ b/Build/source/libs/graphite2/ChangeLog @@ -0,0 +1,3 @@ +2012-12-04 Peter Breitenlohner + + Import graphite2-1.2.0. diff --git a/Build/source/libs/graphite2/Makefile.am b/Build/source/libs/graphite2/Makefile.am new file mode 100644 index 00000000000..6b40b804112 --- /dev/null +++ b/Build/source/libs/graphite2/Makefile.am @@ -0,0 +1,138 @@ +## Proxy Makefile.am to build graphite2 for TeX Live. +## +## Copyright (C) 2012 Peter Breitenlohner +## +## This file is free software; the copyright holder +## gives unlimited permission to copy and/or distribute it, +## with or without modifications, as long as this notice is preserved. +## +ACLOCAL_AMFLAGS = -I ../../m4 + +# Rebuild +.PHONY: rebuild +rebuild: config.force all + +## We want to re-distribute the whole original graphite2 source tree. +## +EXTRA_DIST = $(GRAPHITE2_TREE) + +## Changes applied to the original source tree +## +EXTRA_DIST += $(GRAPHITE2_TREE)-PATCHES + +GRAPHITE2_SRC = $(GRAPHITE2_TREE)/src +GRAPHITE2_INC = $(GRAPHITE2_TREE)/include + +# in case of an SVN repository +dist-hook: + rm -rf `find $(distdir) -name .svn` + +SUBDIRS = . include/graphite2 + +noinst_LIBRARIES = libgraphite2.a + +## common +AM_CPPFLAGS = -I$(top_srcdir)/$(GRAPHITE2_SRC) -I$(top_srcdir)/$(GRAPHITE2_INC) +AM_CPPFLAGS += -DGRAPHITE2_STATIC -DGRAPHITE2_CUSTOM_HEADER='' +libgraphite2_a_SOURCES = \ + $(GRAPHITE2_SRC)/Bidi.cpp \ + $(GRAPHITE2_SRC)/CachedFace.cpp \ + $(GRAPHITE2_SRC)/CmapCache.cpp \ + $(GRAPHITE2_SRC)/Code.cpp \ + $(GRAPHITE2_SRC)/Face.cpp \ + $(GRAPHITE2_SRC)/FeatureMap.cpp \ + $(GRAPHITE2_SRC)/Font.cpp \ + $(GRAPHITE2_SRC)/GlyphCache.cpp \ + $(GRAPHITE2_SRC)/GlyphFace.cpp \ + $(GRAPHITE2_SRC)/Justifier.cpp \ + $(GRAPHITE2_SRC)/NameTable.cpp \ + $(GRAPHITE2_SRC)/Pass.cpp \ + $(GRAPHITE2_SRC)/Rule.cpp \ + $(GRAPHITE2_SRC)/Segment.cpp \ + $(GRAPHITE2_SRC)/Silf.cpp \ + $(GRAPHITE2_SRC)/Slot.cpp \ + $(GRAPHITE2_SRC)/Sparse.cpp \ + $(GRAPHITE2_SRC)/TtfUtil.cpp \ + $(GRAPHITE2_SRC)/UtfCodec.cpp \ + $(GRAPHITE2_SRC)/gr_char_info.cpp \ + $(GRAPHITE2_SRC)/gr_face.cpp \ + $(GRAPHITE2_SRC)/gr_features.cpp \ + $(GRAPHITE2_SRC)/gr_font.cpp \ + $(GRAPHITE2_SRC)/gr_logging.cpp \ + $(GRAPHITE2_SRC)/gr_segment.cpp \ + $(GRAPHITE2_SRC)/gr_slot.cpp \ + $(GRAPHITE2_SRC)/inc/CachedFace.h \ + $(GRAPHITE2_SRC)/inc/CharInfo.h \ + $(GRAPHITE2_SRC)/inc/CmapCache.h \ + $(GRAPHITE2_SRC)/inc/Code.h \ + $(GRAPHITE2_SRC)/inc/Endian.h \ + $(GRAPHITE2_SRC)/inc/Face.h \ + $(GRAPHITE2_SRC)/inc/FeatureMap.h \ + $(GRAPHITE2_SRC)/inc/FeatureVal.h \ + $(GRAPHITE2_SRC)/inc/FileFace.h \ + $(GRAPHITE2_SRC)/inc/Font.h \ + $(GRAPHITE2_SRC)/inc/GlyphCache.h \ + $(GRAPHITE2_SRC)/inc/GlyphFace.h \ + $(GRAPHITE2_SRC)/inc/List.h \ + $(GRAPHITE2_SRC)/inc/Machine.h \ + $(GRAPHITE2_SRC)/inc/Main.h \ + $(GRAPHITE2_SRC)/inc/NameTable.h \ + $(GRAPHITE2_SRC)/inc/Pass.h \ + $(GRAPHITE2_SRC)/inc/Position.h \ + $(GRAPHITE2_SRC)/inc/Rule.h \ + $(GRAPHITE2_SRC)/inc/SegCache.h \ + $(GRAPHITE2_SRC)/inc/SegCacheEntry.h \ + $(GRAPHITE2_SRC)/inc/SegCacheStore.h \ + $(GRAPHITE2_SRC)/inc/Segment.h \ + $(GRAPHITE2_SRC)/inc/Silf.h \ + $(GRAPHITE2_SRC)/inc/Slot.h \ + $(GRAPHITE2_SRC)/inc/Sparse.h \ + $(GRAPHITE2_SRC)/inc/TtfTypes.h \ + $(GRAPHITE2_SRC)/inc/TtfUtil.h \ + $(GRAPHITE2_SRC)/inc/UtfCodec.h \ + $(GRAPHITE2_SRC)/inc/bits.h \ + $(GRAPHITE2_SRC)/inc/debug.h \ + $(GRAPHITE2_SRC)/inc/json.h \ + $(GRAPHITE2_SRC)/inc/locale2lcid.h \ + $(GRAPHITE2_SRC)/inc/opcode_table.h \ + $(GRAPHITE2_SRC)/inc/opcodes.h + +if DIRECT_TYPE +libgraphite2_a_SOURCES += $(GRAPHITE2_SRC)/direct_machine.cpp +else !DIRECT_TYPE +libgraphite2_a_SOURCES += $(GRAPHITE2_SRC)/call_machine.cpp +endif !DIRECT_TYPE + +if WITH_SEGCACHE +libgraphite2_a_SOURCES += \ + $(GRAPHITE2_SRC)/SegCache.cpp \ + $(GRAPHITE2_SRC)/SegCacheEntry.cpp \ + $(GRAPHITE2_SRC)/SegCacheStore.cpp +endif WITH_SEGCACHE + +if WITH_FILEFACE +libgraphite2_a_SOURCES += $(GRAPHITE2_SRC)/FileFace.cpp +endif WITH_FILEFACE + +if WITH_TRACING +libgraphite2_a_SOURCES += $(GRAPHITE2_SRC)/json.cpp +endif WITH_TRACING + +$(libgraphite2_a_OBJECTS): config.force + +config.force: + echo timestamp >config.force + $(SHELL) ./config.status --recheck + +DISTCLEANFILES = config.force + +##if build +## check_PROGRAMS = +## dist_check_SCRIPTS = graphite2.test +## TESTS = graphite2.test +## endif build + +LDADD = libgraphite2.a + +## Files generated by TESTS + diff --git a/Build/source/libs/graphite2/Makefile.in b/Build/source/libs/graphite2/Makefile.in new file mode 100644 index 00000000000..b6b61d781e8 --- /dev/null +++ b/Build/source/libs/graphite2/Makefile.in @@ -0,0 +1,1479 @@ +# Makefile.in generated by automake 1.12.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@DIRECT_TYPE_TRUE@am__append_1 = $(GRAPHITE2_SRC)/direct_machine.cpp +@DIRECT_TYPE_FALSE@am__append_2 = $(GRAPHITE2_SRC)/call_machine.cpp +@WITH_SEGCACHE_TRUE@am__append_3 = \ +@WITH_SEGCACHE_TRUE@ $(GRAPHITE2_SRC)/SegCache.cpp \ +@WITH_SEGCACHE_TRUE@ $(GRAPHITE2_SRC)/SegCacheEntry.cpp \ +@WITH_SEGCACHE_TRUE@ $(GRAPHITE2_SRC)/SegCacheStore.cpp + +@WITH_FILEFACE_TRUE@am__append_4 = $(GRAPHITE2_SRC)/FileFace.cpp +@WITH_TRACING_TRUE@am__append_5 = $(GRAPHITE2_SRC)/json.cpp +subdir = . +DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(top_srcdir)/../../build-aux/config.guess \ + $(top_srcdir)/../../build-aux/config.sub \ + $(top_srcdir)/../../build-aux/depcomp \ + $(top_srcdir)/../../build-aux/install-sh \ + $(top_srcdir)/../../build-aux/ltmain.sh \ + $(top_srcdir)/../../build-aux/missing $(top_srcdir)/configure \ + ../../build-aux/config.guess ../../build-aux/config.sub \ + ../../build-aux/depcomp ../../build-aux/install-sh \ + ../../build-aux/ltmain.sh ../../build-aux/missing \ + ../../build-aux/texinfo.tex ../../build-aux/ylwrap ChangeLog +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-warnings.m4 \ + $(top_srcdir)/../../m4/libtool.m4 \ + $(top_srcdir)/../../m4/ltoptions.m4 \ + $(top_srcdir)/../../m4/ltsugar.m4 \ + $(top_srcdir)/../../m4/ltversion.m4 \ + $(top_srcdir)/../../m4/lt~obsolete.m4 $(top_srcdir)/version.ac \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +libgraphite2_a_AR = $(AR) $(ARFLAGS) +libgraphite2_a_LIBADD = +am__libgraphite2_a_SOURCES_DIST = $(GRAPHITE2_SRC)/Bidi.cpp \ + $(GRAPHITE2_SRC)/CachedFace.cpp $(GRAPHITE2_SRC)/CmapCache.cpp \ + $(GRAPHITE2_SRC)/Code.cpp $(GRAPHITE2_SRC)/Face.cpp \ + $(GRAPHITE2_SRC)/FeatureMap.cpp $(GRAPHITE2_SRC)/Font.cpp \ + $(GRAPHITE2_SRC)/GlyphCache.cpp $(GRAPHITE2_SRC)/GlyphFace.cpp \ + $(GRAPHITE2_SRC)/Justifier.cpp $(GRAPHITE2_SRC)/NameTable.cpp \ + $(GRAPHITE2_SRC)/Pass.cpp $(GRAPHITE2_SRC)/Rule.cpp \ + $(GRAPHITE2_SRC)/Segment.cpp $(GRAPHITE2_SRC)/Silf.cpp \ + $(GRAPHITE2_SRC)/Slot.cpp $(GRAPHITE2_SRC)/Sparse.cpp \ + $(GRAPHITE2_SRC)/TtfUtil.cpp $(GRAPHITE2_SRC)/UtfCodec.cpp \ + $(GRAPHITE2_SRC)/gr_char_info.cpp $(GRAPHITE2_SRC)/gr_face.cpp \ + $(GRAPHITE2_SRC)/gr_features.cpp $(GRAPHITE2_SRC)/gr_font.cpp \ + $(GRAPHITE2_SRC)/gr_logging.cpp \ + $(GRAPHITE2_SRC)/gr_segment.cpp $(GRAPHITE2_SRC)/gr_slot.cpp \ + $(GRAPHITE2_SRC)/inc/CachedFace.h \ + $(GRAPHITE2_SRC)/inc/CharInfo.h \ + $(GRAPHITE2_SRC)/inc/CmapCache.h $(GRAPHITE2_SRC)/inc/Code.h \ + $(GRAPHITE2_SRC)/inc/Endian.h $(GRAPHITE2_SRC)/inc/Face.h \ + $(GRAPHITE2_SRC)/inc/FeatureMap.h \ + $(GRAPHITE2_SRC)/inc/FeatureVal.h \ + $(GRAPHITE2_SRC)/inc/FileFace.h $(GRAPHITE2_SRC)/inc/Font.h \ + $(GRAPHITE2_SRC)/inc/GlyphCache.h \ + $(GRAPHITE2_SRC)/inc/GlyphFace.h $(GRAPHITE2_SRC)/inc/List.h \ + $(GRAPHITE2_SRC)/inc/Machine.h $(GRAPHITE2_SRC)/inc/Main.h \ + $(GRAPHITE2_SRC)/inc/NameTable.h $(GRAPHITE2_SRC)/inc/Pass.h \ + $(GRAPHITE2_SRC)/inc/Position.h $(GRAPHITE2_SRC)/inc/Rule.h \ + $(GRAPHITE2_SRC)/inc/SegCache.h \ + $(GRAPHITE2_SRC)/inc/SegCacheEntry.h \ + $(GRAPHITE2_SRC)/inc/SegCacheStore.h \ + $(GRAPHITE2_SRC)/inc/Segment.h $(GRAPHITE2_SRC)/inc/Silf.h \ + $(GRAPHITE2_SRC)/inc/Slot.h $(GRAPHITE2_SRC)/inc/Sparse.h \ + $(GRAPHITE2_SRC)/inc/TtfTypes.h $(GRAPHITE2_SRC)/inc/TtfUtil.h \ + $(GRAPHITE2_SRC)/inc/UtfCodec.h $(GRAPHITE2_SRC)/inc/bits.h \ + $(GRAPHITE2_SRC)/inc/debug.h $(GRAPHITE2_SRC)/inc/json.h \ + $(GRAPHITE2_SRC)/inc/locale2lcid.h \ + $(GRAPHITE2_SRC)/inc/opcode_table.h \ + $(GRAPHITE2_SRC)/inc/opcodes.h \ + $(GRAPHITE2_SRC)/direct_machine.cpp \ + $(GRAPHITE2_SRC)/call_machine.cpp \ + $(GRAPHITE2_SRC)/SegCache.cpp \ + $(GRAPHITE2_SRC)/SegCacheEntry.cpp \ + $(GRAPHITE2_SRC)/SegCacheStore.cpp \ + $(GRAPHITE2_SRC)/FileFace.cpp $(GRAPHITE2_SRC)/json.cpp +@DIRECT_TYPE_TRUE@am__objects_1 = direct_machine.$(OBJEXT) +@DIRECT_TYPE_FALSE@am__objects_2 = call_machine.$(OBJEXT) +@WITH_SEGCACHE_TRUE@am__objects_3 = SegCache.$(OBJEXT) \ +@WITH_SEGCACHE_TRUE@ SegCacheEntry.$(OBJEXT) \ +@WITH_SEGCACHE_TRUE@ SegCacheStore.$(OBJEXT) +@WITH_FILEFACE_TRUE@am__objects_4 = FileFace.$(OBJEXT) +@WITH_TRACING_TRUE@am__objects_5 = json.$(OBJEXT) +am_libgraphite2_a_OBJECTS = Bidi.$(OBJEXT) CachedFace.$(OBJEXT) \ + CmapCache.$(OBJEXT) Code.$(OBJEXT) Face.$(OBJEXT) \ + FeatureMap.$(OBJEXT) Font.$(OBJEXT) GlyphCache.$(OBJEXT) \ + GlyphFace.$(OBJEXT) Justifier.$(OBJEXT) NameTable.$(OBJEXT) \ + Pass.$(OBJEXT) Rule.$(OBJEXT) Segment.$(OBJEXT) Silf.$(OBJEXT) \ + Slot.$(OBJEXT) Sparse.$(OBJEXT) TtfUtil.$(OBJEXT) \ + UtfCodec.$(OBJEXT) gr_char_info.$(OBJEXT) gr_face.$(OBJEXT) \ + gr_features.$(OBJEXT) gr_font.$(OBJEXT) gr_logging.$(OBJEXT) \ + gr_segment.$(OBJEXT) gr_slot.$(OBJEXT) $(am__objects_1) \ + $(am__objects_2) $(am__objects_3) $(am__objects_4) \ + $(am__objects_5) +libgraphite2_a_OBJECTS = $(am_libgraphite2_a_OBJECTS) +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/../../build-aux/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libgraphite2_a_SOURCES) +DIST_SOURCES = $(am__libgraphite2_a_SOURCES_DIST) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + cscope distdir dist dist-all distcheck +ETAGS = etags +CTAGS = ctags +CSCOPE = cscope +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +DIST_TARGETS = dist-gzip +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GRAPHITE2_TREE = @GRAPHITE2_TREE@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +WARNING_CFLAGS = @WARNING_CFLAGS@ +WARNING_CXXFLAGS = @WARNING_CXXFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +ACLOCAL_AMFLAGS = -I ../../m4 +EXTRA_DIST = $(GRAPHITE2_TREE) $(GRAPHITE2_TREE)-PATCHES +GRAPHITE2_SRC = $(GRAPHITE2_TREE)/src +GRAPHITE2_INC = $(GRAPHITE2_TREE)/include +SUBDIRS = . include/graphite2 +noinst_LIBRARIES = libgraphite2.a +AM_CPPFLAGS = -I$(top_srcdir)/$(GRAPHITE2_SRC) \ + -I$(top_srcdir)/$(GRAPHITE2_INC) -DGRAPHITE2_STATIC \ + -DGRAPHITE2_CUSTOM_HEADER='' +libgraphite2_a_SOURCES = $(GRAPHITE2_SRC)/Bidi.cpp \ + $(GRAPHITE2_SRC)/CachedFace.cpp $(GRAPHITE2_SRC)/CmapCache.cpp \ + $(GRAPHITE2_SRC)/Code.cpp $(GRAPHITE2_SRC)/Face.cpp \ + $(GRAPHITE2_SRC)/FeatureMap.cpp $(GRAPHITE2_SRC)/Font.cpp \ + $(GRAPHITE2_SRC)/GlyphCache.cpp $(GRAPHITE2_SRC)/GlyphFace.cpp \ + $(GRAPHITE2_SRC)/Justifier.cpp $(GRAPHITE2_SRC)/NameTable.cpp \ + $(GRAPHITE2_SRC)/Pass.cpp $(GRAPHITE2_SRC)/Rule.cpp \ + $(GRAPHITE2_SRC)/Segment.cpp $(GRAPHITE2_SRC)/Silf.cpp \ + $(GRAPHITE2_SRC)/Slot.cpp $(GRAPHITE2_SRC)/Sparse.cpp \ + $(GRAPHITE2_SRC)/TtfUtil.cpp $(GRAPHITE2_SRC)/UtfCodec.cpp \ + $(GRAPHITE2_SRC)/gr_char_info.cpp $(GRAPHITE2_SRC)/gr_face.cpp \ + $(GRAPHITE2_SRC)/gr_features.cpp $(GRAPHITE2_SRC)/gr_font.cpp \ + $(GRAPHITE2_SRC)/gr_logging.cpp \ + $(GRAPHITE2_SRC)/gr_segment.cpp $(GRAPHITE2_SRC)/gr_slot.cpp \ + $(GRAPHITE2_SRC)/inc/CachedFace.h \ + $(GRAPHITE2_SRC)/inc/CharInfo.h \ + $(GRAPHITE2_SRC)/inc/CmapCache.h $(GRAPHITE2_SRC)/inc/Code.h \ + $(GRAPHITE2_SRC)/inc/Endian.h $(GRAPHITE2_SRC)/inc/Face.h \ + $(GRAPHITE2_SRC)/inc/FeatureMap.h \ + $(GRAPHITE2_SRC)/inc/FeatureVal.h \ + $(GRAPHITE2_SRC)/inc/FileFace.h $(GRAPHITE2_SRC)/inc/Font.h \ + $(GRAPHITE2_SRC)/inc/GlyphCache.h \ + $(GRAPHITE2_SRC)/inc/GlyphFace.h $(GRAPHITE2_SRC)/inc/List.h \ + $(GRAPHITE2_SRC)/inc/Machine.h $(GRAPHITE2_SRC)/inc/Main.h \ + $(GRAPHITE2_SRC)/inc/NameTable.h $(GRAPHITE2_SRC)/inc/Pass.h \ + $(GRAPHITE2_SRC)/inc/Position.h $(GRAPHITE2_SRC)/inc/Rule.h \ + $(GRAPHITE2_SRC)/inc/SegCache.h \ + $(GRAPHITE2_SRC)/inc/SegCacheEntry.h \ + $(GRAPHITE2_SRC)/inc/SegCacheStore.h \ + $(GRAPHITE2_SRC)/inc/Segment.h $(GRAPHITE2_SRC)/inc/Silf.h \ + $(GRAPHITE2_SRC)/inc/Slot.h $(GRAPHITE2_SRC)/inc/Sparse.h \ + $(GRAPHITE2_SRC)/inc/TtfTypes.h $(GRAPHITE2_SRC)/inc/TtfUtil.h \ + $(GRAPHITE2_SRC)/inc/UtfCodec.h $(GRAPHITE2_SRC)/inc/bits.h \ + $(GRAPHITE2_SRC)/inc/debug.h $(GRAPHITE2_SRC)/inc/json.h \ + $(GRAPHITE2_SRC)/inc/locale2lcid.h \ + $(GRAPHITE2_SRC)/inc/opcode_table.h \ + $(GRAPHITE2_SRC)/inc/opcodes.h $(am__append_1) $(am__append_2) \ + $(am__append_3) $(am__append_4) $(am__append_5) +DISTCLEANFILES = config.force +LDADD = libgraphite2.a +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +config.h: stamp-h1 + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +libgraphite2.a: $(libgraphite2_a_OBJECTS) $(libgraphite2_a_DEPENDENCIES) $(EXTRA_libgraphite2_a_DEPENDENCIES) + -rm -f libgraphite2.a + $(libgraphite2_a_AR) libgraphite2.a $(libgraphite2_a_OBJECTS) $(libgraphite2_a_LIBADD) + $(RANLIB) libgraphite2.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Bidi.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CachedFace.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CmapCache.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Code.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Face.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FeatureMap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FileFace.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Font.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GlyphCache.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GlyphFace.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Justifier.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NameTable.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Pass.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Rule.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SegCache.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SegCacheEntry.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SegCacheStore.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Segment.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Silf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Slot.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Sparse.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TtfUtil.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UtfCodec.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/call_machine.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/direct_machine.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gr_char_info.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gr_face.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gr_features.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gr_font.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gr_logging.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gr_segment.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gr_slot.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/json.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +Bidi.o: $(GRAPHITE2_SRC)/Bidi.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Bidi.o -MD -MP -MF $(DEPDIR)/Bidi.Tpo -c -o Bidi.o `test -f '$(GRAPHITE2_SRC)/Bidi.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/Bidi.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Bidi.Tpo $(DEPDIR)/Bidi.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/Bidi.cpp' object='Bidi.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Bidi.o `test -f '$(GRAPHITE2_SRC)/Bidi.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/Bidi.cpp + +Bidi.obj: $(GRAPHITE2_SRC)/Bidi.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Bidi.obj -MD -MP -MF $(DEPDIR)/Bidi.Tpo -c -o Bidi.obj `if test -f '$(GRAPHITE2_SRC)/Bidi.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/Bidi.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/Bidi.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Bidi.Tpo $(DEPDIR)/Bidi.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/Bidi.cpp' object='Bidi.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Bidi.obj `if test -f '$(GRAPHITE2_SRC)/Bidi.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/Bidi.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/Bidi.cpp'; fi` + +CachedFace.o: $(GRAPHITE2_SRC)/CachedFace.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT CachedFace.o -MD -MP -MF $(DEPDIR)/CachedFace.Tpo -c -o CachedFace.o `test -f '$(GRAPHITE2_SRC)/CachedFace.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/CachedFace.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/CachedFace.Tpo $(DEPDIR)/CachedFace.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/CachedFace.cpp' object='CachedFace.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o CachedFace.o `test -f '$(GRAPHITE2_SRC)/CachedFace.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/CachedFace.cpp + +CachedFace.obj: $(GRAPHITE2_SRC)/CachedFace.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT CachedFace.obj -MD -MP -MF $(DEPDIR)/CachedFace.Tpo -c -o CachedFace.obj `if test -f '$(GRAPHITE2_SRC)/CachedFace.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/CachedFace.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/CachedFace.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/CachedFace.Tpo $(DEPDIR)/CachedFace.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/CachedFace.cpp' object='CachedFace.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o CachedFace.obj `if test -f '$(GRAPHITE2_SRC)/CachedFace.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/CachedFace.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/CachedFace.cpp'; fi` + +CmapCache.o: $(GRAPHITE2_SRC)/CmapCache.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT CmapCache.o -MD -MP -MF $(DEPDIR)/CmapCache.Tpo -c -o CmapCache.o `test -f '$(GRAPHITE2_SRC)/CmapCache.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/CmapCache.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/CmapCache.Tpo $(DEPDIR)/CmapCache.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/CmapCache.cpp' object='CmapCache.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o CmapCache.o `test -f '$(GRAPHITE2_SRC)/CmapCache.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/CmapCache.cpp + +CmapCache.obj: $(GRAPHITE2_SRC)/CmapCache.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT CmapCache.obj -MD -MP -MF $(DEPDIR)/CmapCache.Tpo -c -o CmapCache.obj `if test -f '$(GRAPHITE2_SRC)/CmapCache.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/CmapCache.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/CmapCache.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/CmapCache.Tpo $(DEPDIR)/CmapCache.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/CmapCache.cpp' object='CmapCache.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o CmapCache.obj `if test -f '$(GRAPHITE2_SRC)/CmapCache.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/CmapCache.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/CmapCache.cpp'; fi` + +Code.o: $(GRAPHITE2_SRC)/Code.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Code.o -MD -MP -MF $(DEPDIR)/Code.Tpo -c -o Code.o `test -f '$(GRAPHITE2_SRC)/Code.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/Code.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Code.Tpo $(DEPDIR)/Code.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/Code.cpp' object='Code.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Code.o `test -f '$(GRAPHITE2_SRC)/Code.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/Code.cpp + +Code.obj: $(GRAPHITE2_SRC)/Code.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Code.obj -MD -MP -MF $(DEPDIR)/Code.Tpo -c -o Code.obj `if test -f '$(GRAPHITE2_SRC)/Code.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/Code.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/Code.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Code.Tpo $(DEPDIR)/Code.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/Code.cpp' object='Code.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Code.obj `if test -f '$(GRAPHITE2_SRC)/Code.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/Code.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/Code.cpp'; fi` + +Face.o: $(GRAPHITE2_SRC)/Face.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Face.o -MD -MP -MF $(DEPDIR)/Face.Tpo -c -o Face.o `test -f '$(GRAPHITE2_SRC)/Face.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/Face.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Face.Tpo $(DEPDIR)/Face.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/Face.cpp' object='Face.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Face.o `test -f '$(GRAPHITE2_SRC)/Face.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/Face.cpp + +Face.obj: $(GRAPHITE2_SRC)/Face.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Face.obj -MD -MP -MF $(DEPDIR)/Face.Tpo -c -o Face.obj `if test -f '$(GRAPHITE2_SRC)/Face.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/Face.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/Face.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Face.Tpo $(DEPDIR)/Face.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/Face.cpp' object='Face.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Face.obj `if test -f '$(GRAPHITE2_SRC)/Face.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/Face.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/Face.cpp'; fi` + +FeatureMap.o: $(GRAPHITE2_SRC)/FeatureMap.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FeatureMap.o -MD -MP -MF $(DEPDIR)/FeatureMap.Tpo -c -o FeatureMap.o `test -f '$(GRAPHITE2_SRC)/FeatureMap.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/FeatureMap.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FeatureMap.Tpo $(DEPDIR)/FeatureMap.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/FeatureMap.cpp' object='FeatureMap.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FeatureMap.o `test -f '$(GRAPHITE2_SRC)/FeatureMap.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/FeatureMap.cpp + +FeatureMap.obj: $(GRAPHITE2_SRC)/FeatureMap.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FeatureMap.obj -MD -MP -MF $(DEPDIR)/FeatureMap.Tpo -c -o FeatureMap.obj `if test -f '$(GRAPHITE2_SRC)/FeatureMap.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/FeatureMap.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/FeatureMap.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FeatureMap.Tpo $(DEPDIR)/FeatureMap.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/FeatureMap.cpp' object='FeatureMap.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FeatureMap.obj `if test -f '$(GRAPHITE2_SRC)/FeatureMap.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/FeatureMap.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/FeatureMap.cpp'; fi` + +Font.o: $(GRAPHITE2_SRC)/Font.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Font.o -MD -MP -MF $(DEPDIR)/Font.Tpo -c -o Font.o `test -f '$(GRAPHITE2_SRC)/Font.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/Font.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Font.Tpo $(DEPDIR)/Font.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/Font.cpp' object='Font.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Font.o `test -f '$(GRAPHITE2_SRC)/Font.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/Font.cpp + +Font.obj: $(GRAPHITE2_SRC)/Font.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Font.obj -MD -MP -MF $(DEPDIR)/Font.Tpo -c -o Font.obj `if test -f '$(GRAPHITE2_SRC)/Font.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/Font.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/Font.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Font.Tpo $(DEPDIR)/Font.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/Font.cpp' object='Font.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Font.obj `if test -f '$(GRAPHITE2_SRC)/Font.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/Font.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/Font.cpp'; fi` + +GlyphCache.o: $(GRAPHITE2_SRC)/GlyphCache.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT GlyphCache.o -MD -MP -MF $(DEPDIR)/GlyphCache.Tpo -c -o GlyphCache.o `test -f '$(GRAPHITE2_SRC)/GlyphCache.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/GlyphCache.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/GlyphCache.Tpo $(DEPDIR)/GlyphCache.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/GlyphCache.cpp' object='GlyphCache.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o GlyphCache.o `test -f '$(GRAPHITE2_SRC)/GlyphCache.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/GlyphCache.cpp + +GlyphCache.obj: $(GRAPHITE2_SRC)/GlyphCache.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT GlyphCache.obj -MD -MP -MF $(DEPDIR)/GlyphCache.Tpo -c -o GlyphCache.obj `if test -f '$(GRAPHITE2_SRC)/GlyphCache.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/GlyphCache.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/GlyphCache.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/GlyphCache.Tpo $(DEPDIR)/GlyphCache.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/GlyphCache.cpp' object='GlyphCache.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o GlyphCache.obj `if test -f '$(GRAPHITE2_SRC)/GlyphCache.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/GlyphCache.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/GlyphCache.cpp'; fi` + +GlyphFace.o: $(GRAPHITE2_SRC)/GlyphFace.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT GlyphFace.o -MD -MP -MF $(DEPDIR)/GlyphFace.Tpo -c -o GlyphFace.o `test -f '$(GRAPHITE2_SRC)/GlyphFace.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/GlyphFace.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/GlyphFace.Tpo $(DEPDIR)/GlyphFace.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/GlyphFace.cpp' object='GlyphFace.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o GlyphFace.o `test -f '$(GRAPHITE2_SRC)/GlyphFace.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/GlyphFace.cpp + +GlyphFace.obj: $(GRAPHITE2_SRC)/GlyphFace.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT GlyphFace.obj -MD -MP -MF $(DEPDIR)/GlyphFace.Tpo -c -o GlyphFace.obj `if test -f '$(GRAPHITE2_SRC)/GlyphFace.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/GlyphFace.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/GlyphFace.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/GlyphFace.Tpo $(DEPDIR)/GlyphFace.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/GlyphFace.cpp' object='GlyphFace.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o GlyphFace.obj `if test -f '$(GRAPHITE2_SRC)/GlyphFace.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/GlyphFace.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/GlyphFace.cpp'; fi` + +Justifier.o: $(GRAPHITE2_SRC)/Justifier.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Justifier.o -MD -MP -MF $(DEPDIR)/Justifier.Tpo -c -o Justifier.o `test -f '$(GRAPHITE2_SRC)/Justifier.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/Justifier.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Justifier.Tpo $(DEPDIR)/Justifier.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/Justifier.cpp' object='Justifier.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Justifier.o `test -f '$(GRAPHITE2_SRC)/Justifier.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/Justifier.cpp + +Justifier.obj: $(GRAPHITE2_SRC)/Justifier.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Justifier.obj -MD -MP -MF $(DEPDIR)/Justifier.Tpo -c -o Justifier.obj `if test -f '$(GRAPHITE2_SRC)/Justifier.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/Justifier.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/Justifier.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Justifier.Tpo $(DEPDIR)/Justifier.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/Justifier.cpp' object='Justifier.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Justifier.obj `if test -f '$(GRAPHITE2_SRC)/Justifier.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/Justifier.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/Justifier.cpp'; fi` + +NameTable.o: $(GRAPHITE2_SRC)/NameTable.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT NameTable.o -MD -MP -MF $(DEPDIR)/NameTable.Tpo -c -o NameTable.o `test -f '$(GRAPHITE2_SRC)/NameTable.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/NameTable.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/NameTable.Tpo $(DEPDIR)/NameTable.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/NameTable.cpp' object='NameTable.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o NameTable.o `test -f '$(GRAPHITE2_SRC)/NameTable.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/NameTable.cpp + +NameTable.obj: $(GRAPHITE2_SRC)/NameTable.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT NameTable.obj -MD -MP -MF $(DEPDIR)/NameTable.Tpo -c -o NameTable.obj `if test -f '$(GRAPHITE2_SRC)/NameTable.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/NameTable.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/NameTable.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/NameTable.Tpo $(DEPDIR)/NameTable.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/NameTable.cpp' object='NameTable.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o NameTable.obj `if test -f '$(GRAPHITE2_SRC)/NameTable.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/NameTable.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/NameTable.cpp'; fi` + +Pass.o: $(GRAPHITE2_SRC)/Pass.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Pass.o -MD -MP -MF $(DEPDIR)/Pass.Tpo -c -o Pass.o `test -f '$(GRAPHITE2_SRC)/Pass.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/Pass.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Pass.Tpo $(DEPDIR)/Pass.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/Pass.cpp' object='Pass.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Pass.o `test -f '$(GRAPHITE2_SRC)/Pass.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/Pass.cpp + +Pass.obj: $(GRAPHITE2_SRC)/Pass.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Pass.obj -MD -MP -MF $(DEPDIR)/Pass.Tpo -c -o Pass.obj `if test -f '$(GRAPHITE2_SRC)/Pass.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/Pass.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/Pass.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Pass.Tpo $(DEPDIR)/Pass.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/Pass.cpp' object='Pass.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Pass.obj `if test -f '$(GRAPHITE2_SRC)/Pass.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/Pass.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/Pass.cpp'; fi` + +Rule.o: $(GRAPHITE2_SRC)/Rule.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Rule.o -MD -MP -MF $(DEPDIR)/Rule.Tpo -c -o Rule.o `test -f '$(GRAPHITE2_SRC)/Rule.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/Rule.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Rule.Tpo $(DEPDIR)/Rule.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/Rule.cpp' object='Rule.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Rule.o `test -f '$(GRAPHITE2_SRC)/Rule.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/Rule.cpp + +Rule.obj: $(GRAPHITE2_SRC)/Rule.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Rule.obj -MD -MP -MF $(DEPDIR)/Rule.Tpo -c -o Rule.obj `if test -f '$(GRAPHITE2_SRC)/Rule.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/Rule.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/Rule.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Rule.Tpo $(DEPDIR)/Rule.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/Rule.cpp' object='Rule.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Rule.obj `if test -f '$(GRAPHITE2_SRC)/Rule.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/Rule.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/Rule.cpp'; fi` + +Segment.o: $(GRAPHITE2_SRC)/Segment.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Segment.o -MD -MP -MF $(DEPDIR)/Segment.Tpo -c -o Segment.o `test -f '$(GRAPHITE2_SRC)/Segment.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/Segment.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Segment.Tpo $(DEPDIR)/Segment.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/Segment.cpp' object='Segment.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Segment.o `test -f '$(GRAPHITE2_SRC)/Segment.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/Segment.cpp + +Segment.obj: $(GRAPHITE2_SRC)/Segment.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Segment.obj -MD -MP -MF $(DEPDIR)/Segment.Tpo -c -o Segment.obj `if test -f '$(GRAPHITE2_SRC)/Segment.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/Segment.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/Segment.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Segment.Tpo $(DEPDIR)/Segment.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/Segment.cpp' object='Segment.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Segment.obj `if test -f '$(GRAPHITE2_SRC)/Segment.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/Segment.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/Segment.cpp'; fi` + +Silf.o: $(GRAPHITE2_SRC)/Silf.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Silf.o -MD -MP -MF $(DEPDIR)/Silf.Tpo -c -o Silf.o `test -f '$(GRAPHITE2_SRC)/Silf.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/Silf.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Silf.Tpo $(DEPDIR)/Silf.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/Silf.cpp' object='Silf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Silf.o `test -f '$(GRAPHITE2_SRC)/Silf.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/Silf.cpp + +Silf.obj: $(GRAPHITE2_SRC)/Silf.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Silf.obj -MD -MP -MF $(DEPDIR)/Silf.Tpo -c -o Silf.obj `if test -f '$(GRAPHITE2_SRC)/Silf.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/Silf.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/Silf.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Silf.Tpo $(DEPDIR)/Silf.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/Silf.cpp' object='Silf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Silf.obj `if test -f '$(GRAPHITE2_SRC)/Silf.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/Silf.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/Silf.cpp'; fi` + +Slot.o: $(GRAPHITE2_SRC)/Slot.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Slot.o -MD -MP -MF $(DEPDIR)/Slot.Tpo -c -o Slot.o `test -f '$(GRAPHITE2_SRC)/Slot.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/Slot.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Slot.Tpo $(DEPDIR)/Slot.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/Slot.cpp' object='Slot.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Slot.o `test -f '$(GRAPHITE2_SRC)/Slot.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/Slot.cpp + +Slot.obj: $(GRAPHITE2_SRC)/Slot.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Slot.obj -MD -MP -MF $(DEPDIR)/Slot.Tpo -c -o Slot.obj `if test -f '$(GRAPHITE2_SRC)/Slot.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/Slot.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/Slot.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Slot.Tpo $(DEPDIR)/Slot.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/Slot.cpp' object='Slot.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Slot.obj `if test -f '$(GRAPHITE2_SRC)/Slot.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/Slot.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/Slot.cpp'; fi` + +Sparse.o: $(GRAPHITE2_SRC)/Sparse.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Sparse.o -MD -MP -MF $(DEPDIR)/Sparse.Tpo -c -o Sparse.o `test -f '$(GRAPHITE2_SRC)/Sparse.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/Sparse.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Sparse.Tpo $(DEPDIR)/Sparse.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/Sparse.cpp' object='Sparse.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Sparse.o `test -f '$(GRAPHITE2_SRC)/Sparse.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/Sparse.cpp + +Sparse.obj: $(GRAPHITE2_SRC)/Sparse.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Sparse.obj -MD -MP -MF $(DEPDIR)/Sparse.Tpo -c -o Sparse.obj `if test -f '$(GRAPHITE2_SRC)/Sparse.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/Sparse.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/Sparse.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Sparse.Tpo $(DEPDIR)/Sparse.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/Sparse.cpp' object='Sparse.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Sparse.obj `if test -f '$(GRAPHITE2_SRC)/Sparse.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/Sparse.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/Sparse.cpp'; fi` + +TtfUtil.o: $(GRAPHITE2_SRC)/TtfUtil.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT TtfUtil.o -MD -MP -MF $(DEPDIR)/TtfUtil.Tpo -c -o TtfUtil.o `test -f '$(GRAPHITE2_SRC)/TtfUtil.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/TtfUtil.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/TtfUtil.Tpo $(DEPDIR)/TtfUtil.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/TtfUtil.cpp' object='TtfUtil.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o TtfUtil.o `test -f '$(GRAPHITE2_SRC)/TtfUtil.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/TtfUtil.cpp + +TtfUtil.obj: $(GRAPHITE2_SRC)/TtfUtil.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT TtfUtil.obj -MD -MP -MF $(DEPDIR)/TtfUtil.Tpo -c -o TtfUtil.obj `if test -f '$(GRAPHITE2_SRC)/TtfUtil.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/TtfUtil.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/TtfUtil.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/TtfUtil.Tpo $(DEPDIR)/TtfUtil.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/TtfUtil.cpp' object='TtfUtil.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o TtfUtil.obj `if test -f '$(GRAPHITE2_SRC)/TtfUtil.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/TtfUtil.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/TtfUtil.cpp'; fi` + +UtfCodec.o: $(GRAPHITE2_SRC)/UtfCodec.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT UtfCodec.o -MD -MP -MF $(DEPDIR)/UtfCodec.Tpo -c -o UtfCodec.o `test -f '$(GRAPHITE2_SRC)/UtfCodec.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/UtfCodec.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/UtfCodec.Tpo $(DEPDIR)/UtfCodec.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/UtfCodec.cpp' object='UtfCodec.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o UtfCodec.o `test -f '$(GRAPHITE2_SRC)/UtfCodec.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/UtfCodec.cpp + +UtfCodec.obj: $(GRAPHITE2_SRC)/UtfCodec.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT UtfCodec.obj -MD -MP -MF $(DEPDIR)/UtfCodec.Tpo -c -o UtfCodec.obj `if test -f '$(GRAPHITE2_SRC)/UtfCodec.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/UtfCodec.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/UtfCodec.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/UtfCodec.Tpo $(DEPDIR)/UtfCodec.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/UtfCodec.cpp' object='UtfCodec.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o UtfCodec.obj `if test -f '$(GRAPHITE2_SRC)/UtfCodec.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/UtfCodec.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/UtfCodec.cpp'; fi` + +gr_char_info.o: $(GRAPHITE2_SRC)/gr_char_info.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gr_char_info.o -MD -MP -MF $(DEPDIR)/gr_char_info.Tpo -c -o gr_char_info.o `test -f '$(GRAPHITE2_SRC)/gr_char_info.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/gr_char_info.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/gr_char_info.Tpo $(DEPDIR)/gr_char_info.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/gr_char_info.cpp' object='gr_char_info.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gr_char_info.o `test -f '$(GRAPHITE2_SRC)/gr_char_info.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/gr_char_info.cpp + +gr_char_info.obj: $(GRAPHITE2_SRC)/gr_char_info.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gr_char_info.obj -MD -MP -MF $(DEPDIR)/gr_char_info.Tpo -c -o gr_char_info.obj `if test -f '$(GRAPHITE2_SRC)/gr_char_info.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/gr_char_info.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/gr_char_info.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/gr_char_info.Tpo $(DEPDIR)/gr_char_info.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/gr_char_info.cpp' object='gr_char_info.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gr_char_info.obj `if test -f '$(GRAPHITE2_SRC)/gr_char_info.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/gr_char_info.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/gr_char_info.cpp'; fi` + +gr_face.o: $(GRAPHITE2_SRC)/gr_face.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gr_face.o -MD -MP -MF $(DEPDIR)/gr_face.Tpo -c -o gr_face.o `test -f '$(GRAPHITE2_SRC)/gr_face.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/gr_face.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/gr_face.Tpo $(DEPDIR)/gr_face.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/gr_face.cpp' object='gr_face.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gr_face.o `test -f '$(GRAPHITE2_SRC)/gr_face.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/gr_face.cpp + +gr_face.obj: $(GRAPHITE2_SRC)/gr_face.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gr_face.obj -MD -MP -MF $(DEPDIR)/gr_face.Tpo -c -o gr_face.obj `if test -f '$(GRAPHITE2_SRC)/gr_face.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/gr_face.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/gr_face.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/gr_face.Tpo $(DEPDIR)/gr_face.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/gr_face.cpp' object='gr_face.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gr_face.obj `if test -f '$(GRAPHITE2_SRC)/gr_face.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/gr_face.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/gr_face.cpp'; fi` + +gr_features.o: $(GRAPHITE2_SRC)/gr_features.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gr_features.o -MD -MP -MF $(DEPDIR)/gr_features.Tpo -c -o gr_features.o `test -f '$(GRAPHITE2_SRC)/gr_features.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/gr_features.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/gr_features.Tpo $(DEPDIR)/gr_features.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/gr_features.cpp' object='gr_features.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gr_features.o `test -f '$(GRAPHITE2_SRC)/gr_features.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/gr_features.cpp + +gr_features.obj: $(GRAPHITE2_SRC)/gr_features.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gr_features.obj -MD -MP -MF $(DEPDIR)/gr_features.Tpo -c -o gr_features.obj `if test -f '$(GRAPHITE2_SRC)/gr_features.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/gr_features.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/gr_features.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/gr_features.Tpo $(DEPDIR)/gr_features.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/gr_features.cpp' object='gr_features.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gr_features.obj `if test -f '$(GRAPHITE2_SRC)/gr_features.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/gr_features.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/gr_features.cpp'; fi` + +gr_font.o: $(GRAPHITE2_SRC)/gr_font.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gr_font.o -MD -MP -MF $(DEPDIR)/gr_font.Tpo -c -o gr_font.o `test -f '$(GRAPHITE2_SRC)/gr_font.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/gr_font.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/gr_font.Tpo $(DEPDIR)/gr_font.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/gr_font.cpp' object='gr_font.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gr_font.o `test -f '$(GRAPHITE2_SRC)/gr_font.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/gr_font.cpp + +gr_font.obj: $(GRAPHITE2_SRC)/gr_font.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gr_font.obj -MD -MP -MF $(DEPDIR)/gr_font.Tpo -c -o gr_font.obj `if test -f '$(GRAPHITE2_SRC)/gr_font.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/gr_font.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/gr_font.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/gr_font.Tpo $(DEPDIR)/gr_font.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/gr_font.cpp' object='gr_font.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gr_font.obj `if test -f '$(GRAPHITE2_SRC)/gr_font.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/gr_font.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/gr_font.cpp'; fi` + +gr_logging.o: $(GRAPHITE2_SRC)/gr_logging.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gr_logging.o -MD -MP -MF $(DEPDIR)/gr_logging.Tpo -c -o gr_logging.o `test -f '$(GRAPHITE2_SRC)/gr_logging.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/gr_logging.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/gr_logging.Tpo $(DEPDIR)/gr_logging.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/gr_logging.cpp' object='gr_logging.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gr_logging.o `test -f '$(GRAPHITE2_SRC)/gr_logging.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/gr_logging.cpp + +gr_logging.obj: $(GRAPHITE2_SRC)/gr_logging.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gr_logging.obj -MD -MP -MF $(DEPDIR)/gr_logging.Tpo -c -o gr_logging.obj `if test -f '$(GRAPHITE2_SRC)/gr_logging.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/gr_logging.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/gr_logging.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/gr_logging.Tpo $(DEPDIR)/gr_logging.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/gr_logging.cpp' object='gr_logging.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gr_logging.obj `if test -f '$(GRAPHITE2_SRC)/gr_logging.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/gr_logging.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/gr_logging.cpp'; fi` + +gr_segment.o: $(GRAPHITE2_SRC)/gr_segment.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gr_segment.o -MD -MP -MF $(DEPDIR)/gr_segment.Tpo -c -o gr_segment.o `test -f '$(GRAPHITE2_SRC)/gr_segment.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/gr_segment.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/gr_segment.Tpo $(DEPDIR)/gr_segment.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/gr_segment.cpp' object='gr_segment.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gr_segment.o `test -f '$(GRAPHITE2_SRC)/gr_segment.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/gr_segment.cpp + +gr_segment.obj: $(GRAPHITE2_SRC)/gr_segment.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gr_segment.obj -MD -MP -MF $(DEPDIR)/gr_segment.Tpo -c -o gr_segment.obj `if test -f '$(GRAPHITE2_SRC)/gr_segment.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/gr_segment.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/gr_segment.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/gr_segment.Tpo $(DEPDIR)/gr_segment.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/gr_segment.cpp' object='gr_segment.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gr_segment.obj `if test -f '$(GRAPHITE2_SRC)/gr_segment.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/gr_segment.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/gr_segment.cpp'; fi` + +gr_slot.o: $(GRAPHITE2_SRC)/gr_slot.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gr_slot.o -MD -MP -MF $(DEPDIR)/gr_slot.Tpo -c -o gr_slot.o `test -f '$(GRAPHITE2_SRC)/gr_slot.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/gr_slot.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/gr_slot.Tpo $(DEPDIR)/gr_slot.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/gr_slot.cpp' object='gr_slot.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gr_slot.o `test -f '$(GRAPHITE2_SRC)/gr_slot.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/gr_slot.cpp + +gr_slot.obj: $(GRAPHITE2_SRC)/gr_slot.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gr_slot.obj -MD -MP -MF $(DEPDIR)/gr_slot.Tpo -c -o gr_slot.obj `if test -f '$(GRAPHITE2_SRC)/gr_slot.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/gr_slot.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/gr_slot.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/gr_slot.Tpo $(DEPDIR)/gr_slot.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/gr_slot.cpp' object='gr_slot.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gr_slot.obj `if test -f '$(GRAPHITE2_SRC)/gr_slot.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/gr_slot.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/gr_slot.cpp'; fi` + +direct_machine.o: $(GRAPHITE2_SRC)/direct_machine.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT direct_machine.o -MD -MP -MF $(DEPDIR)/direct_machine.Tpo -c -o direct_machine.o `test -f '$(GRAPHITE2_SRC)/direct_machine.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/direct_machine.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/direct_machine.Tpo $(DEPDIR)/direct_machine.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/direct_machine.cpp' object='direct_machine.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o direct_machine.o `test -f '$(GRAPHITE2_SRC)/direct_machine.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/direct_machine.cpp + +direct_machine.obj: $(GRAPHITE2_SRC)/direct_machine.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT direct_machine.obj -MD -MP -MF $(DEPDIR)/direct_machine.Tpo -c -o direct_machine.obj `if test -f '$(GRAPHITE2_SRC)/direct_machine.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/direct_machine.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/direct_machine.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/direct_machine.Tpo $(DEPDIR)/direct_machine.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/direct_machine.cpp' object='direct_machine.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o direct_machine.obj `if test -f '$(GRAPHITE2_SRC)/direct_machine.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/direct_machine.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/direct_machine.cpp'; fi` + +call_machine.o: $(GRAPHITE2_SRC)/call_machine.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT call_machine.o -MD -MP -MF $(DEPDIR)/call_machine.Tpo -c -o call_machine.o `test -f '$(GRAPHITE2_SRC)/call_machine.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/call_machine.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/call_machine.Tpo $(DEPDIR)/call_machine.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/call_machine.cpp' object='call_machine.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o call_machine.o `test -f '$(GRAPHITE2_SRC)/call_machine.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/call_machine.cpp + +call_machine.obj: $(GRAPHITE2_SRC)/call_machine.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT call_machine.obj -MD -MP -MF $(DEPDIR)/call_machine.Tpo -c -o call_machine.obj `if test -f '$(GRAPHITE2_SRC)/call_machine.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/call_machine.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/call_machine.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/call_machine.Tpo $(DEPDIR)/call_machine.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/call_machine.cpp' object='call_machine.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o call_machine.obj `if test -f '$(GRAPHITE2_SRC)/call_machine.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/call_machine.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/call_machine.cpp'; fi` + +SegCache.o: $(GRAPHITE2_SRC)/SegCache.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT SegCache.o -MD -MP -MF $(DEPDIR)/SegCache.Tpo -c -o SegCache.o `test -f '$(GRAPHITE2_SRC)/SegCache.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/SegCache.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/SegCache.Tpo $(DEPDIR)/SegCache.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/SegCache.cpp' object='SegCache.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o SegCache.o `test -f '$(GRAPHITE2_SRC)/SegCache.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/SegCache.cpp + +SegCache.obj: $(GRAPHITE2_SRC)/SegCache.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT SegCache.obj -MD -MP -MF $(DEPDIR)/SegCache.Tpo -c -o SegCache.obj `if test -f '$(GRAPHITE2_SRC)/SegCache.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/SegCache.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/SegCache.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/SegCache.Tpo $(DEPDIR)/SegCache.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/SegCache.cpp' object='SegCache.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o SegCache.obj `if test -f '$(GRAPHITE2_SRC)/SegCache.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/SegCache.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/SegCache.cpp'; fi` + +SegCacheEntry.o: $(GRAPHITE2_SRC)/SegCacheEntry.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT SegCacheEntry.o -MD -MP -MF $(DEPDIR)/SegCacheEntry.Tpo -c -o SegCacheEntry.o `test -f '$(GRAPHITE2_SRC)/SegCacheEntry.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/SegCacheEntry.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/SegCacheEntry.Tpo $(DEPDIR)/SegCacheEntry.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/SegCacheEntry.cpp' object='SegCacheEntry.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o SegCacheEntry.o `test -f '$(GRAPHITE2_SRC)/SegCacheEntry.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/SegCacheEntry.cpp + +SegCacheEntry.obj: $(GRAPHITE2_SRC)/SegCacheEntry.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT SegCacheEntry.obj -MD -MP -MF $(DEPDIR)/SegCacheEntry.Tpo -c -o SegCacheEntry.obj `if test -f '$(GRAPHITE2_SRC)/SegCacheEntry.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/SegCacheEntry.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/SegCacheEntry.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/SegCacheEntry.Tpo $(DEPDIR)/SegCacheEntry.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/SegCacheEntry.cpp' object='SegCacheEntry.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o SegCacheEntry.obj `if test -f '$(GRAPHITE2_SRC)/SegCacheEntry.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/SegCacheEntry.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/SegCacheEntry.cpp'; fi` + +SegCacheStore.o: $(GRAPHITE2_SRC)/SegCacheStore.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT SegCacheStore.o -MD -MP -MF $(DEPDIR)/SegCacheStore.Tpo -c -o SegCacheStore.o `test -f '$(GRAPHITE2_SRC)/SegCacheStore.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/SegCacheStore.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/SegCacheStore.Tpo $(DEPDIR)/SegCacheStore.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/SegCacheStore.cpp' object='SegCacheStore.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o SegCacheStore.o `test -f '$(GRAPHITE2_SRC)/SegCacheStore.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/SegCacheStore.cpp + +SegCacheStore.obj: $(GRAPHITE2_SRC)/SegCacheStore.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT SegCacheStore.obj -MD -MP -MF $(DEPDIR)/SegCacheStore.Tpo -c -o SegCacheStore.obj `if test -f '$(GRAPHITE2_SRC)/SegCacheStore.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/SegCacheStore.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/SegCacheStore.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/SegCacheStore.Tpo $(DEPDIR)/SegCacheStore.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/SegCacheStore.cpp' object='SegCacheStore.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o SegCacheStore.obj `if test -f '$(GRAPHITE2_SRC)/SegCacheStore.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/SegCacheStore.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/SegCacheStore.cpp'; fi` + +FileFace.o: $(GRAPHITE2_SRC)/FileFace.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FileFace.o -MD -MP -MF $(DEPDIR)/FileFace.Tpo -c -o FileFace.o `test -f '$(GRAPHITE2_SRC)/FileFace.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/FileFace.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FileFace.Tpo $(DEPDIR)/FileFace.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/FileFace.cpp' object='FileFace.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FileFace.o `test -f '$(GRAPHITE2_SRC)/FileFace.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/FileFace.cpp + +FileFace.obj: $(GRAPHITE2_SRC)/FileFace.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FileFace.obj -MD -MP -MF $(DEPDIR)/FileFace.Tpo -c -o FileFace.obj `if test -f '$(GRAPHITE2_SRC)/FileFace.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/FileFace.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/FileFace.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FileFace.Tpo $(DEPDIR)/FileFace.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/FileFace.cpp' object='FileFace.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FileFace.obj `if test -f '$(GRAPHITE2_SRC)/FileFace.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/FileFace.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/FileFace.cpp'; fi` + +json.o: $(GRAPHITE2_SRC)/json.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT json.o -MD -MP -MF $(DEPDIR)/json.Tpo -c -o json.o `test -f '$(GRAPHITE2_SRC)/json.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/json.cpp +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/json.Tpo $(DEPDIR)/json.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/json.cpp' object='json.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o json.o `test -f '$(GRAPHITE2_SRC)/json.cpp' || echo '$(srcdir)/'`$(GRAPHITE2_SRC)/json.cpp + +json.obj: $(GRAPHITE2_SRC)/json.cpp +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT json.obj -MD -MP -MF $(DEPDIR)/json.Tpo -c -o json.obj `if test -f '$(GRAPHITE2_SRC)/json.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/json.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/json.cpp'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/json.Tpo $(DEPDIR)/json.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(GRAPHITE2_SRC)/json.cpp' object='json.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o json.obj `if test -f '$(GRAPHITE2_SRC)/json.cpp'; then $(CYGPATH_W) '$(GRAPHITE2_SRC)/json.cpp'; else $(CYGPATH_W) '$(srcdir)/$(GRAPHITE2_SRC)/json.cpp'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool config.lt + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done +cscopelist-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) + +clean-cscope: + -rm -f cscope.files + +cscope.files: clean-cscope cscopelist-recursive cscopelist + +cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__post_remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__post_remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__post_remove_distdir) + +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile $(LIBRARIES) config.h +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ + mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ + cscopelist-recursive ctags-recursive install-am install-strip \ + tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-cscope \ + clean-generic clean-libtool clean-noinstLIBRARIES cscope \ + cscopelist cscopelist-recursive ctags ctags-recursive dist \ + dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \ + dist-tarZ dist-xz dist-zip distcheck distclean \ + distclean-compile distclean-generic distclean-hdr \ + distclean-libtool distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Rebuild +.PHONY: rebuild +rebuild: config.force all + +# in case of an SVN repository +dist-hook: + rm -rf `find $(distdir) -name .svn` + +$(libgraphite2_a_OBJECTS): config.force + +config.force: + echo timestamp >config.force + $(SHELL) ./config.status --recheck + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/Build/source/libs/graphite2/ac/graphite2.ac b/Build/source/libs/graphite2/ac/graphite2.ac new file mode 100644 index 00000000000..712a81ad974 --- /dev/null +++ b/Build/source/libs/graphite2/ac/graphite2.ac @@ -0,0 +1,10 @@ +## libs/graphite2/ac/graphite2.ac: configure.ac fragment for the TeX Live subdirectory libs/graphite2/ +dnl +dnl Copyright (C) 2012 Peter Breitenlohner +dnl You may freely use, modify and/or distribute this file. +dnl +## basic check of system graphite2 +KPSE_TRY_LIB([graphite2], + [#include ], + [int *nMajor, int *nMinor, int *nBugFix; +gr_engine_version(nMajor, nMinor, nBugFix);]) diff --git a/Build/source/libs/graphite2/ac/withenable.ac b/Build/source/libs/graphite2/ac/withenable.ac new file mode 100644 index 00000000000..7d276b58a45 --- /dev/null +++ b/Build/source/libs/graphite2/ac/withenable.ac @@ -0,0 +1,7 @@ +## libs/graphite2/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/graphite2/ +dnl +dnl Copyright (C) 2012 Peter Breitenlohner +dnl You may freely use, modify and/or distribute this file. +dnl +## configure options and TL libraries required for graphite2 +KPSE_WITH_LIB([graphite2]) diff --git a/Build/source/libs/graphite2/aclocal.m4 b/Build/source/libs/graphite2/aclocal.m4 new file mode 100644 index 00000000000..af1ab3ac25b --- /dev/null +++ b/Build/source/libs/graphite2/aclocal.m4 @@ -0,0 +1,988 @@ +# generated automatically by aclocal 1.12.5 -*- Autoconf -*- + +# Copyright (C) 1996-2012 Free Software Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) + +# Copyright (C) 2002-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.12' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.12.5], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.12.5])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is '.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each '.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.62])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[AC_DIAGNOSE([obsolete], +[$0: two- and three-arguments forms are deprecated. For more info, see: +http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +dnl Support for Objective C++ was only introduced in Autoconf 2.65, +dnl but we still cater to Autoconf 2.62. +m4_ifdef([AC_PROG_OBJCXX], +[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl +]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl +]) + +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST([install_sh])]) + +# Copyright (C) 2003-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless 'enable' is passed literally. +# For symmetry, 'disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. +AC_DEFUN([AM_MAINTAINER_MODE], +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], + [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], + am_maintainer_other[ make rules and dependencies not useful + (and sometimes confusing) to the casual installer])], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN(['missing' script is too old or missing]) +fi +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) + +# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor 'install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in "make install-strip", and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of '-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([../../m4/kpse-warnings.m4]) +m4_include([../../m4/libtool.m4]) +m4_include([../../m4/ltoptions.m4]) +m4_include([../../m4/ltsugar.m4]) +m4_include([../../m4/ltversion.m4]) +m4_include([../../m4/lt~obsolete.m4]) diff --git a/Build/source/libs/graphite2/config.h.in b/Build/source/libs/graphite2/config.h.in new file mode 100644 index 00000000000..ec55ba91789 --- /dev/null +++ b/Build/source/libs/graphite2/config.h.in @@ -0,0 +1,71 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 to disable fileface support. */ +#undef GRAPHITE2_NFILEFACE + +/* Define to 1 to disable segcache support. */ +#undef GRAPHITE2_NSEGCACHE + +/* Define to 1 to disable tracing support. */ +#undef GRAPHITE2_NTRACING + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Version number of package */ +#undef VERSION diff --git a/Build/source/libs/graphite2/configure b/Build/source/libs/graphite2/configure new file mode 100755 index 00000000000..b1c39da122f --- /dev/null +++ b/Build/source/libs/graphite2/configure @@ -0,0 +1,17903 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.69 for graphite2 for TeX Live 1.2.0. +# +# Report bugs to . +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 + + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and tex-k@tug.org +$0: about your system, including any error possibly output +$0: before this message. Then install a modern shell, or +$0: manually run the script under such a shell if you do +$0: have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + +SHELL=${CONFIG_SHELL-/bin/sh} + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='graphite2 for TeX Live' +PACKAGE_TARNAME='graphite2-for-tex-live' +PACKAGE_VERSION='1.2.0' +PACKAGE_STRING='graphite2 for TeX Live 1.2.0' +PACKAGE_BUGREPORT='tex-k@tug.org' +PACKAGE_URL='' + +ac_unique_file="graphite2-1.2.0/graphite2.pc.in" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +LIBOBJS +GRAPHITE2_TREE +WITH_TRACING_FALSE +WITH_TRACING_TRUE +WITH_FILEFACE_FALSE +WITH_FILEFACE_TRUE +WITH_SEGCACHE_FALSE +WITH_SEGCACHE_TRUE +DIRECT_TYPE_FALSE +DIRECT_TYPE_TRUE +build_FALSE +build_TRUE +CXXCPP +CPP +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +MANIFEST_TOOL +ac_ct_AR +AR +DLLTOOL +OBJDUMP +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +EGREP +GREP +SED +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +LIBTOOL +WARNING_CXXFLAGS +WARNING_CFLAGS +LN_S +RANLIB +am__fastdepCXX_FALSE +am__fastdepCXX_TRUE +CXXDEPMODE +ac_ct_CXX +CXXFLAGS +CXX +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +am__nodep +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_maintainer_mode +enable_dependency_tracking +enable_compiler_warnings +enable_shared +enable_static +with_pic +enable_fast_install +with_gnu_ld +with_sysroot +enable_libtool_lock +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CXX +CXXFLAGS +CCC +CPP +CXXCPP' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures graphite2 for TeX Live 1.2.0 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root + [DATAROOTDIR/doc/graphite2-for-tex-live] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of graphite2 for TeX Live 1.2.0:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build + --enable-compiler-warnings=[no|min|yes|max|all] + Turn on compiler warnings [default: yes if + maintainer-mode, min otherwise] + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CPP C preprocessor + CXXCPP C++ preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +graphite2 for TeX Live configure 1.2.0 +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_cxx_try_compile LINENO +# ---------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_cxx_try_cpp LINENO +# ------------------------ +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_cpp + +# ac_fn_cxx_try_link LINENO +# ------------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_link +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by graphite2 for TeX Live $as_me 1.2.0, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + +ac_aux_dir= +for ac_dir in ../../build-aux "$srcdir"/../../build-aux; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../build-aux \"$srcdir\"/../../build-aux" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + + + +am__api_version='1.12' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; 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_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +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_prog_STRIP="${ac_tool_prefix}strip" + $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 + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; 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_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +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_prog_ac_ct_STRIP="strip" + $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 + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + 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 + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; 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_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +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_prog_AWK="$ac_prog" + $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 + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='graphite2-for-tex-live' + VERSION='1.2.0' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; 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_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +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_prog_CC="${ac_tool_prefix}gcc" + $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 + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; 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_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +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_prog_ac_ct_CC="gcc" + $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 + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + 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 + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; 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_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +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_prog_CC="${ac_tool_prefix}cc" + $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 + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; 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_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +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 + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $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 + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; 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_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +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_prog_CC="$ac_tool_prefix$ac_prog" + $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 + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; 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_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +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_prog_ac_ct_CC="$ac_prog" + $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 + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + 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 + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; 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_prog_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +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_prog_CXX="$ac_tool_prefix$ac_prog" + $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 + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; 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_prog_ac_ct_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +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_prog_ac_ct_CXX="$ac_prog" + $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 + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + 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 + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +if ${ac_cv_cxx_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GXX=yes +else + GXX= +fi +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if ${ac_cv_prog_cxx_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +else + CXXFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + +else + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CXX" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CXX_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; 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_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +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_prog_RANLIB="${ac_tool_prefix}ranlib" + $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 + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; 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_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +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_prog_ac_ct_RANLIB="ranlib" + $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 + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + 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 + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; 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, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + + +# Check whether --enable-compiler-warnings was given. +if test "${enable_compiler_warnings+set}" = set; then : + enableval=$enable_compiler_warnings; +fi +case $enable_compiler_warnings in #( + no | min | yes | max | all) : + ;; #( + *) : + if test "x$enable_maintainer_mode" = xyes; then : + enable_compiler_warnings=yes +else + enable_compiler_warnings=min +fi ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what warning flags to pass to the C compiler" >&5 +$as_echo_n "checking what warning flags to pass to the C compiler... " >&6; } +if ${kpse_cv_warning_cflags+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$GCC" = xyes; then + kpse_cv_warning_cflags= +if test "x$enable_compiler_warnings" != xno; then + kpse_cv_warning_cflags="-Wimplicit -Wreturn-type" + case `$CC -dumpversion` in #( + 3.4.* | 4.*) : + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wdeclaration-after-statement" ;; #( + *) : + ;; +esac + case `$CC -dumpversion` in #( + 3.[234].* | 4.*) : + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wno-unknown-pragmas" ;; #( + *) : + ;; +esac + if test "x$enable_compiler_warnings" != xmin; then + kpse_cv_warning_cflags="-Wall -Wunused $kpse_cv_warning_cflags" + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wmissing-prototypes -Wmissing-declarations" + if test "x$enable_compiler_warnings" != xyes; then + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wparentheses -Wswitch -Wtrigraphs -Wpointer-arith" + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wcast-qual -Wcast-align -Wwrite-strings" + case `$CC -dumpversion` in #( + 3.4.* | 4.*) : + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wold-style-definition" ;; #( + *) : + ;; +esac + if test "x$enable_compiler_warnings" != xmax; then + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wshadow" + fi + fi + fi +fi +elif test "x$enable_compiler_warnings" = xno; then + kpse_cv_warning_cflags= +else + kpse_cv_warning_cflags= # FIXME: warning flags for non-GNU C compilers +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_warning_cflags" >&5 +$as_echo "$kpse_cv_warning_cflags" >&6; } +WARNING_CFLAGS=$kpse_cv_warning_cflags + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what warning flags to pass to the C++ compiler" >&5 +$as_echo_n "checking what warning flags to pass to the C++ compiler... " >&6; } +if ${kpse_cv_warning_cxxflags+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$GXX" = xyes; then + kpse_cv_warning_cxxflags= +kpse_warn_strings="-Wno-write-strings" +if test "x$enable_compiler_warnings" != xno; then + kpse_cv_warning_cxxflags="-Wreturn-type" + case `$CXX -dumpversion` in #( + 3.* | 4.[012345].*) : + kpse_cv_warning_cxxflags="-Wimplicit $kpse_cv_warning_cxxflags" ;; #( + *) : + ;; +esac + case `$CXX -dumpversion` in #( + 3.[234].* | 4.*) : + kpse_cv_warning_cxxflags="$kpse_cv_warning_cxxflags -Wno-unknown-pragmas" ;; #( + *) : + ;; +esac + if test "x$enable_compiler_warnings" != xmin; then + kpse_cv_warning_cxxflags="-Wall -Wunused $kpse_cv_warning_cxxflags" + if test "x$enable_compiler_warnings" != xyes; then + kpse_cv_warning_cxxflags="$kpse_cv_warning_cxxflags -Wparentheses -Wswitch -Wtrigraphs -Wpointer-arith" + kpse_cv_warning_cxxflags="$kpse_cv_warning_cxxflags -Wcast-qual -Wcast-align" + kpse_warn_strings="-Wwrite-strings" + if test "x$enable_compiler_warnings" != xmax; then + kpse_cv_warning_cxxflags="$kpse_cv_warning_cxxflags -Wshadow" + fi + fi + fi +fi +kpse_cv_warning_cxxflags="$kpse_cv_warning_cxxflags $kpse_warn_strings" +elif test "x$enable_compiler_warnings" = xno; then + kpse_cv_warning_cxxflags= +else + kpse_cv_warning_cxxflags= # FIXME: warning flags for non-GNU C++ compilers +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_warning_cxxflags" >&5 +$as_echo "$kpse_cv_warning_cxxflags" >&6; } +WARNING_CXXFLAGS=$kpse_cv_warning_cxxflags + + + + + + +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.4.2' +macro_revision='1.3337' + + + + + + + + + + + + + +ltmain="$ac_aux_dir/ltmain.sh" + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case "$ECHO" in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + 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_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if ${ac_cv_path_FGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_FGREP" || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_FGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_FGREP=$FGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" + + +test -z "$GREP" && GREP=grep + + + + + + + + + + + + + + + + + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if ${lt_cv_path_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; 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_prog_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DUMPBIN"; then + ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. +else +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_prog_DUMPBIN="$ac_tool_prefix$ac_prog" + $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 + +fi +fi +DUMPBIN=$ac_cv_prog_DUMPBIN +if test -n "$DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DUMPBIN" && break + done +fi +if test -z "$DUMPBIN"; then + ac_ct_DUMPBIN=$DUMPBIN + for ac_prog in dumpbin "link -dump" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; 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_prog_ac_ct_DUMPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DUMPBIN"; then + ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. +else +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_prog_ac_ct_DUMPBIN="$ac_prog" + $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 + +fi +fi +ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN +if test -n "$ac_ct_DUMPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_DUMPBIN" && break +done + + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" + 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 + DUMPBIN=$ac_ct_DUMPBIN + fi +fi + + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi + + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if ${lt_cv_nm_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 + (eval echo "\"\$as_me:$LINENO: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } + +# find the maximum length of command line arguments +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if ${lt_cv_sys_max_cmd_len+:} false; then : + $as_echo_n "(cached) " >&6 +else + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } +fi +max_cmd_len=$lt_cv_sys_max_cmd_len + + + + + + +: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } + + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi + + + + + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if ${lt_cv_ld_reload_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; 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_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +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_prog_OBJDUMP="${ac_tool_prefix}objdump" + $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 + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; 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_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +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_prog_ac_ct_OBJDUMP="objdump" + $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 + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + 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 + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if ${lt_cv_deplibs_check_method+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[4-9]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[3-9]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + + + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; 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_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +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_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $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 + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; 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_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +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_prog_ac_ct_DLLTOOL="dlltool" + $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 + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + 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 + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; 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_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +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_prog_AR="$ac_tool_prefix$ac_prog" + $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 + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AR" && break + done +fi +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; 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_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +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_prog_ac_ct_AR="$ac_prog" + $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 + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_AR" && break +done + + if test "x$ac_ct_AR" = x; then + AR="false" + 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 + AR=$ac_ct_AR + fi +fi + +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; 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_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +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_prog_STRIP="${ac_tool_prefix}strip" + $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 + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; 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_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +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_prog_ac_ct_STRIP="strip" + $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 + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + 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 + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +test -z "$STRIP" && STRIP=: + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; 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_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +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_prog_RANLIB="${ac_tool_prefix}ranlib" + $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 + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; 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_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +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_prog_ac_ct_RANLIB="ranlib" + $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 + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + 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 + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +test -z "$RANLIB" && RANLIB=: + + + + + + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if ${lt_cv_sys_global_symbol_pipe+:} false; then : + $as_echo_n "(cached) " >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK '"\ +" {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } +fi + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + + + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then : + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if ${lt_cv_cc_needs_belf+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_cc_needs_belf=yes +else + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; 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_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +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_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $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 + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; 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_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +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_prog_ac_ct_MANIFEST_TOOL="mt" + $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 + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + 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 + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + + + + + case $host_os in + rhapsody* | darwin*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. +set dummy ${ac_tool_prefix}dsymutil; 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_prog_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DSYMUTIL"; then + ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. +else +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_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" + $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 + +fi +fi +DSYMUTIL=$ac_cv_prog_DSYMUTIL +if test -n "$DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DSYMUTIL"; then + ac_ct_DSYMUTIL=$DSYMUTIL + # Extract the first word of "dsymutil", so it can be a program name with args. +set dummy dsymutil; 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_prog_ac_ct_DSYMUTIL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DSYMUTIL"; then + ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. +else +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_prog_ac_ct_DSYMUTIL="dsymutil" + $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 + +fi +fi +ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL +if test -n "$ac_ct_DSYMUTIL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + 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 + DSYMUTIL=$ac_ct_DSYMUTIL + fi +else + DSYMUTIL="$ac_cv_prog_DSYMUTIL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. +set dummy ${ac_tool_prefix}nmedit; 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_prog_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NMEDIT"; then + ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. +else +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_prog_NMEDIT="${ac_tool_prefix}nmedit" + $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 + +fi +fi +NMEDIT=$ac_cv_prog_NMEDIT +if test -n "$NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NMEDIT"; then + ac_ct_NMEDIT=$NMEDIT + # Extract the first word of "nmedit", so it can be a program name with args. +set dummy nmedit; 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_prog_ac_ct_NMEDIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NMEDIT"; then + ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. +else +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_prog_ac_ct_NMEDIT="nmedit" + $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 + +fi +fi +ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT +if test -n "$ac_ct_NMEDIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + 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 + NMEDIT=$ac_ct_NMEDIT + fi +else + NMEDIT="$ac_cv_prog_NMEDIT" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. +set dummy ${ac_tool_prefix}lipo; 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_prog_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LIPO"; then + ac_cv_prog_LIPO="$LIPO" # Let the user override the test. +else +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_prog_LIPO="${ac_tool_prefix}lipo" + $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 + +fi +fi +LIPO=$ac_cv_prog_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_LIPO"; then + ac_ct_LIPO=$LIPO + # Extract the first word of "lipo", so it can be a program name with args. +set dummy lipo; 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_prog_ac_ct_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LIPO"; then + ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. +else +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_prog_ac_ct_LIPO="lipo" + $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 + +fi +fi +ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO +if test -n "$ac_ct_LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + 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 + LIPO=$ac_ct_LIPO + fi +else + LIPO="$ac_cv_prog_LIPO" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool; 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_prog_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL"; then + ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. +else +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_prog_OTOOL="${ac_tool_prefix}otool" + $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 + +fi +fi +OTOOL=$ac_cv_prog_OTOOL +if test -n "$OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL"; then + ac_ct_OTOOL=$OTOOL + # Extract the first word of "otool", so it can be a program name with args. +set dummy otool; 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_prog_ac_ct_OTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL"; then + ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. +else +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_prog_ac_ct_OTOOL="otool" + $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 + +fi +fi +ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL +if test -n "$ac_ct_OTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + 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 + OTOOL=$ac_ct_OTOOL + fi +else + OTOOL="$ac_cv_prog_OTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. +set dummy ${ac_tool_prefix}otool64; 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_prog_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OTOOL64"; then + ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. +else +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_prog_OTOOL64="${ac_tool_prefix}otool64" + $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 + +fi +fi +OTOOL64=$ac_cv_prog_OTOOL64 +if test -n "$OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OTOOL64"; then + ac_ct_OTOOL64=$OTOOL64 + # Extract the first word of "otool64", so it can be a program name with args. +set dummy otool64; 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_prog_ac_ct_OTOOL64+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OTOOL64"; then + ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. +else +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_prog_ac_ct_OTOOL64="otool64" + $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 + +fi +fi +ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 +if test -n "$ac_ct_OTOOL64"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + 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 + OTOOL64=$ac_ct_OTOOL64 + fi +else + OTOOL64="$ac_cv_prog_OTOOL64" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if ${lt_cv_apple_cc_single_mod+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes +else + lt_cv_ld_exported_symbols_list=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF + +fi + +done + + + + +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf + + + + + +# Set options + + + + enable_dlopen=no + + + enable_win32_dll=no + + + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + + + + + + + + + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi + + + + + + + + + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then : + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + pic_mode=default +fi + + +test -z "$pic_mode" && pic_mode=default + + + + + + + + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then : + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi + + + + + + + + + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +test -z "$LN_S" && LN_S="ln -s" + + + + + + + + + + + + + + +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if ${lt_cv_objdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } +objdir=$lt_cv_objdir + + + + + +cat >>confdefs.h <<_ACEOF +#define LT_OBJDIR "$lt_cv_objdir/" +_ACEOF + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if ${lt_cv_path_MAGIC_CMD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +# Use C for the default configuration in the libtool script + +lt_save_CC="$CC" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + + + + + + + lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-qpic' + lt_prog_compiler_static='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Wl,' + ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + esac + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + rdos*) + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + lt_prog_compiler_wl='-Qoption ld ';; + *) + lt_prog_compiler_wl='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if ${lt_cv_prog_compiler_pic_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi + + + + + + + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works=yes + fi + else + lt_cv_prog_compiler_static_works=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } + +if test x"$lt_cv_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + runpath_var= + allow_undefined_flag= + always_export_symbols=no + archive_cmds= + archive_expsym_cmds= + compiler_needs_object=no + enable_shared_with_static_runtimes=no + export_dynamic_flag_spec= + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + hardcode_automatic=no + hardcode_direct=no + hardcode_direct_absolute=no + hardcode_libdir_flag_spec= + hardcode_libdir_separator= + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + inherit_rpath=no + link_all_deplibs=unknown + module_cmds= + module_expsym_cmds= + old_archive_from_new_cmds= + old_archive_from_expsyms_cmds= + thread_safe_flag_spec= + whole_archive_flag_spec= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[3-9]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='${wl}--export-all-symbols' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs=no + fi + ;; + + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs=yes + ;; + + interix[3-9]*) + hardcode_direct=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_direct_absolute=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + file_list_spec='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + export_dynamic_flag_spec='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='' + ;; + m68k) + archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + esac + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac + ;; + + darwin* | rhapsody*) + + + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + + else + whole_archive_flag_spec='' + fi + link_all_deplibs=yes + allow_undefined_flag="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + + else + ld_shlibs=no + fi + + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -b" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } + +if test x"$lt_cv_prog_compiler__b" = xyes; then + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' +fi + + ;; + esac + fi + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=yes + hardcode_direct_absolute=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo (void) { return 0; } +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + inherit_rpath=yes + link_all_deplibs=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + hardcode_shlibpath_var=no + hardcode_direct_absolute=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + fi + archive_cmds_need_lc='no' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + archive_cmds_need_lc='no' + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' + fi + ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag='${wl}-z,text' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' + archive_cmds_need_lc=no + hardcode_shlibpath_var=no + hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_separator=':' + link_all_deplibs=yes + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + export_dynamic_flag_spec='${wl}-Blargedynsym' + ;; + esac + fi + fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } +test "$ld_shlibs" = no && can_build_shared=no + +with_gnu_ld=$with_gnu_ld + + + + + + + + + + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[lt_foo]++; } + if (lt_freq[lt_foo] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([A-Za-z]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[4-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[23].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[3-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } + +if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = xyes; then : + lt_cv_dlopen="shl_load" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if ${ac_cv_lib_dld_shl_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes +else + ac_cv_lib_dld_shl_load=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if ${ac_cv_lib_svld_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_svld_dlopen=yes +else + ac_cv_lib_svld_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if ${ac_cv_lib_dld_dld_link+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_dld_link=yes +else + ac_cv_lib_dld_dld_link=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if ${lt_cv_dlopen_self_static+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + + + + + + + + + + + + + + + + +striplib= +old_striplib= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $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; } + fi + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac +fi + + + + + + + + + + + + + # Report which library types will actually be built + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } + + + + +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 +$as_echo_n "checking how to run the C++ preprocessor... " >&6; } +if test -z "$CXXCPP"; then + if ${ac_cv_prog_CXXCPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 +$as_echo "$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +else + _lt_caught_CXX_error=yes +fi + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +compiler_needs_object_CXX=no +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_direct_absolute_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported +hardcode_automatic_CXX=no +inherit_rpath_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +reload_flag_CXX=$reload_flag +reload_cmds_CXX=$reload_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + + + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + + # save warnings/boilerplate of simple test code + ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* + + ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* + + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS + compiler=$CC + compiler_CXX=$CC + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` + + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' + else + lt_prog_compiler_no_builtin_flag_CXX= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${lt_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${lt_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + + + + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + ld_shlibs_CXX=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aix[4-9]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_direct_absolute_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + file_list_spec_CXX='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct_CXX=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + export_dynamic_flag_spec_CXX='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + always_export_symbols_CXX=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__CXX +fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + + archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__CXX +fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + fi + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_CXX=' ' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=yes + file_list_spec_CXX='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' + enable_shared_with_static_runtimes_CXX=yes + # Don't use ranlib + old_postinstall_cmds_CXX='chmod 644 $oldlib' + postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + esac + ;; + darwin* | rhapsody*) + + + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + + else + whole_archive_flag_spec_CXX='' + fi + link_all_deplibs_CXX=yes + allow_undefined_flag_CXX="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then + archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + + else + ld_shlibs_CXX=no + fi + + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + freebsd2.*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + ld_shlibs_CXX=no + ;; + + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + + gnu*) + ;; + + haiku*) + archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs_CXX=yes + ;; + + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + *) + hardcode_direct_CXX=yes + hardcode_direct_absolute_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + interix[3-9]*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + inherit_rpath_CXX=yes + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [1-5].* | *pgcpp\ [1-5].*) + prelink_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + old_archive_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' + archive_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 and above use weak symbols + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + ;; + xl* | mpixl* | bgxl*) + # IBM XL 8.0 on PPC, with GNU ld + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + hardcode_libdir_flag_spec_CXX='-R$libdir' + whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object_CXX=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + ld_shlibs_CXX=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + hardcode_direct_absolute_CXX=yes + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=func_echo_all + else + ld_shlibs_CXX=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + case $host in + osf3*) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + ;; + *) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + ;; + esac + + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' + ;; + esac + link_all_deplibs_CXX=yes + + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='${wl}-z,text' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ + '"$old_archive_cmds_CXX" + reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ + '"$reload_cmds_CXX" + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +$as_echo "$ld_shlibs_CXX" >&6; } + test "$ld_shlibs_CXX" = no && can_build_shared=no + + GCC_CXX="$GXX" + LD_CXX="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + # Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= + +cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF + + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; +esac + +if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case ${prev}${p} in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + fi + + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac + if test "$pre_test_object_deps_done" = no; then + case ${prev} in + -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + prev= + ;; + + *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" +fi + +$RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS + +# PORTME: override above test on systems where it is broken +case $host_os in +interix[3-9]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC* | sunCC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac + + +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac + compiler_lib_search_dirs_CXX= +if test -n "${compiler_lib_search_path_CXX}"; then + compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + lt_prog_compiler_pic_CXX='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static_CXX= + ;; + interix[3-9]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_CXX=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_CXX='-fPIC -shared' + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix[4-9]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + dgux*) + case $cc_basename in + ec++*) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-qpic' + lt_prog_compiler_static_CXX='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + lt_prog_compiler_pic_CXX='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx*) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc*) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } +lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } +if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_pic_works_CXX=yes + fi + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } + +if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi + +fi + + + + + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_static_works_CXX=yes + fi + else + lt_cv_prog_compiler_static_works_CXX=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } + +if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } + + + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } + if test "$hard_links" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' + case $host_os in + aix[4-9]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + case $cc_basename in + cl*) + exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + ;; + esac + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 +$as_echo "$ld_shlibs_CXX" >&6; } +test "$ld_shlibs_CXX" = no && can_build_shared=no + +with_gnu_ld_CXX=$with_gnu_ld + + + + + + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_CXX in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc_CXX=no + else + lt_cv_archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } + archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX + ;; + esac + fi + ;; +esac + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } + +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[4-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[23].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[3-9]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + lt_cv_shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || + test -n "$runpath_var_CXX" || + test "X$hardcode_automatic_CXX" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct_CXX" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 +$as_echo "$hardcode_action_CXX" >&6; } + +if test "$hardcode_action_CXX" = relink || + test "$inherit_rpath_CXX" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + + fi # test -n "$compiler" + + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + + + + + ac_config_commands="$ac_config_commands libtool" + + + + +# Only expand once: + + + +ac_config_headers="$ac_config_headers config.h" + + + if test "x$enable_build" != xno; then + build_TRUE= + build_FALSE='#' +else + build_TRUE='#' + build_FALSE= +fi + + +if test "x$enable_build" != xno || test -f config.force; then +echo timestamp >config.force +fi + + if test "x$GCC" = xyes; then + DIRECT_TYPE_TRUE= + DIRECT_TYPE_FALSE='#' +else + DIRECT_TYPE_TRUE='#' + DIRECT_TYPE_FALSE= +fi + + +enable_segcache=no + if test "x$enable_segcache" != xno; then + WITH_SEGCACHE_TRUE= + WITH_SEGCACHE_FALSE='#' +else + WITH_SEGCACHE_TRUE='#' + WITH_SEGCACHE_FALSE= +fi + +if test "x$enable_segcache" = no; then + +$as_echo "#define GRAPHITE2_NSEGCACHE 1" >>confdefs.h + +fi + +enable_fileface=yes + if test "x$enable_fileface" != xno; then + WITH_FILEFACE_TRUE= + WITH_FILEFACE_FALSE='#' +else + WITH_FILEFACE_TRUE='#' + WITH_FILEFACE_FALSE= +fi + +if test "x$enable_fileface" = no; then + +$as_echo "#define GRAPHITE2_NFILEFACE 1" >>confdefs.h + +fi + +enable_tracing=no + if test "x$enable_tracing" != xno; then + WITH_TRACING_TRUE= + WITH_TRACING_FALSE='#' +else + WITH_TRACING_TRUE='#' + WITH_TRACING_FALSE= +fi + +if test "x$enable_tracing" = no; then + +$as_echo "#define GRAPHITE2_NTRACING 1" >>confdefs.h + +fi + +GRAPHITE2_TREE=graphite2-1.2.0 + + +ac_config_files="$ac_config_files Makefile include/graphite2/Makefile" + + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${build_TRUE}" && test -z "${build_FALSE}"; then + as_fn_error $? "conditional \"build\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DIRECT_TYPE_TRUE}" && test -z "${DIRECT_TYPE_FALSE}"; then + as_fn_error $? "conditional \"DIRECT_TYPE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_SEGCACHE_TRUE}" && test -z "${WITH_SEGCACHE_FALSE}"; then + as_fn_error $? "conditional \"WITH_SEGCACHE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_FILEFACE_TRUE}" && test -z "${WITH_FILEFACE_FALSE}"; then + as_fn_error $? "conditional \"WITH_FILEFACE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_TRACING_TRUE}" && test -z "${WITH_TRACING_FALSE}"; then + as_fn_error $? "conditional \"WITH_TRACING\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by graphite2 for TeX Live $as_me 1.2.0, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +graphite2 for TeX Live config.status 1.2.0 +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' +lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' +reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' +AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' +STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' +RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' +need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' +LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' +predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' +postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' +predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' +postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' +LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' +reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' +reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' +GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' +inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' +link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' +always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' +exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' +include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' +prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' +predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' +postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' +predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' +postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' + +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in SHELL \ +ECHO \ +PATH_SEPARATOR \ +SED \ +GREP \ +EGREP \ +FGREP \ +LD \ +NM \ +LN_S \ +lt_SP2NL \ +lt_NL2SP \ +reload_flag \ +OBJDUMP \ +deplibs_check_method \ +file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +DLLTOOL \ +sharedlib_from_linklib_cmd \ +AR \ +AR_FLAGS \ +archiver_list_spec \ +STRIP \ +RANLIB \ +CC \ +CFLAGS \ +compiler \ +lt_cv_sys_global_symbol_pipe \ +lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +nm_file_list_spec \ +lt_prog_compiler_no_builtin_flag \ +lt_prog_compiler_pic \ +lt_prog_compiler_wl \ +lt_prog_compiler_static \ +lt_cv_prog_compiler_c_o \ +need_locks \ +MANIFEST_TOOL \ +DSYMUTIL \ +NMEDIT \ +LIPO \ +OTOOL \ +OTOOL64 \ +shrext_cmds \ +export_dynamic_flag_spec \ +whole_archive_flag_spec \ +compiler_needs_object \ +with_gnu_ld \ +allow_undefined_flag \ +no_undefined_flag \ +hardcode_libdir_flag_spec \ +hardcode_libdir_separator \ +exclude_expsyms \ +include_expsyms \ +file_list_spec \ +variables_saved_for_relink \ +libname_spec \ +library_names_spec \ +soname_spec \ +install_override_mode \ +finish_eval \ +old_striplib \ +striplib \ +compiler_lib_search_dirs \ +predep_objects \ +postdep_objects \ +predeps \ +postdeps \ +compiler_lib_search_path \ +LD_CXX \ +reload_flag_CXX \ +compiler_CXX \ +lt_prog_compiler_no_builtin_flag_CXX \ +lt_prog_compiler_pic_CXX \ +lt_prog_compiler_wl_CXX \ +lt_prog_compiler_static_CXX \ +lt_cv_prog_compiler_c_o_CXX \ +export_dynamic_flag_spec_CXX \ +whole_archive_flag_spec_CXX \ +compiler_needs_object_CXX \ +with_gnu_ld_CXX \ +allow_undefined_flag_CXX \ +no_undefined_flag_CXX \ +hardcode_libdir_flag_spec_CXX \ +hardcode_libdir_separator_CXX \ +exclude_expsyms_CXX \ +include_expsyms_CXX \ +file_list_spec_CXX \ +compiler_lib_search_dirs_CXX \ +predep_objects_CXX \ +postdep_objects_CXX \ +predeps_CXX \ +postdeps_CXX \ +compiler_lib_search_path_CXX; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in reload_cmds \ +old_postinstall_cmds \ +old_postuninstall_cmds \ +old_archive_cmds \ +extract_expsyms_cmds \ +old_archive_from_new_cmds \ +old_archive_from_expsyms_cmds \ +archive_cmds \ +archive_expsym_cmds \ +module_cmds \ +module_expsym_cmds \ +export_symbols_cmds \ +prelink_cmds \ +postlink_cmds \ +postinstall_cmds \ +postuninstall_cmds \ +finish_cmds \ +sys_lib_search_path_spec \ +sys_lib_dlsearch_path_spec \ +reload_cmds_CXX \ +old_archive_cmds_CXX \ +old_archive_from_new_cmds_CXX \ +old_archive_from_expsyms_cmds_CXX \ +archive_cmds_CXX \ +archive_expsym_cmds_CXX \ +module_cmds_CXX \ +module_expsym_cmds_CXX \ +export_symbols_cmds_CXX \ +prelink_cmds_CXX \ +postlink_cmds_CXX; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[\\\\\\\`\\"\\\$]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +ac_aux_dir='$ac_aux_dir' +xsi_shell='$xsi_shell' +lt_shell_append='$lt_shell_append' + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + + + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile' + + + + + + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "include/graphite2/Makefile") CONFIG_FILES="$CONFIG_FILES include/graphite2/Makefile" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + "libtool":C) + + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool 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. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +# The names of the tagged configurations supported by this script. +available_tags="CXX " + +# ### BEGIN LIBTOOL CONFIG + +# Which release of libtool.m4 was used? +macro_version=$macro_version +macro_revision=$macro_revision + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# What type of objects to build. +pic_mode=$pic_mode + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" + +# A grep program that handles long lines. +GREP=$lt_GREP + +# An ERE matcher. +EGREP=$lt_EGREP + +# A literal string matcher. +FGREP=$lt_FGREP + +# A BSD- or MS-compatible name lister. +NM=$lt_NM + +# Whether we need soft or hard links. +LN_S=$lt_LN_S + +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len + +# Object file suffix (normally "o"). +objext=$ac_objext + +# Executable file suffix (normally ""). +exeext=$exeext + +# whether the shell understands "unset". +lt_unset=$lt_unset + +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL + +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP + +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + +# An object symbol dumper. +OBJDUMP=$lt_OBJDUMP + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method = "file_magic". +file_magic_cmd=$lt_file_magic_cmd + +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + +# The archiver. +AR=$lt_AR + +# Flags to create an archive. +AR_FLAGS=$lt_AR_FLAGS + +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + +# A symbol stripping program. +STRIP=$lt_STRIP + +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + +# A C compiler. +LTCC=$lt_CC + +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix + +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL + +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT + +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO + +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL + +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 + +# Old archive suffix (normally "a"). +libext=$libext + +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink + +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Library versioning type. +version_type=$version_type + +# Shared library runtime path variable. +runpath_var=$runpath_var + +# Shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds + +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + + +# The linker used to build libraries. +LD=$lt_LD + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds + +# A language specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU compiler? +with_gcc=$GCC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects +postdep_objects=$lt_postdep_objects +predeps=$lt_predeps +postdeps=$lt_postdeps + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path + +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + +ltmain="$ac_aux_dir/ltmain.sh" + + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi + + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + + + cat <<_LT_EOF >> "$ofile" + +# ### BEGIN LIBTOOL TAG CONFIG: CXX + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# How to create reloadable object files. +reload_flag=$lt_reload_flag_CXX +reload_cmds=$lt_reload_cmds_CXX + +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds_CXX + +# A language specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU compiler? +with_gcc=$GCC_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object_CXX + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX + +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld_CXX + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute_CXX + +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic_CXX + +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath_CXX + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds_CXX + +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_CXX + +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec_CXX + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# The directories searched by this compiler when creating a shared library. +compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX + +# Dependencies to place before and after the objects being linked to +# create a shared library. +predep_objects=$lt_predep_objects_CXX +postdep_objects=$lt_postdep_objects_CXX +predeps=$lt_predeps_CXX +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + +# ### END LIBTOOL TAG CONFIG: CXX +_LT_EOF + + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + diff --git a/Build/source/libs/graphite2/configure.ac b/Build/source/libs/graphite2/configure.ac new file mode 100644 index 00000000000..0ccbb973f55 --- /dev/null +++ b/Build/source/libs/graphite2/configure.ac @@ -0,0 +1,63 @@ +dnl Process this file with autoconf to produce a configure script. +dnl +dnl Copyright (C) 2012 Peter Breitenlohner +dnl +dnl This file is free software; the copyright holder +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +m4_include([version.ac])[] dnl define graphite2_version +AC_INIT([graphite2 for TeX Live], graphite2_version, [tex-k@tug.org]) +AC_PREREQ([2.65]) +AC_CONFIG_SRCDIR([graphite2-]graphite2_version[/graphite2.pc.in]) +AC_CONFIG_AUX_DIR([../../build-aux]) +AC_CONFIG_MACRO_DIR([../../m4]) + +AM_INIT_AUTOMAKE([foreign]) +AM_MAINTAINER_MODE + +AC_PROG_CC +AC_PROG_CXX +AC_PROG_RANLIB +AC_PROG_LN_S + +KPSE_COMPILER_WARNINGS + +LT_INIT + +AC_CONFIG_HEADERS([config.h]) + +AM_CONDITIONAL([build], [test "x$enable_build" != xno]) + +if test "x$enable_build" != xno || test -f config.force; then +echo timestamp >config.force +fi + +AM_CONDITIONAL([DIRECT_TYPE], [test "x$GCC" = xyes]) + +enable_segcache=no +AM_CONDITIONAL([WITH_SEGCACHE], [test "x$enable_segcache" != xno]) +if test "x$enable_segcache" = no; then + AC_DEFINE([GRAPHITE2_NSEGCACHE], 1, + [Define to 1 to disable segcache support.]) +fi + +enable_fileface=yes +AM_CONDITIONAL([WITH_FILEFACE], [test "x$enable_fileface" != xno]) +if test "x$enable_fileface" = no; then + AC_DEFINE([GRAPHITE2_NFILEFACE], 1, + [Define to 1 to disable fileface support.]) +fi + +enable_tracing=no +AM_CONDITIONAL([WITH_TRACING], [test "x$enable_tracing" != xno]) +if test "x$enable_tracing" = no; then + AC_DEFINE([GRAPHITE2_NTRACING], 1, + [Define to 1 to disable tracing support.]) +fi + +AC_SUBST([GRAPHITE2_TREE], [graphite2-]graphite2_version) + +AC_CONFIG_FILES([Makefile include/graphite2/Makefile]) + +AC_OUTPUT diff --git a/Build/source/libs/graphite2/graphite2-1.2.0-PATCHES/ChangeLog b/Build/source/libs/graphite2/graphite2-1.2.0-PATCHES/ChangeLog new file mode 100644 index 00000000000..2bcabd35aba --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0-PATCHES/ChangeLog @@ -0,0 +1,9 @@ +2012-12-04 Peter Breitenlohner + + Imported graphite-1.2.0 source tree from: + http://sourceforge.net/projects/silgraphite/files/graphite2/ + + * patch-01-case-sensitive (new): Windows.h => windows.h. + * patch-02-attribute-hot (new): Test for gcc-4.3 or better. + * patch-03-old-gcc (new): Allow to build with, e.g., gcc-3.4. + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0-PATCHES/TL-Changes b/Build/source/libs/graphite2/graphite2-1.2.0-PATCHES/TL-Changes new file mode 100644 index 00000000000..21e4d312e90 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0-PATCHES/TL-Changes @@ -0,0 +1,10 @@ +Changes applied to the graphite-1.2.0/ tree as obtained from: + http://sourceforge.net/projects/silgraphite/files/graphite2/ + +Removed unused dirs: + contrib + debian-src + doc + gr2fonttest + tests + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0-PATCHES/patch-01-case-sensitive b/Build/source/libs/graphite2/graphite2-1.2.0-PATCHES/patch-01-case-sensitive new file mode 100644 index 00000000000..aa2986c38cf --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0-PATCHES/patch-01-case-sensitive @@ -0,0 +1,14 @@ + Required for case-sensitive filesystems. + +diff -ur graphite2-1.2.0.orig/src/gr_logging.cpp graphite2-1.2.0/src/gr_logging.cpp +--- graphite2-1.2.0.orig/src/gr_logging.cpp 2012-09-21 10:39:40.000000000 +0200 ++++ graphite2-1.2.0/src/gr_logging.cpp 2012-12-04 12:19:51.657709606 +0100 +@@ -33,7 +33,7 @@ + #include "inc/Segment.h" + + #if defined _WIN32 +-#include "Windows.h" ++#include "windows.h" + #endif + + using namespace graphite2; diff --git a/Build/source/libs/graphite2/graphite2-1.2.0-PATCHES/patch-02-attribute-hot b/Build/source/libs/graphite2/graphite2-1.2.0-PATCHES/patch-02-attribute-hot new file mode 100644 index 00000000000..1eaa4a69d4e --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0-PATCHES/patch-02-attribute-hot @@ -0,0 +1,14 @@ + The attribute requires in gcc-4.3 or better. + +diff -ur graphite2-1.2.0.orig/src/inc/Machine.h graphite2-1.2.0/src/inc/Machine.h +--- graphite2-1.2.0.orig/src/inc/Machine.h 2012-09-21 10:39:40.000000000 +0200 ++++ graphite2-1.2.0/src/inc/Machine.h 2012-12-04 13:10:33.000000000 +0100 +@@ -36,7 +36,7 @@ + #include "inc/Main.h" + + #if defined(__GNUC__) +-#if defined(__clang__) ++#if defined(__clang__) || (__GNUC__ * 100 + __GNUC_MINOR__) < 403 + #define HOT + #if defined(__x86_64) + #define REGPARM(n) __attribute__((regparm(n))) diff --git a/Build/source/libs/graphite2/graphite2-1.2.0-PATCHES/patch-03-old-gcc b/Build/source/libs/graphite2/graphite2-1.2.0-PATCHES/patch-03-old-gcc new file mode 100644 index 00000000000..a07fc0bc746 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0-PATCHES/patch-03-old-gcc @@ -0,0 +1,44 @@ + Required for gcc-3.4 and probaly other old versions to avoid + error: base `graphite2::Face' with only non-default constructor in + class without a constructor + and the same for Font, Segment. + +diff -ur graphite2-1.2.0.orig/src/inc/Face.h graphite2-1.2.0/src/inc/Face.h +--- graphite2-1.2.0.orig/src/inc/Face.h 2012-09-21 10:39:40.000000000 +0200 ++++ graphite2-1.2.0/src/inc/Face.h 2012-12-04 12:15:58.000000000 +0100 +@@ -89,6 +89,9 @@ + + CLASS_NEW_DELETE; + private: ++ // do not instantiate ++ Face(); ++ + SillMap m_Sill; + gr_face_ops m_ops; + const void * m_appFaceHandle; // non-NULL +diff -ur graphite2-1.2.0.orig/src/inc/Font.h graphite2-1.2.0/src/inc/Font.h +--- graphite2-1.2.0.orig/src/inc/Font.h 2012-09-21 10:39:40.000000000 +0200 ++++ graphite2-1.2.0/src/inc/Font.h 2012-12-04 12:13:14.000000000 +0100 +@@ -54,6 +54,9 @@ + float m_scale; // scales from design units to ppm + bool m_hinted; + ++ // do not instantiate ++ Font(); ++ + Font(const Font&); + Font& operator=(const Font&); + }; +diff -ur graphite2-1.2.0.orig/src/inc/Segment.h graphite2-1.2.0/src/inc/Segment.h +--- graphite2-1.2.0.orig/src/inc/Segment.h 2012-09-21 10:39:40.000000000 +0200 ++++ graphite2-1.2.0/src/inc/Segment.h 2012-12-04 12:15:53.000000000 +0100 +@@ -148,6 +148,9 @@ + float justify(Slot *pSlot, const Font *font, float width, enum justFlags flags, Slot *pFirst, Slot *pLast); + + private: ++ // do not instantiate ++ Segment(); ++ + Rect m_bbox; // ink box of the segment + Position m_advance; // whole segment advance + SlotRope m_slots; // std::vector of slot buffers diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/.hg_archival.txt b/Build/source/libs/graphite2/graphite2-1.2.0/.hg_archival.txt new file mode 100644 index 00000000000..0e511bd458c --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/.hg_archival.txt @@ -0,0 +1,5 @@ +repo: 999e2033695c3bcf2f65d611737ac9008805bd58 +node: 8d2a85a546653a795d39cab287a1965a785cfbf8 +branch: default +latesttag: 1.2.0 +latesttagdistance: 1 diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/.hgeol b/Build/source/libs/graphite2/graphite2-1.2.0/.hgeol new file mode 100644 index 00000000000..5eb1fc19d0f --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/.hgeol @@ -0,0 +1,15 @@ +[patterns] +**.c = native +**.cfg = native +**.cpp = native +**.gdh = native +**.h = native +**.json = native +**.log = native +**.pdf = BIN +**.sh = native +**.txt = native +**.ttf = BIN + +[repository] +native=LF diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/.hgignore b/Build/source/libs/graphite2/graphite2-1.2.0/.hgignore new file mode 100644 index 00000000000..5934da4b3c8 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/.hgignore @@ -0,0 +1,34 @@ +syntax:glob +*~ +*.bak +m4 +autom4te.cache +config +configure +config.status +config.log +aclocal.m4 +libtool +Makefile.in +Makefile +msvs9 +vs9 +nmake* +*.o +*.lo +*.Plo +*.swp +*.la +*.kdev4 +.cproject +.project +.pydevproject + +syntax:regexp +\.libs/ +\.deps/ +\.externalToolBuilders +build*/ +release/ +debug/ +dev/ diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/.hgtags b/Build/source/libs/graphite2/graphite2-1.2.0/.hgtags new file mode 100644 index 00000000000..164d8ba9a73 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/.hgtags @@ -0,0 +1,27 @@ +c36cd69f32ac9daace9f8784063567d81328e778 base +e0db725d6db85c49389176f2ee460366f080c023 Release 0.9 +3a92b51d7167e16c31b963924bd01964d6eb7e63 r0.9.1 +5369cdd121206c950113de37f4886152aa86cc98 0.9.2 +3ec0de96c2229e975b1452f9a92c4ab3845c0ad2 0.9.3 +50901246031365c63fb826a18a5ca52099201d93 0.9.4 +b8a64c4a89f5d742553a7cc3cfddb6b3e08e1fa0 1.0.0 +bedb05f72d56f24ca0fc333fd14eabb1ec553902 1.0.1 +bedb05f72d56f24ca0fc333fd14eabb1ec553902 1.0.1 +0000000000000000000000000000000000000000 1.0.1 +0000000000000000000000000000000000000000 1.0.1 +01df4f7cc7b0f31f8490b4246b298ac10d92675e 1.0.1 +0fa690ff089ce0bc382a553cc01c0b721fbdee5c 1.0.2 +0fa690ff089ce0bc382a553cc01c0b721fbdee5c 1.0.2 +b10bcaf1302411513a5961d1854ff8c02e5ad5e6 1.0.2 +8795e344f7964bdf8ef4607004f01b94c41e5775 1.0.3 +8795e344f7964bdf8ef4607004f01b94c41e5775 1.0.3 +0000000000000000000000000000000000000000 1.0.3 +0000000000000000000000000000000000000000 1.0.3 +f148746a0d99d2f9bc050906ce78815565a0d0b4 1.0.3 +afdc9c2e4cf341560dfcb985b66e52793d1987af 1.1.0 +afdc9c2e4cf341560dfcb985b66e52793d1987af 1.1.0 +22dfbf9cd047667eef87602eacf2ac1e84ec20d7 1.1.0 +e095cd8b635aa985c8054717761555b6d46dbdb6 1.1.1 +1ffaabe61f501b7a0b9217f4b82f21ac6a7af212 1.1.2 +d8c8ce7898a9e73a9cb11c25b9ff6a198fdf8d80 1.1.3 +fb4b0c347a953f6aa656a4e414f8e42e91c00c2b 1.2.0 diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/CMakeLists.txt b/Build/source/libs/graphite2/graphite2-1.2.0/CMakeLists.txt new file mode 100644 index 00000000000..043a9f4e8ec --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/CMakeLists.txt @@ -0,0 +1,73 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR) +cmake_policy(SET CMP0012 NEW) +include(TestBigEndian) + +project(graphite2) +set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}) +if (NOT CMAKE_BUILD_TYPE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY VALUE Release) +endif (NOT CMAKE_BUILD_TYPE) +#if (CMAKE_BUILD_TYPE STREQUAL ClangASN) +# add_definitions(-faddress-sanitizer -fno-omit-frame-pointer) +# set_property(CACHE CMAKE_C_COMPILER PROPERTY VALUE clang) +# set_property(CACHE CMAKE_CXX_COMPILER PROPERTY VALUE clang) +#endif (CMAKE_BUILD_TYPE STREQUAL ClangASN) + +enable_language(CXX C) + +include_directories(${PROJECT_SOURCE_DIR}/include) +if (CMAKE_BUILD_TYPE STREQUAL ClangASN) + add_definitions(-faddress-sanitizer -fno-omit-frame-pointer) +endif (CMAKE_BUILD_TYPE STREQUAL ClangASN) + +enable_testing() + +set(GRAPHITE2_VM_TYPE auto CACHE STRING "Choose the type of vm machine: Auto, Direct or Call.") +option(GRAPHITE2_NSEGCACHE "Compile out the gr_*_with_seg_cache APIs") +option(GRAPHITE2_NFILEFACE "Compile out the gr_make_file_face* APIs") +option(GRAPHITE2_NTRACING "Compile out log segment tracing capability") + + +message(STATUS "Build: " ${CMAKE_BUILD_TYPE}) +string(REPLACE "ON" "disabled" _SEGCACHE_SUPPORT ${GRAPHITE2_NSEGCACHE}) +string(REPLACE "OFF" "enabled" _SEGCACHE_SUPPORT ${_SEGCACHE_SUPPORT}) +string(REPLACE "ON" "disabled" _FILEFACE_SUPPORT ${GRAPHITE2_NFILEFACE}) +string(REPLACE "OFF" "enabled" _FILEFACE_SUPPORT ${_FILEFACE_SUPPORT}) +string(REPLACE "ON" "disabled" _TRACING_SUPPORT ${GRAPHITE2_NTRACING}) +string(REPLACE "OFF" "enabled" _TRACING_SUPPORT ${_TRACING_SUPPORT}) +message(STATUS "Segment Cache support: " ${_SEGCACHE_SUPPORT}) +message(STATUS "File Face support: " ${_FILEFACE_SUPPORT}) +message(STATUS "Tracing support: " ${_TRACING_SUPPORT}) + +string(TOLOWER ${GRAPHITE2_VM_TYPE} GRAPHITE2_VM_TYPE) +if (NOT GRAPHITE2_VM_TYPE MATCHES "auto|direct|call") + message(SEND_ERROR "unrecognised vm machine type: ${GRAPHITE2_VM_TYPE}. Only Auto, Direct or Call are available") +endif (NOT GRAPHITE2_VM_TYPE MATCHES "auto|direct|call") +if (GRAPHITE2_VM_TYPE STREQUAL "auto") + if (CMAKE_BUILD_TYPE MATCHES "[Rr]el(ease|[Ww]ith[Dd]eb[Ii]nfo)") + set(GRAPHITE2_VM_TYPE "direct") + else(CMAKE_BUILD_TYPE MATCHES "[Rr]el(ease|[Ww]ith[Dd]eb[Ii]nfo)") + set(GRAPHITE2_VM_TYPE "call") + endif(CMAKE_BUILD_TYPE MATCHES "[Rr]el(ease|[Ww]ith[Dd]eb[Ii]nfo)") +endif (GRAPHITE2_VM_TYPE STREQUAL "auto") +if (GRAPHITE2_VM_TYPE STREQUAL "direct" AND NOT (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_BASE_NAME STREQUAL "clang++")) + message(WARNING "vm machine type direct can only be built using GCC") + set(GRAPHITE2_VM_TYPE "call") +endif (GRAPHITE2_VM_TYPE STREQUAL "direct" AND NOT (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_BASE_NAME STREQUAL "clang++")) +message(STATUS "Using vm machine type: ${GRAPHITE2_VM_TYPE}") + +add_subdirectory(src) +add_subdirectory(tests) +add_subdirectory(doc) +if (NOT (GRAPHITE2_NSEGCACHE OR GRAPHITE2_NFILEFACE)) + add_subdirectory(gr2fonttest) +endif (NOT (GRAPHITE2_NSEGCACHE OR GRAPHITE2_NFILEFACE)) + +set(version 2.1.0) +set(libdir ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}) +set(includedir ${CMAKE_INSTALL_PREFIX}/include) + +configure_file(graphite2.pc.in graphite2.pc) + +install(FILES ${PROJECT_BINARY_DIR}/graphite2.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig) + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/COPYING b/Build/source/libs/graphite2/graphite2-1.2.0/COPYING new file mode 100644 index 00000000000..d40f2d84587 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/COPYING @@ -0,0 +1,26 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + + Alternatively, you may use this library under the terms of the Mozilla + Public License (http://mozilla.org/MPL) or under the GNU General Public + License, as published by the Free Sofware Foundation; either version + 2 of the license or (at your option) any later version. +*/ diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/ChangeLog b/Build/source/libs/graphite2/graphite2-1.2.0/ChangeLog new file mode 100644 index 00000000000..03629e97f80 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/ChangeLog @@ -0,0 +1,89 @@ +1.2.0 + . API Changes: + . Added Windows friendly gr_start_logging and gr_stop_logging, now per face + . Added gr_make_face_with_ops, gr_make_face_with_seg_cache_and_ops + . Added gr_make_font_with_ops + . Added gr_face_is_char_supported + . Added gr_face_info to give info to apps about face capabilities + . Deprecated gr_make_face, gr_make_face_with_seg_cache, gr_make_font_with_advance_fn + . Deprecated graphite_start_logging and graphite_stop_logging + . These functions are stubbed now and do nothing, but do compile and link. + . Bump API version to 3 + . Add C# wrapper to contrib + . Handle justification information in a font and do something useful with it + . Builds clang clean (has done for a while) + . Bug fixes + . Windows build and bug fixes + . Add extra information to json debug output + . Added windows build documentation + . Added freetype sample code and test + +1.1.3 + . Default build has GRAPHITE2_COMPARE_RENDERER to OFF to reduce dependencies + . Builds on Mac with clang + . Debug output improvements + . Tidy up perl wrappers + . Fuzz tester improvements + . Various bug fixes for bad font handling +1.1.2 + . Support feature ids < 4 chars when space padded for inclusion in FF 14. + . More fuzztesting and removal of causes of valgrind bad reads and sigabrts + . Remove contrib/android into its own repo (http://hg.palaso.org/grandroid) + . Update comparerenderer to latest harfbuzzng api +1.1.1 + . Missing Log.h included + . perl wrappers updated +1.1.0 + . Refactored debug output to use json + . Renamed VM_MACHINE_TYPE to GRAPHITE2_VM_TYPE + . Renamed DISABLE_SEGCACHE to GRAPHITE2_NSEGCACE + . Renamed DISBALE_FILE_FACE to GRAPHITE2_NFILEFACE + . Renamed ENABLE_COMPARE_RENDERER to GRAPHTIE2_COMPARE_RENDERER + . Renamed DOXYGEN_CONFIG to GRAPHITE2_DOXYGEN_CONFIG + . Renamed GR2_CUSTOM_HEADER to GRAPHITE2_CUSTOM_HEADER + . Renamed GR2_EXPORTING to GRAPHITE2_EXPORTING + . Added GRAPHITE2_STATIC for static only builds + . Added GRAPHITE2_NTRACING to compile out tracing code + . Documented GRAPHITE2_{EXPORTING,STATIC,NTRACING} in hacking.txt + . Bump libtool version to 2.1.0 + . dumb font rendering works + . slot user attributes are now signed rather than unsigned + . add support for long class maps + . Rename perl library to avoid nameclash on Windows + . Various robustness fixes + . Moved internal .h files into src/inc + . Parallelise fuzztest + . General build improvements, particularly on Windows + +1.0.3 + . Fix UTF16 surrogate support + . script and lang tags may be space padded or null padded + . Remove need for WORDS_BIGENDIAN, do it all automatically + . Remove all #include . Use CLASS_NEW_DELETE instead. + . Fix comparerenderer to work with current hbng + . Add valgrind to fuzztest to ensure good memory use at all times + . Fix new fuzztest exposed bugs. + . Fix bugs exposed by Mozilla security review + . Add continuous integration build on Windows support + +1.0.2 + . Fix Windows build + . Comparerenderer uses hbng enforcing ot rendering + . Add Bidi .hasChar support and refactor mirroring code + . Make cmake default Release rather than debug + . Don't compile in a boat load of TtfUtil that isn't used, saving 15% of binary + . Chase the FSF around its latest office moves + . WORDS_BIGENDIAN is set at the top so tests now pass on ppc, etc. + . More words in the manual + +1.0.1 + . Release is the default build in cmake now. + . Refactor cmake build to not rebuild things so much. + . Include a missing file + . Remove -nostdlibs, making gcc happy everywhere + . Update comparerenderer to latest hbng interface + . Add changelog + +1.0.0 + . First major release of perfect code! + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/Graphite.cmake b/Build/source/libs/graphite2/graphite2-1.2.0/Graphite.cmake new file mode 100644 index 00000000000..b6fe7cfc66e --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/Graphite.cmake @@ -0,0 +1,99 @@ +include(GetPrerequisites) + +function(nolib_test LIBNAME OBJECTFILE) + string(REGEX REPLACE "[][^$.*+?|()-]" "\\\\\\0" LIBNAME_REGEX ${LIBNAME}) + if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + add_test(NAME nolib-${LIBNAME}-${PROJECT_NAME} + COMMAND otool -L ${OBJECTFILE}) + set_tests_properties(nolib-${LIBNAME}-${PROJECT_NAME} PROPERTIES + FAIL_REGULAR_EXPRESSION "${CMAKE_SHARED_LIBRARY_PREFIX}${LIBNAME_REGEX}[.0-9]+${CMAKE_SHARED_LIBRARY_SUFFIX}") + else (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + add_test(NAME nolib-${LIBNAME}-${PROJECT_NAME} + COMMAND readelf --dynamic ${OBJECTFILE}) + set_tests_properties(nolib-${LIBNAME}-${PROJECT_NAME} PROPERTIES + FAIL_REGULAR_EXPRESSION "0x[0-9a-f]+ \\(NEEDED\\)[ \\t]+Shared library: \\[${CMAKE_SHARED_LIBRARY_PREFIX}${LIBNAME_REGEX}${CMAKE_SHARED_LIBRARY_SUFFIX}.*\\]") + endif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") +endfunction(nolib_test) + + +MACRO(GET_TARGET_PROPERTY_WITH_DEFAULT _variable _target _property _default_value) + GET_TARGET_PROPERTY (${_variable} ${_target} ${_property}) + IF (${_variable} MATCHES NOTFOUND) + SET (${_variable} ${_default_value}) + ENDIF (${_variable} MATCHES NOTFOUND) +ENDMACRO (GET_TARGET_PROPERTY_WITH_DEFAULT) + + +FUNCTION(CREATE_LIBTOOL_FILE _target _install_DIR) + GET_TARGET_PROPERTY(_target_location ${_target} LOCATION) + GET_TARGET_PROPERTY_WITH_DEFAULT(_target_static_lib ${_target} STATIC_LIB "") + GET_TARGET_PROPERTY_WITH_DEFAULT(_target_dependency_libs ${_target} LT_DEPENDENCY_LIBS "") + GET_TARGET_PROPERTY_WITH_DEFAULT(_target_current ${_target} LT_VERSION_CURRENT 0) + GET_TARGET_PROPERTY_WITH_DEFAULT(_target_age ${_target} LT_VERSION_AGE 0) + GET_TARGET_PROPERTY_WITH_DEFAULT(_target_revision ${_target} LT_VERSION_REVISION 0) + GET_TARGET_PROPERTY_WITH_DEFAULT(_target_installed ${_target} LT_INSTALLED yes) + GET_TARGET_PROPERTY_WITH_DEFAULT(_target_shouldnotlink ${_target} LT_SHOULDNOTLINK yes) + GET_TARGET_PROPERTY_WITH_DEFAULT(_target_dlopen ${_target} LT_DLOPEN "") + GET_TARGET_PROPERTY_WITH_DEFAULT(_target_dlpreopen ${_target} LT_DLPREOPEN "") + GET_FILENAME_COMPONENT(_lanamewe ${_target_location} NAME_WE) + GET_FILENAME_COMPONENT(_soname ${_target_location} NAME) + SET(_laname ${PROJECT_BINARY_DIR}/${_lanamewe}.la) + FILE(WRITE ${_laname} "# ${_lanamewe}.la - a libtool library file\n") + FILE(APPEND ${_laname} "# Generated by CMake ${CMAKE_VERSION} (like GNU libtool)\n") + FILE(APPEND ${_laname} "\n# Please DO NOT delete this file!\n# It is necessary for linking the library with libtool.\n\n" ) + FILE(APPEND ${_laname} "# The name that we can dlopen(3).\n") + FILE(APPEND ${_laname} "dlname='${_soname}'\n\n") + FILE(APPEND ${_laname} "# Names of this library.\n") + FILE(APPEND ${_laname} "library_names='${_soname}.${_target_current}.${_target_age}.${_target_revision} ${_soname}.${_target_current} ${_soname}'\n\n") + FILE(APPEND ${_laname} "# The name of the static archive.\n") + FILE(APPEND ${_laname} "old_library='${_target_static_lib}'\n\n") + FILE(APPEND ${_laname} "# Libraries that this one depends upon.\n") + FILE(APPEND ${_laname} "dependency_libs='${_target_dependency_libs}'\n\n") + FILE(APPEND ${_laname} "# Names of additional weak libraries provided by this library\n") + FILE(APPEND ${_laname} "weak_library_names=\n\n") + FILE(APPEND ${_laname} "# Version information for ${_laname}.\n") + FILE(APPEND ${_laname} "current=${_target_current}\n") + FILE(APPEND ${_laname} "age=${_target_age}\n") + FILE(APPEND ${_laname} "revision=${_target_revision}\n\n") + FILE(APPEND ${_laname} "# Is this an already installed library?\n") + FILE(APPEND ${_laname} "installed=${_target_installed}\n\n") + FILE(APPEND ${_laname} "# Should we warn about portability when linking against -modules?\n") + FILE(APPEND ${_laname} "shouldnotlink=${_target_shouldnotlink}\n\n") + FILE(APPEND ${_laname} "# Files to dlopen/dlpreopen\n") + FILE(APPEND ${_laname} "dlopen='${_target_dlopen}'\n") + FILE(APPEND ${_laname} "dlpreopen='${_target_dlpreopen}'\n\n") + FILE(APPEND ${_laname} "# Directory that this library needs to be installed in:\n") + FILE(APPEND ${_laname} "libdir='${CMAKE_INSTALL_PREFIX}${_install_DIR}'\n") + INSTALL( FILES ${_laname} DESTINATION ${CMAKE_INSTALL_PREFIX}${_install_DIR}) +ENDFUNCTION(CREATE_LIBTOOL_FILE) + + +function(fonttest TESTNAME FONTFILE) + if (EXISTS ${PROJECT_SOURCE_DIR}/standards/${TESTNAME}${CMAKE_SYSTEM_NAME}.log) + set(PLATFORM_TEST_SUFFIX ${CMAKE_SYSTEM_NAME}) + endif (EXISTS ${PROJECT_SOURCE_DIR}/standards/${TESTNAME}${CMAKE_SYSTEM_NAME}.log) + if (NOT (GRAPHITE2_NSEGCACHE OR GRAPHITE2_NFILEFACE)) + add_test(NAME ${TESTNAME} COMMAND $ -trace ${PROJECT_BINARY_DIR}/${TESTNAME}.json -log ${PROJECT_BINARY_DIR}/${TESTNAME}.log ${PROJECT_SOURCE_DIR}/fonts/${FONTFILE} -codes ${ARGN}) + set_tests_properties(${TESTNAME} PROPERTIES TIMEOUT 3) + add_test(NAME ${TESTNAME}Output COMMAND ${CMAKE_COMMAND} -E compare_files ${PROJECT_BINARY_DIR}/${TESTNAME}.log ${PROJECT_SOURCE_DIR}/standards/${TESTNAME}${PLATFORM_TEST_SUFFIX}.log) + if (NOT GRAPHITE2_NTRACING) + add_test(NAME ${TESTNAME}Debug COMMAND python ${PROJECT_SOURCE_DIR}/jsoncmp ${PROJECT_BINARY_DIR}/${TESTNAME}.json ${PROJECT_SOURCE_DIR}/standards/${TESTNAME}.json) + set_tests_properties(${TESTNAME}Debug PROPERTIES DEPENDS ${TESTNAME}) + endif (NOT GRAPHITE2_NTRACING) + set_tests_properties(${TESTNAME}Output PROPERTIES DEPENDS ${TESTNAME}) + endif (NOT (GRAPHITE2_NSEGCACHE OR GRAPHITE2_NFILEFACE)) +endfunction(fonttest) + + +function(feattest TESTNAME FONTFILE) + if (EXISTS ${PROJECT_SOURCE_DIR}/standards/${TESTNAME}${CMAKE_SYSTEM_NAME}.log) + set(PLATFORM_TEST_SUFFIX ${CMAKE_SYSTEM_NAME}) + endif (EXISTS ${PROJECT_SOURCE_DIR}/standards/${TESTNAME}${CMAKE_SYSTEM_NAME}.log) + if (NOT (GRAPHITE2_NSEGCACHE OR GRAPHITE2_NFILEFACE)) + add_test(NAME ${TESTNAME} COMMAND $ -log ${PROJECT_BINARY_DIR}/${TESTNAME}.log ${PROJECT_SOURCE_DIR}/fonts/${FONTFILE}) + set_tests_properties(${TESTNAME} PROPERTIES TIMEOUT 3) + add_test(NAME ${TESTNAME}Output COMMAND ${CMAKE_COMMAND} -E compare_files ${PROJECT_BINARY_DIR}/${TESTNAME}.log ${PROJECT_SOURCE_DIR}/standards/${TESTNAME}${PLATFORM_TEST_SUFFIX}.log) + set_tests_properties(${TESTNAME}Output PROPERTIES DEPENDS ${TESTNAME}) + endif (NOT (GRAPHITE2_NSEGCACHE OR GRAPHITE2_NFILEFACE)) +endfunction(feattest) + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/LICENSE b/Build/source/libs/graphite2/graphite2-1.2.0/LICENSE new file mode 100644 index 00000000000..2d2d780e601 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/LICENSE @@ -0,0 +1,510 @@ + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations +below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes a de-facto standard. To achieve this, non-free programs must +be allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control +compilation and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at least + three years, to give the same user the materials specified in + Subsection 6a, above, for a charge no more than the cost of + performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply, and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License +may add an explicit geographical distribution limitation excluding those +countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms +of the ordinary General Public License). + + To apply these terms, attach the following notices to the library. +It is safest to attach them to the start of each source file to most +effectively convey the exclusion of warranty; and each file should +have at least the "copyright" line and a pointer to where the full +notice is found. + + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or +your school, if any, to sign a "copyright disclaimer" for the library, +if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James + Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/Todo.txt b/Build/source/libs/graphite2/graphite2-1.2.0/Todo.txt new file mode 100644 index 00000000000..52f7509f87a --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/Todo.txt @@ -0,0 +1,9 @@ +Changes to make to the API when we are forced to change it: + +* add font table deletion function ptr so that the app doesn't have to + manage a collection of font tables + +Other stuff we should do + +* Change logging generation id to be a magic extra user attribute. This allows for use within justification logging. Also add [ ] around the whoe log to bring the fragments together. + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/graphite2.pc.in b/Build/source/libs/graphite2/graphite2-1.2.0/graphite2.pc.in new file mode 100644 index 00000000000..a4f19b39ce4 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/graphite2.pc.in @@ -0,0 +1,7 @@ + +Name: Graphite2 +Description: Font rendering engine for Complex Scripts +Version: ${version} +Libs: -L${libdir} -lgraphite2 +Cflags: -I${includedir} + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/include/graphite2/Font.h b/Build/source/libs/graphite2/graphite2-1.2.0/include/graphite2/Font.h new file mode 100644 index 00000000000..39e4dcf7a19 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/include/graphite2/Font.h @@ -0,0 +1,389 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + + Alternatively, the contents of this file may be used under the terms + of the Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once + +#include "graphite2/Types.h" + +#define GR2_VERSION_MAJOR 1 +#define GR2_VERSION_MINOR 2 +#define GR2_VERSION_BUGFIX 0 + +#ifdef __cplusplus +extern "C" +{ +#endif + +typedef struct gr_face gr_face; +typedef struct gr_font gr_font; +typedef struct gr_feature_ref gr_feature_ref; +typedef struct gr_feature_val gr_feature_val; + +/** +* Returns version information on this engine +*/ +GR2_API void gr_engine_version(int *nMajor, int *nMinor, int *nBugFix); + +/** +* The Face Options allow the application to require that certain tables are +* read during face construction. This may be of concern if the appFaceHandle +* used in the gr_get_table_fn may change. +* The values can be combined +*/ +enum gr_face_options { + /** No preload, no cmap caching, fail if the graphite tables are invalid */ + gr_face_default = 0, + /** Dumb rendering will be enabled if the graphite tables are invalid */ + gr_face_dumbRendering = 1, + /** preload glyphs at construction time */ + gr_face_preloadGlyphs = 2, + /** Cache the lookup from code point to glyph ID at construction time */ + gr_face_cacheCmap = 4, + /** Preload everything */ + gr_face_preloadAll = 6 +}; + +/** Holds information about a particular Graphite silf table that has been loaded */ +struct gr_faceinfo { + gr_uint16 extra_ascent; /**< The extra_ascent in the GDL, in design units */ + gr_uint16 extra_descent; /**< The extra_descent in the GDL, in design units */ + gr_uint16 upem; /**< The design units for the font */ + enum gr_space_contextuals { + gr_space_unknown = 0, /**< no information is known. */ + gr_space_none = 1, /**< the space character never occurs in any rules. */ + gr_space_left_only = 2, /**< the space character only occurs as the first element in a rule. */ + gr_space_right_only = 3, /**< the space character only occurs as the last element in a rule. */ + gr_space_either_only = 4, /**< the space character only occurs as the only element in a rule. */ + gr_space_both = 5, /**< the space character may occur as the first or last element of a rule. */ + gr_space_cross = 6 /**< the space character occurs in a rule not as a first or last element. */ + } space_contextuals; + unsigned int has_bidi_pass : 1; /**< the table specifies that a bidirectional pass should run */ + unsigned int line_ends : 1; /**< there are line end contextuals somewhere */ + unsigned int justifies : 1; /**< there are .justify properties set somewhere on some glyphs */ +}; + +typedef struct gr_faceinfo gr_faceinfo; + +/** type describing function to retrieve font table information + * + * @return a pointer to the table in memory. The pointed to memory must exist as + * long as the gr_face which makes the call. + * @param appFaceHandle is the unique information passed to gr_make_face() + * @param name is a 32bit tag to the table name. + * @param len returned by this function to say how long the table is in memory. + */ +typedef const void *(*gr_get_table_fn)(const void* appFaceHandle, unsigned int name, size_t *len); + +/** type describing function to release any resources allocated by the above get_table table function + * + * @param appFaceHandle is the unique information passed to gr_make_face() + * @param pointer to table memory returned by get_table. + */ +typedef void (*gr_release_table_fn)(const void* appFaceHandle, const void *table_buffer); + +/** struct housing function pointers to manage font table buffers for the graphite engine. */ +struct gr_face_ops +{ + /** size in bytes of this structure */ + size_t size; + /** a pointer to a function to request a table from the client. */ + gr_get_table_fn get_table; + /** is a pointer to a function to notify the client the a table can be released. + * This can be NULL to signify that the client does not wish to do any release handling. */ + gr_release_table_fn release_table; +}; +typedef struct gr_face_ops gr_face_ops; + +/** Create a gr_face object given application information and a table functions. + * + * @return gr_face or NULL if the font fails to load for some reason. + * @param appFaceHandle This is application specific information that is passed + * to the getTable function. The appFaceHandle must stay + * alive as long as the gr_face is alive. + * @param face_ops Pointer to face specific callback structure for table + * management. Must stay alive for the duration of the + * call only. + * @param faceOptions Bitfield describing various options. See enum gr_face_options for details. + */ +GR2_API gr_face* gr_make_face_with_ops(const void* appFaceHandle/*non-NULL*/, const gr_face_ops *face_ops, unsigned int faceOptions); + +/** Create a gr_face object given application information and a getTable function. This function is deprecated as of v1.2.0 in + * favour of gr_make_face_with_ops. + * + * @return gr_face or NULL if the font fails to load for some reason. + * @param appFaceHandle This is application specific information that is passed + * to the getTable function. The appFaceHandle must stay + * alive as long as the gr_face is alive. + * @param getTable Callback function to get table data. + * @param faceOptions Bitfield describing various options. See enum gr_face_options for details. + */ +GR2_API gr_face* gr_make_face(const void* appFaceHandle/*non-NULL*/, gr_get_table_fn getTable, unsigned int faceOptions); + +//#ifndef GRAPHITE2_NSEGCACHE +/** Create a gr_face object given application information, with subsegmental caching support + * + * @return gr_face or NULL if the font fails to load. + * @param appFaceHandle is a pointer to application specific information that is passed to getTable. + * This may not be NULL and must stay alive as long as the gr_face is alive. + * @param face_ops Pointer to face specific callback structure for table management. Must stay + * alive for the duration of the call only. + * @param segCacheMaxSize How large the segment cache is. + * @param faceOptions Bitfield of values from enum gr_face_options + */ +GR2_API gr_face* gr_make_face_with_seg_cache_and_ops(const void* appFaceHandle, const gr_face_ops *face_ops, unsigned int segCacheMaxSize, unsigned int faceOptions); + +/** Create a gr_face object given application information, with subsegmental caching support. + * This function is deprecated as of v1.2.0 in favour of gr_make_face_with_seg_cache_and_ops. + * + * @return gr_face or NULL if the font fails to load. + * @param appFaceHandle is a pointer to application specific information that is passed to getTable. + * This may not be NULL and must stay alive as long as the gr_face is alive. + * @param getTable The function graphite calls to access font table data + * @param segCacheMaxSize How large the segment cache is. + * @param faceOptions Bitfield of values from enum gr_face_options + */ +GR2_API gr_face* gr_make_face_with_seg_cache(const void* appFaceHandle, gr_get_table_fn getTable, unsigned int segCacheMaxSize, unsigned int faceOptions); +//#endif + +/** Convert a tag in a string into a gr_uint32 + * + * @return gr_uint32 tag, zero padded + * @param str a nul terminated string of which at most the first 4 characters are read + */ +GR2_API gr_uint32 gr_str_to_tag(const char *str); + +/** Convert a gr_uint32 tag into a string + * + * @param tag contains the tag to convert + * @param str is a pointer to a char array of at least size 4 bytes. The first 4 bytes of this array + * will be overwritten by this function. No nul is appended. + */ +GR2_API void gr_tag_to_str(gr_uint32 tag, char *str); + +/** Get feature values for a given language or default + * + * @return a copy of the default feature values for a given language. The application must call + * gr_featureval_destroy() to free this object when done. + * @param pFace The font face to get feature values from + * @param langname The language tag to get feature values for. If there is no such language or + * langname is 0, the default feature values for the font are returned. + * langname is right 0 padded and assumes lowercase. Thus the en langauge + * would be 0x656E0000. Langname may also be space padded, thus 0x656E2020. + */ +GR2_API gr_feature_val* gr_face_featureval_for_lang(const gr_face* pFace, gr_uint32 langname); + +/** Get feature reference for a given feature id from a face + * + * @return a feature reference corresponding to the given id. This data is part of the gr_face and + * will be freed when the face is destroyed. + * @param pFace Font face to get information on. + * @param featId Feature id tag to get reference to. + */ +GR2_API const gr_feature_ref* gr_face_find_fref(const gr_face* pFace, gr_uint32 featId); + +/** Returns number of feature references in a face **/ +GR2_API gr_uint16 gr_face_n_fref(const gr_face* pFace); + +/** Returns feature reference at given index in face **/ +GR2_API const gr_feature_ref* gr_face_fref(const gr_face* pFace, gr_uint16 i); + +/** Return number of languages the face knows about **/ +GR2_API unsigned short gr_face_n_languages(const gr_face* pFace); + +/** Returns a language id corresponding to a language of given index in the face **/ +GR2_API gr_uint32 gr_face_lang_by_index(const gr_face* pFace, gr_uint16 i); + +/** Destroy the given face and free its memory **/ +GR2_API void gr_face_destroy(gr_face *face); + +/** Returns the number of glyphs in the face **/ +GR2_API unsigned short gr_face_n_glyphs(const gr_face* pFace); + +/** Returns a faceinfo for the face and script **/ +GR2_API const gr_faceinfo *gr_face_info(const gr_face *pFace, gr_uint32 script); + +/** Returns whether the font supports a given Unicode character + * + * @return true if the character is supported. + * @param pFace face to test within + * @param usv Unicode Scalar Value of character to test + * @param script Tag of script for selecting which set of pseudo glyphs to test. May be NULL. + */ +GR2_API int gr_face_is_char_supported(const gr_face *pFace, gr_uint32 usv, gr_uint32 script); + +#ifndef GRAPHITE2_NFILEFACE +/** Create gr_face from a font file + * + * @return gr_face that accesses a font file directly. Returns NULL on failure. + * @param filename Full path and filename to font file + * @param faceOptions Bitfile from enum gr_face_options to control face options. + */ +GR2_API gr_face* gr_make_file_face(const char *filename, unsigned int faceOptions); + +//#ifndef GRAPHITE2_NSEGCACHE +/** Create gr_face from a font file, with subsegment caching support. + * + * @return gr_face that accesses a font file directly. Returns NULL on failure. + * @param filename Full path and filename to font file + * @param segCacheMaxSize Specifies how big to make the cache in segments. + * @param faceOptions Bitfield from enum gr_face_options to control face options. + */ +GR2_API gr_face* gr_make_file_face_with_seg_cache(const char *filename, unsigned int segCacheMaxSize, unsigned int faceOptions); +//#endif +#endif // !GRAPHITE2_NFILEFACE + +/** Create a font from a face + * + * @return gr_font Call font_destroy to free this font + * @param ppm Resolution of the font in pixels per em + * @param face Face this font corresponds to. This must stay alive as long as the font is alive. + */ +GR2_API gr_font* gr_make_font(float ppm, const gr_face *face); + +/** query function to find the hinted advance of a glyph + * + * @param appFontHandle is the unique information passed to gr_make_font_with_advance() + * @param glyphid is the glyph to retireve the hinted advance for. + */ +typedef float (*gr_advance_fn)(const void* appFontHandle, gr_uint16 glyphid); + +/** struct housing function pointers to manage font hinted metrics for the + * graphite engine. */ +struct gr_font_ops +{ + /** size of the structure in bytes to allow for future extensibility */ + size_t size; + /** a pointer to a function to retrieve the hinted + * advance width of a glyph which the font cannot + * provide without client assistance. This can be + * NULL to signify no horizontal hinted metrics are necessary. */ + gr_advance_fn glyph_advance_x; + /** a pointer to a function to retrieve the hinted + * advance height of a glyph which the font cannot + * provide without client assistance. This can be + * NULL to signify no horizontal hinted metrics are necessary. */ + gr_advance_fn glyph_advance_y; +}; +typedef struct gr_font_ops gr_font_ops; + +/** Creates a font with hinted advance width query functions + * + * @return gr_font to be destroyed via font_destroy + * @param ppm size of font in pixels per em + * @param appFontHandle font specific information that must stay alive as long + * as the font does + * @param font_ops pointer font specific callback structure for hinted metrics. + * Must stay alive for the duration of the call. + * @param face the face this font corresponds to. Must stay alive as long as + * the font does. + */ +GR2_API gr_font* gr_make_font_with_ops(float ppm, const void* appFontHandle, const gr_font_ops * font_ops, const gr_face *face); + +/** Creates a font with hinted advance width query function. + * This function is deprecated. Use gr_make_font_with_ops instead. + * + * @return gr_font to be destroyed via font_destroy + * @param ppm size of font in pixels per em + * @param appFontHandle font specific information that must stay alive as long + * as the font does + * @param getAdvance callback function reference that returns horizontal advance in pixels for a glyph. + * Must stay alive for the duration of the call. + * @param face the face this font corresponds to. Must stay alive as long as + * the font does. + */ +GR2_API gr_font* gr_make_font_with_advance_fn(float ppm, const void* appFontHandle, gr_advance_fn getAdvance, const gr_face *face); + +/** Free a font **/ +GR2_API void gr_font_destroy(gr_font *font); + +/** get a feature value + * + * @return value of specific feature or 0 if any problems. + * @param pfeatureref gr_feature_ref to the feature + * @param feats gr_feature_val containing all the values + */ +GR2_API gr_uint16 gr_fref_feature_value(const gr_feature_ref* pfeatureref, const gr_feature_val* feats); + +/** set a feature value + * + * @return false if there were any problems (value out of range, etc.) + * @param pfeatureref gr_feature_ref to the feature + * @param val value to set the feature to + * @param pDest the gr_feature_val containing all the values for all the features + */ +GR2_API int gr_fref_set_feature_value(const gr_feature_ref* pfeatureref, gr_uint16 val, gr_feature_val* pDest); + +/** Returns the id tag for a gr_feature_ref **/ +GR2_API gr_uint32 gr_fref_id(const gr_feature_ref* pfeatureref); + +/** Returns number of values a feature may take, given a gr_feature_ref **/ +GR2_API gr_uint16 gr_fref_n_values(const gr_feature_ref* pfeatureref); + +/** Returns the value associated with a particular value in a feature + * + * @return value + * @param pfeatureref gr_feature_ref of the feature of interest + * @param settingno Index up to the return value of gr_fref_n_values() of the value + */ +GR2_API gr_int16 gr_fref_value(const gr_feature_ref* pfeatureref, gr_uint16 settingno); + +/** Returns a string of the UI name of a feature + * + * @return string of the UI name, in the encoding form requested. Call gr_label_destroy() after use. + * @param pfeatureref gr_feature_ref of the feature + * @param langId This is a pointer since the face may not support a string in the requested + * language. The actual language of the string is returned in langId + * @param utf Encoding form for the string + * @param length Used to return the length of the string returned in bytes. + */ +GR2_API void* gr_fref_label(const gr_feature_ref* pfeatureref, gr_uint16 *langId, enum gr_encform utf, gr_uint32 *length); + +/** Return a UI string for a possible value of a feature + * + * @return string of the UI name, in the encoding form requested. nul terminated. Call gr_label_destroy() + * after use. + * @param pfeatureref gr_feature_ref of the feature + * @param settingno Value setting index + * @param langId This is a pointer to the requested language. The requested language id is + * replaced by the actual language id of the string returned. + * @param utf Encoding form for the string + * @param length Returns the length of the string returned in bytes. + */ +GR2_API void* gr_fref_value_label(const gr_feature_ref* pfeatureref, gr_uint16 settingno/*rather than a value*/, gr_uint16 *langId, enum gr_encform utf, gr_uint32 *length); + +/** Destroy a previously returned label string **/ +GR2_API void gr_label_destroy(void * label); + +/** Copies a gr_feature_val **/ +GR2_API gr_feature_val* gr_featureval_clone(const gr_feature_val* pfeatures); + +/** Destroys a gr_feature_val **/ +GR2_API void gr_featureval_destroy(gr_feature_val *pfeatures); + +#ifdef __cplusplus +} +#endif + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/include/graphite2/Log.h b/Build/source/libs/graphite2/graphite2-1.2.0/include/graphite2/Log.h new file mode 100644 index 00000000000..d1c6f0fe36f --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/include/graphite2/Log.h @@ -0,0 +1,85 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + + Alternatively, the contents of this file may be used under the terms + of the Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once + +#include +#include +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +/** deprecated mechanism that doesn't do anything now. */ +typedef enum { + GRLOG_NONE = 0x0, + GRLOG_FACE = 0x01, + GRLOG_SEGMENT = 0x02, + GRLOG_PASS = 0x04, + GRLOG_CACHE = 0x08, + + GRLOG_OPCODE = 0x80, + GRLOG_ALL = 0xFF +} GrLogMask; + +/** Start logging all segment creation and updates on the provided face. This + * is logged to a JSON file, see "Segment JSON Schema.txt" for a precise + * definition of the file + * + * @return true if the file was successfully created and logging is correctly + * initialised. + * @param face the gr_face whose segments you want to log to the given file + * @param log_path a utf8 encoded file name and path to log to. + */ +GR2_API bool gr_start_logging(gr_face * face, const char *log_path); + + +/** Stop logging on the given face. This will close the log file created by + * gr_start_logging. + * + * @param face the gr_face whose segments you want to stop logging + */ +GR2_API void gr_stop_logging(gr_face * face); + +/** Start logging to a FILE object. + * This function is deprecated as of 1.2.0, use the _face versions instead. + * + * @return True on success + * @param logfile FILE reference to output logging to + * @param mask What aspects of logging to report (ignored) + */ +GR2_API bool graphite_start_logging(FILE * logFile, GrLogMask mask); //may not do anthing if disabled in the implementation of the engine. + +/** Stop logging to a FILE object. + * This function is deprecated as of 1.2.0, use the _face versions instead. + */ +GR2_API void graphite_stop_logging(); + +#ifdef __cplusplus +} +#endif diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/include/graphite2/Segment.h b/Build/source/libs/graphite2/graphite2-1.2.0/include/graphite2/Segment.h new file mode 100644 index 00000000000..051c8ed7783 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/include/graphite2/Segment.h @@ -0,0 +1,400 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + + Alternatively, the contents of this file may be used under the terms + of the Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once + +#include "graphite2/Types.h" +#include "graphite2/Font.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +enum gr_break_weight { + gr_breakNone = 0, + /* after break weights */ + gr_breakWhitespace = 10, + gr_breakWord = 15, + gr_breakIntra = 20, + gr_breakLetter = 30, + gr_breakClip = 40, + /* before break weights */ + gr_breakBeforeWhitespace = -10, + gr_breakBeforeWord = -15, + gr_breakBeforeIntra = -20, + gr_breakBeforeLetter = -30, + gr_breakBeforeClip = -40 +}; + +enum gr_justFlags { + /// Indicates that this segment is a complete line + gr_justCompleteLine = 0, + /// Indicates that the start of the slot list is not at the start of a line + gr_justStartInline = 1, + /// Indicates that the end of the slot list is not at the end of a line + gr_justEndInline = 2 +}; + +/** Used for looking up slot attributes. Most are already available in other functions **/ +enum gr_attrCode { + /// adjusted glyph advance in x direction in design units + gr_slatAdvX = 0, + /// adjusted glyph advance in y direction (usually 0) in design units + gr_slatAdvY, + /// returns 0. Deprecated. + gr_slatAttTo, + /// This slot attaches to its parent at the given design units in the x direction + gr_slatAttX, + /// This slot attaches to its parent at the given design units in the y direction + gr_slatAttY, + /// This slot attaches to its parent at the given glyph point (not implemented) + gr_slatAttGpt, + /// x-direction adjustment from the given glyph point (not implemented) + gr_slatAttXOff, + /// y-direction adjustment from the given glyph point (not implemented) + gr_slatAttYOff, + /// Where on this glyph should align with the attachment point on the parent glyph in the x-direction. + gr_slatAttWithX, + /// Where on this glyph should align with the attachment point on the parent glyph in the y-direction + gr_slatAttWithY, + /// Which glyph point on this glyph should align with the attachment point on the parent glyph (not implemented). + gr_slatWithGpt, + /// Adjustment to gr_slatWithGpt in x-direction (not implemented) + gr_slatAttWithXOff, + /// Adjustment to gr_slatWithGpt in y-direction (not implemented) + gr_slatAttWithYOff, + /// Attach at given nesting level (not implemented) + gr_slatAttLevel, + /// Line break breakweight for this glyph + gr_slatBreak, + /// Ligature component reference (not implemented) + gr_slatCompRef, + /// bidi directionality of this glyph (not implemented) + gr_slatDir, + /// Whether insertion is allowed before this glyph + gr_slatInsert, + /// Final positioned position of this glyph relative to its parent in x-direction in pixels + gr_slatPosX, + /// Final positioned position of this glyph relative to its parent in y-direction in pixels + gr_slatPosY, + /// Amount to shift glyph by in x-direction design units + gr_slatShiftX, + /// Amount to shift glyph by in y-direction design units + gr_slatShiftY, + /// attribute user1 + gr_slatUserDefnV1, + /// not implemented + gr_slatMeasureSol, + /// not implemented + gr_slatMeasureEol, + /// Amount this slot can stretch (not implemented) + gr_slatJStretch, + /// Amount this slot can shrink (not implemented) + gr_slatJShrink, + /// Granularity by which this slot can stretch or shrink (not implemented) + gr_slatJStep, + /// Justification weight for this glyph (not implemented) + gr_slatJWeight, + /// Amount this slot mush shrink or stretch in design units + gr_slatJWidth, + /// SubSegment split point + gr_slatSegSplit = gr_slatJStretch + 29, + /// User defined attribute, see subattr for user attr number + gr_slatUserDefn, + + /// not implemented + gr_slatMax, + /// not implemented + gr_slatNoEffect = gr_slatMax + 1 +}; + +enum gr_bidirtl { + /// Underlying paragraph direction is RTL + gr_rtl = 1, + /// Set this to not run the bidi pass internally, even if the font asks for it. + /// This presumes that the segment is in a single direction. + gr_nobidi = 2, + /// Disable auto mirroring for rtl text + gr_nomirror = 4 +}; + +typedef struct gr_char_info gr_char_info; +typedef struct gr_segment gr_segment; +typedef struct gr_slot gr_slot; + +/** Returns Unicode character for a charinfo. + * + * @param p Pointer to charinfo to return information on. + */ +GR2_API unsigned int gr_cinfo_unicode_char(const gr_char_info* p/*not NULL*/); + +/** Returns breakweight for a charinfo. + * + * @return Breakweight is a number between -50 and 50 indicating the cost of a + * break before or after this character. + * @param p Pointer to charinfo to return information on. + */ +GR2_API int gr_cinfo_break_weight(const gr_char_info* p/*not NULL*/); + +/** Returns the slot index that after this character is after in the slot stream + * + * @return after slot index between 0 and gr_seg_n_slots() + * @param p Pointer to charinfo to return information on. + */ +GR2_API int gr_cinfo_after(const gr_char_info* p/*not NULL*/); + +/** Returns the slot index that before this character is before in the slot stream + * + * @return before slot index between 0 and gr_seg_n_slots() + * @param p Pointer to charinfo to return information on. + */ +GR2_API int gr_cinfo_before(const gr_char_info* p/*not NULL*/); + +/** Returns the code unit index of this character in the input string + * + * @return code unit index between 0 and the end of the string + * @param p Pointer to charinfo to return information on. + */ +GR2_API size_t gr_cinfo_base(const gr_char_info* p/*not NULL*/); + +/** Returns the number of unicode characters in a string. + * + * @return number of characters in the string + * @param enc Specifies the type of data in the string: utf8, utf16, utf32 + * @param buffer_begin The start of the string + * @param buffer_end Measure up to the first nul or when end is reached, whichever is earliest. + * This parameter may be NULL. + * @param pError If there is a structural fault in the string, the location is returned + * in this variable. If no error occurs, pError will contain NULL. NULL + * may be passed for pError if no such information is required. + */ +GR2_API size_t gr_count_unicode_characters(enum gr_encform enc, const void* buffer_begin, const void* buffer_end, const void** pError); + +/** Creates and returns a segment. + * + * @return a segment that needs seg_destroy called on it. May return NULL if bad problems + * in segment processing. + * @param font Gives the size of the font in pixels per em for final positioning. If + * NULL, positions are returned in design units, i.e. at a ppm of the upem + * of the face. + * @param face The face containing all the non-size dependent information. + * @param script This is a tag containing a script identifier that is used to choose + * which graphite table within the font to use. Maybe 0. Tag may be 4 chars + * NULL padded in LSBs or space padded in LSBs. + * @param pFeats Pointer to a feature values to be used for the segment. Only one + * feature values may be used for a segment. If NULL the default features + * for the font will be used. + * @param enc Specifies what encoding form the string is in (utf8, utf16, utf32) + * @param pStart Start of the string + * @param nChars Number of unicode characters to process in the string. The string will + * be processed either up to the first NULL or until nChars have been + * processed. nChars is also used to initialise the internal memory + * allocations of the segment. So it is wise not to make nChars too much + * greater than the actual number of characters being processed. + * @param dir Specifies whether the segment is processed right to left (1) or left to + * right (0) and whether to run the internal bidi pass, if a font requests it. + * See enum gr_bidirtl for details. + */ +GR2_API gr_segment* gr_make_seg(const gr_font* font, const gr_face* face, gr_uint32 script, const gr_feature_val* pFeats, enum gr_encform enc, const void* pStart, size_t nChars, int dir); + +/** Destroys a segment, freeing the memory. + * + * @param p The segment to destroy + */ +GR2_API void gr_seg_destroy(gr_segment* p); + +/** Returns the advance for the whole segment. + * + * Returns the width of the segment up to the next glyph origin after the segment + */ +GR2_API float gr_seg_advance_X(const gr_segment* pSeg/*not NULL*/); + +/** Returns the height advance for the segment. **/ +GR2_API float gr_seg_advance_Y(const gr_segment* pSeg/*not NULL*/); + +/** Returns the number of gr_char_infos in the segment. **/ +GR2_API unsigned int gr_seg_n_cinfo(const gr_segment* pSeg/*not NULL*/); + +/** Returns a gr_char_info at a given index in the segment. **/ +GR2_API const gr_char_info* gr_seg_cinfo(const gr_segment* pSeg/*not NULL*/, unsigned int index/*must be + +typedef unsigned char gr_uint8; +typedef gr_uint8 gr_byte; +typedef signed char gr_int8; +typedef unsigned short gr_uint16; +typedef short gr_int16; +typedef unsigned int gr_uint32; +typedef int gr_int32; + +enum gr_encform { + gr_utf8 = 1/*sizeof(uint8)*/, gr_utf16 = 2/*sizeof(uint16)*/, gr_utf32 = 4/*sizeof(uint32)*/ +}; + +// Definitions for library publicly exported symbols +#if defined _WIN32 || defined __CYGWIN__ + #if defined GRAPHITE2_STATIC + #define GR2_API + #elif defined GRAPHITE2_EXPORTING + #if defined __GNUC__ + #define GR2_API __attribute__((dllexport)) + #else + #define GR2_API __declspec(dllexport) + #endif + #else + #if defined __GNUC__ + #define GR2_API __attribute__((dllimport)) + #else + #define GR2_API __declspec(dllimport) + #endif + #endif + #define GR2_LOCAL +#else + #if __GNUC__ >= 4 + #define GR2_API __attribute__ ((visibility("default"))) + #define GR2_LOCAL __attribute__ ((visibility("hidden"))) + #else + #define GR2_API + #define GR2_LOCAL + #endif +#endif diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/Bidi.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/Bidi.cpp new file mode 100644 index 00000000000..b612a81e647 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/Bidi.cpp @@ -0,0 +1,578 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#include "inc/Main.h" +#include "inc/Slot.h" +#include "inc/Segment.h" + +using namespace graphite2; + +enum DirCode { // Hungarian: dirc + Unk = -1, + N = 0, // other neutrals (default) - ON + L = 1, // left-to-right, strong - L + R = 2, // right-to-left, strong - R + AL = 3, // Arabic letter, right-to-left, strong, AR + EN = 4, // European number, left-to-right, weak - EN + ES = 5, // European separator, left-to-right, weak - ES + ET = 6, // European number terminator, left-to-right, weak - ET + AN = 7, // Arabic number, left-to-right, weak - AN + CS = 8, // Common number separator, left-to-right, weak - CS + WS = 9, // white space, neutral - WS + BN = 10, // boundary neutral - BN + + LRO = 11, // LTR override + RLO = 12, // RTL override + LRE = 13, // LTR embedding + RLE = 14, // RTL embedding + PDF = 15, // pop directional format + NSM = 16, // non-space mark + + ON = N +}; + +enum DirMask { + Nmask = 1, + Lmask = 2, + Rmask = 4, + ALmask = 8, + ENmask = 0x10, + ESmask = 0x20, + ETmask = 0x40, + ANmask = 0x80, + CSmask = 0x100, + WSmask = 0x200, + BNmask = 0x400, + LROmask = 0x800, + RLOmask = 0x1000, + LREmask = 0x2000, + RLEmask = 0x4000, + PDFmask = 0x8000, + NSMmask = 0x10000 +}; + +unsigned int bidi_class_map[] = { 0, 1, 2, 5, 4, 8, 9, 3, 7, 0, 0, 0, 0, 0, 0, 0, 6 }; +// Algorithms based on Unicode reference standard code. Thanks Asmus Freitag. +#define MAX_LEVEL 61 + +Slot *resolveExplicit(int level, int dir, Slot *s, int nNest = 0) +{ + int nLastValid = nNest; + Slot *res = NULL; + for ( ; s && !res; s = s->next()) + { + int cls = s->getBidiClass(); + switch(cls) + { + case LRO: + case LRE: + nNest++; + if (level & 1) + s->setBidiLevel(level + 1); + else + s->setBidiLevel(level + 2); + if (s->getBidiLevel() > MAX_LEVEL) + s->setBidiLevel(level); + else + { + s = resolveExplicit(s->getBidiLevel(), (cls == LRE ? N : L), s->next(), nNest); + nNest--; + if (s) continue; else break; + } + cls = BN; + s->setBidiClass(cls); + break; + + case RLO: + case RLE: + nNest++; + if (level & 1) + s->setBidiLevel(level + 2); + else + s->setBidiLevel(level + 1); + if (s->getBidiLevel() > MAX_LEVEL) + s->setBidiLevel(level); + else + { + s = resolveExplicit(s->getBidiLevel(), (cls == RLE ? N : R), s->next(), nNest); + nNest--; + if (s) continue; else break; + } + cls = BN; + s->setBidiClass(cls); + break; + + case PDF: + cls = BN; + s->setBidiClass(cls); + if (nNest) + { + if (nLastValid < nNest) + --nNest; + else + res = s; + } + break; + } + + if (dir != N) + cls = dir; + if (s) + { + s->setBidiLevel(level); + if (s->getBidiClass() != BN) + s->setBidiClass(cls); + } + else + break; + } + return res; +} + +// === RESOLVE WEAK TYPES ================================================ + +enum bidi_state // possible states +{ + xa, // arabic letter + xr, // right leter + xl, // left letter + + ao, // arabic lett. foll by ON + ro, // right lett. foll by ON + lo, // left lett. foll by ON + + rt, // ET following R + lt, // ET following L + + cn, // EN, AN following AL + ra, // arabic number foll R + re, // european number foll R + la, // arabic number foll L + le, // european number foll L + + ac, // CS following cn + rc, // CS following ra + rs, // CS,ES following re + lc, // CS following la + ls, // CS,ES following le + + ret, // ET following re + let, // ET following le +} ; + +enum bidi_state_mask +{ + xamask = 1, + xrmask = 2, + xlmask = 4, + aomask = 8, + romask = 0x10, + lomask = 0x20, + rtmask = 0x40, + ltmask = 0x80, + cnmask = 0x100, + ramask = 0x200, + remask = 0x400, + lamask = 0x800, + lemask = 0x1000, + acmask = 0x2000, + rcmask = 0x4000, + rsmask = 0x8000, + lcmask = 0x10000, + lsmask = 0x20000, + retmask = 0x40000, + letmask = 0x80000 +}; + +const bidi_state stateWeak[][10] = +{ + // N, L, R, AN, EN, AL,NSM, CS, ES, ET, +{ /*xa*/ ao, xl, xr, cn, cn, xa, xa, ao, ao, ao, /* arabic letter */ }, +{ /*xr*/ ro, xl, xr, ra, re, xa, xr, ro, ro, rt, /* right letter */ }, +{ /*xl*/ lo, xl, xr, la, le, xa, xl, lo, lo, lt, /* left letter */ }, + +{ /*ao*/ ao, xl, xr, cn, cn, xa, ao, ao, ao, ao, /* arabic lett. foll by ON*/ }, +{ /*ro*/ ro, xl, xr, ra, re, xa, ro, ro, ro, rt, /* right lett. foll by ON */ }, +{ /*lo*/ lo, xl, xr, la, le, xa, lo, lo, lo, lt, /* left lett. foll by ON */ }, + +{ /*rt*/ ro, xl, xr, ra, re, xa, rt, ro, ro, rt, /* ET following R */ }, +{ /*lt*/ lo, xl, xr, la, le, xa, lt, lo, lo, lt, /* ET following L */ }, + +{ /*cn*/ ao, xl, xr, cn, cn, xa, cn, ac, ao, ao, /* EN, AN following AL */ }, +{ /*ra*/ ro, xl, xr, ra, re, xa, ra, rc, ro, rt, /* arabic number foll R */ }, +{ /*re*/ ro, xl, xr, ra, re, xa, re, rs, rs,ret, /* european number foll R */ }, +{ /*la*/ lo, xl, xr, la, le, xa, la, lc, lo, lt, /* arabic number foll L */ }, +{ /*le*/ lo, xl, xr, la, le, xa, le, ls, ls,let, /* european number foll L */ }, + +{ /*ac*/ ao, xl, xr, cn, cn, xa, ao, ao, ao, ao, /* CS following cn */ }, +{ /*rc*/ ro, xl, xr, ra, re, xa, ro, ro, ro, rt, /* CS following ra */ }, +{ /*rs*/ ro, xl, xr, ra, re, xa, ro, ro, ro, rt, /* CS,ES following re */ }, +{ /*lc*/ lo, xl, xr, la, le, xa, lo, lo, lo, lt, /* CS following la */ }, +{ /*ls*/ lo, xl, xr, la, le, xa, lo, lo, lo, lt, /* CS,ES following le */ }, + +{ /*ret*/ ro, xl, xr, ra, re, xa,ret, ro, ro,ret, /* ET following re */ }, +{ /*let*/ lo, xl, xr, la, le, xa,let, lo, lo,let, /* ET following le */ }, + + +}; + +enum bidi_action // possible actions +{ + // primitives + IX = 0x100, // increment + XX = 0xF, // no-op + + // actions + xxx = (XX << 4) + XX, // no-op + xIx = IX + xxx, // increment run + xxN = (XX << 4) + ON, // set current to N + xxE = (XX << 4) + EN, // set current to EN + xxA = (XX << 4) + AN, // set current to AN + xxR = (XX << 4) + R, // set current to R + xxL = (XX << 4) + L, // set current to L + Nxx = (ON << 4) + 0xF, // set run to neutral + Axx = (AN << 4) + 0xF, // set run to AN + ExE = (EN << 4) + EN, // set run to EN, set current to EN + NIx = (ON << 4) + 0xF + IX, // set run to N, increment + NxN = (ON << 4) + ON, // set run to N, set current to N + NxR = (ON << 4) + R, // set run to N, set current to R + NxE = (ON << 4) + EN, // set run to N, set current to EN + + AxA = (AN << 4) + AN, // set run to AN, set current to AN + NxL = (ON << 4) + L, // set run to N, set current to L + LxL = (L << 4) + L, // set run to L, set current to L +}; + + +const bidi_action actionWeak[][10] = +{ + // N,.. L, R, AN, EN, AL, NSM, CS,..ES, ET, +{ /*xa*/ xxx, xxx, xxx, xxx, xxA, xxR, xxR, xxN, xxN, xxN, /* arabic letter */ }, +{ /*xr*/ xxx, xxx, xxx, xxx, xxE, xxR, xxR, xxN, xxN, xIx, /* right leter */ }, +{ /*xl*/ xxx, xxx, xxx, xxx, xxL, xxR, xxL, xxN, xxN, xIx, /* left letter */ }, + +{ /*ao*/ xxx, xxx, xxx, xxx, xxA, xxR, xxN, xxN, xxN, xxN, /* arabic lett. foll by ON */ }, +{ /*ro*/ xxx, xxx, xxx, xxx, xxE, xxR, xxN, xxN, xxN, xIx, /* right lett. foll by ON */ }, +{ /*lo*/ xxx, xxx, xxx, xxx, xxL, xxR, xxN, xxN, xxN, xIx, /* left lett. foll by ON */ }, + +{ /*rt*/ Nxx, Nxx, Nxx, Nxx, ExE, NxR, xIx, NxN, NxN, xIx, /* ET following R */ }, +{ /*lt*/ Nxx, Nxx, Nxx, Nxx, LxL, NxR, xIx, NxN, NxN, xIx, /* ET following L */ }, + +{ /*cn*/ xxx, xxx, xxx, xxx, xxA, xxR, xxA, xIx, xxN, xxN, /* EN, AN following AL */ }, +{ /*ra*/ xxx, xxx, xxx, xxx, xxE, xxR, xxA, xIx, xxN, xIx, /* arabic number foll R */ }, +{ /*re*/ xxx, xxx, xxx, xxx, xxE, xxR, xxE, xIx, xIx, xxE, /* european number foll R */ }, +{ /*la*/ xxx, xxx, xxx, xxx, xxL, xxR, xxA, xIx, xxN, xIx, /* arabic number foll L */ }, +{ /*le*/ xxx, xxx, xxx, xxx, xxL, xxR, xxL, xIx, xIx, xxL, /* european number foll L */ }, + +{ /*ac*/ Nxx, Nxx, Nxx, Axx, AxA, NxR, NxN, NxN, NxN, NxN, /* CS following cn */ }, +{ /*rc*/ Nxx, Nxx, Nxx, Axx, NxE, NxR, NxN, NxN, NxN, NIx, /* CS following ra */ }, +{ /*rs*/ Nxx, Nxx, Nxx, Nxx, ExE, NxR, NxN, NxN, NxN, NIx, /* CS,ES following re */ }, +{ /*lc*/ Nxx, Nxx, Nxx, Axx, NxL, NxR, NxN, NxN, NxN, NIx, /* CS following la */ }, +{ /*ls*/ Nxx, Nxx, Nxx, Nxx, LxL, NxR, NxN, NxN, NxN, NIx, /* CS,ES following le */ }, + +{ /*ret*/xxx, xxx, xxx, xxx, xxE, xxR, xxE, xxN, xxN, xxE, /* ET following re */ }, +{ /*let*/xxx, xxx, xxx, xxx, xxL, xxR, xxL, xxN, xxN, xxL, /* ET following le */ }, +}; + +inline uint8 GetDeferredType(bidi_action a) { return (a >> 4) & 0xF; } +inline uint8 GetResolvedType(bidi_action a) { return a & 0xF; } +inline DirCode EmbeddingDirection(int l) { return l & 1 ? R : L; } +inline bool IsDeferredState(bidi_state a) { return 0 != ((1 << a) & (rtmask | ltmask | acmask | rcmask | rsmask | lcmask | lsmask)); } +inline bool IsModifiedClass(DirCode a) { return 0 != ((1 << a) & (ALmask | NSMmask | ESmask | CSmask | ETmask | ENmask)); } + +void SetDeferredRunClass(Slot *s, Slot *sRun, int nval) +{ + if (!sRun || s == sRun) return; + for (Slot *p = s->prev(); p != sRun; p = p->prev()) + p->setBidiClass(nval); +} + +void resolveWeak(int baseLevel, Slot *s) +{ + int state = (baseLevel & 1) ? xr : xl; + int cls; + int level = baseLevel; + Slot *sRun = NULL; + Slot *sLast = s; + + for ( ; s; s = s->next()) + { + sLast = s; + cls = s->getBidiClass(); + if (cls == BN) + { + s->setBidiLevel(level); + if (!s->next() && level != baseLevel) + s->setBidiClass(EmbeddingDirection(level)); + else if (s->next() && level != s->next()->getBidiLevel() && s->next()->getBidiClass() != BN) + { + int newLevel = s->next()->getBidiLevel(); + if (level > newLevel) + newLevel = level; + s->setBidiLevel(newLevel); + s->setBidiClass(EmbeddingDirection(newLevel)); + level = s->next()->getBidiLevel(); + } + else + continue; + } + + bidi_action action = actionWeak[state][bidi_class_map[cls]]; + int clsRun = GetDeferredType(action); + if (clsRun != XX) + { + SetDeferredRunClass(s, sRun, clsRun); + sRun = NULL; + } + int clsNew = GetResolvedType(action); + if (clsNew != XX) + s->setBidiClass(clsNew); + if (!sRun && (IX & action)) + sRun = s->prev(); + state = stateWeak[state][bidi_class_map[cls]]; + } + + cls = EmbeddingDirection(level); + int clsRun = GetDeferredType(actionWeak[state][bidi_class_map[cls]]); + if (clsRun != XX) + SetDeferredRunClass(sLast, sRun, clsRun); +} + +// Neutrals +enum neutral_action +{ + // action to resolve previous input + nL = L, // resolve EN to L + En = 3 << 4, // resolve neutrals run to embedding level direction + Rn = R << 4, // resolve neutrals run to strong right + Ln = L << 4, // resolved neutrals run to strong left + In = (1<<8), // increment count of deferred neutrals + LnL = (1<<4)+L, // set run and EN to L +}; + +int GetDeferredNeutrals(int action, int level) +{ + action = (action >> 4) & 0xF; + if (action == (En >> 4)) + return EmbeddingDirection(level); + else + return action; +} + +int GetResolvedNeutrals(int action) +{ + action = action & 0xF; + if (action == In) + return 0; + else + return action; +} + +// state values +enum neutral_state +{ + // new temporary class + r, // R and characters resolved to R + l, // L and characters resolved to L + rn, // N preceded by right + ln, // N preceded by left + a, // AN preceded by left (the abbrev 'la' is used up above) + na, // N preceeded by a +} ; + +const uint8 neutral_class_map[] = { 0, 1, 2, 0, 4, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0 }; + +const int actionNeutrals[][5] = +{ +// N, L, R, AN, EN, = cls + // state = +{ In, 0, 0, 0, 0, }, // r right +{ In, 0, 0, 0, L, }, // l left + +{ In, En, Rn, Rn, Rn, }, // rn N preceded by right +{ In, Ln, En, En, LnL, }, // ln N preceded by left + +{ In, 0, 0, 0, L, }, // a AN preceded by left +{ In, En, Rn, Rn, En, }, // na N preceded by a +} ; + +const int stateNeutrals[][5] = +{ +// N, L, R, AN, EN = cls + // state = +{ rn, l, r, r, r, }, // r right +{ ln, l, r, a, l, }, // l left + +{ rn, l, r, r, r, }, // rn N preceded by right +{ ln, l, r, a, l, }, // ln N preceded by left + +{ na, l, r, a, l, }, // a AN preceded by left +{ na, l, r, a, l, }, // na N preceded by la +} ; + +void resolveNeutrals(int baseLevel, Slot *s) +{ + int state = baseLevel ? r : l; + int cls; + Slot *sRun = NULL; + Slot *sLast = s; + int level = baseLevel; + + for ( ; s; s = s->next()) + { + sLast = s; + cls = s->getBidiClass(); + if (cls == BN) + { + if (sRun) + sRun = sRun->prev(); + continue; + } + + int action = actionNeutrals[state][neutral_class_map[cls]]; + int clsRun = GetDeferredNeutrals(action, level); + if (clsRun != N) + { + SetDeferredRunClass(s, sRun, clsRun); + sRun = NULL; + } + int clsNew = GetResolvedNeutrals(action); + if (clsNew != N) + s->setBidiClass(clsNew); + if (!sRun && (action & In)) + sRun = s->prev(); + state = stateNeutrals[state][neutral_class_map[cls]]; + level = s->getBidiLevel(); + } + cls = EmbeddingDirection(level); + int clsRun = GetDeferredNeutrals(actionNeutrals[state][neutral_class_map[cls]], level); + if (clsRun != N) + SetDeferredRunClass(sLast, sRun, clsRun); +} + +const int addLevel[][4] = +{ + // L, R, AN, EN = cls + // level = +/* even */ { 0, 1, 2, 2, }, // EVEN +/* odd */ { 1, 0, 1, 1, }, // ODD + +}; + +void resolveImplicit(Slot *s, Segment *seg, uint8 aMirror) +{ + bool rtl = seg->dir() & 1; + for ( ; s; s = s->next()) + { + int cls = s->getBidiClass(); + if (cls == BN) + continue; + else if (cls == AN) + cls = AL; + if (cls < 5 && cls > 0) + { + int level = s->getBidiLevel(); + level += addLevel[level & 1][cls - 1]; + s->setBidiLevel(level); + if (aMirror) + { + int hasChar = seg->glyphAttr(s->gid(), aMirror + 1); + if ( ((level & 1) && (!(seg->dir() & 4) || !hasChar)) + || ((rtl ^ (level & 1)) && (seg->dir() & 4) && hasChar) ) + { + unsigned short g = seg->glyphAttr(s->gid(), aMirror); + if (g) s->setGlyph(seg, g); + } + } + } + } +} + +void resolveWhitespace(int baseLevel, Segment *seg, uint8 aBidi, Slot *s) +{ + for ( ; s; s = s->prev()) + { + int cls = seg->glyphAttr(s->gid(), aBidi); + if (cls == WS) + s->setBidiLevel(baseLevel); + else + break; + } +} + + +inline +Slot * join(int level, Slot * a, Slot * b) +{ + if (!a) return b; + if (level & 1) { Slot * const t = a; a = b; b = t; } + Slot * const t = b->prev(); + a->prev()->next(b); b->prev(a->prev()); // splice middle + t->next(a); a->prev(t); // splice ends + return a; +} + + +Slot * span(Slot * & cs, const bool rtl) +{ + Slot * r = cs, * re = cs; cs = cs->next(); + if (rtl) + { + Slot * t = r->next(); r->next(r->prev()); r->prev(t); + for (int l = r->getBidiLevel(); cs && l == cs->getBidiLevel(); cs = cs->prev()) + { + re = cs; + t = cs->next(); cs->next(cs->prev()); cs->prev(t); + } + r->next(re); + re->prev(r); + r = re; + } + else + { + for (int l = r->getBidiLevel(); cs && l == cs->getBidiLevel(); cs = cs->next()) + re = cs; + r->prev(re); + re->next(r); + } + if (cs) cs->prev(0); + return r; +} + + +Slot *resolveOrder(Slot * & cs, const bool reordered, const int level) +{ + Slot * r = 0; + int ls; + while (cs && level <= (ls = cs->getBidiLevel() - reordered)) + { + r = join(level, r, level >= ls + ? span(cs, level & 1) + : resolveOrder(cs, reordered, level+1)); + } + return r; +} + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/CMakeLists.txt b/Build/source/libs/graphite2/graphite2-1.2.0/src/CMakeLists.txt new file mode 100644 index 00000000000..1b485463555 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/CMakeLists.txt @@ -0,0 +1,139 @@ +# GRAPHITE2 LICENSING +# +# Copyright 2010, SIL International +# All rights reserved. +# +# This library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation; either version 2.1 of 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 +# Lesser General Public License for more details. +# +# You should also have received a copy of the GNU Lesser General Public +# License along with this library in the file named "LICENSE". +# If not, write to the Free Software Foundation, 51 Franklin Street, +# Suite 500, Boston, MA 02110-1335, USA or visit their web page on the +# internet at http://www.fsf.org/licenses/lgpl.html. + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR) +project(graphite2_core) +cmake_policy(SET CMP0012 NEW) +INCLUDE(CheckCXXSourceCompiles) + +set(GRAPHITE_API_CURRENT 3) +set(GRAPHITE_API_REVISION 0) +set(GRAPHITE_API_AGE 1) +set(GRAPHITE_VERSION ${GRAPHITE_API_CURRENT}.${GRAPHITE_API_REVISION}.${GRAPHITE_API_AGE}) +set(GRAPHITE_SO_VERSION ${GRAPHITE_API_CURRENT}) + +include(TestBigEndian) + +include_directories(${PROJECT_SOURCE_DIR}) + +set(SEGCACHE SegCache.cpp SegCacheEntry.cpp SegCacheStore.cpp) +if (GRAPHITE2_NSEGCACHE) + add_definitions(-DGRAPHITE2_NSEGCACHE) + set(SEGCACHE) +endif (GRAPHITE2_NSEGCACHE) + +set(FILEFACE FileFace.cpp) +if (GRAPHITE2_NFILEFACE) + add_definitions(-DGRAPHITE2_NFILEFACE) + set(FILEFACE) +endif (GRAPHITE2_NFILEFACE) + +set(TRACING json.cpp) +if (GRAPHITE2_NTRACING) + add_definitions(-DGRAPHITE2_NTRACING) + set(TRACING) +endif (GRAPHITE2_NTRACING) + + +set(GRAPHITE_HEADERS + ../include/graphite2/Font.h + ../include/graphite2/Segment.h + ../include/graphite2/Types.h + ../include/graphite2/Log.h + ) + +file(GLOB PRIVATE_HEADERS inc/*.h) + +add_library(graphite2 SHARED + ${GRAPHITE2_VM_TYPE}_machine.cpp + gr_char_info.cpp + gr_features.cpp + gr_face.cpp + gr_font.cpp + gr_logging.cpp + gr_segment.cpp + gr_slot.cpp + Bidi.cpp + CachedFace.cpp + CmapCache.cpp + Code.cpp + Face.cpp + FeatureMap.cpp + Font.cpp + GlyphFace.cpp + GlyphCache.cpp + Justifier.cpp + NameTable.cpp + Pass.cpp + Rule.cpp + Segment.cpp + Silf.cpp + Slot.cpp + Sparse.cpp + TtfUtil.cpp + UtfCodec.cpp + ${FILEFACE} + ${SEGCACHE} + ${TRACING}) + +set_target_properties(graphite2 PROPERTIES PUBLIC_HEADER "${GRAPHITE_HEADERS}" + SOVERSION ${GRAPHITE_SO_VERSION} + VERSION ${GRAPHITE_VERSION} + LT_VERSION_CURRENT ${GRAPHITE_API_CURRENT} + LT_VERSION_REVISION ${GRAPHITE_API_REVISION} + LT_VERSION_AGE ${GRAPHITE_API_AGE}) + +if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + set_target_properties(graphite2 PROPERTIES + COMPILE_FLAGS "-Wall -Wextra -Wno-unknown-pragmas -Wendif-labels -Wshadow -Wctor-dtor-privacy -Wnon-virtual-dtor -fdiagnostics-show-option -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -fno-stack-protector" + LINK_FLAGS "-nodefaultlibs" + LINKER_LANGUAGE C) + if (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*") + target_link_libraries(graphite2 kernel32 msvcr90 mingw32 gcc user32) + else (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*") + target_link_libraries(graphite2 c gcc) + include(Graphite) + nolib_test(stdc++ $) + endif (${CMAKE_CXX_COMPILER} MATCHES ".*mingw.*") + set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") + CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}") +endif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + +if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + set_target_properties(graphite2 PROPERTIES + COMPILE_FLAGS "-Wall -Wextra -Wno-unknown-pragmas -Wendif-labels -Wshadow -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -fdiagnostics-show-option -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -fno-stack-protector" + LINK_FLAGS "-nodefaultlibs" + LINKER_LANGUAGE C) + target_link_libraries(graphite2 c) + include(Graphite) + nolib_test(stdc++ $) + set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") + CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}") +endif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + +if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + set_target_properties(graphite2 PROPERTIES + COMPILE_DEFINITIONS "_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;UNICODE;GRAPHITE2_EXPORTING") +endif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + + +install(TARGETS graphite2 EXPORT graphite2 LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX} PUBLIC_HEADER DESTINATION include/graphite2 RUNTIME DESTINATION bin) +install(EXPORT graphite2 DESTINATION share/graphite2 NAMESPACE gr2_) diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/CachedFace.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/CachedFace.cpp new file mode 100644 index 00000000000..3642768854b --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/CachedFace.cpp @@ -0,0 +1,127 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ + +#ifndef GRAPHITE2_NSEGCACHE + +#include +#include "inc/CachedFace.h" +#include "inc/SegCacheStore.h" + + +using namespace graphite2; + +CachedFace::CachedFace(const void* appFaceHandle/*non-NULL*/, const gr_face_ops & ops) +: Face(appFaceHandle, ops), m_cacheStore(0) +{ +} + +CachedFace::~CachedFace() +{ + delete m_cacheStore; +} + +bool CachedFace::setupCache(unsigned int cacheSize) +{ + m_cacheStore = new SegCacheStore(*this, m_numSilf, cacheSize); + return bool(m_cacheStore); +} + + +bool CachedFace::runGraphite(Segment *seg, const Silf *pSilf) const +{ + assert(pSilf); + pSilf->runGraphite(seg, 0, pSilf->substitutionPass()); + + unsigned int silfIndex = 0; + for (; silfIndex < m_numSilf && &(m_silfs[silfIndex]) != pSilf; ++silfIndex); + if (silfIndex == m_numSilf) return false; + SegCache * const segCache = m_cacheStore->getOrCreate(silfIndex, seg->getFeatures(0)); + if (!segCache) + return false; + + assert(m_cacheStore); + // find where the segment can be broken + Slot * subSegStartSlot = seg->first(); + Slot * subSegEndSlot = subSegStartSlot; + uint16 cmapGlyphs[eMaxSpliceSize]; + int subSegStart = 0; + for (unsigned int i = 0; i < seg->charInfoCount(); ++i) + { + const unsigned int length = i - subSegStart + 1; + if (length < eMaxSpliceSize) + cmapGlyphs[length-1] = subSegEndSlot->gid(); + else return false; + const bool spaceOnly = m_cacheStore->isSpaceGlyph(subSegEndSlot->gid()); + // at this stage the character to slot mapping is still 1 to 1 + const int breakWeight = seg->charinfo(i)->breakWeight(), + nextBreakWeight = (i + 1 < seg->charInfoCount())? + seg->charinfo(i+1)->breakWeight() : 0; + const uint8 f = seg->charinfo(i)->flags(); + if (((spaceOnly + || (breakWeight > 0 && breakWeight <= gr_breakWord) + || i + 1 == seg->charInfoCount() + || ((nextBreakWeight < 0 && nextBreakWeight >= gr_breakBeforeWord) + || (subSegEndSlot->next() && m_cacheStore->isSpaceGlyph(subSegEndSlot->next()->gid())))) + && f != 1) + || f == 2) + { + // record the next slot before any splicing + Slot * nextSlot = subSegEndSlot->next(); + // spaces should be left untouched by graphite rules in any sane font + if (!spaceOnly) + { + // found a break position, check for a cache of the sub sequence + const SegCacheEntry * entry = segCache->find(cmapGlyphs, length); + // TODO disable cache for words at start/end of line with contextuals + if (!entry) + { + SegmentScopeState scopeState = seg->setScope(subSegStartSlot, subSegEndSlot, length); + pSilf->runGraphite(seg, pSilf->substitutionPass(), pSilf->numPasses()); + if (length < eMaxSpliceSize) + { + seg->associateChars(); + entry = segCache->cache(m_cacheStore, cmapGlyphs, length, seg, subSegStart); + } + seg->removeScope(scopeState); + } + else + seg->splice(subSegStart, length, subSegStartSlot, subSegEndSlot, + entry->first(), entry->glyphLength()); + } + subSegStartSlot = subSegEndSlot = nextSlot; + subSegStart = i + 1; + } + else + { + subSegEndSlot = subSegEndSlot->next(); + } + } + return true; +} + +#endif + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/CmapCache.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/CmapCache.cpp new file mode 100644 index 00000000000..c5e4be0366f --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/CmapCache.cpp @@ -0,0 +1,152 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ + +#include "inc/Main.h" +#include "inc/CmapCache.h" +#include "inc/Face.h" +#include "inc/TtfTypes.h" +#include "inc/TtfUtil.h" + + +using namespace graphite2; + +const void * bmp_subtable(const Face::Table & cmap) +{ + const void * stbl; + if (TtfUtil::CheckCmapSubtable4(stbl = TtfUtil::FindCmapSubtable(cmap, 3, 1, cmap.size())) + || TtfUtil::CheckCmapSubtable4(stbl = TtfUtil::FindCmapSubtable(cmap, 0, 3, cmap.size())) + || TtfUtil::CheckCmapSubtable4(stbl = TtfUtil::FindCmapSubtable(cmap, 0, 2, cmap.size())) + || TtfUtil::CheckCmapSubtable4(stbl = TtfUtil::FindCmapSubtable(cmap, 0, 1, cmap.size())) + || TtfUtil::CheckCmapSubtable4(stbl = TtfUtil::FindCmapSubtable(cmap, 0, 0, cmap.size()))) + return stbl; + return 0; +} + +const void * smp_subtable(const Face::Table & cmap) +{ + const void * stbl; + if (TtfUtil::CheckCmapSubtable12(stbl = TtfUtil::FindCmapSubtable(cmap, 3, 10, cmap.size())) + || TtfUtil::CheckCmapSubtable12(stbl = TtfUtil::FindCmapSubtable(cmap, 0, 4, cmap.size()))) + return stbl; + return 0; +} + +template +bool cache_subtable(uint16 * blocks[], const void * cst, const unsigned int limit) +{ + int rangeKey = 0; + uint32 codePoint = NextCodePoint(cst, 0, &rangeKey), + prevCodePoint = 0; + while (codePoint != limit) + { + unsigned int block = codePoint >> 8; + if (!blocks[block]) + { + blocks[block] = grzeroalloc(0x100); + if (!blocks[block]) + return false; + } + blocks[block][codePoint & 0xFF] = LookupCodePoint(cst, codePoint, rangeKey); + // prevent infinite loop + if (codePoint <= prevCodePoint) + codePoint = prevCodePoint + 1; + prevCodePoint = codePoint; + codePoint = NextCodePoint(cst, codePoint, &rangeKey); + } + return true; +} + + +CachedCmap::CachedCmap(const Face & face) +: m_isBmpOnly(true), + m_blocks(0) +{ + const Face::Table cmap(face, Tag::cmap); + if (!cmap) return; + + const void * bmp_cmap = bmp_subtable(cmap); + const void * smp_cmap = smp_subtable(cmap); + m_isBmpOnly = !smp_cmap; + + m_blocks = grzeroalloc(m_isBmpOnly ? 0x100 : 0x1100); + if (m_blocks && smp_cmap) + { + if (!cache_subtable(m_blocks, smp_cmap, 0x10FFFF)) + return; + } + + if (m_blocks && bmp_cmap) + { + if (!cache_subtable(m_blocks, bmp_cmap, 0xFFFF)) + return; + } +} + +CachedCmap::~CachedCmap() throw() +{ + unsigned int numBlocks = (m_isBmpOnly)? 0x100 : 0x1100; + for (unsigned int i = 0; i < numBlocks; i++) + free(m_blocks[i]); + free(m_blocks); +} + +uint16 CachedCmap::operator [] (const uint32 usv) const throw() +{ + if ((m_isBmpOnly && usv > 0xFFFF) || (usv > 0x10FFFF)) + return 0; + const uint32 block = 0xFFFF & (usv >> 8); + if (m_blocks[block]) + return m_blocks[block][usv & 0xFF]; + return 0; +}; + +CachedCmap::operator bool() const throw() +{ + return m_blocks != 0; +} + + +DirectCmap::DirectCmap(const Face & face) +: _cmap(face, Tag::cmap), + _smp(smp_subtable(_cmap)), + _bmp(bmp_subtable(_cmap)) +{ +} + +uint16 DirectCmap::operator [] (const uint32 usv) const throw() +{ + return usv > 0xFFFF + ? (_smp ? TtfUtil::CmapSubtable12Lookup(_smp, usv, 0) : 0) + : TtfUtil::CmapSubtable4Lookup(_bmp, usv, 0); +} + +DirectCmap::operator bool () const throw() +{ + return _cmap && _bmp; +} + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/Code.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/Code.cpp new file mode 100644 index 00000000000..01f9d511e95 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/Code.cpp @@ -0,0 +1,609 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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 class represents loaded graphite stack machine code. It performs +// basic sanity checks, on the incoming code to prevent more obvious problems +// from crashing graphite. +// Author: Tim Eves + +#include +#include +#include +#include +#include "graphite2/Segment.h" +#include "inc/Code.h" +#include "inc/Face.h" +#include "inc/GlyphFace.h" +#include "inc/GlyphCache.h" +#include "inc/Machine.h" +#include "inc/Rule.h" +#include "inc/Silf.h" + +#include + +#ifdef NDEBUG +#ifdef __GNUC__ +#pragma GCC diagnostic ignored "-Wunused-parameter" +#endif +#endif + + +using namespace graphite2; +using namespace vm; + +namespace { + +inline bool is_return(const instr i) { + const opcode_t * opmap = Machine::getOpcodeTable(); + const instr pop_ret = *opmap[POP_RET].impl, + ret_zero = *opmap[RET_ZERO].impl, + ret_true = *opmap[RET_TRUE].impl; + return i == pop_ret || i == ret_zero || i == ret_true; +} + +struct context +{ + context(uint8 ref=0) : codeRef(ref) {flags.changed=false; flags.referenced=false; flags.inserted=false;} + struct { + uint8 changed:1, + referenced:1, + inserted:1; + } flags; + uint8 codeRef; +}; + +} // end namespace + + +class Machine::Code::decoder +{ +public: + struct limits; + struct analysis + { + uint8 slotref; + context contexts[256]; + byte max_ref; + + analysis() : slotref(0), max_ref(0) {}; + void set_ref(int index) throw(); + void set_changed(int index) throw(); + + }; + + decoder(const limits & lims, Code &code) throw(); + + bool load(const byte * bc_begin, const byte * bc_end); + void apply_analysis(instr * const code, instr * code_end); + byte max_ref() { return _analysis.max_ref; } + int pre_context() const { return _pre_context; } + +private: + opcode fetch_opcode(const byte * bc); + void analyse_opcode(const opcode, const int8 * const dp) throw(); + bool emit_opcode(opcode opc, const byte * & bc); + bool validate_opcode(const opcode opc, const byte * const bc); + bool valid_upto(const uint16 limit, const uint16 x) const throw(); + void failure(const status_t s) const throw() { _code.failure(s); } + + Code & _code; + int _pre_context; + uint16 _rule_length; + instr * _instr; + byte * _data; + const limits & _max; + analysis _analysis; +}; + + +struct Machine::Code::decoder::limits +{ + const byte * const bytecode; + const uint8 pre_context; + const uint16 rule_length, + classes, + glyf_attrs, + features; + const byte attrid[gr_slatMax]; +}; + +inline Machine::Code::decoder::decoder(const limits & lims, Code &code) throw() +: _code(code), + _pre_context(code._constraint ? 0 : lims.pre_context), + _rule_length(code._constraint ? 1 : lims.rule_length), + _instr(code._code), _data(code._data), _max(lims) +{ } + + + +Machine::Code::Code(bool is_constraint, const byte * bytecode_begin, const byte * const bytecode_end, + uint8 pre_context, uint16 rule_length, const Silf & silf, const Face & face) + : _code(0), _data(0), _data_size(0), _instr_count(0), _max_ref(0), _status(loaded), + _constraint(is_constraint), _modify(false), _delete(false), _own(true) +{ + assert(bytecode_begin != 0); + if (bytecode_begin == bytecode_end) + { + ::new (this) Code(); + return; + } + assert(bytecode_end > bytecode_begin); + const opcode_t * op_to_fn = Machine::getOpcodeTable(); + + // Allocate code and dat target buffers, these sizes are a worst case + // estimate. Once we know their real sizes the we'll shrink them. + _code = static_cast(malloc((bytecode_end - bytecode_begin) + * sizeof(instr))); + _data = static_cast(malloc((bytecode_end - bytecode_begin) + * sizeof(byte))); + + if (!_code || !_data) { + failure(alloc_failed); + return; + } + + const decoder::limits lims = { + bytecode_end, + pre_context, + rule_length, + silf.numClasses(), + face.glyphs().numAttrs(), + face.numFeatures(), + {1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,255, + 1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,0,0, + 0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0, silf.numUser()} + }; + + decoder dec(lims, *this); + if(!dec.load(bytecode_begin, bytecode_end)) + return; + + // Is this an empty program? + if (_instr_count == 0) + { + release_buffers(); + ::new (this) Code(); + return; + } + + // When we reach the end check we've terminated it correctly + if (!is_return(_code[_instr_count-1])) { + failure(missing_return); + return; + } + + assert((_constraint && immutable()) || !_constraint); + dec.apply_analysis(_code, _code + _instr_count); + _max_ref = dec.max_ref(); + + // Now we know exactly how much code and data the program really needs + // realloc the buffers to exactly the right size so we don't waste any + // memory. + assert((bytecode_end - bytecode_begin) >= std::ptrdiff_t(_instr_count)); + assert((bytecode_end - bytecode_begin) >= std::ptrdiff_t(_data_size)); + _code = static_cast(realloc(_code, (_instr_count+1)*sizeof(instr))); + _data = static_cast(realloc(_data, _data_size*sizeof(byte))); + + // Make this RET_ZERO, we should never reach this but just in case ... + _code[_instr_count] = op_to_fn[RET_ZERO].impl[_constraint]; + + if (!_code) + failure(alloc_failed); +} + +Machine::Code::~Code() throw () +{ + if (_own) + release_buffers(); +} + + +bool Machine::Code::decoder::load(const byte * bc, const byte * bc_end) +{ + while (bc < bc_end) + { + const opcode opc = fetch_opcode(bc++); + if (opc == vm::MAX_OPCODE) + return false; + + analyse_opcode(opc, reinterpret_cast(bc)); + + if (!emit_opcode(opc, bc)) + return false; + } + + return bool(_code); +} + +// Validation check and fixups. +// + +opcode Machine::Code::decoder::fetch_opcode(const byte * bc) +{ + const opcode opc = opcode(*bc++); + + // Do some basic sanity checks based on what we know about the opcode + if (!validate_opcode(opc, bc)) return MAX_OPCODE; + + // And check it's arguments as far as possible + switch (opc) + { + case NOP : + case PUSH_BYTE : + case PUSH_BYTEU : + case PUSH_SHORT : + case PUSH_SHORTU : + case PUSH_LONG : + case ADD : + case SUB : + case MUL : + case DIV : + case MIN_ : + case MAX_ : + case NEG : + case TRUNC8 : + case TRUNC16 : + case COND : + case AND : + case OR : + case NOT : + case EQUAL : + case NOT_EQ : + case LESS : + case GTR : + case LESS_EQ : + case GTR_EQ : + break; + case NEXT : + case NEXT_N : // runtime checked + case COPY_NEXT : + ++_pre_context; + break; + case PUT_GLYPH_8BIT_OBS : + valid_upto(_max.classes, bc[0]); + break; + case PUT_SUBS_8BIT_OBS : + valid_upto(_rule_length, _pre_context + int8(bc[0])); + valid_upto(_max.classes, bc[1]); + valid_upto(_max.classes, bc[2]); + break; + case PUT_COPY : + valid_upto(_rule_length, _pre_context + int8(bc[0])); + break; + case INSERT : + --_pre_context; + break; + case DELETE : + break; + case ASSOC : + for (uint8 num = bc[0]; num; --num) + valid_upto(_rule_length, _pre_context + int8(bc[num])); + break; + case CNTXT_ITEM : + valid_upto(_max.rule_length, _max.pre_context + int8(bc[0])); + if (bc + 2 + bc[1] >= _max.bytecode) failure(jump_past_end); + if (_pre_context != 0) failure(nested_context_item); + break; + case ATTR_SET : + case ATTR_ADD : + case ATTR_SUB : + case ATTR_SET_SLOT : + valid_upto(gr_slatMax, bc[0]); + break; + case IATTR_SET_SLOT : + if (valid_upto(gr_slatMax, bc[0])) + valid_upto(_max.attrid[bc[0]], bc[1]); + break; + case PUSH_SLOT_ATTR : + valid_upto(gr_slatMax, bc[0]); + valid_upto(_rule_length, _pre_context + int8(bc[1])); + break; + case PUSH_GLYPH_ATTR_OBS : + valid_upto(_max.glyf_attrs, bc[0]); + valid_upto(_rule_length, _pre_context + int8(bc[1])); + break; + case PUSH_GLYPH_METRIC : + valid_upto(kgmetDescent, bc[0]); + valid_upto(_rule_length, _pre_context + int8(bc[1])); + // level: dp[2] no check necessary + break; + case PUSH_FEAT : + valid_upto(_max.features, bc[0]); + valid_upto(_rule_length, _pre_context + int8(bc[1])); + break; + case PUSH_ATT_TO_GATTR_OBS : + valid_upto(_max.glyf_attrs, bc[0]); + valid_upto(_rule_length, _pre_context + int8(bc[1])); + break; + case PUSH_ATT_TO_GLYPH_METRIC : + valid_upto(kgmetDescent, bc[0]); + valid_upto(_rule_length, _pre_context + int8(bc[1])); + // level: dp[2] no check necessary + break; + case PUSH_ISLOT_ATTR : + if (valid_upto(gr_slatMax, bc[0])) + { + valid_upto(_rule_length, _pre_context + int8(bc[1])); + valid_upto(_max.attrid[bc[0]], bc[2]); + } + break; + case PUSH_IGLYPH_ATTR :// not implemented + case POP_RET : + case RET_ZERO : + case RET_TRUE : + break; + case IATTR_SET : + case IATTR_ADD : + case IATTR_SUB : + if (valid_upto(gr_slatMax, bc[0])) + valid_upto(_max.attrid[bc[0]], bc[1]); + break; + case PUSH_PROC_STATE : // dummy: dp[0] no check necessary + case PUSH_VERSION : + break; + case PUT_SUBS : + valid_upto(_rule_length, _pre_context + int8(bc[0])); + valid_upto(_max.classes, uint16(bc[1]<< 8) | bc[2]); + valid_upto(_max.classes, uint16(bc[3]<< 8) | bc[4]); + break; + case PUT_SUBS2 : // not implemented + case PUT_SUBS3 : // not implemented + break; + case PUT_GLYPH : + valid_upto(_max.classes, uint16(bc[0]<< 8) | bc[1]); + break; + case PUSH_GLYPH_ATTR : + case PUSH_ATT_TO_GLYPH_ATTR : + valid_upto(_max.glyf_attrs, uint16(bc[0]<< 8) | bc[1]); + valid_upto(_rule_length, _pre_context + int8(bc[2])); + break; + default: + failure(invalid_opcode); + break; + } + + return bool(_code) ? opc : MAX_OPCODE; +} + + +void Machine::Code::decoder::analyse_opcode(const opcode opc, const int8 * arg) throw() +{ + if (_code._constraint) return; + + switch (opc) + { + case DELETE : + _code._delete = true; + break; + case PUT_GLYPH_8BIT_OBS : + case PUT_GLYPH : + _code._modify = true; + _analysis.set_changed(_analysis.slotref); + break; + case NEXT : + case COPY_NEXT : + if (!_analysis.contexts[_analysis.slotref].flags.inserted) + ++_analysis.slotref; + _analysis.contexts[_analysis.slotref] = context(_code._instr_count+1); + if (_analysis.slotref > _analysis.max_ref) _analysis.max_ref = _analysis.slotref; + break; + case INSERT : + _analysis.contexts[_analysis.slotref].flags.inserted = true; + _code._modify = true; + break; + case PUT_SUBS_8BIT_OBS : // slotref on 1st parameter + case PUT_SUBS : + _code._modify = true; + _analysis.set_changed(_analysis.slotref); + // no break + case PUT_COPY : + { + if (arg[0] != 0) { _analysis.set_changed(_analysis.slotref); _code._modify = true; } + if (arg[0] <= 0 && -arg[0] <= _analysis.slotref - _analysis.contexts[_analysis.slotref].flags.inserted) + _analysis.set_ref(_analysis.slotref + arg[0] - _analysis.contexts[_analysis.slotref].flags.inserted); + else if (_analysis.slotref + arg[0] > _analysis.max_ref) _analysis.max_ref = _analysis.slotref + arg[0]; + break; + } + case PUSH_ATT_TO_GATTR_OBS : // slotref on 2nd parameter + if (_code._constraint) return; + // no break + case PUSH_GLYPH_ATTR_OBS : + case PUSH_SLOT_ATTR : + case PUSH_GLYPH_METRIC : + case PUSH_ATT_TO_GLYPH_METRIC : + case PUSH_ISLOT_ATTR : + case PUSH_FEAT : + if (arg[1] <= 0 && -arg[1] <= _analysis.slotref - _analysis.contexts[_analysis.slotref].flags.inserted) + _analysis.set_ref(_analysis.slotref + arg[1] - _analysis.contexts[_analysis.slotref].flags.inserted); + else if (_analysis.slotref + arg[1] > _analysis.max_ref) _analysis.max_ref = _analysis.slotref + arg[1]; + break; + case PUSH_ATT_TO_GLYPH_ATTR : + if (_code._constraint) return; + // no break + case PUSH_GLYPH_ATTR : + if (arg[2] <= 0 && -arg[2] <= _analysis.slotref - _analysis.contexts[_analysis.slotref].flags.inserted) + _analysis.set_ref(_analysis.slotref + arg[2] - _analysis.contexts[_analysis.slotref].flags.inserted); + else if (_analysis.slotref + arg[2] > _analysis.max_ref) _analysis.max_ref = _analysis.slotref + arg[2]; + break; + case ASSOC : // slotrefs in varargs + break; + default: + break; + } +} + + +bool Machine::Code::decoder::emit_opcode(opcode opc, const byte * & bc) +{ + const opcode_t * op_to_fn = Machine::getOpcodeTable(); + const opcode_t & op = op_to_fn[opc]; + if (op.impl[_code._constraint] == 0) + { + failure(unimplemented_opcode_used); + return false; + } + + const size_t param_sz = op.param_sz == VARARGS ? bc[0] + 1 : op.param_sz; + + // Add this instruction + *_instr++ = op.impl[_code._constraint]; + ++_code._instr_count; + + // Grab the parameters + if (param_sz) { + memcpy(_data, bc, param_sz * sizeof(byte)); + bc += param_sz; + _data += param_sz; + _code._data_size += param_sz; + } + + // recursively decode a context item so we can split the skip into + // instruction and data portions. + if (opc == CNTXT_ITEM) + { + assert(_pre_context == 0); + _pre_context = _max.pre_context + int8(_data[-2]); + _rule_length = _max.rule_length; + + const size_t ctxt_start = _code._instr_count; + byte & instr_skip = _data[-1]; + byte & data_skip = *_data++; + ++_code._data_size; + + if (load(bc, bc + instr_skip)) + { + bc += instr_skip; + data_skip = instr_skip - (_code._instr_count - ctxt_start); + instr_skip = _code._instr_count - ctxt_start; + + _rule_length = 1; + _pre_context = 0; + } + } + + return bool(_code); +} + + +void Machine::Code::decoder::apply_analysis(instr * const code, instr * code_end) +{ + // insert TEMP_COPY commands for slots that need them (that change and are referenced later) + int tempcount = 0; + if (_code._constraint) return; + + const instr temp_copy = Machine::getOpcodeTable()[TEMP_COPY].impl[0]; + for (const context * c = _analysis.contexts, * const ce = c + _analysis.slotref; c != ce; ++c) + { + if (!c->flags.referenced || !c->flags.changed) continue; + + instr * const tip = code + c->codeRef + tempcount; + memmove(tip+1, tip, (code_end - tip) * sizeof(instr)); + *tip = temp_copy; + ++code_end; + ++tempcount; + } + + _code._instr_count = code_end - code; +} + + +inline +bool Machine::Code::decoder::validate_opcode(const opcode opc, const byte * const bc) +{ + if (opc >= MAX_OPCODE) + { + failure(invalid_opcode); + return false; + } + const opcode_t & op = Machine::getOpcodeTable()[opc]; + const size_t param_sz = op.param_sz == VARARGS ? bc[0] + 1 : op.param_sz; + if (bc + param_sz > _max.bytecode) + { + failure(arguments_exhausted); + return false; + } + return true; +} + + +bool Machine::Code::decoder::valid_upto(const uint16 limit, const uint16 x) const throw() +{ + const bool t = x < limit; + if (!t) failure(out_of_range_data); + return t; +} + + +inline +void Machine::Code::failure(const status_t s) throw() { + release_buffers(); + _status = s; +} + + +inline +void Machine::Code::decoder::analysis::set_ref(const int index) throw() { + contexts[index].flags.referenced = true; + if (index > max_ref) max_ref = index; +} + + +inline +void Machine::Code::decoder::analysis::set_changed(const int index) throw() { + contexts[index].flags.changed = true; + if (index > max_ref) max_ref = index; +} + + +void Machine::Code::release_buffers() throw() +{ + free(_code); + free(_data); + _code = 0; + _data = 0; + _own = false; +} + + +int32 Machine::Code::run(Machine & m, slotref * & map) const +{ + assert(_own); + assert(*this); // Check we are actually runnable + + if (m.slotMap().size() <= size_t(_max_ref + m.slotMap().context())) + { + m._status = Machine::slot_offset_out_bounds; +// return (m.slotMap().end() - map); + return 1; + } + + return m.run(_code, _data, map); +} + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/Face.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/Face.cpp new file mode 100644 index 00000000000..4566025de92 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/Face.cpp @@ -0,0 +1,254 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#include +#include "graphite2/Segment.h" +#include "inc/CmapCache.h" +#include "inc/debug.h" +#include "inc/Endian.h" +#include "inc/Face.h" +#include "inc/FileFace.h" +#include "inc/GlyphFace.h" +#include "inc/json.h" +#include "inc/SegCacheStore.h" +#include "inc/Segment.h" +#include "inc/NameTable.h" + + +using namespace graphite2; + +Face::Face(const void* appFaceHandle/*non-NULL*/, const gr_face_ops & ops) +: m_appFaceHandle(appFaceHandle), + m_pFileFace(NULL), + m_pGlyphFaceCache(NULL), + m_cmap(NULL), + m_pNames(NULL), + m_logger(NULL), + m_silfs(NULL), + m_numSilf(0), + m_ascent(0), + m_descent(0) +{ + memset(&m_ops, 0, sizeof m_ops); + memcpy(&m_ops, &ops, std::min(sizeof m_ops, ops.size)); +} + + +Face::~Face() +{ + setLogger(0); + delete m_pGlyphFaceCache; + delete m_cmap; + delete[] m_silfs; +#ifndef GRAPHITE2_NFILEFACE + delete m_pFileFace; +#endif + delete m_pNames; +} + +float Face::default_glyph_advance(const void* font_ptr, gr_uint16 glyphid) +{ + const Font & font = *reinterpret_cast(font_ptr); + + return font.face().glyphs().glyph(glyphid)->theAdvance().x * font.scale(); +} + +bool Face::readGlyphs(uint32 faceOptions) +{ + if (faceOptions & gr_face_cacheCmap) + m_cmap = new CachedCmap(*this); + else + m_cmap = new DirectCmap(*this); + + m_pGlyphFaceCache = new GlyphCache(*this, faceOptions); + if (!m_pGlyphFaceCache + || m_pGlyphFaceCache->numGlyphs() == 0 + || m_pGlyphFaceCache->unitsPerEm() == 0 + || !m_cmap || !*m_cmap) + return false; + + if (faceOptions & gr_face_preloadGlyphs) + nameTable(); // preload the name table along with the glyphs, heh. + + return true; +} + +bool Face::readGraphite(const Table & silf) +{ + const byte * p = silf; + if (!p) return false; + + const uint32 version = be::read(p); + if (version < 0x00020000) return false; + if (version >= 0x00030000) + be::skip(p); // compilerVersion + m_numSilf = be::read(p); + be::skip(p); // reserved + + bool havePasses = false; + m_silfs = new Silf[m_numSilf]; + for (int i = 0; i < m_numSilf; i++) + { + const uint32 offset = be::read(p), + next = i == m_numSilf - 1 ? silf.size() : be::peek(p); + if (next > silf.size() || offset >= next) + return false; + + if (!m_silfs[i].readGraphite(silf + offset, next - offset, *this, version)) + return false; + + if (m_silfs[i].numPasses()) + havePasses = true; + } + + return havePasses; +} + +bool Face::readFeatures() +{ + return m_Sill.readFace(*this); +} + +bool Face::runGraphite(Segment *seg, const Silf *aSilf) const +{ +#if !defined GRAPHITE2_NTRACING + json * dbgout = logger(); + if (dbgout) + { + *dbgout << json::object + << "id" << objectid(seg) + << "passes" << json::array; + } +#endif + + bool res = aSilf->runGraphite(seg, 0, aSilf->justificationPass()); + res &= aSilf->runGraphite(seg, aSilf->positionPass(), aSilf->numPasses()); + +#if !defined GRAPHITE2_NTRACING + if (dbgout) +{ + *dbgout << json::item + << json::close // Close up the passes array + << "output" << json::array; + for(Slot * s = seg->first(); s; s = s->next()) + *dbgout << dslot(seg, s); + seg->finalise(0); // Call this here to fix up charinfo back indexes. + *dbgout << json::close + << "advance" << seg->advance() + << "chars" << json::array; + for(size_t i = 0, n = seg->charInfoCount(); i != n; ++i) + *dbgout << json::flat << *seg->charinfo(i); + *dbgout << json::close // Close up the chars array + << json::close; // Close up the segment object + } +#endif + + return res; +} + +void Face::setLogger(FILE * log_file GR_MAYBE_UNUSED) +{ +#if !defined GRAPHITE2_NTRACING + delete m_logger; + m_logger = log_file ? new json(log_file) : 0; +#endif +} + +const Silf *Face::chooseSilf(uint32 script) const +{ + if (m_numSilf == 0) + return NULL; + else if (m_numSilf == 1 || script == 0) + return m_silfs; + else // do more work here + return m_silfs; +} + +uint16 Face::findPseudo(uint32 uid) const +{ + return (m_numSilf) ? m_silfs[0].findPseudo(uid) : 0; +} + +uint16 Face::getGlyphMetric(uint16 gid, uint8 metric) const +{ + switch (metrics(metric)) + { + case kgmetAscent : return m_ascent; + case kgmetDescent : return m_descent; + default: return glyphs().glyph(gid)->getMetric(metric); + } +} + +void Face::takeFileFace(FileFace* pFileFace GR_MAYBE_UNUSED/*takes ownership*/) +{ +#ifndef GRAPHITE2_NFILEFACE + if (m_pFileFace==pFileFace) + return; + + delete m_pFileFace; + m_pFileFace = pFileFace; +#endif +} + +NameTable * Face::nameTable() const +{ + if (m_pNames) return m_pNames; + const Table name(*this, Tag::name); + if (name) + m_pNames = new NameTable(name, name.size()); + return m_pNames; +} + +uint16 Face::languageForLocale(const char * locale) const +{ + nameTable(); + if (m_pNames) + return m_pNames->getLanguageId(locale); + return 0; +} + +Face::Table::Table(const Face & face, const Tag n) throw() +: _f(&face) +{ + size_t sz = 0; + _p = reinterpret_cast((*_f->m_ops.get_table)(_f->m_appFaceHandle, n, &sz)); + _sz = uint32(sz); + if (!TtfUtil::CheckTable(n, _p, _sz)) + { + this->~Table(); // Make sure we release the table buffer even if the table filed it's checks + _p = 0; _sz = 0; + } +} + +Face::Table & Face::Table::operator = (const Table & rhs) throw() +{ + if (_p == rhs._p) return *this; + + this->~Table(); + new (this) Table(rhs); + return *this; +} + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/FeatureMap.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/FeatureMap.cpp new file mode 100644 index 00000000000..c625950b8a8 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/FeatureMap.cpp @@ -0,0 +1,279 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#include + +#include "inc/Main.h" +#include "inc/bits.h" +#include "inc/Endian.h" +#include "inc/FeatureMap.h" +#include "inc/FeatureVal.h" +#include "graphite2/Font.h" +#include "inc/TtfUtil.h" +#include +#include "inc/Face.h" + + +using namespace graphite2; + +namespace +{ + static int cmpNameAndFeatures(const void *ap, const void *bp) + { + const NameAndFeatureRef & a = *static_cast(ap), + & b = *static_cast(bp); + return (a < b ? -1 : (b < a ? 1 : 0)); + } + + const size_t FEAT_HEADER = sizeof(uint32) + 2*sizeof(uint16) + sizeof(uint32), + FEATURE_SIZE = sizeof(uint32) + + 2*sizeof(uint16) + + sizeof(uint32) + + 2*sizeof(uint16), + FEATURE_SETTING_SIZE = sizeof(int16) + sizeof(uint16); + + uint16 readFeatureSettings(const byte * p, FeatureSetting * s, size_t num_settings) + { + uint16 max_val = 0; + for (FeatureSetting * const end = s + num_settings; s != end; ++s) + { + const int16 value = be::read(p); + ::new (s) FeatureSetting(value, be::read(p)); + if (uint16(value) > max_val) max_val = value; + } + + return max_val; + } +} + +FeatureRef::FeatureRef(const Face & face, + unsigned short & bits_offset, uint32 max_val, + uint32 name, uint16 uiName, uint16 flags, + FeatureSetting *settings, uint16 num_set) throw() +: m_pFace(&face), + m_nameValues(settings), + m_mask(mask_over_val(max_val)), + m_max(max_val), + m_id(name), + m_nameid(uiName), + m_flags(flags), + m_numSet(num_set) +{ + const uint8 need_bits = bit_set_count(m_mask); + m_index = (bits_offset + need_bits) / SIZEOF_CHUNK; + if (m_index > bits_offset / SIZEOF_CHUNK) + bits_offset = m_index*SIZEOF_CHUNK; + m_bits = bits_offset % SIZEOF_CHUNK; + bits_offset += need_bits; + m_mask <<= m_bits; +} + +FeatureRef::~FeatureRef() throw() +{ + free(m_nameValues); +} + +bool FeatureMap::readFeats(const Face & face) +{ + const Face::Table feat(face, TtfUtil::Tag::Feat); + const byte * p = feat; + if (!p) return true; + if (feat.size() < FEAT_HEADER) return false; + + const byte *const feat_start = p, + *const feat_end = p + feat.size(); + + const uint32 version = be::read(p); + m_numFeats = be::read(p); + be::skip(p); + be::skip(p); + + // Sanity checks + if (m_numFeats == 0) return true; + if (version < 0x00010000 || + p + m_numFeats*FEATURE_SIZE > feat_end) + { //defensive + m_numFeats = 0; + return false; + } + + m_feats = new FeatureRef [m_numFeats]; + uint16 * const defVals = gralloc(m_numFeats); + unsigned short bits = 0; //to cause overflow on first Feature + + for (int i = 0, ie = m_numFeats; i != ie; i++) + { + const uint32 label = version < 0x00020000 ? be::read(p) : be::read(p); + const uint16 num_settings = be::read(p); + if (version >= 0x00020000) + be::skip(p); + const byte * const feat_setts = feat_start + be::read(p); + const uint16 flags = be::read(p), + uiName = be::read(p); + + if (feat_setts + num_settings * FEATURE_SETTING_SIZE > feat_end) + { + free(defVals); + return false; + } + + FeatureSetting *uiSet; + uint32 maxVal; + if (num_settings != 0) + { + uiSet = gralloc(num_settings); + maxVal = readFeatureSettings(feat_setts, uiSet, num_settings); + defVals[i] = uiSet[0].value(); + } + else + { + uiSet = 0; + maxVal = 0xffffffff; + defVals[i] = 0; + } + + ::new (m_feats + i) FeatureRef (face, bits, maxVal, + label, uiName, flags, + uiSet, num_settings); + } + m_defaultFeatures = new Features(bits/(sizeof(uint32)*8) + 1, *this); + m_pNamedFeats = new NameAndFeatureRef[m_numFeats]; + for (int i = 0; i < m_numFeats; ++i) + { + m_feats[i].applyValToFeature(defVals[i], *m_defaultFeatures); + m_pNamedFeats[i] = m_feats+i; + } + + free(defVals); + + qsort(m_pNamedFeats, m_numFeats, sizeof(NameAndFeatureRef), &cmpNameAndFeatures); + + return true; +} + +bool SillMap::readFace(const Face & face) +{ + if (!m_FeatureMap.readFeats(face)) return false; + if (!readSill(face)) return false; + return true; +} + + +bool SillMap::readSill(const Face & face) +{ + const Face::Table sill(face, TtfUtil::Tag::Sill); + const byte *pSill = sill; + + if (!pSill) return true; + if (sill.size() < 12) return false; + if (be::read(pSill) != 0x00010000UL) return false; + m_numLanguages = be::read(pSill); + m_langFeats = new LangFeaturePair[m_numLanguages]; + if (!m_langFeats || !m_FeatureMap.m_numFeats) { m_numLanguages = 0; return true; } //defensive + + pSill += 6; // skip the fast search + if (sill.size() < m_numLanguages * 8U + 12) return false; + + for (int i = 0; i < m_numLanguages; i++) + { + uint32 langid = be::read(pSill); + uint16 numSettings = be::read(pSill); + uint16 offset = be::read(pSill); + if (offset + 8U * numSettings > sill.size() && numSettings > 0) return false; + Features* feats = new Features(*m_FeatureMap.m_defaultFeatures); + const byte *pLSet = sill + offset; + + // Apply langauge specific settings + for (int j = 0; j < numSettings; j++) + { + uint32 name = be::read(pLSet); + uint16 val = be::read(pLSet); + pLSet += 2; + const FeatureRef* pRef = m_FeatureMap.findFeatureRef(name); + if (pRef) pRef->applyValToFeature(val, *feats); + } + // Add the language id feature which is always feature id 1 + const FeatureRef* pRef = m_FeatureMap.findFeatureRef(1); + if (pRef) pRef->applyValToFeature(langid, *feats); + + m_langFeats[i].m_lang = langid; + m_langFeats[i].m_pFeatures = feats; + } + return true; +} + + +Features* SillMap::cloneFeatures(uint32 langname/*0 means default*/) const +{ + if (langname) + { + // the number of languages in a font is usually small e.g. 8 in Doulos + // so this loop is not very expensive + for (uint16 i = 0; i < m_numLanguages; i++) + { + if (m_langFeats[i].m_lang == langname) + return new Features(*m_langFeats[i].m_pFeatures); + } + } + return new Features (*m_FeatureMap.m_defaultFeatures); +} + + + +const FeatureRef *FeatureMap::findFeatureRef(uint32 name) const +{ + NameAndFeatureRef *it; + + for (it = m_pNamedFeats; it < m_pNamedFeats + m_numFeats; ++it) + if (it->m_name == name) + return it->m_pFRef; + return NULL; +} + +bool FeatureRef::applyValToFeature(uint32 val, Features & pDest) const +{ + if (val>maxVal() || !m_pFace) + return false; + if (pDest.m_pMap==NULL) + pDest.m_pMap = &m_pFace->theSill().theFeatureMap(); + else + if (pDest.m_pMap!=&m_pFace->theSill().theFeatureMap()) + return false; //incompatible + pDest.reserve(m_index); + pDest[m_index] &= ~m_mask; + pDest[m_index] |= (uint32(val) << m_bits); + return true; +} + +uint32 FeatureRef::getFeatureVal(const Features& feats) const +{ + if (m_index < feats.size() && &m_pFace->theSill().theFeatureMap()==feats.m_pMap) + return (feats[m_index] & m_mask) >> m_bits; + else + return 0; +} + + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/FileFace.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/FileFace.cpp new file mode 100644 index 00000000000..1e37763fb6a --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/FileFace.cpp @@ -0,0 +1,118 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#include +//#include "graphite2/Segment.h" +//#include "inc/CmapCache.h" +//#include "inc/Endian.h" +#include "inc/FileFace.h" +//#include "inc/GlyphFace.h" +//#include "inc/SegCacheStore.h" +//#include "inc/Segment.h" +//#include "inc/NameTable.h" + + +using namespace graphite2; + +#ifndef GRAPHITE2_NFILEFACE + +FileFace::FileFace(const char *filename) +: _file(fopen(filename, "rb")), + _file_len(0), + _header_tbl(NULL), + _table_dir(NULL) +{ + if (!_file) return; + + if (fseek(_file, 0, SEEK_END)) return; + _file_len = ftell(_file); + if (fseek(_file, 0, SEEK_SET)) return; + + size_t tbl_offset, tbl_len; + + // Get the header. + if (!TtfUtil::GetHeaderInfo(tbl_offset, tbl_len)) return; + if (fseek(_file, tbl_offset, SEEK_SET)) return; + _header_tbl = (TtfUtil::Sfnt::OffsetSubTable*)gralloc(tbl_len); + if (_header_tbl) + { + if (fread(_header_tbl, 1, tbl_len, _file) != tbl_len) return; + if (!TtfUtil::CheckHeader(_header_tbl)) return; + } + + // Get the table directory + if (!TtfUtil::GetTableDirInfo(_header_tbl, tbl_offset, tbl_len)) return; + _table_dir = (TtfUtil::Sfnt::OffsetSubTable::Entry*)gralloc(tbl_len); + if (fseek(_file, tbl_offset, SEEK_SET)) return; + if (_table_dir) + if (fread(_table_dir, 1, tbl_len, _file) != tbl_len) return; +} + +FileFace::~FileFace() +{ + free(_table_dir); + free(_header_tbl); + if (_file) + fclose(_file); +} + + +const void *FileFace::get_table_fn(const void* appFaceHandle, unsigned int name, size_t *len) +{ + if (appFaceHandle == 0) return 0; + const FileFace & file_face = *static_cast(appFaceHandle); + + char *tbl; + size_t tbl_offset, tbl_len; + if (!TtfUtil::GetTableInfo(name, file_face._header_tbl, file_face._table_dir, tbl_offset, tbl_len)) + return 0; + + if (tbl_offset + tbl_len > file_face._file_len + || fseek(file_face._file, tbl_offset, SEEK_SET) != 0) + return 0; + + tbl = gralloc(tbl_len); + if (fread(tbl, 1, tbl_len, file_face._file) != tbl_len) + { + free(tbl); + return 0; + } + + if (len) *len = tbl_len; + return tbl; +} + +void FileFace::rel_table_fn(const void* appFaceHandle, const void *table_buffer) +{ + if (appFaceHandle == 0) return; + + free(const_cast(table_buffer)); +} + +const gr_face_ops FileFace::ops = { sizeof FileFace::ops, &FileFace::get_table_fn, &FileFace::rel_table_fn }; + + +#endif //!GRAPHITE2_NFILEFACE diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/Font.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/Font.cpp new file mode 100644 index 00000000000..b090bb0fa80 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/Font.cpp @@ -0,0 +1,62 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#include +#include "inc/Face.h" +#include "inc/Font.h" +#include "inc/GlyphCache.h" + +using namespace graphite2; + +Font::Font(float ppm, const Face & f, const void * appFontHandle, const gr_font_ops * ops) +: m_appFontHandle(appFontHandle ? appFontHandle : this), + m_face(f), + m_scale(ppm / f.glyphs().unitsPerEm()), + m_hinted(appFontHandle && ops && (ops->glyph_advance_x || ops->glyph_advance_y)) +{ + memset(&m_ops, 0, sizeof m_ops); + if (m_hinted) + memcpy(&m_ops, ops, std::min(sizeof m_ops, ops->size)); + else + m_ops.glyph_advance_x = &Face::default_glyph_advance; + + size_t nGlyphs = f.glyphs().numGlyphs(); + m_advances = gralloc(nGlyphs); + if (m_advances) + { + for (float *advp = m_advances; nGlyphs; --nGlyphs, ++advp) + *advp = INVALID_ADVANCE; + } +} + + +/*virtual*/ Font::~Font() +{ + free(m_advances); +} + + + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/GlyphCache.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/GlyphCache.cpp new file mode 100644 index 00000000000..7f304479281 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/GlyphCache.cpp @@ -0,0 +1,344 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#include + +#include "graphite2/Font.h" + +#include "inc/Main.h" +#include "inc/Face.h" //for the tags +#include "inc/GlyphCache.h" +#include "inc/GlyphFace.h" +#include "inc/Endian.h" + +using namespace graphite2; + +namespace +{ + class glat_iterator : public std::iterator > + { + public: + glat_iterator(const void * glat=0) : _p(reinterpret_cast(glat)), _n(0) {} + + glat_iterator & operator ++ () { ++_v.first; --_n; _p += sizeof(uint16); if (_n == -1) { _p -= 2; _v.first = *_p++; _n = *_p++; } return *this; } + glat_iterator operator ++ (int) { glat_iterator tmp(*this); operator++(); return tmp; } + + bool operator == (const glat_iterator & rhs) { return _p >= rhs._p || _p + _n*sizeof(uint16) > rhs._p; } + bool operator != (const glat_iterator & rhs) { return !operator==(rhs); } + + value_type operator * () const { + if (_n==0) { _v.first = *_p++; _n = *_p++; } + _v.second = be::peek(_p); + return _v; + } + const value_type * operator ->() const { operator * (); return &_v; } + + protected: + mutable const byte * _p; + mutable value_type _v; + mutable int _n; + }; + + class glat2_iterator : public glat_iterator + { + public: + glat2_iterator(const void * glat) : glat_iterator(glat) {} + + glat2_iterator & operator ++ () { ++_v.first; --_n; _p += sizeof(uint16); if (_n == -1) { _p -= sizeof(uint16)*2; _v.first = be::read(_p); _n = be::read(_p); } return *this; } + glat2_iterator operator ++ (int) { glat2_iterator tmp(*this); operator++(); return tmp; } + + value_type operator * () const { + if (_n==0) { _v.first = be::read(_p); _n = be::read(_p); } + _v.second = be::peek(_p); + return _v; + } + const value_type * operator ->() const { operator * (); return &_v; } + }; +} + + +class GlyphCache::Loader +{ +public: + Loader(const Face & face, const bool dumb_font); //return result indicates success. Do not use if failed. + + operator bool () const throw(); + unsigned short int units_per_em() const throw(); + unsigned short int num_glyphs() const throw(); + unsigned short int num_attrs() const throw(); + + const GlyphFace * read_glyph(unsigned short gid, GlyphFace &) const throw(); + + CLASS_NEW_DELETE; +private: + Face::Table _head, + _hhea, + _hmtx, + _glyf, + _loca, + m_pGlat, + m_pGloc; + + bool _long_fmt; + unsigned short _num_glyphs_graphics, //i.e. boundary box and advance + _num_glyphs_attributes, + _num_attrs; // number of glyph attributes per glyph +}; + + + +GlyphCache::GlyphCache(const Face & face, const uint32 face_options) +: _glyph_loader(new Loader(face, bool(face_options & gr_face_dumbRendering))), + _glyphs(_glyph_loader && *_glyph_loader ? grzeroalloc(_glyph_loader->num_glyphs()) : 0), + _num_glyphs(_glyphs ? _glyph_loader->num_glyphs() : 0), + _num_attrs(_glyphs ? _glyph_loader->num_attrs() : 0), + _upem(_glyphs ? _glyph_loader->units_per_em() : 0) +{ + if ((face_options & gr_face_preloadGlyphs) && _glyph_loader && _glyphs) + { + GlyphFace * const glyphs = new GlyphFace [_num_glyphs]; + if (!glyphs) + return; + + // The 0 glyph is definately required. + _glyphs[0] = _glyph_loader->read_glyph(0, glyphs[0]); + + // glyphs[0] has the same address as the glyphs array just allocated, + // thus assigning the &glyphs[0] to _glyphs[0] means _glyphs[0] points + // to the entire array. + const GlyphFace * loaded = _glyphs[0]; + for (uint16 gid = 1; loaded && gid != _num_glyphs; ++gid) + _glyphs[gid] = loaded = _glyph_loader->read_glyph(gid, glyphs[gid]); + + if (!loaded) + { + _glyphs[0] = 0; + delete [] glyphs; + } + delete _glyph_loader; + _glyph_loader = 0; + } + + if (_glyphs && glyph(0) == 0) + { + free(_glyphs); + _glyphs = 0; + _num_glyphs = _num_attrs = _upem = 0; + } +} + + +GlyphCache::~GlyphCache() +{ + if (_glyphs) + { + if (_glyph_loader) + { + const GlyphFace * * g = _glyphs; + for(unsigned short n = _num_glyphs; n; --n, ++g) + delete *g; + } + else + delete [] _glyphs[0]; + free(_glyphs); + } + delete _glyph_loader; +} + +const GlyphFace *GlyphCache::glyph(unsigned short glyphid) const //result may be changed by subsequent call with a different glyphid +{ + const GlyphFace * & p = _glyphs[glyphid]; + if (p == 0 && _glyph_loader) + { + GlyphFace * g = new GlyphFace(); + if (g) p = _glyph_loader->read_glyph(glyphid, *g); + } + return p; +} + +uint16 GlyphCache::glyphAttr(uint16 gid, uint16 gattr) const +{ + const GlyphFace * p = glyphSafe(gid); + + return p && gattr < _num_attrs ? p->attrs()[gattr] : 0; +} + + + +GlyphCache::Loader::Loader(const Face & face, const bool dumb_font) +: _head(face, Tag::head), + _hhea(face, Tag::hhea), + _hmtx(face, Tag::hmtx), + _glyf(face, Tag::glyf), + _loca(face, Tag::loca), + _long_fmt(false), + _num_glyphs_graphics(0), + _num_glyphs_attributes(0), + _num_attrs(0) +{ + if (!operator bool()) + return; + + const Face::Table maxp = Face::Table(face, Tag::maxp); + if (!maxp) { _head = Face::Table(); return; } + + _num_glyphs_graphics = TtfUtil::GlyphCount(maxp); + // This will fail if the number of glyphs is wildly out of range. + if (TtfUtil::LocaLookup(_num_glyphs_graphics-1, _loca, _loca.size(), _head) == size_t(-1)) + { + _head = Face::Table(); + return; + } + + if (!dumb_font) + { + if ((m_pGlat = Face::Table(face, Tag::Glat)) == NULL + || (m_pGloc = Face::Table(face, Tag::Gloc)) == NULL + || m_pGloc.size() < 6) + { + _head = Face::Table(); + return; + } + const byte * p = m_pGloc; + const int version = be::read(p); + const uint16 flags = be::read(p); + _num_attrs = be::read(p); + // We can accurately calculate the number of attributed glyphs by + // subtracting the length of the attribids array (numAttribs long if present) + // and dividing by either 2 or 4 depending on shor or lonf format + _long_fmt = flags & 1; + _num_glyphs_attributes = (m_pGloc.size() + - (p - m_pGloc) + - sizeof(uint16)*(flags & 0x2 ? _num_attrs : 0)) + / (_long_fmt ? sizeof(uint32) : sizeof(uint16)) - 1; + + if (version != 0x00010000 + || _num_attrs == 0 || _num_attrs > 0x1000 // is this hard limit appropriate? + || _num_glyphs_graphics > _num_glyphs_attributes) + { + _head = Face::Table(); + return; + } + } +} + +inline +GlyphCache::Loader::operator bool () const throw() +{ + return _head && _hhea && _hmtx && _glyf && _loca; +} + +inline +unsigned short int GlyphCache::Loader::units_per_em() const throw() +{ + return _head ? TtfUtil::DesignUnits(_head) : 0; +} + +inline +unsigned short int GlyphCache::Loader::num_glyphs() const throw() +{ + return std::max(_num_glyphs_graphics, _num_glyphs_attributes); +} + +inline +unsigned short int GlyphCache::Loader::num_attrs() const throw() +{ + return _num_attrs; +} + +const GlyphFace * GlyphCache::Loader::read_glyph(unsigned short glyphid, GlyphFace & glyph) const throw() +{ + Rect bbox; + Position advance; + + if (glyphid < _num_glyphs_graphics) + { + int nLsb, xMin, yMin, xMax, yMax; + unsigned int nAdvWid; + size_t locidx = TtfUtil::LocaLookup(glyphid, _loca, _loca.size(), _head); + void *pGlyph = TtfUtil::GlyfLookup(_glyf, locidx, _glyf.size()); + if (TtfUtil::HorMetrics(glyphid, _hmtx, _hmtx.size(), _hhea, nLsb, nAdvWid)) + advance = Position(static_cast(nAdvWid), 0); + + if (pGlyph && TtfUtil::GlyfBox(pGlyph, xMin, yMin, xMax, yMax)) + bbox = Rect(Position(static_cast(xMin), static_cast(yMin)), + Position(static_cast(xMax), static_cast(yMax))); + } + + if (glyphid < _num_glyphs_attributes) + { + const byte * gloc = m_pGloc; + size_t glocs = 0, gloce = 0; + + be::skip(gloc); + be::skip(gloc,2); + if (_long_fmt) + { + be::skip(gloc, glyphid); + glocs = be::read(gloc); + gloce = be::peek(gloc); + } + else + { + be::skip(gloc, glyphid); + glocs = be::read(gloc); + gloce = be::peek(gloc); + } + + if (glocs >= m_pGlat.size() && gloce > m_pGlat.size()) + return 0; + + const uint32 glat_version = be::peek(m_pGlat); + if (glat_version < 0x00020000) + { + if (gloce - glocs < 2*sizeof(byte)+sizeof(uint16) + || gloce - glocs > _num_attrs*(2*sizeof(byte)+sizeof(uint16))) + { + return 0; + } + + new (&glyph) GlyphFace(bbox, advance, glat_iterator(m_pGlat + glocs), glat_iterator(m_pGlat + gloce)); + } + else + { + if (gloce - glocs < 3*sizeof(uint16) + || gloce - glocs > _num_attrs*3*sizeof(uint16)) + { + return 0; + } + + new (&glyph) GlyphFace(bbox, advance, glat2_iterator(m_pGlat + glocs), glat2_iterator(m_pGlat + gloce)); + } + + if (glyph.attrs().size() > _num_attrs) + { + glyph.~GlyphFace(); + return 0; + } + } + + return &glyph; +} diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/GlyphFace.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/GlyphFace.cpp new file mode 100644 index 00000000000..9fc11b2157e --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/GlyphFace.cpp @@ -0,0 +1,48 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#include "inc/GlyphFace.h" + + +using namespace graphite2; + +uint16 GlyphFace::getMetric(uint8 metric) const +{ + switch (metrics(metric)) + { + case kgmetLsb : return static_cast(m_bbox.bl.x); + case kgmetRsb : return static_cast(m_advance.x - m_bbox.tr.x); + case kgmetBbTop : return static_cast(m_bbox.tr.y); + case kgmetBbBottom : return static_cast(m_bbox.bl.y); + case kgmetBbLeft : return static_cast(m_bbox.bl.x); + case kgmetBbRight : return static_cast(m_bbox.tr.x); + case kgmetBbHeight : return static_cast(m_bbox.tr.y - m_bbox.bl.y); + case kgmetBbWidth : return static_cast(m_bbox.tr.x - m_bbox.bl.x); + case kgmetAdvWidth : return static_cast(m_advance.x); + case kgmetAdvHeight : return static_cast(m_advance.y); + default : return 0; + } +} diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/Justifier.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/Justifier.cpp new file mode 100644 index 00000000000..fc667dca1ab --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/Justifier.cpp @@ -0,0 +1,267 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ + +#include "inc/Segment.h" +#include "graphite2/Font.h" +#include "inc/debug.h" +#include "inc/CharInfo.h" +#include "inc/Slot.h" +#include "inc/Main.h" +#include + +using namespace graphite2; + +class JustifyTotal { +public: + JustifyTotal() : m_numGlyphs(0), m_tStretch(0), m_tShrink(0), m_tStep(0), m_tWeight(0) {} + void accumulate(Slot *s, Segment *seg, int level); + int weight() const { return m_tWeight; } + + CLASS_NEW_DELETE + +private: + int m_numGlyphs; + int m_tStretch; + int m_tShrink; + int m_tStep; + int m_tWeight; +}; + +void JustifyTotal::accumulate(Slot *s, Segment *seg, int level) +{ + ++m_numGlyphs; + m_tStretch += s->getJustify(seg, level, 0); + m_tShrink += s->getJustify(seg, level, 1); + m_tStep += s->getJustify(seg, level, 2); + m_tWeight += s->getJustify(seg, level, 3); +} + +float Segment::justify(Slot *pSlot, const Font *font, float width, GR_MAYBE_UNUSED justFlags flags, Slot *pFirst, Slot *pLast) +{ + Slot *s, *end; + float currWidth = 0.0; + const float scale = font ? font->scale() : 1.0f; + Position res; + + if (width < 0 && !(silf()->flags())) + return width; + + if (!pFirst) pFirst = pSlot; + while (!pFirst->isBase()) pFirst = pFirst->attachedTo(); + if (!pLast) pLast = last(); + while (!pLast->isBase()) pLast = pLast->attachedTo(); + const float base = pFirst->origin().x / scale; + width = width / scale; + if ((flags & gr_justEndInline) == 0) + { + do { + Rect bbox = theGlyphBBoxTemporary(pLast->glyph()); + if (bbox.bl.x != 0. || bbox.bl.y != 0. || bbox.tr.x != 0. || bbox.tr.y == 0.) + break; + pLast = pLast->prev(); + } while (pLast != pFirst); + } + + end = pLast->nextSibling(); + pFirst = pFirst->nextSibling(); + + int icount = 0; + int numLevels = silf()->numJustLevels(); + if (!numLevels) + { + for (s = pSlot; s != end; s = s->next()) + { + CharInfo *c = charinfo(s->before()); + if (isWhitespace(c->unicodeChar())) + { + s->setJustify(this, 0, 3, 1); + s->setJustify(this, 0, 2, 1); + s->setJustify(this, 0, 0, -1); + ++icount; + } + } + if (!icount) + { + for (s = pSlot; s != end; s = s->nextSibling()) + { + s->setJustify(this, 0, 3, 1); + s->setJustify(this, 0, 2, 1); + s->setJustify(this, 0, 0, -1); + } + } + ++numLevels; + } + + JustifyTotal *stats = new JustifyTotal[numLevels]; + for (s = pFirst; s != end; s = s->nextSibling()) + { + float w = s->origin().x / scale + s->advance() - base; + if (w > currWidth) currWidth = w; + for (int j = 0; j < numLevels; ++j) + stats[j].accumulate(s, this, j); + s->just(0); + } + + for (int i = (width < 0.0) ? -1 : numLevels - 1; i >= 0; --i) + { + float diff; + float error = 0.; + float diffpw; + int tWeight = stats[i].weight(); + + do { + error = 0.; + diff = width - currWidth; + diffpw = diff / tWeight; + tWeight = 0; + for (s = pFirst; s != end; s = s->nextSibling()) // don't include final glyph + { + int w = s->getJustify(this, i, 3); + float pref = diffpw * w + error; + int step = s->getJustify(this, i, 2); + if (!step) step = 1; // handle lazy font developers + if (pref > 0) + { + float max = uint16(s->getJustify(this, i, 0)); + if (i == 0) max -= s->just(); + if (pref > max) pref = max; + else tWeight += w; + } + else + { + float max = uint16(s->getJustify(this, i, 1)); + if (i == 0) max += s->just(); + if (-pref > max) pref = -max; + else tWeight += w; + } + int actual = step ? int(pref / step) * step : int(pref); + + if (actual) + { + error += diffpw * w - actual; + if (i == 0) + s->just(s->just() + actual); + else + s->setJustify(this, i, 4, actual); + } + } + currWidth += diff - error; + } while (i == 0 && int(abs(error)) > 0 && tWeight); + } + + Slot *oldFirst = m_first; + Slot *oldLast = m_last; + if (silf()->flags() & 1) + { + m_first = pSlot = addLineEnd(pSlot); + m_last = pLast = addLineEnd(end); + } + else + { + m_first = pSlot; + m_last = pLast; + } + + // run justification passes here +#if !defined GRAPHITE2_NTRACING + json * const dbgout = m_face->logger(); + if (dbgout) + *dbgout << json::object + << "justifies" << objectid(this) + << "passes" << json::array; +#endif + + if (m_silf->justificationPass() != m_silf->positionPass() && (width >= 0. || (silf()->flags() & 1))) + m_silf->runGraphite(this, m_silf->justificationPass(), m_silf->positionPass()); + +#if !defined GRAPHITE2_NTRACING + if (dbgout) + { + *dbgout << json::item << json::close; // Close up the passes array + positionSlots(NULL, pSlot, pLast); + Slot *lEnd = pLast->nextSibling(); + *dbgout << "output" << json::array; + for(Slot * t = pSlot; t != lEnd; t = t->next()) + *dbgout << dslot(this, t); + *dbgout << json::close << json::close; + } +#endif + + res = positionSlots(font, pSlot, pLast); + + if (silf()->flags() & 1) + { + delLineEnd(m_first); + delLineEnd(m_last); + } + m_first = oldFirst; + m_last = oldLast; + return res.x; +} + +Slot *Segment::addLineEnd(Slot *nSlot) +{ + Slot *eSlot = newSlot(); + const uint16 gid = silf()->endLineGlyphid(); + const GlyphFace * theGlyph = m_face->glyphs().glyphSafe(gid); + eSlot->setGlyph(this, gid, theGlyph); + if (nSlot) + { + eSlot->next(nSlot); + eSlot->prev(nSlot->prev()); + nSlot->prev(eSlot); + eSlot->before(nSlot->before()); + if (eSlot->prev()) + eSlot->after(eSlot->prev()->after()); + else + eSlot->after(nSlot->before()); + } + else + { + nSlot = m_last; + eSlot->prev(nSlot); + nSlot->next(eSlot); + eSlot->after(eSlot->prev()->after()); + eSlot->before(nSlot->after()); + } + return eSlot; +} + +void Segment::delLineEnd(Slot *s) +{ + Slot *nSlot = s->next(); + if (nSlot) + { + nSlot->prev(s->prev()); + if (s->prev()) + s->prev()->next(nSlot); + } + else + s->prev()->next(NULL); + freeSlot(s); +} + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/NameTable.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/NameTable.cpp new file mode 100644 index 00000000000..d29b92bc40e --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/NameTable.cpp @@ -0,0 +1,222 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#include "inc/Main.h" +#include "inc/Endian.h" + +#include "inc/NameTable.h" +#include "inc/UtfCodec.h" + +using namespace graphite2; + +NameTable::NameTable(const void* data, size_t length, uint16 platformId, uint16 encodingID) + : m_platformId(0), m_encodingId(0), m_languageCount(0), + m_platformOffset(0), m_platformLastRecord(0), m_nameDataLength(0), + m_table(0), m_nameData(NULL) +{ + void *pdata = malloc(length); + if (!pdata) return; + memcpy(pdata, data, length); + m_table = reinterpret_cast(pdata); + + if ((length > sizeof(TtfUtil::Sfnt::FontNames)) && + (length > sizeof(TtfUtil::Sfnt::FontNames) + + sizeof(TtfUtil::Sfnt::NameRecord) * ( be::swap(m_table->count) - 1))) + { + uint16 offset = be::swap(m_table->string_offset); + m_nameData = reinterpret_cast(pdata) + offset; + setPlatformEncoding(platformId, encodingID); + m_nameDataLength = length - offset; + } + else + { + free(const_cast(m_table)); + m_table = NULL; + } +} + +uint16 NameTable::setPlatformEncoding(uint16 platformId, uint16 encodingID) +{ + if (!m_nameData) return 0; + uint16 i = 0; + uint16 count = be::swap(m_table->count); + for (; i < count; i++) + { + if (be::swap(m_table->name_record[i].platform_id) == platformId && + be::swap(m_table->name_record[i].platform_specific_id) == encodingID) + { + m_platformOffset = i; + break; + } + } + while ((++i < count) && + (be::swap(m_table->name_record[i].platform_id) == platformId) && + (be::swap(m_table->name_record[i].platform_specific_id) == encodingID)) + { + m_platformLastRecord = i; + } + m_encodingId = encodingID; + m_platformId = platformId; + return 0; +} + +void* NameTable::getName(uint16& languageId, uint16 nameId, gr_encform enc, uint32& length) +{ + uint16 anyLang = 0; + uint16 enUSLang = 0; + uint16 bestLang = 0; + if (!m_table) + { + languageId = 0; + length = 0; + return NULL; + } + for (uint16 i = m_platformOffset; i <= m_platformLastRecord; i++) + { + if (be::swap(m_table->name_record[i].name_id) == nameId) + { + uint16 langId = be::swap(m_table->name_record[i].language_id); + if (langId == languageId) + { + bestLang = i; + break; + } + // MS language tags have the language in the lower byte, region in the higher + else if ((langId & 0xFF) == (languageId & 0xFF)) + { + bestLang = i; + } + else if (langId == 0x409) + { + enUSLang = i; + } + else + { + anyLang = i; + } + } + } + if (!bestLang) + { + if (enUSLang) bestLang = enUSLang; + else + { + bestLang = anyLang; + if (!anyLang) + { + languageId = 0; + length = 0; + return NULL; + } + } + } + const TtfUtil::Sfnt::NameRecord & nameRecord = m_table->name_record[bestLang]; + languageId = be::swap(nameRecord.language_id); + uint16 utf16Length = be::swap(nameRecord.length); + uint16 offset = be::swap(nameRecord.offset); + if(offset + utf16Length > m_nameDataLength) + { + languageId = 0; + length = 0; + return NULL; + } + utf16Length >>= 1; // in utf16 units + utf16::codeunit_t * utf16Name = gralloc(utf16Length); + const uint8* pName = m_nameData + offset; + for (size_t i = 0; i < utf16Length; i++) + { + utf16Name[i] = be::read(pName); + } + switch (enc) + { + case gr_utf8: + { + utf8::codeunit_t* uniBuffer = gralloc(3 * utf16Length + 1); + utf8::iterator d = uniBuffer; + for (utf16::const_iterator s = utf16Name, e = utf16Name + utf16Length; s != e; ++s, ++d) + *d = *s; + length = d - uniBuffer; + uniBuffer[length] = 0; + return uniBuffer; + } + case gr_utf16: + length = utf16Length; + return utf16Name; + case gr_utf32: + { + utf32::codeunit_t * uniBuffer = gralloc(utf16Length + 1); + utf32::iterator d = uniBuffer; + for (utf16::const_iterator s = utf16Name, e = utf16Name + utf16Length; s != e; ++s, ++d) + *d = *s; + length = d - uniBuffer; + uniBuffer[length] = 0; + return uniBuffer; + } + } + length = 0; + return NULL; +} + +uint16 NameTable::getLanguageId(const char * bcp47Locale) +{ + size_t localeLength = strlen(bcp47Locale); + uint16 localeId = m_locale2Lang.getMsId(bcp47Locale); + if (m_table && (be::swap(m_table->format) == 1)) + { + const uint8 * pLangEntries = reinterpret_cast(m_table) + + sizeof(TtfUtil::Sfnt::FontNames) + + sizeof(TtfUtil::Sfnt::NameRecord) * ( be::swap(m_table->count) - 1); + uint16 numLangEntries = be::read(pLangEntries); + const TtfUtil::Sfnt::LangTagRecord * langTag = + reinterpret_cast(pLangEntries); + if (pLangEntries + numLangEntries * sizeof(TtfUtil::Sfnt::LangTagRecord) <= m_nameData) + { + for (uint16 i = 0; i < numLangEntries; i++) + { + uint16 offset = be::swap(langTag[i].offset); + uint16 length = be::swap(langTag[i].length); + if ((offset + length <= m_nameDataLength) && (length == 2 * localeLength)) + { + const uint8* pName = m_nameData + offset; + bool match = true; + for (size_t j = 0; j < localeLength; j++) + { + uint16 code = be::read(pName); + if ((code > 0x7F) || (code != bcp47Locale[j])) + { + match = false; + break; + } + } + if (match) + return 0x8000 + i; + } + } + } + } + return localeId; +} + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/Pass.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/Pass.cpp new file mode 100644 index 00000000000..51fabc8e8b0 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/Pass.cpp @@ -0,0 +1,586 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#include "inc/Main.h" +#include "inc/debug.h" +#include "inc/Endian.h" +#include "inc/Pass.h" +#include +#include +#include +#include "inc/Segment.h" +#include "inc/Code.h" +#include "inc/Rule.h" + +using namespace graphite2; +using vm::Machine; +typedef Machine::Code Code; + + +Pass::Pass() +: m_silf(0), + m_cols(0), + m_rules(0), + m_ruleMap(0), + m_startStates(0), + m_sTable(0), + m_states(0), + m_flags(0), + m_iMaxLoop(0), + m_numGlyphs(0), + m_numRules(0), + m_sRows(0), + m_sTransition(0), + m_sSuccess(0), + m_sColumns(0), + m_minPreCtxt(0), + m_maxPreCtxt(0) +{ +} + +Pass::~Pass() +{ + free(m_cols); + free(m_startStates); + free(m_sTable); + free(m_states); + free(m_ruleMap); + + delete [] m_rules; +} + +bool Pass::readPass(const byte * const pass_start, size_t pass_length, size_t subtable_base, const Face & face) +{ + const byte * p = pass_start, + * const pass_end = p + pass_length; + size_t numRanges; + + if (pass_length < 40) return false; + // Read in basic values + m_flags = be::read(p); + m_iMaxLoop = be::read(p); + be::skip(p,2); // skip maxContext & maxBackup + m_numRules = be::read(p); + be::skip(p); // fsmOffset - not sure why we would want this + const byte * const pcCode = pass_start + be::read(p) - subtable_base, + * const rcCode = pass_start + be::read(p) - subtable_base, + * const aCode = pass_start + be::read(p) - subtable_base; + be::skip(p); + m_sRows = be::read(p); + m_sTransition = be::read(p); + m_sSuccess = be::read(p); + m_sColumns = be::read(p); + numRanges = be::read(p); + be::skip(p, 3); // skip searchRange, entrySelector & rangeShift. + assert(p - pass_start == 40); + // Perform some sanity checks. + if ( m_sTransition > m_sRows + || m_sSuccess > m_sRows + || m_sSuccess + m_sTransition < m_sRows + || numRanges == 0) + return false; + + if (p + numRanges * 6 - 4 > pass_end) return false; + m_numGlyphs = be::peek(p + numRanges * 6 - 4) + 1; + // Calculate the start of various arrays. + const byte * const ranges = p; + be::skip(p, numRanges*3); + const byte * const o_rule_map = p; + be::skip(p, m_sSuccess + 1); + + // More sanity checks + if (reinterpret_cast(o_rule_map + m_sSuccess*sizeof(uint16)) > pass_end + || p > pass_end) + return false; + const size_t numEntries = be::peek(o_rule_map + m_sSuccess*sizeof(uint16)); + const byte * const rule_map = p; + be::skip(p, numEntries); + + if (p + 2*sizeof(uint8) > pass_end) return false; + m_minPreCtxt = be::read(p); + m_maxPreCtxt = be::read(p); + if (m_minPreCtxt > m_maxPreCtxt) return false; + const byte * const start_states = p; + be::skip(p, m_maxPreCtxt - m_minPreCtxt + 1); + const uint16 * const sort_keys = reinterpret_cast(p); + be::skip(p, m_numRules); + const byte * const precontext = p; + be::skip(p, m_numRules); + be::skip(p); // skip reserved byte + + if (p + sizeof(uint16) > pass_end) return false; + const size_t pass_constraint_len = be::read(p); + const uint16 * const o_constraint = reinterpret_cast(p); + be::skip(p, m_numRules + 1); + const uint16 * const o_actions = reinterpret_cast(p); + be::skip(p, m_numRules + 1); + const byte * const states = p; + be::skip(p, m_sTransition*m_sColumns); + be::skip(p); // skip reserved byte + if (p != pcCode || p >= pass_end) return false; + be::skip(p, pass_constraint_len); + if (p != rcCode || p >= pass_end + || size_t(rcCode - pcCode) != pass_constraint_len) return false; + be::skip(p, be::peek(o_constraint + m_numRules)); + if (p != aCode || p >= pass_end) return false; + be::skip(p, be::peek(o_actions + m_numRules)); + + // We should be at the end or within the pass + if (p > pass_end) return false; + + // Load the pass constraint if there is one. + if (pass_constraint_len) + { + m_cPConstraint = vm::Machine::Code(true, pcCode, pcCode + pass_constraint_len, + precontext[0], be::peek(sort_keys), *m_silf, face); + if (!m_cPConstraint) return false; + } + if (!readRanges(ranges, numRanges)) return false; + if (!readRules(rule_map, numEntries, precontext, sort_keys, + o_constraint, rcCode, o_actions, aCode, face)) return false; + return readStates(start_states, states, o_rule_map); +} + + +bool Pass::readRules(const byte * rule_map, const size_t num_entries, + const byte *precontext, const uint16 * sort_key, + const uint16 * o_constraint, const byte *rc_data, + const uint16 * o_action, const byte * ac_data, + const Face & face) +{ + const byte * const ac_data_end = ac_data + be::peek(o_action + m_numRules); + const byte * const rc_data_end = rc_data + be::peek(o_constraint + m_numRules); + + if (!(m_rules = new Rule [m_numRules])) return false; + precontext += m_numRules; + sort_key += m_numRules; + o_constraint += m_numRules; + o_action += m_numRules; + + // Load rules. + const byte * ac_begin = 0, * rc_begin = 0, + * ac_end = ac_data + be::peek(o_action), + * rc_end = rc_data + be::peek(o_constraint); + Rule * r = m_rules + m_numRules - 1; + for (size_t n = m_numRules; n; --n, --r, ac_end = ac_begin, rc_end = rc_begin) + { + r->preContext = *--precontext; + r->sort = be::peek(--sort_key); +#ifndef NDEBUG + r->rule_idx = n - 1; +#endif + if (r->sort > 63 || r->preContext >= r->sort || r->preContext > m_maxPreCtxt || r->preContext < m_minPreCtxt) + return false; + ac_begin = ac_data + be::peek(--o_action); + rc_begin = *--o_constraint ? rc_data + be::peek(o_constraint) : rc_end; + + if (ac_begin > ac_end || ac_begin > ac_data_end || ac_end > ac_data_end + || rc_begin > rc_end || rc_begin > rc_data_end || rc_end > rc_data_end) + return false; + r->action = new vm::Machine::Code(false, ac_begin, ac_end, r->preContext, r->sort, *m_silf, face); + r->constraint = new vm::Machine::Code(true, rc_begin, rc_end, r->preContext, r->sort, *m_silf, face); + + if (!r->action || !r->constraint + || r->action->status() != Code::loaded + || r->constraint->status() != Code::loaded + || !r->constraint->immutable()) + return false; + } + + // Load the rule entries map + RuleEntry * re = m_ruleMap = gralloc(num_entries); + for (size_t n = num_entries; n; --n, ++re) + { + const ptrdiff_t rn = be::read(rule_map); + if (rn >= m_numRules) return false; + re->rule = m_rules + rn; + } + + return true; +} + +static int cmpRuleEntry(const void *a, const void *b) { return (*(RuleEntry *)a < *(RuleEntry *)b ? -1 : + (*(RuleEntry *)b < *(RuleEntry *)a ? 1 : 0)); } + +bool Pass::readStates(const byte * starts, const byte *states, const byte * o_rule_map) +{ + m_startStates = gralloc(m_maxPreCtxt - m_minPreCtxt + 1); + m_states = gralloc(m_sRows); + m_sTable = gralloc(m_sTransition * m_sColumns); + + if (!m_startStates || !m_states || !m_sTable) return false; + // load start states + for (State * * s = m_startStates, + * * const s_end = s + m_maxPreCtxt - m_minPreCtxt + 1; s != s_end; ++s) + { + *s = m_states + be::read(starts); + if (*s < m_states || *s >= m_states + m_sRows) return false; // true; + } + + // load state transition table. + for (State * * t = m_sTable, + * * const t_end = t + m_sTransition*m_sColumns; t != t_end; ++t) + { + *t = m_states + be::read(states); + if (*t < m_states || *t >= m_states + m_sRows) return false; + } + + State * s = m_states, + * const transitions_end = m_states + m_sTransition, + * const success_begin = m_states + m_sRows - m_sSuccess; + const RuleEntry * rule_map_end = m_ruleMap + be::peek(o_rule_map + m_sSuccess*sizeof(uint16)); + for (size_t n = m_sRows; n; --n, ++s) + { + s->transitions = s < transitions_end ? m_sTable + (s-m_states)*m_sColumns : 0; + RuleEntry * const begin = s < success_begin ? 0 : m_ruleMap + be::read(o_rule_map), + * const end = s < success_begin ? 0 : m_ruleMap + be::peek(o_rule_map); + + if (begin >= rule_map_end || end > rule_map_end || begin > end) + return false; + s->rules = begin; + s->rules_end = (end - begin <= FiniteStateMachine::MAX_RULES)? end : + begin + FiniteStateMachine::MAX_RULES; + qsort(begin, end - begin, sizeof(RuleEntry), &cmpRuleEntry); + } + + return true; +} + +bool Pass::readRanges(const byte * ranges, size_t num_ranges) +{ + m_cols = gralloc(m_numGlyphs); + memset(m_cols, 0xFF, m_numGlyphs * sizeof(uint16)); + for (size_t n = num_ranges; n; --n) + { + const uint16 first = be::read(ranges), + last = be::read(ranges), + col = be::read(ranges); + uint16 *p; + + if (first > last || last >= m_numGlyphs || col >= m_sColumns) + return false; + + for (p = m_cols + first; p <= m_cols + last; ) + *p++ = col; + } + return true; +} + + +void Pass::runGraphite(Machine & m, FiniteStateMachine & fsm) const +{ + Slot *s = m.slotMap().segment.first(); + if (!s || !testPassConstraint(m)) return; + Slot *currHigh = s->next(); + +#if !defined GRAPHITE2_NTRACING + if (fsm.dbgout) *fsm.dbgout << "rules" << json::array; + json::closer rules_array_closer(fsm.dbgout); +#endif + + m.slotMap().highwater(currHigh); + int lc = m_iMaxLoop; + do + { + findNDoRule(s, m, fsm); + if (s && (m.slotMap().highpassed() || s == m.slotMap().highwater() || --lc == 0)) { + if (!lc) + { +// if (dbgout) *dbgout << json::item << json::flat << rule_event(-1, s, 1); + s = m.slotMap().highwater(); + } + lc = m_iMaxLoop; + if (s) + m.slotMap().highwater(s->next()); + } + } while (s); +} + +inline uint16 Pass::glyphToCol(const uint16 gid) const +{ + return gid < m_numGlyphs ? m_cols[gid] : 0xffffU; +} + +bool Pass::runFSM(FiniteStateMachine& fsm, Slot * slot) const +{ + fsm.reset(slot, m_maxPreCtxt); + if (fsm.slots.context() < m_minPreCtxt) + return false; + + const State * state = m_startStates[m_maxPreCtxt - fsm.slots.context()]; + do + { + fsm.slots.pushSlot(slot); + if (fsm.slots.size() >= SlotMap::MAX_SLOTS) return false; + const uint16 col = glyphToCol(slot->gid()); + if (col == 0xffffU || !state->is_transition()) return true; + + state = state->transitions[col]; + if (state->is_success()) + fsm.rules.accumulate_rules(*state); + + slot = slot->next(); + } while (state != m_states && slot); + + fsm.slots.pushSlot(slot); + return true; +} + +#if !defined GRAPHITE2_NTRACING + +inline +Slot * input_slot(const SlotMap & slots, const int n) +{ + Slot * s = slots[slots.context() + n]; + if (!s->isCopied()) return s; + + return s->prev() ? s->prev()->next() : (s->next() ? s->next()->prev() : slots.segment.last()); +} + +inline +Slot * output_slot(const SlotMap & slots, const int n) +{ + Slot * s = slots[slots.context() + n - 1]; + return s ? s->next() : slots.segment.first(); +} + +#endif //!defined GRAPHITE2_NTRACING + +void Pass::findNDoRule(Slot * & slot, Machine &m, FiniteStateMachine & fsm) const +{ + assert(slot); + + if (runFSM(fsm, slot)) + { + // Search for the first rule which passes the constraint + const RuleEntry * r = fsm.rules.begin(), + * const re = fsm.rules.end(); + while (r != re && !testConstraint(*r->rule, m)) ++r; + +#if !defined GRAPHITE2_NTRACING + if (fsm.dbgout) + { + if (fsm.rules.size() != 0) + { + *fsm.dbgout << json::item << json::object; + dumpRuleEventConsidered(fsm, *r); + if (r != re) + { + const int adv = doAction(r->rule->action, slot, m); + dumpRuleEventOutput(fsm, *r->rule, slot); + if (r->rule->action->deletes()) fsm.slots.collectGarbage(); + adjustSlot(adv, slot, fsm.slots); + *fsm.dbgout << "cursor" << objectid(dslot(&fsm.slots.segment, slot)) + << json::close; // Close RuelEvent object + + return; + } + else + { + *fsm.dbgout << json::close // close "considered" array + << "output" << json::null + << "cursor" << objectid(dslot(&fsm.slots.segment, slot->next())) + << json::close; + } + } + } + else +#endif + { + if (r != re) + { + const int adv = doAction(r->rule->action, slot, m); + if (r->rule->action->deletes()) fsm.slots.collectGarbage(); + adjustSlot(adv, slot, fsm.slots); + return; + } + } + } + + slot = slot->next(); +} + +#if !defined GRAPHITE2_NTRACING + +void Pass::dumpRuleEventConsidered(const FiniteStateMachine & fsm, const RuleEntry & re) const +{ + *fsm.dbgout << "considered" << json::array; + for (const RuleEntry *r = fsm.rules.begin(); r != &re; ++r) + { + if (r->rule->preContext > fsm.slots.context()) continue; + *fsm.dbgout << json::flat << json::object + << "id" << r->rule - m_rules + << "failed" << true + << "input" << json::flat << json::object + << "start" << objectid(dslot(&fsm.slots.segment, input_slot(fsm.slots, -r->rule->preContext))) + << "length" << r->rule->sort + << json::close // close "input" + << json::close; // close Rule object + } +} + + +void Pass::dumpRuleEventOutput(const FiniteStateMachine & fsm, const Rule & r, Slot * const last_slot) const +{ + *fsm.dbgout << json::item << json::flat << json::object + << "id" << &r - m_rules + << "failed" << false + << "input" << json::flat << json::object + << "start" << objectid(dslot(&fsm.slots.segment, input_slot(fsm.slots, 0))) + << "length" << r.sort - r.preContext + << json::close // close "input" + << json::close // close Rule object + << json::close // close considered array + << "output" << json::object + << "range" << json::flat << json::object + << "start" << objectid(dslot(&fsm.slots.segment, input_slot(fsm.slots, 0))) + << "end" << objectid(dslot(&fsm.slots.segment, last_slot)) + << json::close // close "input" + << "slots" << json::array; + const Position rsb_prepos = last_slot ? last_slot->origin() : fsm.slots.segment.advance(); + fsm.slots.segment.positionSlots(0); + + for(Slot * slot = output_slot(fsm.slots, 0); slot != last_slot; slot = slot->next()) + *fsm.dbgout << dslot(&fsm.slots.segment, slot); + *fsm.dbgout << json::close // close "slots" + << "postshift" << (last_slot ? last_slot->origin() : fsm.slots.segment.advance()) - rsb_prepos + << json::close; // close "output" object + +} + +#endif + + +inline +bool Pass::testPassConstraint(Machine & m) const +{ + if (!m_cPConstraint) return true; + + assert(m_cPConstraint.constraint()); + + m.slotMap().reset(*m.slotMap().segment.first(), 0); + m.slotMap().pushSlot(m.slotMap().segment.first()); + vm::slotref * map = m.slotMap().begin(); + const uint32 ret = m_cPConstraint.run(m, map); + +#if !defined GRAPHITE2_NTRACING + json * const dbgout = m.slotMap().segment.getFace()->logger(); + if (dbgout) + *dbgout << "constraint" << (ret && m.status() == Machine::finished); +#endif + + return ret && m.status() == Machine::finished; +} + + +bool Pass::testConstraint(const Rule & r, Machine & m) const +{ + const uint16 curr_context = m.slotMap().context(); + if (unsigned(r.sort - r.preContext) > m.slotMap().size() - curr_context + || curr_context - r.preContext < 0) return false; + if (!*r.constraint) return true; + assert(r.constraint->constraint()); + + vm::slotref * map = m.slotMap().begin() + curr_context - r.preContext; + for (int n = r.sort; n && map; --n, ++map) + { + if (!*map) continue; + const int32 ret = r.constraint->run(m, map); + if (!ret || m.status() != Machine::finished) + return false; + } + + return true; +} + + +void SlotMap::collectGarbage() +{ + for(Slot **s = begin(), *const *const se = end() - 1; s != se; ++s) { + Slot *& slot = *s; + if(slot->isDeleted() || slot->isCopied()) + segment.freeSlot(slot); + } +} + + + +int Pass::doAction(const Code *codeptr, Slot * & slot_out, vm::Machine & m) const +{ + assert(codeptr); + if (!*codeptr) return 0; + SlotMap & smap = m.slotMap(); + vm::slotref * map = &smap[smap.context()]; + smap.highpassed(false); + + int32 ret = codeptr->run(m, map); + + if (m.status() != Machine::finished) + { + slot_out = NULL; + smap.highwater(0); + return 0; + } + + slot_out = *map; + return ret; +} + + +void Pass::adjustSlot(int delta, Slot * & slot_out, SlotMap & smap) const +{ + if (delta < 0) + { + if (!slot_out) + { + slot_out = smap.segment.last(); + ++delta; + if (smap.highpassed() && !smap.highwater()) + smap.highpassed(false); + } + while (++delta <= 0 && slot_out) + { + if (smap.highpassed() && smap.highwater() == slot_out) + smap.highpassed(false); + slot_out = slot_out->prev(); + } + } + else if (delta > 0) + { + if (!slot_out) + { + slot_out = smap.segment.first(); + --delta; + } + while (--delta >= 0 && slot_out) + { + slot_out = slot_out->next(); + if (slot_out == smap.highwater() && slot_out) + smap.highpassed(true); + } + } +} + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/Rule.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/Rule.cpp new file mode 100644 index 00000000000..afdab495f53 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/Rule.cpp @@ -0,0 +1,31 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ + +#include "inc/Rule.h" +#include "inc/Segment.h" + +using namespace graphite2; diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/SegCache.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/SegCache.cpp new file mode 100644 index 00000000000..446dfbec43f --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/SegCache.cpp @@ -0,0 +1,224 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ + +#include "inc/Main.h" +#include "inc/TtfTypes.h" +#include "inc/TtfUtil.h" +#include "inc/SegCache.h" +#include "inc/SegCacheEntry.h" +#include "inc/SegCacheStore.h" +#include "inc/CmapCache.h" + + +using namespace graphite2; + +#ifndef GRAPHITE2_NSEGCACHE + +SegCache::SegCache(const SegCacheStore * store, const Features & feats) +: m_prefixLength(ePrefixLength), + m_maxCachedSegLength(eMaxSpliceSize), + m_segmentCount(0), + m_features(feats), + m_totalAccessCount(0l), m_totalMisses(0l), + m_purgeFactor(1.0f / (ePurgeFactor * store->maxSegmentCount())) +{ + m_prefixes.raw = grzeroalloc(store->maxCmapGid() + 2); + m_prefixes.range[SEG_CACHE_MIN_INDEX] = SEG_CACHE_UNSET_INDEX; + m_prefixes.range[SEG_CACHE_MAX_INDEX] = SEG_CACHE_UNSET_INDEX; +} + +void SegCache::freeLevel(SegCacheStore * store, SegCachePrefixArray prefixes, size_t level) +{ + for (size_t i = 0; i < store->maxCmapGid(); i++) + { + if (prefixes.array[i].raw) + { + if (level + 1 < ePrefixLength) + freeLevel(store, prefixes.array[i], level + 1); + else + { + SegCachePrefixEntry * prefixEntry = prefixes.prefixEntries[i]; + delete prefixEntry; + } + } + } + free(prefixes.raw); +} + +void SegCache::clear(SegCacheStore * store) +{ + freeLevel(store, m_prefixes, 0); + m_prefixes.raw = NULL; +} + +SegCache::~SegCache() +{ + assert(m_prefixes.raw == NULL); +} + +SegCacheEntry* SegCache::cache(SegCacheStore * store, const uint16* cmapGlyphs, size_t length, Segment * seg, size_t charOffset) +{ + uint16 pos = 0; + if (!length) return NULL; + assert(length < m_maxCachedSegLength); + SegCachePrefixArray pArray = m_prefixes; + while (pos + 1 < m_prefixLength) + { + uint16 gid = (pos < length)? cmapGlyphs[pos] : 0; + if (!pArray.array[gid].raw) + { + pArray.array[gid].raw = grzeroalloc(store->maxCmapGid() + 2); + if (!pArray.array[gid].raw) + return NULL; // malloc failed + if (pArray.range[SEG_CACHE_MIN_INDEX] == SEG_CACHE_UNSET_INDEX) + { + pArray.range[SEG_CACHE_MIN_INDEX] = gid; + pArray.range[SEG_CACHE_MAX_INDEX] = gid; + } + else + { + if (gid < pArray.range[SEG_CACHE_MIN_INDEX]) + pArray.range[SEG_CACHE_MIN_INDEX] = gid; + else if (gid > pArray.range[SEG_CACHE_MAX_INDEX]) + pArray.range[SEG_CACHE_MAX_INDEX] = gid; + } + } + pArray = pArray.array[gid]; + ++pos; + } + uint16 gid = (pos < length)? cmapGlyphs[pos] : 0; + SegCachePrefixEntry * prefixEntry = pArray.prefixEntries[gid]; + if (!prefixEntry) + { + prefixEntry = new SegCachePrefixEntry(); + pArray.prefixEntries[gid] = prefixEntry; + if (pArray.range[SEG_CACHE_MIN_INDEX] == SEG_CACHE_UNSET_INDEX) + { + pArray.range[SEG_CACHE_MIN_INDEX] = gid; + pArray.range[SEG_CACHE_MAX_INDEX] = gid; + } + else + { + if (gid < pArray.range[SEG_CACHE_MIN_INDEX]) + pArray.range[SEG_CACHE_MIN_INDEX] = gid; + else if (gid > pArray.range[SEG_CACHE_MAX_INDEX]) + pArray.range[SEG_CACHE_MAX_INDEX] = gid; + } + } + if (!prefixEntry) return NULL; + // if the cache is full run a purge - this is slow, since it walks the tree + if (m_segmentCount + 1 > store->maxSegmentCount()) + { + purge(store); + assert(m_segmentCount < store->maxSegmentCount()); + } + SegCacheEntry * pEntry = prefixEntry->cache(cmapGlyphs, length, seg, charOffset, m_totalAccessCount); + if (pEntry) ++m_segmentCount; + return pEntry; +} + +void SegCache::purge(SegCacheStore * store) +{ + unsigned long long minAccessCount = static_cast(m_totalAccessCount * m_purgeFactor + 1); + if (minAccessCount < 2) minAccessCount = 2; + unsigned long long oldAccessTime = m_totalAccessCount - store->maxSegmentCount() / eAgeFactor; + purgeLevel(store, m_prefixes, 0, minAccessCount, oldAccessTime); +} + +void SegCache::purgeLevel(SegCacheStore * store, SegCachePrefixArray prefixes, size_t level, + unsigned long long minAccessCount, unsigned long long oldAccessTime) +{ + if (prefixes.range[SEG_CACHE_MIN_INDEX] == SEG_CACHE_UNSET_INDEX) return; + size_t maxGlyphCached = prefixes.range[SEG_CACHE_MAX_INDEX]; + for (size_t i = prefixes.range[SEG_CACHE_MIN_INDEX]; i <= maxGlyphCached; i++) + { + if (prefixes.array[i].raw) + { + if (level + 1 < ePrefixLength) + purgeLevel(store, prefixes.array[i], level + 1, minAccessCount, oldAccessTime); + else + { + SegCachePrefixEntry * prefixEntry = prefixes.prefixEntries[i]; + m_segmentCount -= prefixEntry->purge(minAccessCount, + oldAccessTime, m_totalAccessCount); + } + } + } +} + +uint32 SegCachePrefixEntry::purge(unsigned long long minAccessCount, + unsigned long long oldAccessTime, + unsigned long long currentTime) +{ + // ignore the purge request if another has been done recently + //if (m_lastPurge > oldAccessTime) + // return 0; + + uint32 totalPurged = 0; + // real length is length + 1 in this loop + for (uint16 length = 0; length < eMaxSpliceSize; length++) + { + if (m_entryCounts[length] == 0) + continue; + uint16 purgeCount = 0; + uint16 newIndex = 0; + for (uint16 j = 0; j < m_entryCounts[length]; j++) + { + SegCacheEntry & tempEntry = m_entries[length][j]; + // purge entries with a low access count which haven't been + // accessed recently + if (tempEntry.accessCount() <= minAccessCount && + tempEntry.lastAccess() <= oldAccessTime) + { + tempEntry.clear(); + ++purgeCount; + } + else + { + memcpy(m_entries[length] + newIndex++, m_entries[length] + j, sizeof(SegCacheEntry)); + } + } + if (purgeCount == m_entryCounts[length]) + { + assert(newIndex == 0); + m_entryCounts[length] = 0; + m_entryBSIndex[length] = 0; + free(m_entries[length]); + m_entries[length] = NULL; + } + else if (purgeCount > 0) + { + assert(m_entryCounts[length] == newIndex + purgeCount); + m_entryCounts[length] = newIndex; + } + totalPurged += purgeCount; + } + m_lastPurge = currentTime; + return totalPurged; +} + +#endif diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/SegCacheEntry.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/SegCacheEntry.cpp new file mode 100644 index 00000000000..5e87646185a --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/SegCacheEntry.cpp @@ -0,0 +1,106 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ + +#ifndef GRAPHITE2_NSEGCACHE + +#include "inc/Main.h" +#include "inc/Slot.h" +#include "inc/Segment.h" +#include "inc/SegCache.h" +#include "inc/SegCacheEntry.h" + + +using namespace graphite2; + +SegCacheEntry::SegCacheEntry(const uint16* cmapGlyphs, size_t length, Segment * seg, size_t charOffset, long long cacheTime) + : m_glyphLength(0), m_unicode(gralloc(length)), m_glyph(NULL), + m_attr(NULL), m_justs(NULL), + m_accessCount(0), m_lastAccess(cacheTime) +{ + for (uint16 i = 0; i < length; i++) + { + m_unicode[i] = cmapGlyphs[i]; + } + const size_t glyphCount = seg->slotCount(), + sizeof_sjust = SlotJustify::size_of(seg->silf()->numJustLevels()); + size_t num_justs = 0, + justs_pos = 0; + if (seg->hasJustification()) + { + for (const Slot * s = seg->first(); s; s = s->next()) + { + if (s->m_justs == 0) continue; + ++num_justs; + } + m_justs = gralloc(sizeof_sjust * num_justs); + } + const Slot * slot = seg->first(); + m_glyph = new Slot[glyphCount]; + m_attr = gralloc(glyphCount * seg->numAttrs()); + m_glyphLength = glyphCount; + Slot * slotCopy = m_glyph; + m_glyph->prev(NULL); + + uint16 pos = 0; + while (slot) + { + slotCopy->userAttrs(m_attr + pos * seg->numAttrs()); + slotCopy->m_justs = m_justs ? reinterpret_cast(m_justs + justs_pos++ * sizeof_sjust) : 0; + slotCopy->set(*slot, -static_cast(charOffset), seg->numAttrs(), seg->silf()->numJustLevels()); + slotCopy->index(pos); + if (slot->firstChild()) + slotCopy->m_child = m_glyph + slot->firstChild()->index(); + if (slot->attachedTo()) + slotCopy->attachTo(m_glyph + slot->attachedTo()->index()); + if (slot->nextSibling()) + slotCopy->m_sibling = m_glyph + slot->nextSibling()->index(); + slot = slot->next(); + ++slotCopy; + ++pos; + if (slot) + { + slotCopy->prev(slotCopy-1); + (slotCopy-1)->next(slotCopy); + } + } +} + + +void SegCacheEntry::clear() +{ + free(m_unicode); + free(m_attr); + free(m_justs); + delete [] m_glyph; + m_unicode = NULL; + m_glyph = NULL; + m_glyphLength = 0; + m_attr = NULL; +} + +#endif + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/SegCacheStore.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/SegCacheStore.cpp new file mode 100644 index 00000000000..236fb707ffa --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/SegCacheStore.cpp @@ -0,0 +1,47 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ + +#ifndef GRAPHITE2_NSEGCACHE + +#include "inc/SegCacheStore.h" +#include "inc/Face.h" + + +using namespace graphite2; + +SegCacheStore::SegCacheStore(const Face & face, unsigned int numSilf, size_t maxSegments) +: m_caches(new SilfSegCache[numSilf]), + m_numSilf(numSilf), + m_maxSegments(maxSegments), + m_maxCmapGid(face.glyphs().numGlyphs()), + m_spaceGid(face.cmap()[0x20]), + m_zwspGid(face.cmap()[0x200B]) +{ +} + +#endif + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/Segment.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/Segment.cpp new file mode 100644 index 00000000000..8b54198b023 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/Segment.cpp @@ -0,0 +1,453 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#include "inc/UtfCodec.h" +#include +#include + +#include "inc/bits.h" +#include "inc/Segment.h" +#include "graphite2/Font.h" +#include "inc/CharInfo.h" +#include "inc/debug.h" +#include "inc/Slot.h" +#include "inc/Main.h" +#include "inc/CmapCache.h" +#include "graphite2/Segment.h" + + +using namespace graphite2; + +Segment::Segment(unsigned int numchars, const Face* face, uint32 script, int textDir) +: m_freeSlots(NULL), + m_freeJustifies(NULL), + m_charinfo(new CharInfo[numchars]), + m_face(face), + m_silf(face->chooseSilf(script)), + m_first(NULL), + m_last(NULL), + m_bufSize(numchars + 10), + m_numGlyphs(numchars), + m_numCharinfo(numchars), + m_defaultOriginal(0), + m_dir(textDir) +{ + freeSlot(newSlot()); + m_bufSize = log_binary(numchars)+1; +} + +Segment::~Segment() +{ + for (SlotRope::iterator i = m_slots.begin(); i != m_slots.end(); ++i) + free(*i); + for (AttributeRope::iterator j = m_userAttrs.begin(); j != m_userAttrs.end(); ++j) + free(*j); + delete[] m_charinfo; +} + +#ifndef GRAPHITE2_NSEGCACHE +SegmentScopeState Segment::setScope(Slot * firstSlot, Slot * lastSlot, size_t subLength) +{ + SegmentScopeState state; + state.numGlyphsOutsideScope = m_numGlyphs - subLength; + state.realFirstSlot = m_first; + state.slotBeforeScope = firstSlot->prev(); + state.slotAfterScope = lastSlot->next(); + state.realLastSlot = m_last; + firstSlot->prev(NULL); + lastSlot->next(NULL); + assert(m_defaultOriginal == 0); + m_defaultOriginal = firstSlot->original(); + m_numGlyphs = subLength; + m_first = firstSlot; + m_last = lastSlot; + return state; +} + +void Segment::removeScope(SegmentScopeState & state) +{ + m_numGlyphs = state.numGlyphsOutsideScope + m_numGlyphs; + if (state.slotBeforeScope) + { + state.slotBeforeScope->next(m_first); + m_first->prev(state.slotBeforeScope); + m_first = state.realFirstSlot; + } + if (state.slotAfterScope) + { + state.slotAfterScope->prev(m_last); + m_last->next(state.slotAfterScope); + m_last = state.realLastSlot; + } + m_defaultOriginal = 0; +} + + +void Segment::append(const Segment &other) +{ + Rect bbox = other.m_bbox + m_advance; + + m_slots.insert(m_slots.end(), other.m_slots.begin(), other.m_slots.end()); + CharInfo* pNewCharInfo = new CharInfo[m_numCharinfo+other.m_numCharinfo]; //since CharInfo has no constructor, this doesn't do much + for (unsigned int i=0 ; inext(other.m_first); + other.m_last->prev(m_last); + m_userAttrs.insert(m_userAttrs.end(), other.m_userAttrs.begin(), other.m_userAttrs.end()); + + delete[] m_charinfo; + m_charinfo = pNewCharInfo; + pNewCharInfo += m_numCharinfo ; + for (unsigned int i=0 ; iglyphs().glyphSafe(gid); + if (theGlyph) + { + m_charinfo[id].breakWeight(theGlyph->attrs()[m_silf->aBreak()]); + } + else + { + m_charinfo[id].breakWeight(0); + } + + aSlot->child(NULL); + aSlot->setGlyph(this, gid, theGlyph); + aSlot->originate(id); + aSlot->before(id); + aSlot->after(id); + if (m_last) m_last->next(aSlot); + aSlot->prev(m_last); + m_last = aSlot; + if (!m_first) m_first = aSlot; +} + +Slot *Segment::newSlot() +{ + if (!m_freeSlots) + { + int numUser = m_silf->numUser(); +#if !defined GRAPHITE2_NTRACING + if (m_face->logger()) ++numUser; +#endif + Slot *newSlots = grzeroalloc(m_bufSize); + int16 *newAttrs = grzeroalloc(numUser * m_bufSize); + newSlots[0].userAttrs(newAttrs); + for (size_t i = 1; i < m_bufSize - 1; i++) + { + newSlots[i].next(newSlots + i + 1); + newSlots[i].userAttrs(newAttrs + i * numUser); + } + newSlots[m_bufSize - 1].userAttrs(newAttrs + (m_bufSize - 1) * numUser); + newSlots[m_bufSize - 1].next(NULL); + m_slots.push_back(newSlots); + m_userAttrs.push_back(newAttrs); + m_freeSlots = (m_bufSize > 1)? newSlots + 1 : NULL; + return newSlots; + } + Slot *res = m_freeSlots; + m_freeSlots = m_freeSlots->next(); + res->next(NULL); + return res; +} + +void Segment::freeSlot(Slot *aSlot) +{ + if (m_last == aSlot) m_last = aSlot->prev(); + if (m_first == aSlot) m_first = aSlot->next(); + // reset the slot incase it is reused + ::new (aSlot) Slot; + memset(aSlot->userAttrs(), 0, m_silf->numUser() * sizeof(int16)); + // Update generation counter for debug +#if !defined GRAPHITE2_NTRACING + if (m_face->logger()) + ++aSlot->userAttrs()[m_silf->numUser()]; +#endif + // update next pointer + if (!m_freeSlots) + aSlot->next(NULL); + else + aSlot->next(m_freeSlots); + m_freeSlots = aSlot; +} + +SlotJustify *Segment::newJustify() +{ + if (!m_freeJustifies) + { + const size_t justSize = SlotJustify::size_of(m_silf->numJustLevels()); + byte *justs = grzeroalloc(justSize * m_bufSize); + for (int i = m_bufSize - 2; i >= 0; --i) + { + SlotJustify *p = reinterpret_cast(justs + justSize * i); + SlotJustify *next = reinterpret_cast(justs + justSize * (i + 1)); + p->next = next; + } + m_freeJustifies = (SlotJustify *)justs; + m_justifies.push_back(m_freeJustifies); + } + SlotJustify *res = m_freeJustifies; + m_freeJustifies = m_freeJustifies->next; + res->next = NULL; + return res; +} + +void Segment::freeJustify(SlotJustify *aJustify) +{ + int numJust = m_silf->numJustLevels(); + if (m_silf->numJustLevels() <= 0) numJust = 1; + aJustify->next = m_freeJustifies; + memset(aJustify->values, 0, numJust*SlotJustify::NUMJUSTPARAMS*sizeof(int16)); + m_freeJustifies = aJustify; +} + +#ifndef GRAPHITE2_NSEGCACHE +void Segment::splice(size_t offset, size_t length, Slot * const startSlot, + Slot * endSlot, const Slot * srcSlot, + const size_t numGlyphs) +{ + extendLength(numGlyphs - length); + // remove any extra + if (numGlyphs < length) + { + Slot * end = endSlot->next(); + do + { + endSlot = endSlot->prev(); + freeSlot(endSlot->next()); + } while (numGlyphs < --length); + endSlot->next(end); + if (end) + end->prev(endSlot); + } + else + { + // insert extra slots if needed + while (numGlyphs > length) + { + Slot * extra = newSlot(); + extra->prev(endSlot); + extra->next(endSlot->next()); + endSlot->next(extra); + if (extra->next()) + extra->next()->prev(extra); + if (m_last == endSlot) + m_last = extra; + endSlot = extra; + ++length; + } + } + + endSlot = endSlot->next(); + assert(numGlyphs == length); + Slot * indexmap[eMaxSpliceSize*3]; + assert(numGlyphs < sizeof indexmap/sizeof *indexmap); + Slot * slot = startSlot; + for (uint16 i=0; i < numGlyphs; slot = slot->next(), ++i) + indexmap[i] = slot; + + slot = startSlot; + for (slot=startSlot; slot != endSlot; slot = slot->next(), srcSlot = srcSlot->next()) + { + slot->set(*srcSlot, offset, m_silf->numUser(), m_silf->numJustLevels()); + if (srcSlot->attachedTo()) slot->attachTo(indexmap[srcSlot->attachedTo()->index()]); + if (srcSlot->nextSibling()) slot->m_sibling = indexmap[srcSlot->nextSibling()->index()]; + if (srcSlot->firstChild()) slot->m_child = indexmap[srcSlot->firstChild()->index()]; + } +} +#endif // GRAPHITE2_NSEGCACHE + +void Segment::linkClusters(Slot *s, Slot * end) +{ + end = end->next(); + + for (; s != end && !s->isBase(); s = s->next()); + Slot * ls = s; + + if (m_dir & 1) + { + for (; s != end; s = s->next()) + { + if (!s->isBase()) continue; + + s->sibling(ls); + ls = s; + } + } + else + { + for (; s != end; s = s->next()) + { + if (!s->isBase()) continue; + + ls->sibling(s); + ls = s; + } + } +} + +Position Segment::positionSlots(const Font *font, Slot * iStart, Slot * iEnd) +{ + Position currpos(0., 0.); + Rect bbox; + float clusterMin = 0.; + + if (!iStart) iStart = m_first; + if (!iEnd) iEnd = m_last; + + if (m_dir & 1) + { + for (Slot * s = iEnd, * const end = iStart->prev(); s && s != end; s = s->prev()) + { + if (s->isBase()) + currpos = s->finalise(this, font, currpos, bbox, 0, clusterMin = currpos.x); + } + } + else + { + for (Slot * s = iStart, * const end = iEnd->next(); s && s != end; s = s->next()) + { + if (s->isBase()) + currpos = s->finalise(this, font, currpos, bbox, 0, clusterMin = currpos.x); + } + } + return currpos; +} + + +void Segment::associateChars() +{ + int i = 0; + for (Slot * s = m_first; s; s->index(i++), s = s->next()) + { + int j = s->before(); + if (j < 0) continue; + + for (const int after = s->after(); j <= after; ++j) + { + CharInfo & c = *charinfo(j); + if (c.before() == -1 || i < c.before()) c.before(i); + if (c.after() < i) c.after(i); + } + } +} + + +template +inline void process_utf_data(Segment & seg, const Face & face, const int fid, utf_iter c, size_t n_chars) +{ + const Cmap & cmap = face.cmap(); + int slotid = 0; + + const typename utf_iter::codeunit_type * const base = c; + for (; n_chars; --n_chars, ++c, ++slotid) + { + const uint32 usv = *c; + uint16 gid = cmap[usv]; + if (!gid) gid = face.findPseudo(usv); + seg.appendSlot(slotid, usv, gid, fid, c - base); + } +} + + +void Segment::read_text(const Face *face, const Features* pFeats/*must not be NULL*/, gr_encform enc, const void* pStart, size_t nChars) +{ + assert(face); + assert(pFeats); + + switch (enc) + { + case gr_utf8: process_utf_data(*this, *face, addFeatures(*pFeats), utf8::const_iterator(pStart), nChars); break; + case gr_utf16: process_utf_data(*this, *face, addFeatures(*pFeats), utf16::const_iterator(pStart), nChars); break; + case gr_utf32: process_utf_data(*this, *face, addFeatures(*pFeats), utf32::const_iterator(pStart), nChars); break; + } +} + +void Segment::prepare_pos(const Font * /*font*/) +{ + // copy key changeable metrics into slot (if any); +} + +Slot *resolveExplicit(int level, int dir, Slot *s, int nNest = 0); +void resolveWeak(int baseLevel, Slot *s); +void resolveNeutrals(int baseLevel, Slot *s); +void resolveImplicit(Slot *s, Segment *seg, uint8 aMirror); +void resolveWhitespace(int baseLevel, Segment *seg, uint8 aBidi, Slot *s); +Slot *resolveOrder(Slot * & s, const bool reordered, const int level = 0); + +void Segment::bidiPass(uint8 aBidi, int paradir, uint8 aMirror) +{ + if (slotCount() == 0) + return; + + Slot *s; + int baseLevel = paradir ? 1 : 0; + unsigned int bmask = 0; + for (s = first(); s; s = s->next()) + { + unsigned int bAttr = glyphAttr(s->gid(), aBidi); + s->setBidiClass((bAttr <= 16) * bAttr); + bmask |= (1 << s->getBidiClass()); + s->setBidiLevel(baseLevel); + } + if (bmask & (paradir ? 0x92 : 0x9C)) + { + if (bmask & 0xF800) + resolveExplicit(baseLevel, 0, first(), 0); + if (bmask & 0x10178) + resolveWeak(baseLevel, first()); + if (bmask & 0x361) + resolveNeutrals(baseLevel, first()); + resolveImplicit(first(), this, aMirror); + resolveWhitespace(baseLevel, this, aBidi, last()); + s = resolveOrder(s = first(), baseLevel != 0); + first(s); last(s->prev()); + s->prev()->next(0); s->prev(0); + } + else if (!(dir() & 4) && baseLevel && aMirror) + { + for (s = first(); s; s = s->next()) + { + unsigned short g = glyphAttr(s->gid(), aMirror); + if (g) s->setGlyph(this, g); + } + } +} + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/Silf.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/Silf.cpp new file mode 100644 index 00000000000..96d78e77549 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/Silf.cpp @@ -0,0 +1,385 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#include +#include "graphite2/Segment.h" +#include "inc/debug.h" +#include "inc/Endian.h" +#include "inc/Silf.h" +#include "inc/Segment.h" +#include "inc/Rule.h" + + +using namespace graphite2; + +namespace { static const uint32 ERROROFFSET = 0xFFFFFFFF; } + +Silf::Silf() throw() +: m_passes(0), + m_pseudos(0), + m_classOffsets(0), + m_classData(0), + m_justs(0), + m_numPasses(0), + m_numJusts(0), + m_sPass(0), + m_pPass(0), + m_jPass(0), + m_bPass(0), + m_flags(0), + m_aPseudo(0), + m_aBreak(0), + m_aUser(0), + m_aBidi(0), + m_aMirror(0), + m_iMaxComp(0), + m_aLig(0), + m_numPseudo(0), + m_nClass(0), + m_nLinear(0), + m_gEndLine(0) +{ + memset(&m_silfinfo, 0, sizeof m_silfinfo); +} + +Silf::~Silf() throw() +{ + releaseBuffers(); +} + +void Silf::releaseBuffers() throw() +{ + delete [] m_passes; + delete [] m_pseudos; + free(m_classOffsets); + free(m_classData); + free(m_justs); + m_passes= 0; + m_pseudos = 0; + m_classOffsets = 0; + m_classData = 0; + m_justs = 0; +} + + +bool Silf::readGraphite(const byte * const silf_start, size_t lSilf, const Face& face, uint32 version) +{ + const byte * p = silf_start, + * const silf_end = p + lSilf; + + if (version >= 0x00030000) + { + if (lSilf < 28) { releaseBuffers(); return false; } + be::skip(p); // ruleVersion + be::skip(p,2); // passOffset & pseudosOffset + } + else if (lSilf < 20) { releaseBuffers(); return false; } + const uint16 maxGlyph = be::read(p); + m_silfinfo.extra_ascent = be::read(p); + m_silfinfo.extra_descent = be::read(p); + m_numPasses = be::read(p); + m_sPass = be::read(p); + m_pPass = be::read(p); + m_jPass = be::read(p); + m_bPass = be::read(p); + m_flags = be::read(p); + be::skip(p,2); // max{Pre,Post}Context. + m_aPseudo = be::read(p); + m_aBreak = be::read(p); + m_aBidi = be::read(p); + m_aMirror = be::read(p); + be::skip(p); // skip reserved stuff + + // Read Justification levels. + m_numJusts = be::read(p); + if (maxGlyph >= face.glyphs().numGlyphs() + || p + m_numJusts * 8 >= silf_end) { releaseBuffers(); return false; } + m_justs = gralloc(m_numJusts); + for (uint8 i = 0; i < m_numJusts; i++) + { + ::new(m_justs + i) Justinfo(p[0], p[1], p[2], p[3]); + be::skip(p,8); + } + + if (p + sizeof(uint16) + sizeof(uint8)*8 >= silf_end) { releaseBuffers(); return false; } + m_aLig = be::read(p); + m_aUser = be::read(p); + m_iMaxComp = be::read(p); + be::skip(p,5); // direction and 4 reserved bytes + be::skip(p, be::read(p)); // don't need critical features yet + be::skip(p); // reserved + if (p >= silf_end) { releaseBuffers(); return false; } + be::skip(p, be::read(p)); // don't use scriptTag array. + m_gEndLine = be::read(p); // lbGID + if (p >= silf_end) { releaseBuffers(); return false; } + const byte * o_passes = p, + * const passes_start = silf_start + be::read(p); + + const size_t num_attrs = face.glyphs().numAttrs(); + if (m_aPseudo >= num_attrs + || m_aBreak >= num_attrs + || m_aBidi >= num_attrs + || m_aMirror>= num_attrs + || m_numPasses > 128 || passes_start >= silf_end + || m_pPass < m_sPass || m_pPass > m_numPasses || m_sPass > m_numPasses + || m_jPass < m_pPass || m_jPass > m_numPasses + || (m_bPass != 0xFF && (m_bPass < m_jPass || m_bPass > m_numPasses)) + || m_aLig > 127) { releaseBuffers(); return false; } + be::skip(p, m_numPasses); + if (p + sizeof(uint16) >= passes_start) { releaseBuffers(); return false; } + m_numPseudo = be::read(p); + be::skip(p, 3); // searchPseudo, pseudoSelector, pseudoShift + if (p + m_numPseudo*(sizeof(uint32) + sizeof(uint16)) >= passes_start) { + releaseBuffers(); return false; + } + m_pseudos = new Pseudo[m_numPseudo]; + for (int i = 0; i < m_numPseudo; i++) + { + m_pseudos[i].uid = be::read(p); + m_pseudos[i].gid = be::read(p); + } + + const size_t clen = readClassMap(p, passes_start - p, version); + if (clen == ERROROFFSET || p + clen > passes_start) { releaseBuffers(); return false; } + + m_passes = new Pass[m_numPasses]; + for (size_t i = 0; i < m_numPasses; ++i) + { + const byte * const pass_start = silf_start + be::read(o_passes), + * const pass_end = silf_start + be::peek(o_passes); + if (pass_start > pass_end || pass_end > silf_end) { + releaseBuffers(); return false; + } + + m_passes[i].init(this); + if (!m_passes[i].readPass(pass_start, pass_end - pass_start, pass_start - silf_start, face)) + { + releaseBuffers(); + return false; + } + } + + // fill in gr_faceinfo + m_silfinfo.upem = face.glyphs().unitsPerEm(); + m_silfinfo.has_bidi_pass = (m_bPass != 0xFF); + m_silfinfo.justifies = (m_numJusts != 0) || (m_jPass < m_pPass); + m_silfinfo.line_ends = (m_flags & 1); + m_silfinfo.space_contextuals = gr_faceinfo::gr_space_contextuals((m_flags >> 2) & 0x7); + return true; +} + +template inline uint32 Silf::readClassOffsets(const byte *&p, size_t data_len) +{ + const T cls_off = 2*sizeof(uint16) + sizeof(T)*(m_nClass+1); + const size_t max_off = (be::peek(p + sizeof(T)*m_nClass) - cls_off)/sizeof(uint16); + // Check that the last+1 offset is less than or equal to the class map length. + if (be::peek(p) != cls_off || max_off > (data_len - cls_off)/sizeof(uint16)) + return ERROROFFSET; + + // Read in all the offsets. + m_classOffsets = gralloc(m_nClass+1); + for (uint32 * o = m_classOffsets, * const o_end = o + m_nClass + 1; o != o_end; ++o) + { + *o = (be::read(p) - cls_off)/sizeof(uint16); + if (*o > max_off) + return ERROROFFSET; + } + return max_off; +} + +size_t Silf::readClassMap(const byte *p, size_t data_len, uint32 version) +{ + if (data_len < sizeof(uint16)*2) return ERROROFFSET; + + m_nClass = be::read(p); + m_nLinear = be::read(p); + + // Check that numLinear < numClass, + // that there is at least enough data for numClasses offsets. + if (m_nLinear > m_nClass + || (m_nClass + 1) * (version >= 0x00040000 ? sizeof(uint32) : sizeof(uint16))> (data_len - 4)) + return ERROROFFSET; + + + uint32 max_off; + if (version >= 0x00040000) + max_off = readClassOffsets(p, data_len); + else + max_off = readClassOffsets(p, data_len); + + if (max_off == ERROROFFSET) return ERROROFFSET; + + // Check the linear offsets are sane, these must be monotonically increasing. + for (const uint32 *o = m_classOffsets, * const o_end = o + m_nLinear; o != o_end; ++o) + if (o[0] > o[1]) + return ERROROFFSET; + + // Fortunately the class data is all uint16s so we can decode these now + m_classData = gralloc(max_off); + for (uint16 *d = m_classData, * const d_end = d + max_off; d != d_end; ++d) + *d = be::read(p); + + // Check the lookup class invariants for each non-linear class + for (const uint32 *o = m_classOffsets + m_nLinear, * const o_end = m_classOffsets + m_nClass; o != o_end; ++o) + { + const uint16 * lookup = m_classData + *o; + if (*o > max_off - 4 // LookupClass doesn't stretch over max_off + || lookup[0] == 0 // A LookupClass with no looks is a suspicious thing ... + || lookup[0] > (max_off - *o - 4)/2 // numIDs lookup pairs fits within (start of LookupClass' lookups array, max_off] + || lookup[3] != lookup[0] - lookup[1]) // rangeShift: numIDs - searchRange + return ERROROFFSET; + } + + return max_off; +} + +uint16 Silf::findPseudo(uint32 uid) const +{ + for (int i = 0; i < m_numPseudo; i++) + if (m_pseudos[i].uid == uid) return m_pseudos[i].gid; + return 0; +} + +uint16 Silf::findClassIndex(uint16 cid, uint16 gid) const +{ + if (cid > m_nClass) return -1; + + const uint16 * cls = m_classData + m_classOffsets[cid]; + if (cid < m_nLinear) // output class being used for input, shouldn't happen + { + for (unsigned int i = 0, n = m_classOffsets[cid + 1]; i < n; ++i, ++cls) + if (*cls == gid) return i; + return -1; + } + else + { + const uint16 * min = cls + 4, // lookups array + * max = min + cls[0]*2; // lookups aray is numIDs (cls[0]) uint16 pairs long + do + { + const uint16 * p = min + (-2 & ((max-min)/2)); + if (p[0] > gid) max = p; + else min = p; + } + while (max - min > 2); + return min[0] == gid ? min[1] : -1; + } +} + +uint16 Silf::getClassGlyph(uint16 cid, unsigned int index) const +{ + if (cid > m_nClass) return 0; + + uint32 loc = m_classOffsets[cid]; + if (cid < m_nLinear) + { + if (index < m_classOffsets[cid + 1] - loc) + return m_classData[index + loc]; + } + else // input class being used for output. Shouldn't happen + { + for (unsigned int i = loc + 4; i < m_classOffsets[cid + 1]; i += 2) + if (m_classData[i + 1] == index) return m_classData[i]; + } + return 0; +} + + +bool Silf::runGraphite(Segment *seg, uint8 firstPass, uint8 lastPass) const +{ + assert(seg != 0); + SlotMap map(*seg); + FiniteStateMachine fsm(map, seg->getFace()->logger()); + vm::Machine m(map); + unsigned int initSize = seg->slotCount(); +#if !defined GRAPHITE2_NTRACING + json * const dbgout = seg->getFace()->logger(); +#endif + + if (lastPass == 0) + { + if (firstPass == lastPass) + return true; + lastPass = m_numPasses; + } + + for (size_t i = firstPass; i < lastPass; ++i) + { + // bidi and mirroring + if (i == m_bPass) + { +#if !defined GRAPHITE2_NTRACING + if (dbgout) + { + *dbgout << json::item << json::object + << "id" << -1 + << "slots" << json::array; + seg->positionSlots(0); + for(Slot * s = seg->first(); s; s = s->next()) + *dbgout << dslot(seg, s); + *dbgout << json::close + << "rules" << json::array << json::close + << json::close; + } +#endif + + if (!(seg->dir() & 2)) + seg->bidiPass(m_aBidi, seg->dir() & 1, m_aMirror); + else if (m_aMirror) + { + Slot * s; + for (s = seg->first(); s; s = s->next()) + { + unsigned short g = seg->glyphAttr(s->gid(), m_aMirror); + if (g && (!(seg->dir() & 4) || !seg->glyphAttr(s->gid(), m_aMirror + 1))) + s->setGlyph(seg, g); + } + } + } + +#if !defined GRAPHITE2_NTRACING + if (dbgout) + { + *dbgout << json::item << json::object + << "id" << i+1 + << "slots" << json::array; + seg->positionSlots(0); + for(Slot * s = seg->first(); s; s = s->next()) + *dbgout << dslot(seg, s); + *dbgout << json::close; + } +#endif + + // test whether to reorder, prepare for positioning + m_passes[i].runGraphite(m, fsm); + // only subsitution passes can change segment length, cached subsegments are short for their text + if (m.status() != vm::Machine::finished + || (i < m_pPass && (seg->slotCount() > initSize * MAX_SEG_GROWTH_FACTOR + || (seg->slotCount() && seg->slotCount() * MAX_SEG_GROWTH_FACTOR < initSize)))) + return false; + } + return true; +} diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/Slot.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/Slot.cpp new file mode 100644 index 00000000000..f78fee73264 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/Slot.cpp @@ -0,0 +1,388 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#include "inc/Segment.h" +#include "inc/Slot.h" +#include "inc/Silf.h" +#include "inc/CharInfo.h" +#include "inc/Rule.h" + + +using namespace graphite2; + +Slot::Slot() : + m_next(NULL), m_prev(NULL), + m_glyphid(0), m_realglyphid(0), m_original(0), m_before(0), m_after(0), + m_index(0), m_parent(NULL), m_child(NULL), m_sibling(NULL), + m_position(0, 0), m_shift(0, 0), m_advance(-1, -1), + m_attach(0, 0), m_with(0, 0), m_just(0.), + m_flags(0), m_attLevel(0), m_bidiCls(0), m_bidiLevel(0), m_justs(NULL) + // Do not set m_userAttr since it is set *before* new is called since this + // is used as a positional new to reset the GrSlot +{ +} + +// take care, this does not copy any of the GrSlot pointer fields +void Slot::set(const Slot & orig, int charOffset, size_t numUserAttr, size_t justLevels) +{ + // leave m_next and m_prev unchanged + m_glyphid = orig.m_glyphid; + m_realglyphid = orig.m_realglyphid; + m_original = orig.m_original + charOffset; + m_before = orig.m_before + charOffset; + m_after = orig.m_after + charOffset; + m_parent = NULL; + m_child = NULL; + m_sibling = NULL; + m_position = orig.m_position; + m_shift = orig.m_shift; + m_advance = orig.m_advance; + m_attach = orig.m_attach; + m_with = orig.m_with; + m_flags = orig.m_flags; + m_attLevel = orig.m_attLevel; + m_bidiCls = orig.m_bidiCls; + m_bidiLevel = orig.m_bidiLevel; + if (m_userAttr && orig.m_userAttr) + { + memcpy(m_userAttr, orig.m_userAttr, numUserAttr * sizeof(*m_userAttr)); + } + if (m_justs && orig.m_justs) + { + memcpy(m_justs, orig.m_justs, SlotJustify::size_of(justLevels)); + } +} + +void Slot::update(int /*numGrSlots*/, int numCharInfo, Position &relpos) +{ + m_before += numCharInfo; + m_after += numCharInfo; + m_position = m_position + relpos; +} + +Position Slot::finalise(const Segment *seg, const Font *font, Position & base, Rect & bbox, uint8 attrLevel, float & clusterMin) +{ + if (attrLevel && m_attLevel > attrLevel) return Position(0, 0); + float scale = 1.0; + Position shift = m_shift + Position(m_just, 0); + float tAdvance = m_advance.x + m_just; + const GlyphFace * glyphFace = seg->getFace()->glyphs().glyphSafe(glyph()); + if (font) + { + scale = font->scale(); + shift *= scale; + if (font->isHinted() && glyphFace) + tAdvance = (m_advance.x - glyphFace->theAdvance().x + m_just) * scale + font->advance(m_glyphid); + else + tAdvance *= scale; + } + Position res; + + m_position = base + shift; + if (!m_parent) + { + res = base + Position(tAdvance, m_advance.y * scale); + clusterMin = base.x; + } + else + { + float tAdv; + m_position += (m_attach - m_with) * scale; + tAdv = m_advance.x >= 0.5 ? m_position.x + tAdvance - shift.x : 0.f; + res = Position(tAdv, 0); + if ((m_advance.x >= 0.5 || m_position.x < 0) && m_position.x < clusterMin) clusterMin = m_position.x; + } + + if (glyphFace) + { + Rect ourBbox = glyphFace->theBBox() * scale + m_position; + bbox = bbox.widen(ourBbox); + } + + if (m_child && m_child != this && m_child->attachedTo() == this) + { + Position tRes = m_child->finalise(seg, font, m_position, bbox, attrLevel, clusterMin); + if ((!m_parent || m_advance.x >= 0.5) && tRes.x > res.x) res = tRes; + } + + if (m_parent && m_sibling && m_sibling != this && m_sibling->attachedTo() == m_parent) + { + Position tRes = m_sibling->finalise(seg, font, base, bbox, attrLevel, clusterMin); + if (tRes.x > res.x) res = tRes; + } + + if (!m_parent && clusterMin < base.x) + { + Position adj = Position(base.x - clusterMin, 0.); + res += adj; + m_position += adj; + if (m_child) m_child->floodShift(adj); + } + return res; +} + +uint32 Slot::clusterMetric(const Segment *seg, uint8 metric, uint8 attrLevel) +{ + Position base; + Rect bbox = seg->theGlyphBBoxTemporary(gid()); + float clusterMin = 0.; + Position res = finalise(seg, NULL, base, bbox, attrLevel, clusterMin); + + switch (metrics(metric)) + { + case kgmetLsb : + return static_cast(bbox.bl.x); + case kgmetRsb : + return static_cast(res.x - bbox.tr.x); + case kgmetBbTop : + return static_cast(bbox.tr.y); + case kgmetBbBottom : + return static_cast(bbox.bl.y); + case kgmetBbLeft : + return static_cast(bbox.bl.x); + case kgmetBbRight : + return static_cast(bbox.tr.x); + case kgmetBbWidth : + return static_cast(bbox.tr.x - bbox.bl.x); + case kgmetBbHeight : + return static_cast(bbox.tr.y - bbox.bl.y); + case kgmetAdvWidth : + return static_cast(res.x); + case kgmetAdvHeight : + return static_cast(res.y); + default : + return 0; + } +} + +int Slot::getAttr(const Segment *seg, attrCode ind, uint8 subindex) const +{ + if (!this) return 0; + if (ind == gr_slatUserDefnV1) + { + ind = gr_slatUserDefn; + subindex = 0; + } + else if (ind >= gr_slatJStretch && ind < gr_slatJStretch + 20 && ind != gr_slatJWidth) + { + int indx = ind - gr_slatJStretch; + return getJustify(seg, indx / 5, indx % 5); + } + + switch (ind) + { + case gr_slatAdvX : return int(m_advance.x); + case gr_slatAdvY : return int(m_advance.y); + case gr_slatAttTo : return m_parent ? 1 : 0; + case gr_slatAttX : return int(m_attach.x); + case gr_slatAttY : return int(m_attach.y); + case gr_slatAttXOff : + case gr_slatAttYOff : return 0; + case gr_slatAttWithX : return int(m_with.x); + case gr_slatAttWithY : return int(m_with.y); + case gr_slatAttWithXOff: + case gr_slatAttWithYOff:return 0; + case gr_slatAttLevel : return m_attLevel; + case gr_slatBreak : return seg->charinfo(m_original)->breakWeight(); + case gr_slatCompRef : return 0; + case gr_slatDir : return seg->dir(); + case gr_slatInsert : return isInsertBefore(); + case gr_slatPosX : return int(m_position.x); // but need to calculate it + case gr_slatPosY : return int(m_position.y); + case gr_slatShiftX : return int(m_shift.x); + case gr_slatShiftY : return int(m_shift.y); + case gr_slatMeasureSol: return -1; // err what's this? + case gr_slatMeasureEol: return -1; + case gr_slatJWidth: return m_just; + case gr_slatUserDefn : return m_userAttr[subindex]; + case gr_slatSegSplit : return seg->charinfo(m_original)->flags() & 3; + default : return 0; + } +} + +void Slot::setAttr(Segment *seg, attrCode ind, uint8 subindex, int16 value, const SlotMap & map) +{ + if (!this) return; + if (ind == gr_slatUserDefnV1) + { + ind = gr_slatUserDefn; + subindex = 0; + } + else if (ind >= gr_slatJStretch && ind < gr_slatJStretch + 20 && ind != gr_slatJWidth) + { + int indx = ind - gr_slatJStretch; + return setJustify(seg, indx / 5, indx % 5, value); + } + + switch (ind) + { + case gr_slatAdvX : m_advance.x = value; break; + case gr_slatAdvY : m_advance.y = value; break; + case gr_slatAttTo : + { + const uint16 idx = uint16(value); + if (idx < map.size() && map[idx]) + { + Slot *other = map[idx]; + if (other != this && other->child(this)) + { + attachTo(other); + if (((seg->dir() & 1) != 0) ^ (idx > subindex)) + m_with = Position(advance(), 0); + else // normal match to previous root + m_attach = Position(other->advance(), 0); + } + } + break; + } + case gr_slatAttX : m_attach.x = value; break; + case gr_slatAttY : m_attach.y = value; break; + case gr_slatAttXOff : + case gr_slatAttYOff : break; + case gr_slatAttWithX : m_with.x = value; break; + case gr_slatAttWithY : m_with.y = value; break; + case gr_slatAttWithXOff : + case gr_slatAttWithYOff : break; + case gr_slatAttLevel : + m_attLevel = byte(value); + break; + case gr_slatBreak : + seg->charinfo(m_original)->breakWeight(value); + break; + case gr_slatCompRef : break; // not sure what to do here + case gr_slatDir : break; // read only + case gr_slatInsert : + markInsertBefore(value? true : false); + break; + case gr_slatPosX : break; // can't set these here + case gr_slatPosY : break; + case gr_slatShiftX : m_shift.x = value; break; + case gr_slatShiftY : m_shift.y = value; break; + case gr_slatMeasureSol : break; + case gr_slatMeasureEol : break; + case gr_slatJWidth : just(value); break; + case gr_slatSegSplit : seg->charinfo(m_original)->addflags(value & 3); break; + case gr_slatUserDefn : m_userAttr[subindex] = value; break; + default : + break; + } +} + +int Slot::getJustify(const Segment *seg, uint8 level, uint8 subindex) const +{ + if (level && level >= seg->silf()->numJustLevels()) return 0; + + if (m_justs) + return m_justs->values[level * SlotJustify::NUMJUSTPARAMS + subindex]; + + if (level >= seg->silf()->numJustLevels()) return 0; + Justinfo *jAttrs = seg->silf()->justAttrs() + level; + + switch (subindex) { + case 0 : return seg->glyphAttr(gid(), jAttrs->attrStretch()); + case 1 : return seg->glyphAttr(gid(), jAttrs->attrShrink()); + case 2 : return seg->glyphAttr(gid(), jAttrs->attrStep()); + case 3 : return seg->glyphAttr(gid(), jAttrs->attrWeight()); + case 4 : return 0; // not been set yet, so clearly 0 + default: return 0; + } +} + +void Slot::setJustify(Segment *seg, uint8 level, uint8 subindex, int16 value) +{ + if (level >= seg->silf()->numJustLevels()) return; + if (!m_justs) + { + SlotJustify *j = seg->newJustify(); + j->LoadSlot(this, seg); + m_justs = j; + } + m_justs->values[level * SlotJustify::NUMJUSTPARAMS + subindex] = value; +} + +bool Slot::child(Slot *ap) +{ + if (this == ap) return false; + else if (ap == m_child) return true; + else if (!m_child) + m_child = ap; + else + return m_child->sibling(ap); + return true; +} + +bool Slot::sibling(Slot *ap) +{ + if (this == ap) return false; + else if (ap == m_sibling) return true; + else if (!m_sibling || !ap) + m_sibling = ap; + else + return m_sibling->sibling(ap); + return true; +} + +void Slot::setGlyph(Segment *seg, uint16 glyphid, const GlyphFace * theGlyph) +{ + m_glyphid = glyphid; + if (!theGlyph) + { + theGlyph = seg->getFace()->glyphs().glyphSafe(glyphid); + if (!theGlyph) + { + m_realglyphid = 0; + m_advance = Position(0.,0.); + return; + } + } + m_realglyphid = theGlyph->attrs()[seg->silf()->aPseudo()]; + if (m_realglyphid) + { + const GlyphFace *aGlyph = seg->getFace()->glyphs().glyphSafe(m_realglyphid); + if (aGlyph) theGlyph = aGlyph; + } + m_advance = Position(theGlyph->theAdvance().x, 0.); +} + +void Slot::floodShift(Position adj) +{ + m_position += adj; + if (m_child) m_child->floodShift(adj); + if (m_sibling) m_sibling->floodShift(adj); +} + +void SlotJustify::LoadSlot(const Slot *s, const Segment *seg) +{ + for (int i = seg->silf()->numJustLevels() - 1; i >= 0; --i) + { + Justinfo *justs = seg->silf()->justAttrs() + i; + int16 *v = values + i * NUMJUSTPARAMS; + v[0] = seg->glyphAttr(s->gid(), justs->attrStretch()); + v[1] = seg->glyphAttr(s->gid(), justs->attrShrink()); + v[2] = seg->glyphAttr(s->gid(), justs->attrStep()); + v[3] = seg->glyphAttr(s->gid(), justs->attrWeight()); + } +} diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/Sparse.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/Sparse.cpp new file mode 100644 index 00000000000..64675a2939d --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/Sparse.cpp @@ -0,0 +1,59 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#include +#include "inc/Sparse.h" +#include "inc/bits.h" + +using namespace graphite2; + + +sparse::~sparse() throw() +{ + free(m_array.values); +} + + +sparse::mapped_type sparse::operator [] (const key_type k) const throw() +{ + const chunk & c = m_array.map[k/SIZEOF_CHUNK]; + const mask_t m = c.mask >> (SIZEOF_CHUNK - 1 - (k%SIZEOF_CHUNK)); + const mapped_type g = m & 1; + + return g*m_array.values[g*(c.offset + bit_set_count(m >> 1))]; +} + + +size_t sparse::size() const throw() +{ + size_t n = m_nchunks, + s = 0; + + for (const chunk *ci=m_array.map; n; --n, ++ci) + s += bit_set_count(ci->mask); + + return s; +} diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/TtfUtil.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/TtfUtil.cpp new file mode 100644 index 00000000000..dbd1d5bb274 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/TtfUtil.cpp @@ -0,0 +1,1982 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +/*--------------------------------------------------------------------*//*:Ignore this sentence. + +File: TtfUtil.cpp +Responsibility: Alan Ward +Last reviewed: Not yet. + +Description + Implements the methods for TtfUtil class. This file should remain portable to any C++ + environment by only using standard C++ and the TTF structurs defined in Tt.h. +-------------------------------------------------------------------------------*//*:End Ignore*/ + + +/*********************************************************************************************** + Include files +***********************************************************************************************/ +// Language headers +//#include +#include +#include +#include +#include +#include +//#include +// Platform headers +// Module headers +#include "inc/TtfUtil.h" +#include "inc/TtfTypes.h" +#include "inc/Endian.h" + +/*********************************************************************************************** + Forward declarations +***********************************************************************************************/ + +/*********************************************************************************************** + Local Constants and static variables +***********************************************************************************************/ +namespace +{ + // max number of components allowed in composite glyphs + const int kMaxGlyphComponents = 8; + + template + inline float fixed_to_float(const T f) { + return float(f)/float(2^R); + } + +/*---------------------------------------------------------------------------------------------- + Table of standard Postscript glyph names. From Martin Hosken. Disagress with ttfdump.exe +---------------------------------------------------------------------------------------------*/ +#ifdef ALL_TTFUTILS + const int kcPostNames = 258; + + const char * rgPostName[kcPostNames] = { + ".notdef", ".null", "nonmarkingreturn", "space", "exclam", "quotedbl", "numbersign", + "dollar", "percent", "ampersand", "quotesingle", "parenleft", + "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", + "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", + "nine", "colon", "semicolon", "less", "equal", "greater", "question", + "at", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", + "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", + "bracketleft", "backslash", "bracketright", "asciicircum", + "underscore", "grave", "a", "b", "c", "d", "e", "f", "g", "h", "i", + "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", + "x", "y", "z", "braceleft", "bar", "braceright", "asciitilde", + "Adieresis", "Aring", "Ccedilla", "Eacute", "Ntilde", "Odieresis", + "Udieresis", "aacute", "agrave", "acircumflex", "adieresis", "atilde", + "aring", "ccedilla", "eacute", "egrave", "ecircumflex", "edieresis", + "iacute", "igrave", "icircumflex", "idieresis", "ntilde", "oacute", + "ograve", "ocircumflex", "odieresis", "otilde", "uacute", "ugrave", + "ucircumflex", "udieresis", "dagger", "degree", "cent", "sterling", + "section", "bullet", "paragraph", "germandbls", "registered", + "copyright", "trademark", "acute", "dieresis", "notequal", "AE", + "Oslash", "infinity", "plusminus", "lessequal", "greaterequal", "yen", + "mu", "partialdiff", "summation", "product", "pi", "integral", + "ordfeminine", "ordmasculine", "Omega", "ae", "oslash", "questiondown", + "exclamdown", "logicalnot", "radical", "florin", "approxequal", + "Delta", "guillemotleft", "guillemotright", "ellipsis", "nonbreakingspace", + "Agrave", "Atilde", "Otilde", "OE", "oe", "endash", "emdash", + "quotedblleft", "quotedblright", "quoteleft", "quoteright", "divide", + "lozenge", "ydieresis", "Ydieresis", "fraction", "currency", + "guilsinglleft", "guilsinglright", "fi", "fl", "daggerdbl", "periodcentered", + "quotesinglbase", "quotedblbase", "perthousand", "Acircumflex", + "Ecircumflex", "Aacute", "Edieresis", "Egrave", "Iacute", + "Icircumflex", "Idieresis", "Igrave", "Oacute", "Ocircumflex", + "apple", "Ograve", "Uacute", "Ucircumflex", "Ugrave", "dotlessi", + "circumflex", "tilde", "macron", "breve", "dotaccent", "ring", + "cedilla", "hungarumlaut", "ogonek", "caron", "Lslash", "lslash", + "Scaron", "scaron", "Zcaron", "zcaron", "brokenbar", "Eth", "eth", + "Yacute", "yacute", "Thorn", "thorn", "minus", "multiply", + "onesuperior", "twosuperior", "threesuperior", "onehalf", "onequarter", + "threequarters", "franc", "Gbreve", "gbreve", "Idotaccent", "Scedilla", + "scedilla", "Cacute", "cacute", "Ccaron", "ccaron", + "dcroat" }; +#endif + +} // end of namespace + +/*********************************************************************************************** + Methods +***********************************************************************************************/ + +/* Note on error processing: The code guards against bad glyph ids being used to look up data +in open ended tables (loca, hmtx). If the glyph id comes from a cmap this shouldn't happen +but it seems prudent to check for user errors here. The code does assume that data obtained +from the TTF file is valid otherwise (though the CheckTable method seeks to check for +obvious problems that might accompany a change in table versions). For example an invalid +offset in the loca table which could exceed the size of the glyf table is NOT trapped. +Likewise if numberOf_LongHorMetrics in the hhea table is wrong, this will NOT be trapped, +which could cause a lookup in the hmtx table to exceed the table length. Of course, TTF tables +that are completely corrupt will cause unpredictable results. */ + +/* Note on composite glyphs: Glyphs that have components that are themselves composites +are not supported. IsDeepComposite can be used to test for this. False is returned from many +of the methods in this cases. It is unclear how to build composite glyphs in some cases, +so this code represents my best guess until test cases can be found. See notes on the high- +level GlyfPoints method. */ +namespace graphite2 +{ +namespace TtfUtil +{ + + +/*---------------------------------------------------------------------------------------------- + Get offset and size of the offset table needed to find table directory. + Return true if success, false otherwise. + lSize excludes any table directory entries. +----------------------------------------------------------------------------------------------*/ +bool GetHeaderInfo(size_t & lOffset, size_t & lSize) +{ + lOffset = 0; + lSize = offsetof(Sfnt::OffsetSubTable, table_directory); + assert(sizeof(uint32) + 4*sizeof (uint16) == lSize); + return true; +} + +/*---------------------------------------------------------------------------------------------- + Check the offset table for expected data. + Return true if success, false otherwise. +----------------------------------------------------------------------------------------------*/ +bool CheckHeader(const void * pHdr) +{ + const Sfnt::OffsetSubTable * pOffsetTable + = reinterpret_cast(pHdr); + + return pHdr && be::swap(pOffsetTable->scaler_type) == Sfnt::OffsetSubTable::TrueTypeWin; +} + +/*---------------------------------------------------------------------------------------------- + Get offset and size of the table directory. + Return true if successful, false otherwise. +----------------------------------------------------------------------------------------------*/ +bool GetTableDirInfo(const void * pHdr, size_t & lOffset, size_t & lSize) +{ + const Sfnt::OffsetSubTable * pOffsetTable + = reinterpret_cast(pHdr); + + lOffset = offsetof(Sfnt::OffsetSubTable, table_directory); + lSize = be::swap(pOffsetTable->num_tables) + * sizeof(Sfnt::OffsetSubTable::Entry); + + return true; +} + + +/*---------------------------------------------------------------------------------------------- + Get offset and size of the specified table. + Return true if successful, false otherwise. On false, offset and size will be 0. +----------------------------------------------------------------------------------------------*/ +bool GetTableInfo(const Tag TableTag, const void * pHdr, const void * pTableDir, + size_t & lOffset, size_t & lSize) +{ + const Sfnt::OffsetSubTable * pOffsetTable + = reinterpret_cast(pHdr); + const size_t num_tables = be::swap(pOffsetTable->num_tables); + const Sfnt::OffsetSubTable::Entry + * entry_itr = reinterpret_cast( + pTableDir), + * const dir_end = entry_itr + num_tables; + + if (num_tables > 40) + return false; + + for (;entry_itr != dir_end; ++entry_itr) // 40 - safe guard + { + if (be::swap(entry_itr->tag) == TableTag) + { + lOffset = be::swap(entry_itr->offset); + lSize = be::swap(entry_itr->length); + return true; + } + } + + return false; +} + +/*---------------------------------------------------------------------------------------------- + Check the specified table. Tests depend on the table type. + Return true if successful, false otherwise. +----------------------------------------------------------------------------------------------*/ +bool CheckTable(const Tag TableId, const void * pTable, size_t lTableSize) +{ + using namespace Sfnt; + + if (pTable == 0) return false; + + switch(TableId) + { + case Tag::cmap: // cmap + { + const Sfnt::CharacterCodeMap * const pCmap + = reinterpret_cast(pTable); + return be::swap(pCmap->version) == 0; + } + + case Tag::head: // head + { + const Sfnt::FontHeader * const pHead + = reinterpret_cast(pTable); + bool r = be::swap(pHead->version) == OneFix + && be::swap(pHead->magic_number) == FontHeader::MagicNumber + && be::swap(pHead->glyph_data_format) + == FontHeader::GlypDataFormat + && (be::swap(pHead->index_to_loc_format) + == FontHeader::ShortIndexLocFormat + || be::swap(pHead->index_to_loc_format) + == FontHeader::LongIndexLocFormat) + && sizeof(FontHeader) <= lTableSize; + return r; + } + + case Tag::post: // post + { + const Sfnt::PostScriptGlyphName * const pPost + = reinterpret_cast(pTable); + const fixed format = be::swap(pPost->format); + bool r = format == PostScriptGlyphName::Format1 + || format == PostScriptGlyphName::Format2 + || format == PostScriptGlyphName::Format3 + || format == PostScriptGlyphName::Format25; + return r; + } + + case Tag::hhea: // hhea + { + const Sfnt::HorizontalHeader * pHhea = + reinterpret_cast(pTable); + bool r = be::swap(pHhea->version) == OneFix + && be::swap(pHhea->metric_data_format) == 0 + && sizeof (Sfnt::HorizontalHeader) <= lTableSize; + return r; + } + + case Tag::maxp: // maxp + { + const Sfnt::MaximumProfile * pMaxp = + reinterpret_cast(pTable); + bool r = be::swap(pMaxp->version) == OneFix + && sizeof(Sfnt::MaximumProfile) <= lTableSize; + return r; + } + + case Tag::OS_2: // OS/2 + { + const Sfnt::Compatibility * pOs2 + = reinterpret_cast(pTable); + if (be::swap(pOs2->version) == 0) + { // OS/2 table version 1 size +// if (sizeof(Sfnt::Compatibility) +// - sizeof(uint32)*2 - sizeof(int16)*2 +// - sizeof(uint16)*3 <= lTableSize) + if (sizeof(Sfnt::Compatibility0) <= lTableSize) + return true; + } + else if (be::swap(pOs2->version) == 1) + { // OS/2 table version 2 size +// if (sizeof(Sfnt::Compatibility) +// - sizeof(int16) *2 +// - sizeof(uint16)*3 <= lTableSize) + if (sizeof(Sfnt::Compatibility1) <= lTableSize) + return true; + } + else if (be::swap(pOs2->version) == 2) + { // OS/2 table version 3 size + if (sizeof(Sfnt::Compatibility2) <= lTableSize) + return true; + } + else if (be::swap(pOs2->version) == 3 || be::swap(pOs2->version) == 4) + { // OS/2 table version 4 size - version 4 changed the meaning of some fields which we don't use + if (sizeof(Sfnt::Compatibility3) <= lTableSize) + return true; + } + else + return false; + break; + } + + case Tag::name: + { + const Sfnt::FontNames * pName + = reinterpret_cast(pTable); + return be::swap(pName->format) == 0; + } + + default: + break; + } + + return true; +} + +/*---------------------------------------------------------------------------------------------- + Return the number of glyphs in the font. Should never be less than zero. + + Note: this method is not currently used by the Graphite engine. +----------------------------------------------------------------------------------------------*/ +size_t GlyphCount(const void * pMaxp) +{ + const Sfnt::MaximumProfile * pTable = + reinterpret_cast(pMaxp); + return be::swap(pTable->num_glyphs); +} + +#ifdef ALL_TTFUTILS +/*---------------------------------------------------------------------------------------------- + Return the maximum number of components for any composite glyph in the font. + + Note: this method is not currently used by the Graphite engine. +----------------------------------------------------------------------------------------------*/ +size_t MaxCompositeComponentCount(const void * pMaxp) +{ + const Sfnt::MaximumProfile * pTable = + reinterpret_cast(pMaxp); + return be::swap(pTable->max_component_elements); +} + +/*---------------------------------------------------------------------------------------------- + Composite glyphs can be composed of glyphs that are themselves composites. + This method returns the maximum number of levels like this for any glyph in the font. + A non-composite glyph has a level of 1. + + Note: this method is not currently used by the Graphite engine. +----------------------------------------------------------------------------------------------*/ +size_t MaxCompositeLevelCount(const void * pMaxp) +{ + const Sfnt::MaximumProfile * pTable = + reinterpret_cast(pMaxp); + return be::swap(pTable->max_component_depth); +} + +/*---------------------------------------------------------------------------------------------- + Return the number of glyphs in the font according to a differt source. + Should never be less than zero. Return -1 on failure. + + Note: this method is not currently used by the Graphite engine. +----------------------------------------------------------------------------------------------*/ +size_t LocaGlyphCount(size_t lLocaSize, const void * pHead) //throw(std::domain_error) +{ + + const Sfnt::FontHeader * pTable + = reinterpret_cast(pHead); + + if (be::swap(pTable->index_to_loc_format) + == Sfnt::FontHeader::ShortIndexLocFormat) + // loca entries are two bytes and have been divided by two + return (lLocaSize >> 1) - 1; + + if (be::swap(pTable->index_to_loc_format) + == Sfnt::FontHeader::LongIndexLocFormat) + // loca entries are four bytes + return (lLocaSize >> 2) - 1; + + return -1; + //throw std::domain_error("head table in inconsistent state. The font may be corrupted"); +} +#endif + +/*---------------------------------------------------------------------------------------------- + Return the design units the font is designed with +----------------------------------------------------------------------------------------------*/ +int DesignUnits(const void * pHead) +{ + const Sfnt::FontHeader * pTable = + reinterpret_cast(pHead); + + return be::swap(pTable->units_per_em); +} + +#ifdef ALL_TTFUTILS +/*---------------------------------------------------------------------------------------------- + Return the checksum from the head table, which serves as a unique identifer for the font. +----------------------------------------------------------------------------------------------*/ +int HeadTableCheckSum(const void * pHead) +{ + const Sfnt::FontHeader * pTable = + reinterpret_cast(pHead); + + return be::swap(pTable->check_sum_adjustment); +} + +/*---------------------------------------------------------------------------------------------- + Return the create time from the head table. This consists of a 64-bit integer, which + we return here as two 32-bit integers. + + Note: this method is not currently used by the Graphite engine. +----------------------------------------------------------------------------------------------*/ +void HeadTableCreateTime(const void * pHead, + unsigned int * pnDateBC, unsigned int * pnDateAD) +{ + const Sfnt::FontHeader * pTable = + reinterpret_cast(pHead); + + *pnDateBC = be::swap(pTable->created[0]); + *pnDateAD = be::swap(pTable->created[1]); +} + +/*---------------------------------------------------------------------------------------------- + Return the modify time from the head table.This consists of a 64-bit integer, which + we return here as two 32-bit integers. + + Note: this method is not currently used by the Graphite engine. +----------------------------------------------------------------------------------------------*/ +void HeadTableModifyTime(const void * pHead, + unsigned int * pnDateBC, unsigned int *pnDateAD) +{ + const Sfnt::FontHeader * pTable = + reinterpret_cast(pHead); + + *pnDateBC = be::swap(pTable->modified[0]); + *pnDateAD = be::swap(pTable->modified[1]); +} + +/*---------------------------------------------------------------------------------------------- + Return true if the font is italic. +----------------------------------------------------------------------------------------------*/ +bool IsItalic(const void * pHead) +{ + const Sfnt::FontHeader * pTable = + reinterpret_cast(pHead); + + return ((be::swap(pTable->mac_style) & 0x00000002) != 0); +} + +/*---------------------------------------------------------------------------------------------- + Return the ascent for the font +----------------------------------------------------------------------------------------------*/ +int FontAscent(const void * pOs2) +{ + const Sfnt::Compatibility * pTable = reinterpret_cast(pOs2); + + return be::swap(pTable->win_ascent); +} + +/*---------------------------------------------------------------------------------------------- + Return the descent for the font +----------------------------------------------------------------------------------------------*/ +int FontDescent(const void * pOs2) +{ + const Sfnt::Compatibility * pTable = reinterpret_cast(pOs2); + + return be::swap(pTable->win_descent); +} + +/*---------------------------------------------------------------------------------------------- + Get the bold and italic style bits. + Return true if successful. false otherwise. + In addition to checking the OS/2 table, one could also check + the head table's macStyle field (overridden by the OS/2 table on Win) + the sub-family name in the name table (though this can contain oblique, dark, etc too) +----------------------------------------------------------------------------------------------*/ +bool FontOs2Style(const void *pOs2, bool & fBold, bool & fItalic) +{ + const Sfnt::Compatibility * pTable = reinterpret_cast(pOs2); + + fBold = (be::swap(pTable->fs_selection) & Sfnt::Compatibility::Bold) != 0; + fItalic = (be::swap(pTable->fs_selection) & Sfnt::Compatibility::Italic) != 0; + + return true; +} +#endif + +/*---------------------------------------------------------------------------------------------- + Method for searching name table. +----------------------------------------------------------------------------------------------*/ +bool GetNameInfo(const void * pName, int nPlatformId, int nEncodingId, + int nLangId, int nNameId, size_t & lOffset, size_t & lSize) +{ + lOffset = 0; + lSize = 0; + + const Sfnt::FontNames * pTable = reinterpret_cast(pName); + uint16 cRecord = be::swap(pTable->count); + uint16 nRecordOffset = be::swap(pTable->string_offset); + const Sfnt::NameRecord * pRecord = reinterpret_cast(pTable + 1); + + for (int i = 0; i < cRecord; ++i) + { + if (be::swap(pRecord->platform_id) == nPlatformId && + be::swap(pRecord->platform_specific_id) == nEncodingId && + be::swap(pRecord->language_id) == nLangId && + be::swap(pRecord->name_id) == nNameId) + { + lOffset = be::swap(pRecord->offset) + nRecordOffset; + lSize = be::swap(pRecord->length); + return true; + } + pRecord++; + } + + return false; +} + +#ifdef ALL_TTFUTILS +/*---------------------------------------------------------------------------------------------- + Return all the lang-IDs that have data for the given name-IDs. Assume that there is room + in the return array (langIdList) for 128 items. The purpose of this method is to return + a list of all possible lang-IDs. +----------------------------------------------------------------------------------------------*/ +int GetLangsForNames(const void * pName, int nPlatformId, int nEncodingId, + int * nameIdList, int cNameIds, short * langIdList) +{ + const Sfnt::FontNames * pTable = reinterpret_cast(pName); + int cLangIds = 0; + uint16 cRecord = be::swap(pTable->count); + if (cRecord > 127) return cLangIds; + //uint16 nRecordOffset = swapw(pTable->stringOffset); + const Sfnt::NameRecord * pRecord = reinterpret_cast(pTable + 1); + + for (int i = 0; i < cRecord; ++i) + { + if (be::swap(pRecord->platform_id) == nPlatformId && + be::swap(pRecord->platform_specific_id) == nEncodingId) + { + bool fNameFound = false; + int nLangId = be::swap(pRecord->language_id); + int nNameId = be::swap(pRecord->name_id); + for (int j = 0; j < cNameIds; j++) + { + if (nNameId == nameIdList[j]) + { + fNameFound = true; + break; + } + } + if (fNameFound) + { + // Add it if it's not there. + int ilang; + for (ilang = 0; ilang < cLangIds; ilang++) + if (langIdList[ilang] == nLangId) + break; + if (ilang >= cLangIds) + { + langIdList[cLangIds] = short(nLangId); + cLangIds++; + } + if (cLangIds == 128) + return cLangIds; + } + } + pRecord++; + } + + return cLangIds; +} + +/*---------------------------------------------------------------------------------------------- + Get the offset and size of the font family name in English for the MS Platform with Unicode + writing system. The offset is within the pName data. The string is double byte with MSB + first. +----------------------------------------------------------------------------------------------*/ +bool Get31EngFamilyInfo(const void * pName, size_t & lOffset, size_t & lSize) +{ + return GetNameInfo(pName, Sfnt::NameRecord::Microsoft, 1, 1033, + Sfnt::NameRecord::Family, lOffset, lSize); +} + +/*---------------------------------------------------------------------------------------------- + Get the offset and size of the full font name in English for the MS Platform with Unicode + writing system. The offset is within the pName data. The string is double byte with MSB + first. + + Note: this method is not currently used by the Graphite engine. +----------------------------------------------------------------------------------------------*/ +bool Get31EngFullFontInfo(const void * pName, size_t & lOffset, size_t & lSize) +{ + return GetNameInfo(pName, Sfnt::NameRecord::Microsoft, 1, 1033, + Sfnt::NameRecord::Fullname, lOffset, lSize); +} + +/*---------------------------------------------------------------------------------------------- + Get the offset and size of the font family name in English for the MS Platform with Symbol + writing system. The offset is within the pName data. The string is double byte with MSB + first. +----------------------------------------------------------------------------------------------*/ +bool Get30EngFamilyInfo(const void * pName, size_t & lOffset, size_t & lSize) +{ + return GetNameInfo(pName, Sfnt::NameRecord::Microsoft, 0, 1033, + Sfnt::NameRecord::Family, lOffset, lSize); +} + +/*---------------------------------------------------------------------------------------------- + Get the offset and size of the full font name in English for the MS Platform with Symbol + writing system. The offset is within the pName data. The string is double byte with MSB + first. + + Note: this method is not currently used by the Graphite engine. +----------------------------------------------------------------------------------------------*/ +bool Get30EngFullFontInfo(const void * pName, size_t & lOffset, size_t & lSize) +{ + return GetNameInfo(pName, Sfnt::NameRecord::Microsoft, 0, 1033, + Sfnt::NameRecord::Fullname, lOffset, lSize); +} + +/*---------------------------------------------------------------------------------------------- + Return the Glyph ID for a given Postscript name. This method finds the first glyph which + matches the requested Postscript name. Ideally every glyph should have a unique Postscript + name (except for special names such as .notdef), but this is not always true. + On failure return value less than zero. + -1 - table search failed + -2 - format 3 table (no Postscript glyph info) + -3 - other failures + + Note: this method is not currently used by the Graphite engine. +----------------------------------------------------------------------------------------------*/ +int PostLookup(const void * pPost, size_t lPostSize, const void * pMaxp, + const char * pPostName) +{ + using namespace Sfnt; + + const Sfnt::PostScriptGlyphName * pTable + = reinterpret_cast(pPost); + fixed format = be::swap(pTable->format); + + if (format == PostScriptGlyphName::Format3) + { // format 3 - no Postscript glyph info in font + return -2; + } + + // search for given Postscript name among the standard names + int iPostName = -1; // index in standard names + for (int i = 0; i < kcPostNames; i++) + { + if (!strcmp(pPostName, rgPostName[i])) + { + iPostName = i; + break; + } + } + + if (format == PostScriptGlyphName::Format1) + { // format 1 - use standard Postscript names + return iPostName; + } + + if (format == PostScriptGlyphName::Format25) + { + if (iPostName == -1) + return -1; + + const PostScriptGlyphName25 * pTable25 + = static_cast(pTable); + int cnGlyphs = GlyphCount(pMaxp); + for (gid16 nGlyphId = 0; nGlyphId < cnGlyphs && nGlyphId < kcPostNames; + nGlyphId++) + { // glyph_name_index25 contains bytes so no byte swapping needed + // search for first glyph id that uses the standard name + if (nGlyphId + pTable25->offset[nGlyphId] == iPostName) + return nGlyphId; + } + } + + if (format == PostScriptGlyphName::Format2) + { // format 2 + const PostScriptGlyphName2 * pTable2 + = static_cast(pTable); + + int cnGlyphs = be::swap(pTable2->number_of_glyphs); + + if (iPostName != -1) + { // did match a standard name, look for first glyph id mapped to that name + for (gid16 nGlyphId = 0; nGlyphId < cnGlyphs; nGlyphId++) + { + if (be::swap(pTable2->glyph_name_index[nGlyphId]) == iPostName) + return nGlyphId; + } + return -1; // no glyph with this standard name + } + + else + { // did not match a standard name, search font specific names + size_t nStrSizeGoal = strlen(pPostName); + const char * pFirstGlyphName = reinterpret_cast( + &pTable2->glyph_name_index[0] + cnGlyphs); + const char * pGlyphName = pFirstGlyphName; + int iInNames = 0; // index in font specific names + bool fFound = false; + const char * const endOfTable + = reinterpret_cast(pTable2) + lPostSize; + while (pGlyphName < endOfTable && !fFound) + { // search Pascal strings for first matching name + size_t nStringSize = size_t(*pGlyphName); + if (nStrSizeGoal != nStringSize || + strncmp(pGlyphName + 1, pPostName, nStringSize)) + { // did not match + ++iInNames; + pGlyphName += nStringSize + 1; + } + else + { // did match + fFound = true; + } + } + if (!fFound) + return -1; // no font specific name matches request + + iInNames += kcPostNames; + for (gid16 nGlyphId = 0; nGlyphId < cnGlyphs; nGlyphId++) + { // search for first glyph id that maps to the found string index + if (be::swap(pTable2->glyph_name_index[nGlyphId]) == iInNames) + return nGlyphId; + } + return -1; // no glyph mapped to this index (very strange) + } + } + + return -3; +} + +/*---------------------------------------------------------------------------------------------- + Convert a Unicode character string from big endian (MSB first, Motorola) format to little + endian (LSB first, Intel) format. + nSize is the number of Unicode characters in the string. It should not include any + terminating null. If nSize is 0, it is assumed the string is null terminated. nSize + defaults to 0. + Return true if successful, false otherwise. +----------------------------------------------------------------------------------------------*/ +void SwapWString(void * pWStr, size_t nSize /* = 0 */) //throw (std::invalid_argument) +{ + if (pWStr == 0) + { +// throw std::invalid_argument("null pointer given"); + return; + } + + uint16 * pStr = reinterpret_cast(pWStr); + uint16 * const pStrEnd = pStr + (nSize == 0 ? wcslen((const wchar_t*)pStr) : nSize); + + for (; pStr != pStrEnd; ++pStr) + *pStr = be::swap(*pStr); +// std::transform(pStr, pStrEnd, pStr, read); + +// for (int i = 0; i < nSize; i++) +// { // swap the wide characters in the string +// pStr[i] = utf16(be::swap(uint16(pStr[i]))); +// } +} +#endif + +/*---------------------------------------------------------------------------------------------- + Get the left-side bearing and and advance width based on the given tables and Glyph ID + Return true if successful, false otherwise. On false, one or both value could be INT_MIN +----------------------------------------------------------------------------------------------*/ +bool HorMetrics(gid16 nGlyphId, const void * pHmtx, size_t lHmtxSize, const void * pHhea, + int & nLsb, unsigned int & nAdvWid) +{ + const Sfnt::HorizontalMetric * phmtx = + reinterpret_cast(pHmtx); + + const Sfnt::HorizontalHeader * phhea = + reinterpret_cast(pHhea); + + size_t cLongHorMetrics = be::swap(phhea->num_long_hor_metrics); + if (nGlyphId < cLongHorMetrics) + { // glyph id is acceptable + if (nGlyphId * sizeof(Sfnt::HorizontalMetric) >= lHmtxSize) return false; + nAdvWid = be::swap(phmtx[nGlyphId].advance_width); + nLsb = be::swap(phmtx[nGlyphId].left_side_bearing); + } + else + { + // guard against bad glyph id + size_t lLsbOffset = sizeof(Sfnt::HorizontalMetric) * cLongHorMetrics + + sizeof(int16) * (nGlyphId - cLongHorMetrics); // offset in bytes + // We test like this as LsbOffset is an offset not a length. + if (lLsbOffset > lHmtxSize - sizeof(int16)) + { + nLsb = 0; + return false; + } + nAdvWid = be::swap(phmtx[cLongHorMetrics - 1].advance_width); + nLsb = be::peek(reinterpret_cast(phmtx) + lLsbOffset); + } + + return true; +} + +/*---------------------------------------------------------------------------------------------- + Return a pointer to the requested cmap subtable. By default find the Microsoft Unicode + subtable. Pass nEncoding as -1 to find first table that matches only nPlatformId. + Return NULL if the subtable cannot be found. +----------------------------------------------------------------------------------------------*/ +const void * FindCmapSubtable(const void * pCmap, int nPlatformId, /* =3 */ int nEncodingId, /* = 1 */ size_t length) +{ + const Sfnt::CharacterCodeMap * pTable = reinterpret_cast(pCmap); + uint16 csuPlatforms = be::swap(pTable->num_subtables); + if (length && (sizeof(Sfnt::CharacterCodeMap) + 8 * (csuPlatforms - 1) > length)) + return NULL; + for (int i = 0; i < csuPlatforms; i++) + { + if (be::swap(pTable->encoding[i].platform_id) == nPlatformId && + (nEncodingId == -1 || be::swap(pTable->encoding[i].platform_specific_id) == nEncodingId)) + { + uint32 offset = be::swap(pTable->encoding[i].offset); + const uint8 * pRtn = reinterpret_cast(pCmap) + offset; + if (length) + { + if (offset > length) return NULL; + uint16 format = be::read(pRtn); + if (format == 4) + { + uint16 subTableLength = be::peek(pRtn); + if (i + 1 == csuPlatforms) + { + if (subTableLength > length - offset) + return NULL; + } + else if (subTableLength > be::swap(pTable->encoding[i+1].offset)) + return NULL; + } + if (format == 12) + { + uint32 subTableLength = be::peek(pRtn); + if (i + 1 == csuPlatforms) + { + if (subTableLength > length - offset) + return NULL; + } + else if (subTableLength > be::swap(pTable->encoding[i+1].offset)) + return NULL; + } + } + return reinterpret_cast(pCmap) + offset; + } + } + + return 0; +} + +/*---------------------------------------------------------------------------------------------- + Check the Microsoft Unicode subtable for expected values +----------------------------------------------------------------------------------------------*/ +bool CheckCmapSubtable4(const void * pCmapSubtable4) +{ + if (!pCmapSubtable4) return false; + const Sfnt::CmapSubTable * pTable = reinterpret_cast(pCmapSubtable4); + // Bob H says ome freeware TT fonts have version 1 (eg, CALIGULA.TTF) + // so don't check subtable version. 21 Mar 2002 spec changes version to language. + if (be::swap(pTable->format) != 4) return false; + const Sfnt::CmapSubTableFormat4 * pTable4 = reinterpret_cast(pCmapSubtable4); + uint16 length = be::swap(pTable4->length); + if (length < sizeof(Sfnt::CmapSubTableFormat4)) + return false; + uint16 nRanges = be::swap(pTable4->seg_count_x2) >> 1; + if (length < sizeof(Sfnt::CmapSubTableFormat4) + 4 * nRanges * sizeof(uint16)) + return false; + // check last range is properly terminated + uint16 chEnd = be::peek(pTable4->end_code + nRanges - 1); + return (chEnd == 0xFFFF); +} + +/*---------------------------------------------------------------------------------------------- + Return the Glyph ID for the given Unicode ID in the Microsoft Unicode subtable. + (Actually this code only depends on subtable being format 4.) + Return 0 if the Unicode ID is not in the subtable. +----------------------------------------------------------------------------------------------*/ +gid16 CmapSubtable4Lookup(const void * pCmapSubtabel4, unsigned int nUnicodeId, int rangeKey) +{ + const Sfnt::CmapSubTableFormat4 * pTable = reinterpret_cast(pCmapSubtabel4); + + uint16 nSeg = be::swap(pTable->seg_count_x2) >> 1; + + uint16 n; + const uint16 * pLeft, * pMid; + uint16 cMid, chStart, chEnd; + + if (rangeKey) + { + pMid = &(pTable->end_code[rangeKey]); + chEnd = be::peek(pMid); + n = rangeKey; + } + else + { + // Binary search of the endCode[] array + pLeft = &(pTable->end_code[0]); + n = nSeg; + while (n > 0) + { + cMid = n >> 1; // Pick an element in the middle + pMid = pLeft + cMid; + chEnd = be::peek(pMid); + if (nUnicodeId <= chEnd) + { + if (cMid == 0 || nUnicodeId > be::peek(pMid -1)) + break; // Must be this seg or none! + n = cMid; // Continue on left side, omitting mid point + } + else + { + pLeft = pMid + 1; // Continue on right side, omitting mid point + n -= (cMid + 1); + } + } + + if (!n) + return 0; + } + + // Ok, we're down to one segment and pMid points to the endCode element + // Either this is it or none is. + + chStart = be::peek(pMid += nSeg + 1); + if (chEnd >= nUnicodeId && nUnicodeId >= chStart) + { + // Found correct segment. Find Glyph Id + int16 idDelta = be::peek(pMid += nSeg); + uint16 idRangeOffset = be::peek(pMid += nSeg); + + if (idRangeOffset == 0) + return (uint16)(idDelta + nUnicodeId); // must use modulus 2^16 + + // Look up value in glyphIdArray + size_t offset = (nUnicodeId - chStart) + (idRangeOffset >> 1) + + (reinterpret_cast(pMid) - reinterpret_cast(pTable)); + if (offset * 2 >= pTable->length) + return 0; + gid16 nGlyphId = be::peek(pMid + (nUnicodeId - chStart) + (idRangeOffset >> 1)); + // If this value is 0, return 0. Else add the idDelta + return nGlyphId ? nGlyphId + idDelta : 0; + } + + return 0; +} + +/*---------------------------------------------------------------------------------------------- + Return the next Unicode value in the cmap. Pass 0 to obtain the first item. + Returns 0xFFFF as the last item. + pRangeKey is an optional key that is used to optimize the search; its value is the range + in which the character is found. +----------------------------------------------------------------------------------------------*/ +unsigned int CmapSubtable4NextCodepoint(const void *pCmap31, unsigned int nUnicodeId, int * pRangeKey) +{ + const Sfnt::CmapSubTableFormat4 * pTable = reinterpret_cast(pCmap31); + + uint16 nRange = be::swap(pTable->seg_count_x2) >> 1; + + uint32 nUnicodePrev = (uint32)nUnicodeId; + + const uint16 * pStartCode = &(pTable->end_code[0]) + + nRange // length of end code array + + 1; // reserved word + + if (nUnicodePrev == 0) + { + // return the first codepoint. + if (pRangeKey) + *pRangeKey = 0; + return be::peek(pStartCode); + } + else if (nUnicodePrev >= 0xFFFF) + { + if (pRangeKey) + *pRangeKey = nRange - 1; + return 0xFFFF; + } + + int iRange = (pRangeKey) ? *pRangeKey : 0; + // Just in case we have a bad key: + while (iRange > 0 && be::peek(pStartCode + iRange) > nUnicodePrev) + iRange--; + while (be::peek(pTable->end_code + iRange) < nUnicodePrev) + iRange++; + + // Now iRange is the range containing nUnicodePrev. + unsigned int nStartCode = be::peek(pStartCode + iRange); + unsigned int nEndCode = be::peek(pTable->end_code + iRange); + + if (nStartCode > nUnicodePrev) + // Oops, nUnicodePrev is not in the cmap! Adjust so we get a reasonable + // answer this time around. + nUnicodePrev = nStartCode - 1; + + if (nEndCode > nUnicodePrev) + { + // Next is in the same range; it is the next successive codepoint. + if (pRangeKey) + *pRangeKey = iRange; + return nUnicodePrev + 1; + } + + // Otherwise the next codepoint is the first one in the next range. + // There is guaranteed to be a next range because there must be one that + // ends with 0xFFFF. + if (pRangeKey) + *pRangeKey = iRange + 1; + return be::peek(pStartCode + iRange + 1); +} + +/*---------------------------------------------------------------------------------------------- + Check the Microsoft UCS-4 subtable for expected values. +----------------------------------------------------------------------------------------------*/ +bool CheckCmapSubtable12(const void *pCmapSubtable12) +{ + if (!pCmapSubtable12) return false; + const Sfnt::CmapSubTable * pTable = reinterpret_cast(pCmapSubtable12); + if (be::swap(pTable->format) != 12) + return false; + const Sfnt::CmapSubTableFormat12 * pTable12 = reinterpret_cast(pCmapSubtable12); + uint32 length = be::swap(pTable12->length); + if (length < sizeof(Sfnt::CmapSubTableFormat12)) + return false; + + return (length == (sizeof(Sfnt::CmapSubTableFormat12) + (be::swap(pTable12->num_groups) - 1) + * sizeof(uint32) * 3)); +} + +/*---------------------------------------------------------------------------------------------- + Return the Glyph ID for the given Unicode ID in the Microsoft UCS-4 subtable. + (Actually this code only depends on subtable being format 12.) + Return 0 if the Unicode ID is not in the subtable. +----------------------------------------------------------------------------------------------*/ +gid16 CmapSubtable12Lookup(const void * pCmap310, unsigned int uUnicodeId, int rangeKey) +{ + const Sfnt::CmapSubTableFormat12 * pTable = reinterpret_cast(pCmap310); + + //uint32 uLength = be::swap(pTable->length); //could use to test for premature end of table + uint32 ucGroups = be::swap(pTable->num_groups); + + for (unsigned int i = rangeKey; i < ucGroups; i++) + { + uint32 uStartCode = be::swap(pTable->group[i].start_char_code); + uint32 uEndCode = be::swap(pTable->group[i].end_char_code); + if (uUnicodeId >= uStartCode && uUnicodeId <= uEndCode) + { + uint32 uDiff = uUnicodeId - uStartCode; + uint32 uStartGid = be::swap(pTable->group[i].start_glyph_id); + return static_cast(uStartGid + uDiff); + } + } + + return 0; +} + +/*---------------------------------------------------------------------------------------------- + Return the next Unicode value in the cmap. Pass 0 to obtain the first item. + Returns 0x10FFFF as the last item. + pRangeKey is an optional key that is used to optimize the search; its value is the range + in which the character is found. +----------------------------------------------------------------------------------------------*/ +unsigned int CmapSubtable12NextCodepoint(const void *pCmap310, unsigned int nUnicodeId, int * pRangeKey) +{ + const Sfnt::CmapSubTableFormat12 * pTable = reinterpret_cast(pCmap310); + + int nRange = be::swap(pTable->num_groups); + + uint32 nUnicodePrev = (uint32)nUnicodeId; + + if (nUnicodePrev == 0) + { + // return the first codepoint. + if (pRangeKey) + *pRangeKey = 0; + return be::swap(pTable->group[0].start_char_code); + } + else if (nUnicodePrev >= 0x10FFFF) + { + if (pRangeKey) + *pRangeKey = nRange; + return 0x10FFFF; + } + + int iRange = (pRangeKey) ? *pRangeKey : 0; + // Just in case we have a bad key: + while (iRange > 0 && be::swap(pTable->group[iRange].start_char_code) > nUnicodePrev) + iRange--; + while (be::swap(pTable->group[iRange].end_char_code) < nUnicodePrev) + iRange++; + + // Now iRange is the range containing nUnicodePrev. + + unsigned int nStartCode = be::swap(pTable->group[iRange].start_char_code); + unsigned int nEndCode = be::swap(pTable->group[iRange].end_char_code); + + if (nStartCode > nUnicodePrev) + // Oops, nUnicodePrev is not in the cmap! Adjust so we get a reasonable + // answer this time around. + nUnicodePrev = nStartCode - 1; + + if (nEndCode > nUnicodePrev) + { + // Next is in the same range; it is the next successive codepoint. + if (pRangeKey) + *pRangeKey = iRange; + return nUnicodePrev + 1; + } + + // Otherwise the next codepoint is the first one in the next range, or 10FFFF if we're done. + if (pRangeKey) + *pRangeKey = iRange + 1; + return (iRange + 1 >= nRange) ? 0x10FFFF : be::swap(pTable->group[iRange + 1].start_char_code); +} + +/*---------------------------------------------------------------------------------------------- + Return the offset stored in the loca table for the given Glyph ID. + (This offset is into the glyf table.) + Return -1 if the lookup failed. + Technically this method should return an unsigned long but it is unlikely the offset will + exceed 2^31. +----------------------------------------------------------------------------------------------*/ +size_t LocaLookup(gid16 nGlyphId, + const void * pLoca, size_t lLocaSize, + const void * pHead) // throw (std::out_of_range) +{ + const Sfnt::FontHeader * pTable = reinterpret_cast(pHead); + + // CheckTable verifies the index_to_loc_format is valid + if (be::swap(pTable->index_to_loc_format) == Sfnt::FontHeader::ShortIndexLocFormat) + { // loca entries are two bytes and have been divided by two + if (nGlyphId < (lLocaSize >> 1) - 1) // allow sentinel value to be accessed + { + const uint16 * pShortTable = reinterpret_cast(pLoca); + return (be::peek(pShortTable + nGlyphId) << 1); + } + } + + if (be::swap(pTable->index_to_loc_format) == Sfnt::FontHeader::LongIndexLocFormat) + { // loca entries are four bytes + if (nGlyphId < (lLocaSize >> 2) - 1) + { + const uint32 * pLongTable = reinterpret_cast(pLoca); + return be::peek(pLongTable + nGlyphId); + } + } + + // only get here if glyph id was bad + return -1; + //throw std::out_of_range("glyph id out of range for font"); +} + +/*---------------------------------------------------------------------------------------------- + Return a pointer into the glyf table based on the given offset (from LocaLookup). + Return NULL on error. +----------------------------------------------------------------------------------------------*/ +void * GlyfLookup(const void * pGlyf, size_t nGlyfOffset, size_t nTableLen) +{ + const uint8 * pByte = reinterpret_cast(pGlyf); + if (nGlyfOffset == size_t(-1) || nGlyfOffset >= nTableLen) + return NULL; + return const_cast(pByte + nGlyfOffset); +} + +/*---------------------------------------------------------------------------------------------- + Get the bounding box coordinates for a simple glyf entry (non-composite). + Return true if successful, false otherwise. +----------------------------------------------------------------------------------------------*/ +bool GlyfBox(const void * pSimpleGlyf, int & xMin, int & yMin, + int & xMax, int & yMax) +{ + const Sfnt::Glyph * pGlyph = reinterpret_cast(pSimpleGlyf); + + xMin = be::swap(pGlyph->x_min); + yMin = be::swap(pGlyph->y_min); + xMax = be::swap(pGlyph->x_max); + yMax = be::swap(pGlyph->y_max); + + return true; +} + +#ifdef ALL_TTFUTILS +/*---------------------------------------------------------------------------------------------- + Return the number of contours for a simple glyf entry (non-composite) + Returning -1 means this is a composite glyph +----------------------------------------------------------------------------------------------*/ +int GlyfContourCount(const void * pSimpleGlyf) +{ + const Sfnt::Glyph * pGlyph = reinterpret_cast(pSimpleGlyf); + return be::swap(pGlyph->number_of_contours); // -1 means composite glyph +} + +/*---------------------------------------------------------------------------------------------- + Get the point numbers for the end points of the glyph contours for a simple + glyf entry (non-composite). + cnPointsTotal - count of contours from GlyfContourCount(); (same as number of end points) + prgnContourEndPoints - should point to a buffer large enough to hold cnPoints integers + cnPoints - count of points placed in above range + Return true if successful, false otherwise. + False could indicate a multi-level composite glyphs. +----------------------------------------------------------------------------------------------*/ +bool GlyfContourEndPoints(const void * pSimpleGlyf, int * prgnContourEndPoint, + int cnPointsTotal, int & cnPoints) +{ + const Sfnt::SimpleGlyph * pGlyph = reinterpret_cast(pSimpleGlyf); + + int cContours = be::swap(pGlyph->number_of_contours); + if (cContours < 0) + return false; // this method isn't supposed handle composite glyphs + + for (int i = 0; i < cContours && i < cnPointsTotal; i++) + { + prgnContourEndPoint[i] = be::swap(pGlyph->end_pts_of_contours[i]); + } + + cnPoints = cContours; + return true; +} + +/*---------------------------------------------------------------------------------------------- + Get the points for a simple glyf entry (non-composite) + cnPointsTotal - count of points from largest end point obtained from GlyfContourEndPoints + prgnX & prgnY - should point to buffers large enough to hold cnPointsTotal integers + The ranges are parallel so that coordinates for point(n) are found at offset n in both + ranges. This is raw point data with relative coordinates. + prgbFlag - should point to a buffer a large enough to hold cnPointsTotal bytes + This range is parallel to the prgnX & prgnY + cnPoints - count of points placed in above ranges + Return true if successful, false otherwise. + False could indicate a composite glyph +----------------------------------------------------------------------------------------------*/ +bool GlyfPoints(const void * pSimpleGlyf, int * prgnX, int * prgnY, + char * prgbFlag, int cnPointsTotal, int & cnPoints) +{ + using namespace Sfnt; + + const Sfnt::SimpleGlyph * pGlyph = reinterpret_cast(pSimpleGlyf); + int cContours = be::swap(pGlyph->number_of_contours); + // return false for composite glyph + if (cContours <= 0) + return false; + int cPts = be::swap(pGlyph->end_pts_of_contours[cContours - 1]) + 1; + if (cPts > cnPointsTotal) + return false; + + // skip over bounding box data & point to byte count of instructions (hints) + const uint8 * pbGlyph = reinterpret_cast + (&pGlyph->end_pts_of_contours[cContours]); + + // skip over hints & point to first flag + int cbHints = be::swap(*(uint16 *)pbGlyph); + pbGlyph += sizeof(uint16); + pbGlyph += cbHints; + + // load flags & point to first x coordinate + int iFlag = 0; + while (iFlag < cPts) + { + if (!(*pbGlyph & SimpleGlyph::Repeat)) + { // flag isn't repeated + prgbFlag[iFlag] = (char)*pbGlyph; + pbGlyph++; + iFlag++; + } + else + { // flag is repeated; count specified by next byte + char chFlag = (char)*pbGlyph; + pbGlyph++; + int cFlags = (int)*pbGlyph; + pbGlyph++; + prgbFlag[iFlag] = chFlag; + iFlag++; + for (int i = 0; i < cFlags; i++) + { + prgbFlag[iFlag + i] = chFlag; + } + iFlag += cFlags; + } + } + if (iFlag != cPts) + return false; + + // load x coordinates + iFlag = 0; + while (iFlag < cPts) + { + if (prgbFlag[iFlag] & SimpleGlyph::XShort) + { + prgnX[iFlag] = *pbGlyph; + if (!(prgbFlag[iFlag] & SimpleGlyph::XIsPos)) + { + prgnX[iFlag] = -prgnX[iFlag]; + } + pbGlyph++; + } + else + { + if (prgbFlag[iFlag] & SimpleGlyph::XIsSame) + { + prgnX[iFlag] = 0; + // do NOT increment pbGlyph + } + else + { + prgnX[iFlag] = be::swap(*(int16 *)pbGlyph); + pbGlyph += sizeof(int16); + } + } + iFlag++; + } + + // load y coordinates + iFlag = 0; + while (iFlag < cPts) + { + if (prgbFlag[iFlag] & SimpleGlyph::YShort) + { + prgnY[iFlag] = *pbGlyph; + if (!(prgbFlag[iFlag] & SimpleGlyph::YIsPos)) + { + prgnY[iFlag] = -prgnY[iFlag]; + } + pbGlyph++; + } + else + { + if (prgbFlag[iFlag] & SimpleGlyph::YIsSame) + { + prgnY[iFlag] = 0; + // do NOT increment pbGlyph + } + else + { + prgnY[iFlag] = be::swap(*(int16 *)pbGlyph); + pbGlyph += sizeof(int16); + } + } + iFlag++; + } + + cnPoints = cPts; + return true; +} + +/*---------------------------------------------------------------------------------------------- + Fill prgnCompId with the component Glyph IDs from pSimpleGlyf. + Client must allocate space before calling. + pSimpleGlyf - assumed to point to a composite glyph + cCompIdTotal - the number of elements in prgnCompId + cCompId - the total number of Glyph IDs stored in prgnCompId + Return true if successful, false otherwise + False could indicate a non-composite glyph or the input array was not big enough +----------------------------------------------------------------------------------------------*/ +bool GetComponentGlyphIds(const void * pSimpleGlyf, int * prgnCompId, + size_t cnCompIdTotal, size_t & cnCompId) +{ + using namespace Sfnt; + + if (GlyfContourCount(pSimpleGlyf) >= 0) + return false; + + const Sfnt::SimpleGlyph * pGlyph = reinterpret_cast(pSimpleGlyf); + // for a composite glyph, the special data begins here + const uint8 * pbGlyph = reinterpret_cast(&pGlyph->end_pts_of_contours[0]); + + uint16 GlyphFlags; + size_t iCurrentComp = 0; + do + { + GlyphFlags = be::swap(*((uint16 *)pbGlyph)); + pbGlyph += sizeof(uint16); + prgnCompId[iCurrentComp++] = be::swap(*((uint16 *)pbGlyph)); + pbGlyph += sizeof(uint16); + if (iCurrentComp >= cnCompIdTotal) + return false; + int nOffset = 0; + nOffset += GlyphFlags & CompoundGlyph::Arg1Arg2Words ? 4 : 2; + nOffset += GlyphFlags & CompoundGlyph::HaveScale ? 2 : 0; + nOffset += GlyphFlags & CompoundGlyph::HaveXAndYScale ? 4 : 0; + nOffset += GlyphFlags & CompoundGlyph::HaveTwoByTwo ? 8 : 0; + pbGlyph += nOffset; + } while (GlyphFlags & CompoundGlyph::MoreComponents); + + cnCompId = iCurrentComp; + + return true; +} + +/*---------------------------------------------------------------------------------------------- + Return info on how a component glyph is to be placed + pSimpleGlyph - assumed to point to a composite glyph + nCompId - glyph id for component of interest + bOffset - if true, a & b are the x & y offsets for this component + if false, b is the point on this component that is attaching to point a on the + preceding glyph + Return true if successful, false otherwise + False could indicate a non-composite glyph or that component wasn't found +----------------------------------------------------------------------------------------------*/ +bool GetComponentPlacement(const void * pSimpleGlyf, int nCompId, + bool fOffset, int & a, int & b) +{ + using namespace Sfnt; + + if (GlyfContourCount(pSimpleGlyf) >= 0) + return false; + + const Sfnt::SimpleGlyph * pGlyph = reinterpret_cast(pSimpleGlyf); + // for a composite glyph, the special data begins here + const uint8 * pbGlyph = reinterpret_cast(&pGlyph->end_pts_of_contours[0]); + + uint16 GlyphFlags; + do + { + GlyphFlags = be::swap(*((uint16 *)pbGlyph)); + pbGlyph += sizeof(uint16); + if (be::swap(*((uint16 *)pbGlyph)) == nCompId) + { + pbGlyph += sizeof(uint16); // skip over glyph id of component + fOffset = (GlyphFlags & CompoundGlyph::ArgsAreXYValues) == CompoundGlyph::ArgsAreXYValues; + + if (GlyphFlags & CompoundGlyph::Arg1Arg2Words ) + { + a = be::swap(*(int16 *)pbGlyph); + pbGlyph += sizeof(int16); + b = be::swap(*(int16 *)pbGlyph); + pbGlyph += sizeof(int16); + } + else + { // args are signed bytes + a = *pbGlyph++; + b = *pbGlyph++; + } + return true; + } + pbGlyph += sizeof(uint16); // skip over glyph id of component + int nOffset = 0; + nOffset += GlyphFlags & CompoundGlyph::Arg1Arg2Words ? 4 : 2; + nOffset += GlyphFlags & CompoundGlyph::HaveScale ? 2 : 0; + nOffset += GlyphFlags & CompoundGlyph::HaveXAndYScale ? 4 : 0; + nOffset += GlyphFlags & CompoundGlyph::HaveTwoByTwo ? 8 : 0; + pbGlyph += nOffset; + } while (GlyphFlags & CompoundGlyph::MoreComponents); + + // didn't find requested component + fOffset = true; + a = 0; + b = 0; + return false; +} + +/*---------------------------------------------------------------------------------------------- + Return info on how a component glyph is to be transformed + pSimpleGlyph - assumed to point to a composite glyph + nCompId - glyph id for component of interest + flt11, flt11, flt11, flt11 - a 2x2 matrix giving the transform + bTransOffset - whether to transform the offset from above method + The spec is unclear about the meaning of this flag + Currently - initialize to true for MS rasterizer and false for Mac rasterizer, then + on return it will indicate whether transform should apply to offset (MSDN CD 10/99) + Return true if successful, false otherwise + False could indicate a non-composite glyph or that component wasn't found +----------------------------------------------------------------------------------------------*/ +bool GetComponentTransform(const void * pSimpleGlyf, int nCompId, + float & flt11, float & flt12, float & flt21, float & flt22, + bool & fTransOffset) +{ + using namespace Sfnt; + + if (GlyfContourCount(pSimpleGlyf) >= 0) + return false; + + const Sfnt::SimpleGlyph * pGlyph = reinterpret_cast(pSimpleGlyf); + // for a composite glyph, the special data begins here + const uint8 * pbGlyph = reinterpret_cast(&pGlyph->end_pts_of_contours[0]); + + uint16 GlyphFlags; + do + { + GlyphFlags = be::swap(*((uint16 *)pbGlyph)); + pbGlyph += sizeof(uint16); + if (be::swap(*((uint16 *)pbGlyph)) == nCompId) + { + pbGlyph += sizeof(uint16); // skip over glyph id of component + pbGlyph += GlyphFlags & CompoundGlyph::Arg1Arg2Words ? 4 : 2; // skip over placement data + + if (fTransOffset) // MS rasterizer + fTransOffset = !(GlyphFlags & CompoundGlyph::UnscaledOffset); + else // Apple rasterizer + fTransOffset = (GlyphFlags & CompoundGlyph::ScaledOffset) != 0; + + if (GlyphFlags & CompoundGlyph::HaveScale) + { + flt11 = fixed_to_float<14>(be::swap(*(uint16 *)pbGlyph)); + pbGlyph += sizeof(uint16); + flt12 = 0; + flt21 = 0; + flt22 = flt11; + } + else if (GlyphFlags & CompoundGlyph::HaveXAndYScale) + { + flt11 = fixed_to_float<14>(be::swap(*(uint16 *)pbGlyph)); + pbGlyph += sizeof(uint16); + flt12 = 0; + flt21 = 0; + flt22 = fixed_to_float<14>(be::swap(*(uint16 *)pbGlyph)); + pbGlyph += sizeof(uint16); + } + else if (GlyphFlags & CompoundGlyph::HaveTwoByTwo) + { + flt11 = fixed_to_float<14>(be::swap(*(uint16 *)pbGlyph)); + pbGlyph += sizeof(uint16); + flt12 = fixed_to_float<14>(be::swap(*(uint16 *)pbGlyph)); + pbGlyph += sizeof(uint16); + flt21 = fixed_to_float<14>(be::swap(*(uint16 *)pbGlyph)); + pbGlyph += sizeof(uint16); + flt22 = fixed_to_float<14>(be::swap(*(uint16 *)pbGlyph)); + pbGlyph += sizeof(uint16); + } + else + { // identity transform + flt11 = 1.0; + flt12 = 0.0; + flt21 = 0.0; + flt22 = 1.0; + } + return true; + } + pbGlyph += sizeof(uint16); // skip over glyph id of component + int nOffset = 0; + nOffset += GlyphFlags & CompoundGlyph::Arg1Arg2Words ? 4 : 2; + nOffset += GlyphFlags & CompoundGlyph::HaveScale ? 2 : 0; + nOffset += GlyphFlags & CompoundGlyph::HaveXAndYScale ? 4 : 0; + nOffset += GlyphFlags & CompoundGlyph::HaveTwoByTwo ? 8 : 0; + pbGlyph += nOffset; + } while (GlyphFlags & CompoundGlyph::MoreComponents); + + // didn't find requested component + fTransOffset = false; + flt11 = 1; + flt12 = 0; + flt21 = 0; + flt22 = 1; + return false; +} +#endif + +/*---------------------------------------------------------------------------------------------- + Return a pointer into the glyf table based on the given tables and Glyph ID + Since this method doesn't check for spaces, it is good to call IsSpace before using it. + Return NULL on error. +----------------------------------------------------------------------------------------------*/ +void * GlyfLookup(gid16 nGlyphId, const void * pGlyf, const void * pLoca, + size_t lGlyfSize, size_t lLocaSize, const void * pHead) +{ + // test for valid glyph id + // CheckTable verifies the index_to_loc_format is valid + + const Sfnt::FontHeader * pTable + = reinterpret_cast(pHead); + + if (be::swap(pTable->index_to_loc_format) == Sfnt::FontHeader::ShortIndexLocFormat) + { // loca entries are two bytes (and have been divided by two) + if (nGlyphId >= (lLocaSize >> 1) - 1) // don't allow nGlyphId to access sentinel + { +// throw std::out_of_range("glyph id out of range for font"); + return NULL; + } + } + if (be::swap(pTable->index_to_loc_format) == Sfnt::FontHeader::LongIndexLocFormat) + { // loca entries are four bytes + if (nGlyphId >= (lLocaSize >> 2) - 1) + { +// throw std::out_of_range("glyph id out of range for font"); + return NULL; + } + } + + long lGlyfOffset = LocaLookup(nGlyphId, pLoca, lLocaSize, pHead); + void * pSimpleGlyf = GlyfLookup(pGlyf, lGlyfOffset, lGlyfSize); // invalid loca offset returns null + return pSimpleGlyf; +} + +#ifdef ALL_TTFUTILS +/*---------------------------------------------------------------------------------------------- + Determine if a particular Glyph ID has any data in the glyf table. If it is white space, + there will be no glyf data, though there will be metric data in hmtx, etc. +----------------------------------------------------------------------------------------------*/ +bool IsSpace(gid16 nGlyphId, const void * pLoca, size_t lLocaSize, const void * pHead) +{ + size_t lGlyfOffset = LocaLookup(nGlyphId, pLoca, lLocaSize, pHead); + + // the +1 should always work because there is a sentinel value at the end of the loca table + size_t lNextGlyfOffset = LocaLookup(nGlyphId + 1, pLoca, lLocaSize, pHead); + + return (lNextGlyfOffset - lGlyfOffset) == 0; +} + +/*---------------------------------------------------------------------------------------------- + Determine if a particular Glyph ID is a multi-level composite. +----------------------------------------------------------------------------------------------*/ +bool IsDeepComposite(gid16 nGlyphId, const void * pGlyf, const void * pLoca, + size_t lGlyfSize, long lLocaSize, const void * pHead) +{ + if (IsSpace(nGlyphId, pLoca, lLocaSize, pHead)) {return false;} + + void * pSimpleGlyf = GlyfLookup(nGlyphId, pGlyf, pLoca, lGlyfSize, lLocaSize, pHead); + if (pSimpleGlyf == NULL) + return false; // no way to really indicate an error occured here + + if (GlyfContourCount(pSimpleGlyf) >= 0) + return false; + + int rgnCompId[kMaxGlyphComponents]; // assumes only a limited number of glyph components + size_t cCompIdTotal = kMaxGlyphComponents; + size_t cCompId = 0; + + if (!GetComponentGlyphIds(pSimpleGlyf, rgnCompId, cCompIdTotal, cCompId)) + return false; + + for (size_t i = 0; i < cCompId; i++) + { + pSimpleGlyf = GlyfLookup(static_cast(rgnCompId[i]), + pGlyf, pLoca, lGlyfSize, lLocaSize, pHead); + if (pSimpleGlyf == NULL) {return false;} + + if (GlyfContourCount(pSimpleGlyf) < 0) + return true; + } + + return false; +} + +/*---------------------------------------------------------------------------------------------- + Get the bounding box coordinates based on the given tables and Glyph ID + Handles both simple and composite glyphs. + Return true if successful, false otherwise. On false, all point values will be INT_MIN + False may indicate a white space glyph +----------------------------------------------------------------------------------------------*/ +bool GlyfBox(gid16 nGlyphId, const void * pGlyf, const void * pLoca, + size_t lGlyfSize, size_t lLocaSize, const void * pHead, int & xMin, int & yMin, int & xMax, int & yMax) +{ + xMin = yMin = xMax = yMax = INT_MIN; + + if (IsSpace(nGlyphId, pLoca, lLocaSize, pHead)) {return false;} + + void * pSimpleGlyf = GlyfLookup(nGlyphId, pGlyf, pLoca, lGlyfSize, lLocaSize, pHead); + if (pSimpleGlyf == NULL) {return false;} + + return GlyfBox(pSimpleGlyf, xMin, yMin, xMax, yMax); +} + +/*---------------------------------------------------------------------------------------------- + Get the number of contours based on the given tables and Glyph ID + Handles both simple and composite glyphs. + Return true if successful, false otherwise. On false, cnContours will be INT_MIN + False may indicate a white space glyph or a multi-level composite glyph. +----------------------------------------------------------------------------------------------*/ +bool GlyfContourCount(gid16 nGlyphId, const void * pGlyf, const void * pLoca, + size_t lGlyfSize, size_t lLocaSize, const void * pHead, size_t & cnContours) +{ + cnContours = static_cast(INT_MIN); + + if (IsSpace(nGlyphId, pLoca, lLocaSize, pHead)) {return false;} + + void * pSimpleGlyf = GlyfLookup(nGlyphId, pGlyf, pLoca, lGlyfSize, lLocaSize, pHead); + if (pSimpleGlyf == NULL) {return false;} + + int cRtnContours = GlyfContourCount(pSimpleGlyf); + if (cRtnContours >= 0) + { + cnContours = size_t(cRtnContours); + return true; + } + + //handle composite glyphs + + int rgnCompId[kMaxGlyphComponents]; // assumes no glyph will be made of more than 8 components + size_t cCompIdTotal = kMaxGlyphComponents; + size_t cCompId = 0; + + if (!GetComponentGlyphIds(pSimpleGlyf, rgnCompId, cCompIdTotal, cCompId)) + return false; + + cRtnContours = 0; + int cTmp = 0; + for (size_t i = 0; i < cCompId; i++) + { + if (IsSpace(static_cast(rgnCompId[i]), pLoca, lLocaSize, pHead)) {return false;} + pSimpleGlyf = GlyfLookup(static_cast(rgnCompId[i]), + pGlyf, pLoca, lGlyfSize, lLocaSize, pHead); + if (pSimpleGlyf == 0) {return false;} + // return false on multi-level composite + if ((cTmp = GlyfContourCount(pSimpleGlyf)) < 0) + return false; + cRtnContours += cTmp; + } + + cnContours = size_t(cRtnContours); + return true; +} + +/*---------------------------------------------------------------------------------------------- + Get the point numbers for the end points of the glyph contours based on the given tables + and Glyph ID + Handles both simple and composite glyphs. + cnPoints - count of contours from GlyfContourCount (same as number of end points) + prgnContourEndPoints - should point to a buffer large enough to hold cnPoints integers + Return true if successful, false otherwise. On false, all end points are INT_MIN + False may indicate a white space glyph or a multi-level composite glyph. +----------------------------------------------------------------------------------------------*/ +bool GlyfContourEndPoints(gid16 nGlyphId, const void * pGlyf, const void * pLoca, + size_t lGlyfSize, size_t lLocaSize, const void * pHead, + int * prgnContourEndPoint, size_t cnPoints) +{ + memset(prgnContourEndPoint, 0xFF, cnPoints * sizeof(int)); + // std::fill_n(prgnContourEndPoint, cnPoints, INT_MIN); + + if (IsSpace(nGlyphId, pLoca, lLocaSize, pHead)) {return false;} + + void * pSimpleGlyf = GlyfLookup(nGlyphId, pGlyf, pLoca, lGlyfSize, lLocaSize, pHead); + if (pSimpleGlyf == NULL) {return false;} + + int cContours = GlyfContourCount(pSimpleGlyf); + int cActualPts = 0; + if (cContours > 0) + return GlyfContourEndPoints(pSimpleGlyf, prgnContourEndPoint, cnPoints, cActualPts); + + // handle composite glyphs + + int rgnCompId[kMaxGlyphComponents]; // assumes no glyph will be made of more than 8 components + size_t cCompIdTotal = kMaxGlyphComponents; + size_t cCompId = 0; + + if (!GetComponentGlyphIds(pSimpleGlyf, rgnCompId, cCompIdTotal, cCompId)) + return false; + + int * prgnCurrentEndPoint = prgnContourEndPoint; + int cCurrentPoints = cnPoints; + int nPrevPt = 0; + for (size_t i = 0; i < cCompId; i++) + { + if (IsSpace(static_cast(rgnCompId[i]), pLoca, lLocaSize, pHead)) {return false;} + pSimpleGlyf = GlyfLookup(static_cast(rgnCompId[i]), pGlyf, pLoca, lGlyfSize, lLocaSize, pHead); + if (pSimpleGlyf == NULL) {return false;} + // returns false on multi-level composite + if (!GlyfContourEndPoints(pSimpleGlyf, prgnCurrentEndPoint, cCurrentPoints, cActualPts)) + return false; + // points in composite are numbered sequentially as components are added + // must adjust end point numbers for new point numbers + for (int j = 0; j < cActualPts; j++) + prgnCurrentEndPoint[j] += nPrevPt; + nPrevPt = prgnCurrentEndPoint[cActualPts - 1] + 1; + + prgnCurrentEndPoint += cActualPts; + cCurrentPoints -= cActualPts; + } + + return true; +} + +/*---------------------------------------------------------------------------------------------- + Get the points for a glyph based on the given tables and Glyph ID + Handles both simple and composite glyphs. + cnPoints - count of points from largest end point obtained from GlyfContourEndPoints + prgnX & prgnY - should point to buffers large enough to hold cnPoints integers + The ranges are parallel so that coordinates for point(n) are found at offset n in + both ranges. These points are in absolute coordinates. + prgfOnCurve - should point to a buffer a large enough to hold cnPoints bytes (bool) + This range is parallel to the prgnX & prgnY + Return true if successful, false otherwise. On false, all points may be INT_MIN + False may indicate a white space glyph, a multi-level composite, or a corrupt font + // TODO: doesn't support composite glyphs whose components are themselves components + It's not clear from the TTF spec when the transforms should be applied. Should the + transform be done before or after attachment point calcs? (current code - before) + Should the transform be applied to other offsets? (currently - no; however commented + out code is in place so that if CompoundGlyph::UnscaledOffset on the MS rasterizer is + clear (typical) then yes, and if CompoundGlyph::ScaledOffset on the Apple rasterizer is + clear (typical?) then no). See GetComponentTransform. + It's also unclear where point numbering with attachment poinst starts + (currently - first point number is relative to whole glyph, second point number is + relative to current glyph). +----------------------------------------------------------------------------------------------*/ +bool GlyfPoints(gid16 nGlyphId, const void * pGlyf, + const void * pLoca, size_t lGlyfSize, size_t lLocaSize, const void * pHead, + const int * /*prgnContourEndPoint*/, size_t /*cnEndPoints*/, + int * prgnX, int * prgnY, bool * prgfOnCurve, size_t cnPoints) +{ + memset(prgnX, 0x7F, cnPoints * sizeof(int)); + memset(prgnY, 0x7F, cnPoints * sizeof(int)); + + if (IsSpace(nGlyphId, pLoca, lLocaSize, pHead)) + return false; + + void * pSimpleGlyf = GlyfLookup(nGlyphId, pGlyf, pLoca, lGlyfSize, lLocaSize, pHead); + if (pSimpleGlyf == NULL) + return false; + + int cContours = GlyfContourCount(pSimpleGlyf); + int cActualPts; + if (cContours > 0) + { + if (!GlyfPoints(pSimpleGlyf, prgnX, prgnY, (char *)prgfOnCurve, cnPoints, cActualPts)) + return false; + CalcAbsolutePoints(prgnX, prgnY, cnPoints); + SimplifyFlags((char *)prgfOnCurve, cnPoints); + return true; + } + + // handle composite glyphs + int rgnCompId[kMaxGlyphComponents]; // assumes no glyph will be made of more than 8 components + size_t cCompIdTotal = kMaxGlyphComponents; + size_t cCompId = 0; + + // this will fail if there are more components than there is room for + if (!GetComponentGlyphIds(pSimpleGlyf, rgnCompId, cCompIdTotal, cCompId)) + return false; + + int * prgnCurrentX = prgnX; + int * prgnCurrentY = prgnY; + char * prgbCurrentFlag = (char *)prgfOnCurve; // converting bool to char should be safe + int cCurrentPoints = cnPoints; + bool fOffset = true, fTransOff = true; + int a, b; + float flt11, flt12, flt21, flt22; + // int * prgnPrevX = prgnX; // in case first att pt number relative to preceding glyph + // int * prgnPrevY = prgnY; + for (size_t i = 0; i < cCompId; i++) + { + if (IsSpace(static_cast(rgnCompId[i]), pLoca, lLocaSize, pHead)) {return false;} + void * pCompGlyf = GlyfLookup(static_cast(rgnCompId[i]), pGlyf, pLoca, lGlyfSize, lLocaSize, pHead); + if (pCompGlyf == NULL) {return false;} + // returns false on multi-level composite + if (!GlyfPoints(pCompGlyf, prgnCurrentX, prgnCurrentY, prgbCurrentFlag, + cCurrentPoints, cActualPts)) + return false; + if (!GetComponentPlacement(pSimpleGlyf, rgnCompId[i], fOffset, a, b)) + return false; + if (!GetComponentTransform(pSimpleGlyf, rgnCompId[i], + flt11, flt12, flt21, flt22, fTransOff)) + return false; + bool fIdTrans = flt11 == 1.0 && flt12 == 0.0 && flt21 == 0.0 && flt22 == 1.0; + + // convert points to absolute coordinates + // do before transform and attachment point placement are applied + CalcAbsolutePoints(prgnCurrentX, prgnCurrentY, cActualPts); + + // apply transform - see main method note above + // do before attachment point calcs + if (!fIdTrans) + for (int j = 0; j < cActualPts; j++) + { + int x = prgnCurrentX[j]; // store before transform applied + int y = prgnCurrentY[j]; + prgnCurrentX[j] = (int)(x * flt11 + y * flt12); + prgnCurrentY[j] = (int)(x * flt21 + y * flt22); + } + + // apply placement - see main method note above + int nXOff, nYOff; + if (fOffset) // explicit x & y offsets + { + /* ignore fTransOff for now + if (fTransOff && !fIdTrans) + { // transform x & y offsets + nXOff = (int)(a * flt11 + b * flt12); + nYOff = (int)(a * flt21 + b * flt22); + } + else */ + { // don't transform offset + nXOff = a; + nYOff = b; + } + } + else // attachment points + { // in case first point is relative to preceding glyph and second relative to current + // nXOff = prgnPrevX[a] - prgnCurrentX[b]; + // nYOff = prgnPrevY[a] - prgnCurrentY[b]; + // first point number relative to whole composite, second relative to current glyph + nXOff = prgnX[a] - prgnCurrentX[b]; + nYOff = prgnY[a] - prgnCurrentY[b]; + } + for (int j = 0; j < cActualPts; j++) + { + prgnCurrentX[j] += nXOff; + prgnCurrentY[j] += nYOff; + } + + // prgnPrevX = prgnCurrentX; + // prgnPrevY = prgnCurrentY; + prgnCurrentX += cActualPts; + prgnCurrentY += cActualPts; + prgbCurrentFlag += cActualPts; + cCurrentPoints -= cActualPts; + } + + SimplifyFlags((char *)prgfOnCurve, cnPoints); + + return true; +} + +/*---------------------------------------------------------------------------------------------- + Simplify the meaning of flags to just indicate whether point is on-curve or off-curve. +---------------------------------------------------------------------------------------------*/ +bool SimplifyFlags(char * prgbFlags, int cnPoints) +{ + for (int i = 0; i < cnPoints; i++) + prgbFlags[i] = static_cast(prgbFlags[i] & Sfnt::SimpleGlyph::OnCurve); + return true; +} + +/*---------------------------------------------------------------------------------------------- + Convert relative point coordinates to absolute coordinates + Points are stored in the font such that they are offsets from one another except for the + first point of a glyph. +---------------------------------------------------------------------------------------------*/ +bool CalcAbsolutePoints(int * prgnX, int * prgnY, int cnPoints) +{ + int nX = prgnX[0]; + int nY = prgnY[0]; + for (int i = 1; i < cnPoints; i++) + { + prgnX[i] += nX; + nX = prgnX[i]; + prgnY[i] += nY; + nY = prgnY[i]; + } + + return true; +} +#endif + +/*---------------------------------------------------------------------------------------------- + Return the length of the 'name' table in bytes. + Currently used. +---------------------------------------------------------------------------------------------*/ +#if 0 +size_t NameTableLength(const byte * pTable) +{ + byte * pb = (const_cast(pTable)) + 2; // skip format + size_t cRecords = *pb++ << 8; cRecords += *pb++; + int dbStringOffset0 = (*pb++) << 8; dbStringOffset0 += *pb++; + int dbMaxStringOffset = 0; + for (size_t irec = 0; irec < cRecords; irec++) + { + int nPlatform = (*pb++) << 8; nPlatform += *pb++; + int nEncoding = (*pb++) << 8; nEncoding += *pb++; + int nLanguage = (*pb++) << 8; nLanguage += *pb++; + int nName = (*pb++) << 8; nName += *pb++; + int cbStringLen = (*pb++) << 8; cbStringLen += *pb++; + int dbStringOffset = (*pb++) << 8; dbStringOffset += *pb++; + if (dbMaxStringOffset < dbStringOffset + cbStringLen) + dbMaxStringOffset = dbStringOffset + cbStringLen; + } + return dbStringOffset0 + dbMaxStringOffset; +} +#endif + +} // end of namespace TtfUtil +} // end of namespace graphite diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/UtfCodec.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/UtfCodec.cpp new file mode 100644 index 00000000000..ca3c0c0a700 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/UtfCodec.cpp @@ -0,0 +1,45 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#include "inc/UtfCodec.h" +//using namespace graphite2; + +namespace graphite2 { + +} + +using namespace graphite2; + +const int8 _utf_codec<8>::sz_lut[16] = +{ + 1,1,1,1,1,1,1,1, // 1 byte + 0,0,0,0, // trailing byte + 2,2, // 2 bytes + 3, // 3 bytes + 4 // 4 bytes +}; + +const byte _utf_codec<8>::mask_lut[5] = {0x7f, 0xff, 0x3f, 0x1f, 0x0f}; diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/call_machine.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/call_machine.cpp new file mode 100644 index 00000000000..f06f43cbda3 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/call_machine.cpp @@ -0,0 +1,135 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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 call threaded interpreter implmentation for machine.h +// Author: Tim Eves + +// Build either this interpreter or the direct_machine implementation. +// The call threaded interpreter is portable across compilers and +// architectures as well as being useful to debug (you can set breakpoints on +// opcodes) but is slower that the direct threaded interpreter by a factor of 2 + +#include +#include +#include +#include "inc/Machine.h" +#include "inc/Segment.h" +#include "inc/Slot.h" +#include "inc/Rule.h" + +// Disable the unused parameter warning as th compiler is mistaken since dp +// is always updated (even if by 0) on every opcode. +#ifdef __GNUC__ +#pragma GCC diagnostic ignored "-Wunused-parameter" +#endif + +#define registers const byte * & dp, vm::Machine::stack_t * & sp, \ + vm::Machine::stack_t * const sb, regbank & reg + +// These are required by opcodes.h and should not be changed +#define STARTOP(name) bool name(registers) REGPARM(4);\ + bool name(registers) { +#define ENDOP return (sp - sb)/Machine::STACK_MAX==0; \ + } + +#define EXIT(status) { push(status); return false; } + +// This is required by opcode_table.h +#define do_(name) instr(name) + + +using namespace graphite2; +using namespace vm; + +struct regbank { + slotref is; + slotref * map; + SlotMap & smap; + slotref * const map_base; + const instr * & ip; + int8 flags; +}; + +typedef bool (* ip_t)(registers); + +// Pull in the opcode definitions +// We pull these into a private namespace so these otherwise common names dont +// pollute the toplevel namespace. +namespace { +#define smap reg.smap +#define seg smap.segment +#define is reg.is +#define ip reg.ip +#define map reg.map +#define mapb reg.map_base +#define flags reg.flags + +#include "inc/opcodes.h" + +#undef smap +#undef seg +#undef is +#undef ip +#undef map +#undef mapb +#undef flags +} + +Machine::stack_t Machine::run(const instr * program, + const byte * data, + slotref * & map) + +{ + assert(program != 0); + + // Declare virtual machine registers + const instr * ip = program-1; + const byte * dp = data; + stack_t * sp = _stack + Machine::STACK_GUARD, + * const sb = sp; + regbank reg = {*map, map, _map, _map.begin()+_map.context(), ip, 0}; + + // Run the program + while ((reinterpret_cast(*++ip))(dp, sp, sb, reg)) {} + const stack_t ret = sp == _stack+STACK_GUARD+1 ? *sp-- : 0; + + check_final_stack(sp); + map = reg.map; + *map = reg.is; + return ret; +} + +// Pull in the opcode table +namespace { +#include "inc/opcode_table.h" +} + +const opcode_t * Machine::getOpcodeTable() throw() +{ + return opcode_table; +} + + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/direct_machine.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/direct_machine.cpp new file mode 100644 index 00000000000..09709c30336 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/direct_machine.cpp @@ -0,0 +1,117 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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 direct threaded interpreter implmentation for machine.h +// Author: Tim Eves + +// Build either this interpreter or the call_machine implementation. +// The direct threaded interpreter is relies upon a gcc feature called +// labels-as-values so is only portable to compilers that support the +// extension (gcc only as far as I know) however it should build on any +// architecture gcc supports. +// This is twice as fast as the call threaded model and is likely faster on +// inorder processors with short pipelines and little branch prediction such +// as the ARM and possibly Atom chips. + + +#include +#include +#include "inc/Machine.h" +#include "inc/Segment.h" +#include "inc/Slot.h" +#include "inc/Rule.h" + +#define STARTOP(name) name: { +#define ENDOP }; goto *((sp - sb)/Machine::STACK_MAX ? &&end : *++ip); +#define EXIT(status) { push(status); goto end; } + +#define do_(name) &&name + + +using namespace graphite2; +using namespace vm; + +namespace { + +const void * direct_run(const bool get_table_mode, + const instr * program, + const byte * data, + Machine::stack_t * stack, + slotref * & __map, + SlotMap * __smap=0) +{ + // We need to define and return to opcode table from within this function + // other inorder to take the addresses of the instruction bodies. + #include "inc/opcode_table.h" + if (get_table_mode) + return opcode_table; + + // Declare virtual machine registers + const instr * ip = program; + const byte * dp = data; + Machine::stack_t * sp = stack + Machine::STACK_GUARD, + * const sb = sp; + SlotMap & smap = *__smap; + Segment & seg = smap.segment; + slotref is = *__map, + * map = __map, + * const mapb = smap.begin()+smap.context(); + int8 flags = 0; + + // start the program + goto **ip; + + // Pull in the opcode definitions + #include "inc/opcodes.h" + + end: + __map = map; + *__map = is; + return sp; +} + +} + +const opcode_t * Machine::getOpcodeTable() throw() +{ + slotref * dummy; + return static_cast(direct_run(true, 0, 0, 0, dummy, 0)); +} + + +Machine::stack_t Machine::run(const instr * program, + const byte * data, + slotref * & is) +{ + assert(program != 0); + + const stack_t *sp = static_cast( + direct_run(false, program, data, _stack, is, &_map)); + const stack_t ret = sp == _stack+STACK_GUARD+1 ? *sp-- : 0; + check_final_stack(sp); + return ret; +} + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/files.mk b/Build/source/libs/graphite2/graphite2-1.2.0/src/files.mk new file mode 100644 index 00000000000..358acef62df --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/files.mk @@ -0,0 +1,115 @@ +# GRAPHITE2 LICENSING +# +# Copyright 2010, SIL International +# All rights reserved. +# +# This library is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation; either version 2.1 of 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 +# Lesser General Public License for more details. +# +# You should also have received a copy of the GNU Lesser General Public +# License along with this library in the file named "LICENSE". +# If not, write to the Free Software Foundation, 51 Franklin Street, +# Suite 500, Boston, MA 02110-1335, USA or visit their web page on the +# internet at http://www.fsf.org/licenses/lgpl.html. +# +# Alternatively, the contents of this file may be used under the terms of the +# Mozilla Public License (http://mozilla.org/MPL) or 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. + +# Makefile helper file for those wanting to build Graphite2 using make +# The including makefile should set the following variables +# _NS Prefix to all variables this file creates (namespace) +# $(_NS)_MACHINE Set to direct or call. Set to direct if using gcc else +# set to call +# $(_NS)_BASE path to root of graphite2 project +# +# Returns: +# $(_NS)_SOURCES List of source files (with .cpp extension) +# $(_NS)_PRIVATE_HEADERS List of private header files (with .h extension) +# $(_NS)_PUBLIC_HEADERS List of public header files (with .h extension) + + +$(_NS)_SOURCES = \ + $($(_NS)_BASE)/src/$($(_NS)_MACHINE)_machine.cpp \ + $($(_NS)_BASE)/src/gr_char_info.cpp \ + $($(_NS)_BASE)/src/gr_face.cpp \ + $($(_NS)_BASE)/src/gr_features.cpp \ + $($(_NS)_BASE)/src/gr_font.cpp \ + $($(_NS)_BASE)/src/gr_logging.cpp \ + $($(_NS)_BASE)/src/gr_segment.cpp \ + $($(_NS)_BASE)/src/gr_slot.cpp \ + $($(_NS)_BASE)/src/json.cpp \ + $($(_NS)_BASE)/src/Bidi.cpp \ + $($(_NS)_BASE)/src/CachedFace.cpp \ + $($(_NS)_BASE)/src/CmapCache.cpp \ + $($(_NS)_BASE)/src/Code.cpp \ + $($(_NS)_BASE)/src/Face.cpp \ + $($(_NS)_BASE)/src/FeatureMap.cpp \ + $($(_NS)_BASE)/src/FileFace.cpp \ + $($(_NS)_BASE)/src/Font.cpp \ + $($(_NS)_BASE)/src/GlyphCache.cpp \ + $($(_NS)_BASE)/src/GlyphFace.cpp \ + $($(_NS)_BASE)/src/Justifier.cpp \ + $($(_NS)_BASE)/src/NameTable.cpp \ + $($(_NS)_BASE)/src/Pass.cpp \ + $($(_NS)_BASE)/src/SegCache.cpp \ + $($(_NS)_BASE)/src/SegCacheEntry.cpp \ + $($(_NS)_BASE)/src/SegCacheStore.cpp \ + $($(_NS)_BASE)/src/Segment.cpp \ + $($(_NS)_BASE)/src/Silf.cpp \ + $($(_NS)_BASE)/src/Slot.cpp \ + $($(_NS)_BASE)/src/Sparse.cpp \ + $($(_NS)_BASE)/src/TtfUtil.cpp \ + $($(_NS)_BASE)/src/UtfCodec.cpp + +$(_NS)_PRIVATE_HEADERS = \ + $($(_NS)_BASE)/src/inc/bits.h \ + $($(_NS)_BASE)/src/inc/debug.h \ + $($(_NS)_BASE)/src/inc/json.h \ + $($(_NS)_BASE)/src/inc/CachedFace.h \ + $($(_NS)_BASE)/src/inc/CharInfo.h \ + $($(_NS)_BASE)/src/inc/CmapCache.h \ + $($(_NS)_BASE)/src/inc/Code.h \ + $($(_NS)_BASE)/src/inc/Endian.h \ + $($(_NS)_BASE)/src/inc/Face.h \ + $($(_NS)_BASE)/src/inc/FeatureMap.h \ + $($(_NS)_BASE)/src/inc/FeatureVal.h \ + $($(_NS)_BASE)/src/inc/FileFace.h \ + $($(_NS)_BASE)/src/inc/Font.h \ + $($(_NS)_BASE)/src/inc/GlyphCache.h \ + $($(_NS)_BASE)/src/inc/GlyphFace.h \ + $($(_NS)_BASE)/src/inc/List.h \ + $($(_NS)_BASE)/src/inc/locale2lcid.h \ + $($(_NS)_BASE)/src/inc/Machine.h \ + $($(_NS)_BASE)/src/inc/Main.h \ + $($(_NS)_BASE)/src/inc/NameTable.h \ + $($(_NS)_BASE)/src/inc/opcode_table.h \ + $($(_NS)_BASE)/src/inc/opcodes.h \ + $($(_NS)_BASE)/src/inc/Pass.h \ + $($(_NS)_BASE)/src/inc/Position.h \ + $($(_NS)_BASE)/src/inc/Rule.h \ + $($(_NS)_BASE)/src/inc/SegCache.h \ + $($(_NS)_BASE)/src/inc/SegCacheEntry.h \ + $($(_NS)_BASE)/src/inc/SegCacheStore.h \ + $($(_NS)_BASE)/src/inc/Segment.h \ + $($(_NS)_BASE)/src/inc/Silf.h \ + $($(_NS)_BASE)/src/inc/Slot.h \ + $($(_NS)_BASE)/src/inc/Sparse.h \ + $($(_NS)_BASE)/src/inc/TtfTypes.h \ + $($(_NS)_BASE)/src/inc/TtfUtil.h \ + $($(_NS)_BASE)/src/inc/UtfCodec.h + +$(_NS)_PUBLIC_HEADERS = \ + $($(_NS)_BASE)/include/graphite2/Font.h \ + $($(_NS)_BASE)/include/graphite2/Log.h \ + $($(_NS)_BASE)/include/graphite2/Segment.h \ + $($(_NS)_BASE)/include/graphite2/Types.h + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/gr_char_info.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/gr_char_info.cpp new file mode 100644 index 00000000000..ebcb68e593f --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/gr_char_info.cpp @@ -0,0 +1,65 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#include +#include "graphite2/Segment.h" +#include "inc/CharInfo.h" + +extern "C" +{ + +unsigned int gr_cinfo_unicode_char(const gr_char_info* p/*not NULL*/) +{ + assert(p); + return p->unicodeChar(); +} + + +int gr_cinfo_break_weight(const gr_char_info* p/*not NULL*/) +{ + assert(p); + return p->breakWeight(); +} + +int gr_cinfo_after(const gr_char_info *p/*not NULL*/) +{ + assert(p); + return p->after(); +} + +int gr_cinfo_before(const gr_char_info *p/*not NULL*/) +{ + assert(p); + return p->before(); +} + +size_t gr_cinfo_base(const gr_char_info *p/*not NULL*/) +{ + assert(p); + return p->base(); +} + +} // extern "C" diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/gr_face.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/gr_face.cpp new file mode 100644 index 00000000000..e0f24335522 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/gr_face.cpp @@ -0,0 +1,255 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#include "graphite2/Font.h" +#include "inc/Face.h" +#include "inc/FileFace.h" +#include "inc/GlyphCache.h" +#include "inc/CachedFace.h" +#include "inc/CmapCache.h" +#include "inc/Silf.h" + +using namespace graphite2; + +namespace +{ + bool load_face(Face & face, unsigned int options) + { + Face::Table silf(face, Tag::Silf); + if (silf) options &= ~gr_face_dumbRendering; + else if (!(options & gr_face_dumbRendering)) + return false; + + if (!face.readGlyphs(options)) + return false; + + return silf ? face.readFeatures() && face.readGraphite(silf) + : options & gr_face_dumbRendering; + } +} + +extern "C" { + +gr_face* gr_make_face_with_ops(const void* appFaceHandle/*non-NULL*/, const gr_face_ops *ops, unsigned int faceOptions) + //the appFaceHandle must stay alive all the time when the gr_face is alive. When finished with the gr_face, call destroy_face +{ + if (ops == 0) return 0; + + Face *res = new Face(appFaceHandle, *ops); + if (res && load_face(*res, faceOptions)) + return static_cast(res); + + delete res; + return 0; +} + +gr_face* gr_make_face(const void* appFaceHandle/*non-NULL*/, gr_get_table_fn tablefn, unsigned int faceOptions) +{ + const gr_face_ops ops = {sizeof(gr_face_ops), tablefn, NULL}; + return gr_make_face_with_ops(appFaceHandle, &ops, faceOptions); +} + +#ifndef GRAPHITE2_NSEGCACHE +gr_face* gr_make_face_with_seg_cache_and_ops(const void* appFaceHandle/*non-NULL*/, const gr_face_ops *ops, unsigned int cacheSize, unsigned int faceOptions) + //the appFaceHandle must stay alive all the time when the GrFace is alive. When finished with the GrFace, call destroy_face +{ + if (ops == 0) return 0; + + CachedFace *res = new CachedFace(appFaceHandle, *ops); + if (res && load_face(*res, faceOptions) + && res->setupCache(cacheSize)) + return static_cast(static_cast(res)); + + delete res; + return 0; +} + +gr_face* gr_make_face_with_seg_cache(const void* appFaceHandle/*non-NULL*/, gr_get_table_fn getTable, unsigned int cacheSize, unsigned int faceOptions) +{ + const gr_face_ops ops = {sizeof(gr_face_ops), getTable, NULL}; + return gr_make_face_with_seg_cache_and_ops(appFaceHandle, &ops, cacheSize, faceOptions); +} +#endif + +gr_uint32 gr_str_to_tag(const char *str) +{ + uint32 res = 0; + int i = strlen(str); + if (i > 4) i = 4; + while (--i >= 0) + res = (res >> 8) + (str[i] << 24); + return res; +} + +void gr_tag_to_str(gr_uint32 tag, char *str) +{ + int i = 4; + while (--i >= 0) + { + str[i] = tag & 0xFF; + tag >>= 8; + } +} + +inline +uint32 zeropad(const uint32 x) +{ + if (x == 0x20202020) return 0; + if ((x & 0x00FFFFFF) == 0x00202020) return x & 0xFF000000; + if ((x & 0x0000FFFF) == 0x00002020) return x & 0xFFFF0000; + if ((x & 0x000000FF) == 0x00000020) return x & 0xFFFFFF00; + return x; +} + +gr_feature_val* gr_face_featureval_for_lang(const gr_face* pFace, gr_uint32 langname/*0 means clone default*/) //clones the features. if none for language, clones the default +{ + assert(pFace); + zeropad(langname); + return static_cast(pFace->theSill().cloneFeatures(langname)); +} + + +const gr_feature_ref* gr_face_find_fref(const gr_face* pFace, gr_uint32 featId) //When finished with the FeatureRef, call destroy_FeatureRef +{ + assert(pFace); + zeropad(featId); + const FeatureRef* pRef = pFace->featureById(featId); + return static_cast(pRef); +} + +unsigned short gr_face_n_fref(const gr_face* pFace) +{ + assert(pFace); + return pFace->numFeatures(); +} + +const gr_feature_ref* gr_face_fref(const gr_face* pFace, gr_uint16 i) //When finished with the FeatureRef, call destroy_FeatureRef +{ + assert(pFace); + const FeatureRef* pRef = pFace->feature(i); + return static_cast(pRef); +} + +unsigned short gr_face_n_languages(const gr_face* pFace) +{ + assert(pFace); + return pFace->theSill().numLanguages(); +} + +gr_uint32 gr_face_lang_by_index(const gr_face* pFace, gr_uint16 i) +{ + assert(pFace); + return pFace->theSill().getLangName(i); +} + + +void gr_face_destroy(gr_face *face) +{ + delete face; +} + + +gr_uint16 gr_face_name_lang_for_locale(gr_face *face, const char * locale) +{ + if (face) + { + return face->languageForLocale(locale); + } + return 0; +} + +unsigned short gr_face_n_glyphs(const gr_face* pFace) +{ + return pFace->glyphs().numGlyphs(); +} + +const gr_faceinfo *gr_face_info(const gr_face *pFace, gr_uint32 script) +{ + if (!pFace) return 0; + const Silf *silf = pFace->chooseSilf(script); + if (silf) return silf->silfInfo(); + return 0; +} + +int gr_face_is_char_supported(const gr_face* pFace, gr_uint32 usv, gr_uint32 script) +{ + const Cmap & cmap = pFace->cmap(); + gr_uint16 gid = cmap[usv]; + if (!gid) + { + const Silf * silf = pFace->chooseSilf(script); + gid = silf->findPseudo(usv); + } + return (gid != 0); +} + +#ifndef GRAPHITE2_NFILEFACE +gr_face* gr_make_file_face(const char *filename, unsigned int faceOptions) +{ + FileFace* pFileFace = new FileFace(filename); + if (*pFileFace) + { + gr_face* pRes = gr_make_face_with_ops(pFileFace, &FileFace::ops, faceOptions); + if (pRes) + { + pRes->takeFileFace(pFileFace); //takes ownership + return pRes; + } + } + + //error when loading + + delete pFileFace; + return NULL; +} + +#ifndef GRAPHITE2_NSEGCACHE +gr_face* gr_make_file_face_with_seg_cache(const char* filename, unsigned int segCacheMaxSize, unsigned int faceOptions) //returns NULL on failure. //TBD better error handling + //when finished with, call destroy_face +{ + FileFace* pFileFace = new FileFace(filename); + if (*pFileFace) + { + gr_face * pRes = gr_make_face_with_seg_cache_and_ops(pFileFace, &FileFace::ops, segCacheMaxSize, faceOptions); + if (pRes) + { + pRes->takeFileFace(pFileFace); //takes ownership + return pRes; + } + } + + //error when loading + + delete pFileFace; + return NULL; +} +#endif +#endif //!GRAPHITE2_NFILEFACE + + +} // extern "C" + + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/gr_features.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/gr_features.cpp new file mode 100644 index 00000000000..63c5564ffdd --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/gr_features.cpp @@ -0,0 +1,138 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#include "graphite2/Font.h" +#include "inc/Face.h" +#include "inc/FeatureMap.h" +#include "inc/FeatureVal.h" +#include "inc/NameTable.h" + +using namespace graphite2; + +extern "C" { + + +gr_uint16 gr_fref_feature_value(const gr_feature_ref* pfeatureref, const gr_feature_val* feats) //returns 0 if either pointer is NULL +{ + if (!pfeatureref || !feats) return 0; + + return pfeatureref->getFeatureVal(*feats); +} + + +int gr_fref_set_feature_value(const gr_feature_ref* pfeatureref, gr_uint16 val, gr_feature_val* pDest) +{ + if (!pfeatureref || !pDest) return 0; + + return pfeatureref->applyValToFeature(val, *pDest); +} + + +gr_uint32 gr_fref_id(const gr_feature_ref* pfeatureref) //returns 0 if pointer is NULL +{ + if (!pfeatureref) + return 0; + + return pfeatureref->getId(); +} + + +gr_uint16 gr_fref_n_values(const gr_feature_ref* pfeatureref) +{ + if(!pfeatureref) + return 0; + return pfeatureref->getNumSettings(); +} + + +gr_int16 gr_fref_value(const gr_feature_ref* pfeatureref, gr_uint16 settingno) +{ + if(!pfeatureref || (settingno >= pfeatureref->getNumSettings())) + { + return 0; + } + return pfeatureref->getSettingValue(settingno); +} + + +void* gr_fref_label(const gr_feature_ref* pfeatureref, gr_uint16 *langId, gr_encform utf, gr_uint32 *length) +{ + if(!pfeatureref || !pfeatureref->getFace()) + { + langId = 0; + length = 0; + return NULL; + } + uint16 label = pfeatureref->getNameId(); + NameTable * names = pfeatureref->getFace()->nameTable(); + if (!names) + { + langId = 0; + length = 0; + return NULL; + } + return names->getName(*langId, label, utf, *length); +} + + +void* gr_fref_value_label(const gr_feature_ref*pfeatureref, gr_uint16 setting, + gr_uint16 *langId, gr_encform utf, gr_uint32 *length) +{ + if(!pfeatureref || (setting >= pfeatureref->getNumSettings()) || !pfeatureref->getFace()) + { + langId = 0; + length = 0; + return NULL; + } + uint16 label = pfeatureref->getSettingName(setting); + NameTable * names = pfeatureref->getFace()->nameTable(); + if (!names) + { + langId = 0; + length = 0; + return NULL; + } + return names->getName(*langId, label, utf, *length); +} + + +void gr_label_destroy(void * label) +{ + free(label); +} + +gr_feature_val* gr_featureval_clone(const gr_feature_val* pfeatures/*may be NULL*/) +{ //When finished with the Features, call features_destroy + return static_cast(pfeatures ? new Features(*pfeatures) : new Features); +} + +void gr_featureval_destroy(gr_feature_val *p) +{ + delete p; +} + + +} // extern "C" diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/gr_font.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/gr_font.cpp new file mode 100644 index 00000000000..22e4ec9c157 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/gr_font.cpp @@ -0,0 +1,72 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#include "graphite2/Font.h" +#include "inc/Font.h" + + +using namespace graphite2; + +extern "C" { + +void gr_engine_version(int *nMajor, int *nMinor, int *nBugFix) +{ + if (nMajor) *nMajor = GR2_VERSION_MAJOR; + if (nMinor) *nMinor = GR2_VERSION_MINOR; + if (nBugFix) *nBugFix = GR2_VERSION_BUGFIX; +} + +gr_font* gr_make_font(float ppm/*pixels per em*/, const gr_face *face) +{ + return gr_make_font_with_advance_fn(ppm, 0, 0, face); +} + + +gr_font* gr_make_font_with_ops(float ppm/*pixels per em*/, const void* appFontHandle/*non-NULL*/, const gr_font_ops * font_ops, const gr_face * face/*needed for scaling*/) +{ //the appFontHandle must stay alive all the time when the gr_font is alive. When finished with the gr_font, call destroy_gr_font + if (face == 0) return 0; + + Font * const res = new Font(ppm, *face, appFontHandle, font_ops); + return static_cast(res); +} + +gr_font* gr_make_font_with_advance_fn(float ppm/*pixels per em*/, const void* appFontHandle/*non-NULL*/, gr_advance_fn getAdvance, const gr_face * face/*needed for scaling*/) +{ + const gr_font_ops ops = {sizeof(gr_font_ops), getAdvance, NULL}; + return gr_make_font_with_ops(ppm, appFontHandle, &ops, face); +} + +void gr_font_destroy(gr_font *font) +{ + delete font; +} + + +} // extern "C" + + + + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/gr_logging.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/gr_logging.cpp new file mode 100644 index 00000000000..2fa6d128b1d --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/gr_logging.cpp @@ -0,0 +1,193 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#include + +#include "graphite2/Log.h" +#include "inc/debug.h" +#include "inc/CharInfo.h" +#include "inc/Slot.h" +#include "inc/Segment.h" + +#if defined _WIN32 +#include "windows.h" +#endif + +using namespace graphite2; + + +extern "C" { + + +bool gr_start_logging(gr_face * face, const char *log_path) +{ + if (!face || !log_path) return false; + +#if !defined GRAPHITE2_NTRACING + gr_stop_logging(face); +#if defined _WIN32 + int n = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, log_path, -1, 0, 0); + if (n == 0 || n > MAX_PATH - 12) return false; + + LPWSTR wlog_path = gralloc(n); + FILE *log = 0; + if (wlog_path && MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, log_path, -1, wlog_path, n)) + log = _wfopen(wlog_path, L"wt"); + + free(wlog_path); +#else + FILE *log = fopen(log_path, "wt"); +#endif + if (!log) return false; + + face->setLogger(log); + if (!face->logger()) return false; + + *face->logger() << json::array; + return true; +#else + return false; +#endif +} + +bool graphite_start_logging(FILE * /* log */, GrLogMask /* mask */) +{ +//#if !defined GRAPHITE2_NTRACING +// graphite_stop_logging(); +// +// if (!log) return false; +// +// dbgout = new json(log); +// if (!dbgout) return false; +// +// *dbgout << json::array; +// return true; +//#else + return false; +//#endif +} + +void gr_stop_logging(gr_face * face) +{ + if (!face) return; + +#if !defined GRAPHITE2_NTRACING + if (face->logger()) + { + FILE * log = face->logger()->stream(); + face->setLogger(0); + fclose(log); + } +#endif +} + +void graphite_stop_logging() +{ +// if (dbgout) delete dbgout; +// dbgout = 0; +} + +} // extern "C" + +#if !defined GRAPHITE2_NTRACING + +json & graphite2::operator << (json & j, const CharInfo & ci) throw() +{ + return j << json::object + << "offset" << ci.base() + << "unicode" << ci.unicodeChar() + << "break" << ci.breakWeight() + << "flags" << ci.flags() + << "slot" << json::flat << json::object + << "before" << ci.before() + << "after" << ci.after() + << json::close + << json::close; +} + + +json & graphite2::operator << (json & j, const dslot & ds) throw() +{ + assert(ds.first); + assert(ds.second); + const Segment & seg = *ds.first; + const Slot & s = *ds.second; + + j << json::object + << "id" << objectid(ds) + << "gid" << s.gid() + << "charinfo" << json::flat << json::object + << "original" << s.original() + << "before" << s.before() + << "after" << s.after() + << json::close + << "origin" << s.origin() + << "shift" << Position(float(s.getAttr(0, gr_slatShiftX, 0)), + float(s.getAttr(0, gr_slatShiftY, 0))) + << "advance" << s.advancePos() + << "insert" << s.isInsertBefore() + << "break" << s.getAttr(&seg, gr_slatBreak, 0); + if (s.just() > 0) + j << "justification" << s.just(); + if (s.getBidiLevel() > 0) + j << "bidi" << s.getBidiLevel(); + if (!s.isBase()) + j << "parent" << json::flat << json::object + << "id" << objectid(dslot(&seg, s.attachedTo())) + << "level" << s.getAttr(0, gr_slatAttLevel, 0) + << "offset" << s.attachOffset() + << json::close; + j << "user" << json::flat << json::array; + for (int n = 0; n!= seg.numAttrs(); ++n) + j << s.userAttrs()[n]; + j << json::close; + if (s.firstChild()) + { + j << "children" << json::flat << json::array; + for (const Slot *c = s.firstChild(); c; c = c->nextSibling()) + j << objectid(dslot(&seg, c)); + j << json::close; + } + return j << json::close; +} + + +graphite2::objectid::objectid(const dslot & ds) throw() +{ + const Slot * const p = ds.second; + uint32 s = reinterpret_cast(p); + sprintf(name, "%.4x-%.2x-%.4hx", uint16(s >> 16), uint16(p ? p->userAttrs()[ds.first->silf()->numUser()] : 0), uint16(s)); + name[sizeof name-1] = 0; +} + +graphite2::objectid::objectid(const Segment * const p) throw() +{ + uint32 s = reinterpret_cast(p); + sprintf(name, "%.4x-%.2x-%.4hx", uint16(s >> 16), 0, uint16(s)); + name[sizeof name-1] = 0; +} + +#endif diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/gr_segment.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/gr_segment.cpp new file mode 100644 index 00000000000..6eca66b4a0b --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/gr_segment.cpp @@ -0,0 +1,174 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#include "graphite2/Segment.h" +#include "inc/UtfCodec.h" +#include "inc/Segment.h" + +using namespace graphite2; + +namespace +{ + + gr_segment* makeAndInitialize(const Font *font, const Face *face, uint32 script, const Features* pFeats/*must not be NULL*/, gr_encform enc, const void* pStart, size_t nChars, int dir) + { + if (script == 0x20202020) script = 0; + else if ((script & 0x00FFFFFF) == 0x00202020) script = script & 0xFF000000; + else if ((script & 0x0000FFFF) == 0x00002020) script = script & 0xFFFF0000; + else if ((script & 0x000000FF) == 0x00000020) script = script & 0xFFFFFF00; + // if (!font) return NULL; + Segment* pRes=new Segment(nChars, face, script, dir); + + pRes->read_text(face, pFeats, enc, pStart, nChars); + if (!pRes->runGraphite()) + { + delete pRes; + return NULL; + } + // run the line break passes + // run the substitution passes + pRes->prepare_pos(font); + // run the positioning passes + pRes->finalise(font); + + return static_cast(pRes); + } + + +} + + +template +inline size_t count_unicode_chars(utf_iter first, const utf_iter last, const void **error) +{ + size_t n_chars = 0; + uint32 usv = 0; + + if (last) + { + for (;first != last; ++first, ++n_chars) + if ((usv = *first) == 0 || first.error()) break; + } + else + { + while ((usv = *first) != 0 && !first.error()) + { + ++first; + ++n_chars; + } + } + + if (error) *error = first.error() ? first : 0; + return n_chars; +} + +extern "C" { + +size_t gr_count_unicode_characters(gr_encform enc, const void* buffer_begin, const void* buffer_end/*don't go on or past end, If NULL then ignored*/, const void** pError) //Also stops on nul. Any nul is not in the count +{ + assert(buffer_begin); + + switch (enc) + { + case gr_utf8: return count_unicode_chars(buffer_begin, buffer_end, pError); break; + case gr_utf16: return count_unicode_chars(buffer_begin, buffer_end, pError); break; + case gr_utf32: return count_unicode_chars(buffer_begin, buffer_end, pError); break; + default: return 0; + } +} + + +gr_segment* gr_make_seg(const gr_font *font, const gr_face *face, gr_uint32 script, const gr_feature_val* pFeats, gr_encform enc, const void* pStart, size_t nChars, int dir) +{ + const gr_feature_val * tmp_feats = 0; + if (pFeats == 0) + pFeats = tmp_feats = static_cast(face->theSill().cloneFeatures(0)); + gr_segment * seg = makeAndInitialize(font, face, script, pFeats, enc, pStart, nChars, dir); + delete tmp_feats; + + return seg; +} + + +void gr_seg_destroy(gr_segment* p) +{ + delete p; +} + + +float gr_seg_advance_X(const gr_segment* pSeg/*not NULL*/) +{ + assert(pSeg); + return pSeg->advance().x; +} + + +float gr_seg_advance_Y(const gr_segment* pSeg/*not NULL*/) +{ + assert(pSeg); + return pSeg->advance().y; +} + + +unsigned int gr_seg_n_cinfo(const gr_segment* pSeg/*not NULL*/) +{ + assert(pSeg); + return pSeg->charInfoCount(); +} + + +const gr_char_info* gr_seg_cinfo(const gr_segment* pSeg/*not NULL*/, unsigned int index/*must be (pSeg->charinfo(index)); +} + +unsigned int gr_seg_n_slots(const gr_segment* pSeg/*not NULL*/) +{ + assert(pSeg); + return pSeg->slotCount(); +} + +const gr_slot* gr_seg_first_slot(gr_segment* pSeg/*not NULL*/) +{ + assert(pSeg); + return static_cast(pSeg->first()); +} + +const gr_slot* gr_seg_last_slot(gr_segment* pSeg/*not NULL*/) +{ + assert(pSeg); + return static_cast(pSeg->last()); +} + +float gr_seg_justify(gr_segment* pSeg/*not NULL*/, const gr_slot* pSlot/*not NULL*/, const gr_font *pFont, double width, enum gr_justFlags flags, const gr_slot *pFirst, const gr_slot *pLast) +{ + assert(pSeg); + assert(pSlot); + return pSeg->justify(const_cast(pSlot), pFont, float(width), justFlags(flags), const_cast(pFirst), const_cast(pLast)); +} + +} // extern "C" diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/gr_slot.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/gr_slot.cpp new file mode 100644 index 00000000000..c615e40ffe5 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/gr_slot.cpp @@ -0,0 +1,173 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#include "graphite2/Segment.h" +#include "inc/Segment.h" +#include "inc/Slot.h" +#include "inc/Font.h" + + +extern "C" { + + +const gr_slot* gr_slot_next_in_segment(const gr_slot* p/*not NULL*/) +{ + assert(p); + return static_cast(p->next()); +} + +const gr_slot* gr_slot_prev_in_segment(const gr_slot* p/*not NULL*/) +{ + assert(p); + return static_cast(p->prev()); +} + +const gr_slot* gr_slot_attached_to(const gr_slot* p/*not NULL*/) //returns NULL iff base. If called repeatedly on result, will get to a base +{ + assert(p); + return static_cast(p->attachedTo()); +} + + +const gr_slot* gr_slot_first_attachment(const gr_slot* p/*not NULL*/) //returns NULL iff no attachments. +{ //if slot_first_attachment(p) is not NULL, then slot_attached_to(slot_first_attachment(p))==p. + assert(p); + return static_cast(p->firstChild()); +} + + +const gr_slot* gr_slot_next_sibling_attachment(const gr_slot* p/*not NULL*/) //returns NULL iff no more attachments. +{ //if slot_next_sibling_attachment(p) is not NULL, then slot_attached_to(slot_next_sibling_attachment(p))==slot_attached_to(p). + assert(p); + return static_cast(p->nextSibling()); +} + + +unsigned short gr_slot_gid(const gr_slot* p/*not NULL*/) +{ + assert(p); + return p->glyph(); +} + + +float gr_slot_origin_X(const gr_slot* p/*not NULL*/) +{ + assert(p); + return p->origin().x; +} + + +float gr_slot_origin_Y(const gr_slot* p/*not NULL*/) +{ + assert(p); + return p->origin().y; +} + + +float gr_slot_advance_X(const gr_slot* p/*not NULL*/, const gr_face *face, const gr_font *font) +{ + assert(p); + float scale = 1.0; + float res = p->advance(); + if (font) + { + scale = font->scale(); + if (face && font->isHinted()) + res = (res - face->glyphs().glyph(p->gid())->theAdvance().x) * scale + font->advance(p->gid()); + else + res = res * scale; + } + return res; +} + +float gr_slot_advance_Y(const gr_slot *p/*not NULL*/, const gr_face *face, const gr_font *font) +{ + assert(p); + float res = p->advancePos().y; + if (font && (face || !face)) + return res * font->scale(); + else + return res; +} + +int gr_slot_before(const gr_slot* p/*not NULL*/) +{ + assert(p); + return p->before(); +} + + +int gr_slot_after(const gr_slot* p/*not NULL*/) +{ + assert(p); + return p->after(); +} + +unsigned int gr_slot_index(const gr_slot *p/*not NULL*/) +{ + assert(p); + return p->index(); +} + +int gr_slot_attr(const gr_slot* p/*not NULL*/, const gr_segment* pSeg/*not NULL*/, gr_attrCode index, gr_uint8 subindex) +{ + assert(p); + return p->getAttr(pSeg, index, subindex); +} + + +int gr_slot_can_insert_before(const gr_slot* p/*not NULL*/) +{ + assert(p); + return (p->isInsertBefore())? 1 : 0; +} + + +int gr_slot_original(const gr_slot* p/*not NULL*/) +{ + assert(p); + return p->original(); +} + +void gr_slot_linebreak_before(gr_slot* p/*not NULL*/) +{ + assert(p); + gr_slot *prev = (gr_slot *)p->prev(); + prev->sibling(NULL); + prev->next(NULL); + p->prev(NULL); +} + +#if 0 //what should this be +size_t id(const gr_slot* p/*not NULL*/) +{ + return (size_t)p->id(); +} +#endif + + +} // extern "C" + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/CachedFace.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/CachedFace.h new file mode 100644 index 00000000000..53674754ee2 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/CachedFace.h @@ -0,0 +1,56 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once + +#ifndef GRAPHITE2_NSEGCACHE + +#include "inc/Face.h" + +namespace graphite2 { + +class SegCacheStore; +class SegCache; + +class CachedFace : public Face +{ + CachedFace(const CachedFace &); + CachedFace & operator = (const CachedFace &); + +public: + CachedFace(const void* appFaceHandle/*non-NULL*/, const gr_face_ops & ops); + bool setupCache(unsigned int cacheSize); + virtual ~CachedFace(); + virtual bool runGraphite(Segment *seg, const Silf *silf) const; + SegCacheStore * cacheStore() { return m_cacheStore; } +private: + SegCacheStore * m_cacheStore; +}; + +} // namespace graphite2 + +#endif + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/CharInfo.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/CharInfo.h new file mode 100644 index 00000000000..2debaf73477 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/CharInfo.h @@ -0,0 +1,67 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once +#include "inc/Main.h" + + +namespace graphite2 { + +class CharInfo +{ + +public: + CharInfo() : m_char(0), m_before(-1), m_after(0), m_base(0), m_featureid(0), m_break(0), m_flags(0) {} + void init(int cid) { m_char = cid; } + unsigned int unicodeChar() const { return m_char; } + void feats(int offset) { m_featureid = offset; } + int fid() const { return m_featureid; } + int breakWeight() const { return m_break; } + void breakWeight(int val) { m_break = val; } + int after() const { return m_after; } + void after(int val) { m_after = val; } + int before() const { return m_before; } + void before(int val) { m_before = val; } + size_t base() const { return m_base; } + void base(size_t offset) { m_base = offset; } + void addflags(uint8 val) { m_flags |= val; } + uint8 flags() const { return m_flags; } + + CLASS_NEW_DELETE +private: + int m_char; // Unicode character from character stream + int m_before; // slot index before us, comes before + int m_after; // slot index after us, comes after + size_t m_base; // offset into input string corresponding to this charinfo + uint8 m_featureid; // index into features list in the segment + int8 m_break; // breakweight coming from lb table + uint8 m_flags; // 0,1 segment split. +}; + +} // namespace graphite2 + +struct gr_char_info : public graphite2::CharInfo {}; + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/CmapCache.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/CmapCache.h new file mode 100644 index 00000000000..a7df78ea568 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/CmapCache.h @@ -0,0 +1,82 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once + +#include "inc/Main.h" +#include "inc/Face.h" + +namespace graphite2 { + +class Face; + +class Cmap +{ +public: + + virtual ~Cmap() throw() {} + + virtual uint16 operator [] (const uint32) const throw() { return 0; } + + virtual operator bool () const throw() { return false; } + + CLASS_NEW_DELETE; +}; + +class DirectCmap : public Cmap +{ + DirectCmap(const DirectCmap &); + DirectCmap & operator = (const DirectCmap &); + +public: + DirectCmap(const Face &); + virtual uint16 operator [] (const uint32 usv) const throw(); + virtual operator bool () const throw(); + + CLASS_NEW_DELETE; +private: + const Face::Table _cmap; + const void * _smp, + * _bmp; +}; + +class CachedCmap : public Cmap +{ + CachedCmap(const CachedCmap &); + CachedCmap & operator = (const CachedCmap &); + +public: + CachedCmap(const Face &); + virtual ~CachedCmap() throw(); + virtual uint16 operator [] (const uint32 usv) const throw(); + virtual operator bool () const throw(); + CLASS_NEW_DELETE; +private: + bool m_isBmpOnly; + uint16 ** m_blocks; +}; + +} // namespace graphite2 diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Code.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Code.h new file mode 100644 index 00000000000..d9539b0da24 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Code.h @@ -0,0 +1,175 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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 class represents loaded graphite stack machine code. It performs +// basic sanity checks, on the incoming code to prevent more obvious problems +// from crashing graphite. +// Author: Tim Eves + +#pragma once + +#include +#include +#include "inc/Main.h" +#include "inc/Machine.h" + +namespace graphite2 { + +class Silf; +class Face; + +namespace vm { + +class Machine::Code +{ +public: + enum status_t + { + loaded, + alloc_failed, + invalid_opcode, + unimplemented_opcode_used, + out_of_range_data, + jump_past_end, + arguments_exhausted, + missing_return, + nested_context_item + }; + +private: + class decoder; + + instr * _code; + byte * _data; + size_t _data_size, + _instr_count; + byte _max_ref; + mutable status_t _status; + bool _constraint, + _modify, + _delete; + mutable bool _own; + + void release_buffers() throw (); + void failure(const status_t) throw(); + +public: + Code() throw(); + Code(bool is_constraint, const byte * bytecode_begin, const byte * const bytecode_end, + uint8 pre_context, uint16 rule_length, const Silf &, const Face &); + Code(const Machine::Code &) throw(); + ~Code() throw(); + + Code & operator=(const Code &rhs) throw(); + operator bool () const throw(); + status_t status() const throw(); + bool constraint() const throw(); + size_t dataSize() const throw(); + size_t instructionCount() const throw(); + bool immutable() const throw(); + bool deletes() const throw(); + size_t maxRef() const throw(); + + int32 run(Machine &m, slotref * & map) const; + + CLASS_NEW_DELETE; +}; + +inline Machine::Code::Code() throw() +: _code(0), _data(0), _data_size(0), _instr_count(0), _max_ref(0), + _status(loaded), _constraint(false), _modify(false),_delete(false), + _own(false) +{ +} + +inline Machine::Code::Code(const Machine::Code &obj) throw () + : _code(obj._code), + _data(obj._data), + _data_size(obj._data_size), + _instr_count(obj._instr_count), + _max_ref(obj._max_ref), + _status(obj._status), + _constraint(obj._constraint), + _modify(obj._modify), + _delete(obj._delete), + _own(obj._own) +{ + obj._own = false; +} + +inline Machine::Code & Machine::Code::operator=(const Machine::Code &rhs) throw() { + if (_instr_count > 0) + release_buffers(); + _code = rhs._code; + _data = rhs._data; + _data_size = rhs._data_size; + _instr_count = rhs._instr_count; + _status = rhs._status; + _constraint = rhs._constraint; + _modify = rhs._modify; + _delete = rhs._delete; + _own = rhs._own; + rhs._own = false; + return *this; +} + +inline Machine::Code::operator bool () const throw () { + return _code && status() == loaded; +} + +inline Machine::Code::status_t Machine::Code::status() const throw() { + return _status; +} + +inline bool Machine::Code::constraint() const throw() { + return _constraint; +} + +inline size_t Machine::Code::dataSize() const throw() { + return _data_size; +} + +inline size_t Machine::Code::instructionCount() const throw() { + return _instr_count; +} + +inline bool Machine::Code::immutable() const throw() +{ + return !(_delete || _modify); +} + +inline bool Machine::Code::deletes() const throw() +{ + return _delete; +} + +inline size_t Machine::Code::maxRef() const throw() +{ + return _max_ref; +} + +} // namespace vm +} // namespace graphite2 diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Endian.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Endian.h new file mode 100644 index 00000000000..16ff79f5519 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Endian.h @@ -0,0 +1,107 @@ +/*----------------------------------------------------------------------------- +Copyright (C) 2011 SIL International +Responsibility: Tim Eves + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. + +Description: +A set of fast template based decoders for decoding values of any C integer +type up to long int size laid out with most significant byte first or least +significant byte first (aka big endian or little endian). These are CPU +byte order agnostic and will function the same regardless of the CPUs native +byte order. +Being template based means if the either le or be class is not used then +template code of unused functions will not be instantiated by the compiler +and thus shouldn't cause any overhead. +-----------------------------------------------------------------------------*/ +#include + +#pragma once + + +class be +{ + template + inline static unsigned long int _peek(const unsigned char * p) { + return _peek(p) << (S/2)*8 | _peek(p+S/2); + } +public: + template + inline static T peek(const void * p) { + return T(_peek(static_cast(p))); + } + + template + inline static T read(const unsigned char * &p) { + const T r = T(_peek(p)); + p += sizeof r; + return r; + } + + template + inline static T swap(const T x) { + return T(_peek(reinterpret_cast(&x))); + } + + template + inline static void skip(const unsigned char * &p, size_t n=1) { + p += sizeof(T)*n; + } +}; + +template<> +inline unsigned long int be::_peek<1>(const unsigned char * p) { return *p; } + + +class le +{ + template + inline static unsigned long int _peek(const unsigned char * p) { + return _peek(p) | _peek(p+S/2) << (S/2)*8; + } +public: + template + inline static T peek(const void * p) { + return T(_peek(static_cast(p))); + } + + template + inline static T read(const unsigned char * &p) { + const T r = T(_peek(p)); + p += sizeof r; + return r; + } + + template + inline static T swap(const T x) { + return T(_peek(reinterpret_cast(&x))); + } + + template + inline static void skip(const unsigned char * &p, size_t n=1) { + p += sizeof(T)*n; + } +}; + +template<> +inline unsigned long int le::_peek<1>(const unsigned char * p) { return *p; } + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Face.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Face.h new file mode 100644 index 00000000000..f375e4557ff --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Face.h @@ -0,0 +1,209 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once + +#include + +#include "graphite2/Font.h" + +#include "inc/Main.h" +#include "inc/FeatureMap.h" +#include "inc/TtfUtil.h" +#include "inc/Silf.h" + +namespace graphite2 { + +class Cmap; +class FileFace; +class GlyphCache; +class NameTable; +class json; + +using TtfUtil::Tag; + +// These are the actual tags, as distinct from the consecutive IDs in TtfUtil.h + +class Face +{ + // Prevent any kind of copying + Face(const Face&); + Face& operator=(const Face&); + +public: + class Table; + static float default_glyph_advance(const void* face_ptr, gr_uint16 glyphid); + + Face(const void* appFaceHandle/*non-NULL*/, const gr_face_ops & ops); + virtual ~Face(); + + virtual bool runGraphite(Segment *seg, const Silf *silf) const; + +public: + bool readGlyphs(uint32 faceOptions); + bool readGraphite(const Table & silf); + bool readFeatures(); + void takeFileFace(FileFace* pFileFace/*takes ownership*/); + + const SillMap & theSill() const; + const GlyphCache & glyphs() const; + Cmap & cmap() const; + NameTable * nameTable() const; + void setLogger(FILE *log_file); + json * logger() const throw(); + + const Silf * chooseSilf(uint32 script) const; + uint16 languageForLocale(const char * locale) const; + + // Features + uint16 numFeatures() const; + const FeatureRef * featureById(uint32 id) const; + const FeatureRef * feature(uint16 index) const; + + // Glyph related + uint16 getGlyphMetric(uint16 gid, uint8 metric) const; + uint16 findPseudo(uint32 uid) const; + + CLASS_NEW_DELETE; +private: + // do not instantiate + Face(); + + SillMap m_Sill; + gr_face_ops m_ops; + const void * m_appFaceHandle; // non-NULL + FileFace * m_pFileFace; //owned + mutable GlyphCache * m_pGlyphFaceCache; // owned - never NULL + mutable Cmap * m_cmap; // cmap cache if available + mutable NameTable * m_pNames; + mutable json * m_logger; +protected: + Silf * m_silfs; // silf subtables. + uint16 m_numSilf; // num silf subtables in the silf table +private: + uint16 m_ascent, + m_descent; +}; + + + +inline +const SillMap & Face::theSill() const +{ + return m_Sill; +} + +inline +uint16 Face::numFeatures() const +{ + return m_Sill.theFeatureMap().numFeats(); +} + +inline +const FeatureRef * Face::featureById(uint32 id) const +{ + return m_Sill.theFeatureMap().findFeatureRef(id); +} + +inline +const FeatureRef *Face::feature(uint16 index) const +{ + return m_Sill.theFeatureMap().feature(index); +} + +inline +const GlyphCache & Face::glyphs() const +{ + return *m_pGlyphFaceCache; +} + +inline +Cmap & Face::cmap() const +{ + return *m_cmap; +}; + +inline +json * Face::logger() const throw() +{ + return m_logger; +} + + + +class Face::Table +{ + const Face * _f; + mutable const byte * _p; + uint32 _sz; + +public: + Table() throw(); + Table(const Face & face, const Tag n) throw(); + Table(const Table & rhs) throw(); + ~Table() throw(); + + operator const byte * () const throw(); + + Table & operator = (const Table & rhs) throw(); + size_t size() const throw(); +}; + +inline +Face::Table::Table() throw() +: _f(0), _p(0), _sz(0) +{ +} + +inline +Face::Table::Table(const Table & rhs) throw() +: _f(rhs._f), _p(rhs._p), _sz(rhs._sz) +{ + rhs._p = 0; +} + +inline +Face::Table::~Table() throw() +{ + if (_p && _f->m_ops.release_table) + (*_f->m_ops.release_table)(_f->m_appFaceHandle, _p); +} + +inline +Face::Table::operator const byte * () const throw() +{ + return _p; +} + +inline +size_t Face::Table::size() const throw() +{ + return _sz; +} + +} // namespace graphite2 + +struct gr_face : public graphite2::Face {}; diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/FeatureMap.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/FeatureMap.h new file mode 100644 index 00000000000..ffc58c9b19a --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/FeatureMap.h @@ -0,0 +1,187 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once +// #include +// #include "graphite2/Types.h" +//#include "graphite2/Font.h" +#include "inc/Main.h" +#include "inc/FeatureVal.h" + +namespace graphite2 { + +// Forward declarations for implmentation types +class FeatureMap; +class Face; + + +class FeatureSetting +{ +public: + FeatureSetting(int16 theValue, uint16 labelId) : m_label(labelId), m_value(theValue) {}; + uint16 label() const { return m_label; } + int16 value() const { return m_value; } + + CLASS_NEW_DELETE; +private: + FeatureSetting(const FeatureSetting & fs) : m_label(fs.m_label), m_value(fs.m_value) {}; + + uint16 m_label; + int16 m_value; +}; + +class FeatureRef +{ + typedef uint32 chunk_t; + static const uint8 SIZEOF_CHUNK = sizeof(chunk_t)*8; + +public: + FeatureRef() : m_nameValues(0) {} + FeatureRef(const Face & face, unsigned short & bits_offset, uint32 max_val, + uint32 name, uint16 uiName, uint16 flags, + FeatureSetting *settings, uint16 num_set) throw(); + ~FeatureRef() throw(); + + bool applyValToFeature(uint32 val, Features& pDest) const; //defined in GrFaceImp.h + void maskFeature(Features & pDest) const { + if (m_index < pDest.size()) //defensive + pDest[m_index] |= m_mask; + } + + uint32 getFeatureVal(const Features& feats) const; //defined in GrFaceImp.h + + uint32 getId() const { return m_id; } + uint16 getNameId() const { return m_nameid; } + uint16 getNumSettings() const { return m_numSet; } + uint16 getSettingName(uint16 index) const { return m_nameValues[index].label(); } + int16 getSettingValue(uint16 index) const { return m_nameValues[index].value(); } + uint32 maxVal() const { return m_max; } + const Face* getFace() const { return m_pFace;} + const FeatureMap* getFeatureMap() const;// { return m_pFace;} + + CLASS_NEW_DELETE; +private: + FeatureRef(const FeatureRef & rhs); + + const Face * m_pFace; //not NULL + FeatureSetting * m_nameValues; // array of name table ids for feature values + chunk_t m_mask, // bit mask to get the value from the vector + m_max; // max value the value can take + uint32 m_id; // feature identifier/name + uint16 m_nameid, // Name table id for feature name + m_flags, // feature flags (unused at the moment but read from the font) + m_numSet; // number of values (number of entries in m_nameValues) + byte m_bits, // how many bits to shift the value into place + m_index; // index into the array to find the ulong to mask + +private: //unimplemented + FeatureRef& operator=(const FeatureRef&); +}; + + +class NameAndFeatureRef +{ + public: + NameAndFeatureRef(uint32 name = 0) : m_name(name) , m_pFRef(NULL){} + NameAndFeatureRef(const FeatureRef* p/*not NULL*/) : m_name(p->getId()), m_pFRef(p) {} + + bool operator<(const NameAndFeatureRef& rhs) const //orders by m_name + { return m_name +#include +#include "inc/Main.h" +#include "inc/List.h" + +namespace graphite2 { + +class FeatureRef; +class FeatureMap; + +class FeatureVal : public Vector +{ +public: + FeatureVal() : m_pMap(0) { } + FeatureVal(int num, const FeatureMap & pMap) : Vector(num), m_pMap(&pMap) {} + FeatureVal(const FeatureVal & rhs) : Vector(rhs), m_pMap(rhs.m_pMap) {} + + FeatureVal & operator = (const FeatureVal & rhs) { Vector::operator = (rhs); m_pMap = rhs.m_pMap; return *this; } + + bool operator ==(const FeatureVal & b) const + { + size_t n = size(); + if (n != b.size()) return false; + + for(const_iterator l = begin(), r = b.begin(); n && *l == *r; --n, ++l, ++r); + + return n == 0; + } + + CLASS_NEW_DELETE +private: + friend class FeatureRef; //so that FeatureRefs can manipulate m_vec directly + const FeatureMap* m_pMap; +}; + +typedef FeatureVal Features; + +} // namespace graphite2 + + +struct gr_feature_val : public graphite2::FeatureVal {}; diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/FileFace.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/FileFace.h new file mode 100644 index 00000000000..05e56d64543 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/FileFace.h @@ -0,0 +1,80 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once + +//#include "inc/FeatureMap.h" +//#include "inc/GlyphsCache.h" +//#include "inc/Silf.h" + +#ifndef GRAPHITE2_NFILEFACE + +#include +#include + +#include "graphite2/Font.h" + +#include "inc/Main.h" +#include "inc/TtfTypes.h" +#include "inc/TtfUtil.h" + +namespace graphite2 { + + +class FileFace +{ + static const void * get_table_fn(const void* appFaceHandle, unsigned int name, size_t *len); + static void rel_table_fn(const void* appFaceHandle, const void *table_buffer); + +public: + static const gr_face_ops ops; + + FileFace(const char *filename); + ~FileFace(); + + operator bool () const throw(); + CLASS_NEW_DELETE; + +private: //defensive + FILE * _file; + size_t _file_len; + + TtfUtil::Sfnt::OffsetSubTable * _header_tbl; + TtfUtil::Sfnt::OffsetSubTable::Entry * _table_dir; + + FileFace(const FileFace&); + FileFace& operator=(const FileFace&); +}; + +inline +FileFace::operator bool() const throw() +{ + return _file && _header_tbl && _table_dir; +} + +} // namespace graphite2 + +#endif //!GRAPHITE2_NFILEFACE diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Font.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Font.h new file mode 100644 index 00000000000..a7c1e2a2749 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Font.h @@ -0,0 +1,92 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once +#include +#include "graphite2/Font.h" +#include "inc/Main.h" +#include "inc/Face.h" + +namespace graphite2 { + +#define INVALID_ADVANCE -1e38f // can't be a static const because non-integral + +class Font +{ +public: + Font(float ppm, const Face & face, const void * appFontHandle=0, const gr_font_ops * ops=0); + virtual ~Font(); + + float advance(unsigned short glyphid) const; + float scale() const; + bool isHinted() const; + const Face & face() const; + + CLASS_NEW_DELETE; +private: + gr_font_ops m_ops; + const void * const m_appFontHandle; + float * m_advances; // One advance per glyph in pixels. Nan if not defined + const Face & m_face; + float m_scale; // scales from design units to ppm + bool m_hinted; + + // do not instantiate + Font(); + + Font(const Font&); + Font& operator=(const Font&); +}; + +inline +float Font::advance(unsigned short glyphid) const +{ + if (m_advances[glyphid] == INVALID_ADVANCE) + m_advances[glyphid] = (*m_ops.glyph_advance_x)(m_appFontHandle, glyphid); + return m_advances[glyphid]; +} + +inline +float Font::scale() const +{ + return m_scale; +} + +inline +bool Font::isHinted() const +{ + return m_hinted; +} + +inline +const Face & Font::face() const +{ + return m_face; +} + +} // namespace graphite2 + +struct gr_font : public graphite2::Font {}; diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/GlyphCache.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/GlyphCache.h new file mode 100644 index 00000000000..4f000dca698 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/GlyphCache.h @@ -0,0 +1,93 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once + + +#include "graphite2/Font.h" +#include "inc/Main.h" + +namespace graphite2 { + +class Face; +class FeatureVal; +class GlyphFace; +class Segment; + +class GlyphCache +{ + class Loader; + + GlyphCache(const GlyphCache&); + GlyphCache& operator=(const GlyphCache&); + +public: + GlyphCache(const Face & face, const uint32 face_options); + ~GlyphCache(); + + size_t numGlyphs() const throw(); + size_t numAttrs() const throw(); + size_t unitsPerEm() const throw(); + + const GlyphFace *glyph(unsigned short glyphid) const; //result may be changed by subsequent call with a different glyphid + const GlyphFace *glyphSafe(unsigned short glyphid) const; + uint16 glyphAttr(uint16 gid, uint16 gattr) const; + + CLASS_NEW_DELETE; + +private: + const Loader * _glyph_loader; + const GlyphFace * * _glyphs; + unsigned short _num_glyphs, + _num_attrs, + _upem; +}; + +inline +size_t GlyphCache::numGlyphs() const throw() +{ + return _num_glyphs; +} + +inline +size_t GlyphCache::numAttrs() const throw() +{ + return _num_attrs; +} + +inline +size_t GlyphCache::unitsPerEm() const throw() +{ + return _upem; +} + +inline +const GlyphFace *GlyphCache::glyphSafe(unsigned short glyphid) const +{ + return glyphid < _num_glyphs ? glyph(glyphid) : NULL; +} + +} // namespace graphite2 diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/GlyphFace.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/GlyphFace.h new file mode 100644 index 00000000000..89ed5aea91a --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/GlyphFace.h @@ -0,0 +1,83 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once + +#include "inc/Main.h" +#include "inc/Position.h" +#include "inc/Sparse.h" + +namespace graphite2 { + +enum metrics { + kgmetLsb = 0, kgmetRsb, + kgmetBbTop, kgmetBbBottom, kgmetBbLeft, kgmetBbRight, + kgmetBbHeight, kgmetBbWidth, + kgmetAdvWidth, kgmetAdvHeight, + kgmetAscent, kgmetDescent +}; + + +class GlyphFace +{ +public: + GlyphFace(); + template + GlyphFace(const Rect & bbox, const Position & adv, I first, const I last); + + const Position & theAdvance() const; + const Rect & theBBox() const { return m_bbox; } + const sparse & attrs() const { return m_attrs; } + uint16 getMetric(uint8 metric) const; + + CLASS_NEW_DELETE; +private: + Rect m_bbox; // bounding box metrics in design units + Position m_advance; // Advance width and height in design units + sparse m_attrs; +}; + + +// Inlines: class GlyphFace +// +inline +GlyphFace::GlyphFace() +{} + +template +GlyphFace::GlyphFace(const Rect & bbox, const Position & adv, I first, const I last) +: m_bbox(bbox), + m_advance(adv), + m_attrs(first, last) +{ +} + +inline +const Position & GlyphFace::theAdvance() const { + return m_advance; +} + +} // namespace graphite2 diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/List.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/List.h new file mode 100644 index 00000000000..f99036912d8 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/List.h @@ -0,0 +1,155 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ + +// designed to have a limited subset of the std::vector api +#pragma once + +#include +#include +#include +#include +#include + + +namespace graphite2 { + +template +inline +ptrdiff_t distance(T* first, T* last) { return last-first; } + + +template +class Vector +{ + T * m_first, *m_last, *m_end; +public: + typedef T & reference; + typedef const T & const_reference; + typedef T * iterator; + typedef const T * const_iterator; + + Vector() : m_first(0), m_last(0), m_end(0) {} + Vector(size_t n, const T& value = T()) : m_first(0), m_last(0), m_end(0) { insert(begin(), n, value); } + Vector(const Vector &rhs) : m_first(0), m_last(0), m_end(0) { insert(begin(), rhs.begin(), rhs.end()); } + template + Vector(I first, const I last) : m_first(0), m_last(0), m_end(0) { insert(begin(), first, last); } + ~Vector() { clear(); free(m_first); } + + iterator begin() { return m_first; } + const_iterator begin() const { return m_first; } + + iterator end() { return m_last; } + const_iterator end() const { return m_last; } + + bool empty() const { return m_first == m_last; } + size_t size() const { return m_last - m_first; } + size_t capacity() const{ return m_end - m_first; } + + void reserve(size_t n); + + reference front() { assert(size() > 0); return *begin(); } + const_reference front() const { assert(size() > 0); return *begin(); } + reference back() { assert(size() > 0); return *(end()-1); } + const_reference back() const { assert(size() > 0); return *(end()-1); } + + Vector & operator = (const Vector & rhs) { assign(rhs.begin(), rhs.end()); return *this; } + reference operator [] (size_t n) { assert(size() > n); return m_first[n]; } + const_reference operator [] (size_t n) const { assert(size() > n); return m_first[n]; } + + void assign(size_t n, const T& u) { clear(); insert(begin(), n, u); } + void assign(const_iterator first, const_iterator last) { clear(); insert(begin(), first, last); } + iterator insert(iterator p, const T & x) { p = _insert_default(p, 1); *p = x; return p; } + void insert(iterator p, size_t n, const T & x); + void insert(iterator p, const_iterator first, const_iterator last); + void pop_back() { assert(size() > 0); --m_last; } + void push_back(const T &v) { if (m_last == m_end) reserve(size()+1); new (m_last++) T(v); } + + void clear() { erase(begin(), end()); } + iterator erase(iterator p) { return erase(p, p+1); } + iterator erase(iterator first, iterator last); + +private: + iterator _insert_default(iterator p, size_t n); +}; + +template +inline +void Vector::reserve(size_t n) +{ + if (n > capacity()) + { + const ptrdiff_t sz = size(); + m_first = static_cast(realloc(m_first, n*sizeof(T))); + m_last = m_first + sz; + m_end = m_first + n; + } +} + +template +inline +typename Vector::iterator Vector::_insert_default(iterator p, size_t n) +{ + assert(begin() <= p && p <= end()); + const ptrdiff_t i = p - begin(); + reserve((size() + n + 7) >> 3 << 3); + p = begin() + i; + // Move tail if there is one + if (p != end()) memmove(p + n, p, distance(p,end())*sizeof(T)); + m_last += n; + return p; +} + +template +inline +void Vector::insert(iterator p, size_t n, const T & x) +{ + p = _insert_default(p, n); + // Copy in elements + for (; n; --n, ++p) { new (p) T(x); } +} + +template +inline +void Vector::insert(iterator p, const_iterator first, const_iterator last) +{ + p = _insert_default(p, distance(first, last)); + // Copy in elements + for (;first != last; ++first, ++p) { new (p) T(*first); } +} + +template +inline +typename Vector::iterator Vector::erase(iterator first, iterator last) +{ + for (iterator e = first; e != last; ++e) e->~T(); + const size_t sz = distance(first, last); + if (m_last != last) memmove(first, last, distance(last,end())*sizeof(T)); + m_last -= sz; + return first; +} + +} // namespace graphite2 diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Machine.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Machine.h new file mode 100644 index 00000000000..72a7e761681 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Machine.h @@ -0,0 +1,197 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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 general interpreter interface. +// Author: Tim Eves + +// Build one of direct_machine.cpp or call_machine.cpp to implement this +// interface. + +#pragma once +#include +#include +#include "inc/Main.h" + +#if defined(__GNUC__) +#if defined(__clang__) || (__GNUC__ * 100 + __GNUC_MINOR__) < 403 +#define HOT +#if defined(__x86_64) +#define REGPARM(n) __attribute__((regparm(n))) +#else +#define REGPARM(n) +#endif +#else +#define HOT __attribute__((hot)) +#if defined(__x86_64) +#define REGPARM(n) __attribute__((hot, regparm(n))) +#else +#define REGPARM(n) +#endif +#endif +#else +#define HOT +#define REGPARM(n) +#endif + +namespace graphite2 { + +// Forward declarations +class Segment; +class Slot; +class SlotMap; + + +namespace vm +{ + + +typedef void * instr; +typedef Slot * slotref; + +enum {VARARGS = 0xff, MAX_NAME_LEN=32}; + +enum opcode { + NOP = 0, + + PUSH_BYTE, PUSH_BYTEU, PUSH_SHORT, PUSH_SHORTU, PUSH_LONG, + + ADD, SUB, MUL, DIV, + MIN_, MAX_, + NEG, + TRUNC8, TRUNC16, + + COND, + + AND, OR, NOT, + EQUAL, NOT_EQ, + LESS, GTR, LESS_EQ, GTR_EQ, + + NEXT, NEXT_N, COPY_NEXT, + PUT_GLYPH_8BIT_OBS, PUT_SUBS_8BIT_OBS, PUT_COPY, + INSERT, DELETE, + ASSOC, + CNTXT_ITEM, + + ATTR_SET, ATTR_ADD, ATTR_SUB, + ATTR_SET_SLOT, + IATTR_SET_SLOT, + PUSH_SLOT_ATTR, PUSH_GLYPH_ATTR_OBS, + PUSH_GLYPH_METRIC, PUSH_FEAT, + PUSH_ATT_TO_GATTR_OBS, PUSH_ATT_TO_GLYPH_METRIC, + PUSH_ISLOT_ATTR, + + PUSH_IGLYPH_ATTR, // not implemented + + POP_RET, RET_ZERO, RET_TRUE, + IATTR_SET, IATTR_ADD, IATTR_SUB, + PUSH_PROC_STATE, PUSH_VERSION, + PUT_SUBS, PUT_SUBS2, PUT_SUBS3, + PUT_GLYPH, PUSH_GLYPH_ATTR, PUSH_ATT_TO_GLYPH_ATTR, + MAX_OPCODE, + // private opcodes for internal use only, comes after all other on disk opcodes + TEMP_COPY = MAX_OPCODE +}; + +struct opcode_t +{ + instr impl[2]; + uint8 param_sz; + char name[MAX_NAME_LEN]; +}; + + +class Machine +{ +public: + typedef int32 stack_t; + static size_t const STACK_ORDER = 10, + STACK_MAX = 1 << STACK_ORDER, + STACK_GUARD = 2; + + class Code; + + enum status_t { + finished = 0, + stack_underflow, + stack_not_empty, + stack_overflow, + slot_offset_out_bounds + }; + + Machine(SlotMap &) throw(); + static const opcode_t * getOpcodeTable() throw(); + + CLASS_NEW_DELETE; + + SlotMap & slotMap() const throw(); + status_t status() const throw(); + operator bool () const throw(); + +private: + void check_final_stack(const stack_t * const sp); + stack_t run(const instr * program, const byte * data, + slotref * & map) HOT; + + SlotMap & _map; + stack_t _stack[STACK_MAX + 2*STACK_GUARD]; + status_t _status; +}; + +inline Machine::Machine(SlotMap & map) throw() +: _map(map), _status(finished) +{ + // Initialise stack guard +1 entries as the stack pointer points to the + // current top of stack, hence the first push will never write entry 0. + // Initialising the guard space like this is unnecessary and is only + // done to keep valgrind happy during fuzz testing. Hopefully loop + // unrolling will flatten this. + for (size_t n = STACK_GUARD + 1; n; --n) _stack[n-1] = 0; +} + +inline SlotMap& Machine::slotMap() const throw() +{ + return _map; +} + +inline Machine::status_t Machine::status() const throw() +{ + return _status; +} + +inline void Machine::check_final_stack(const int32 * const sp) +{ + stack_t const * const base = _stack + STACK_GUARD, + * const limit = base + STACK_MAX; + if (sp < base) _status = stack_underflow; // This should be impossible now. + else if (sp >= limit) _status = stack_overflow; // So should this. + else if (sp != base) _status = stack_not_empty; +} + +} // namespace vm +} // namespace graphite2 + + + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Main.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Main.h new file mode 100644 index 00000000000..6ddaf37dfaf --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Main.h @@ -0,0 +1,75 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once + +#include +#include "graphite2/Types.h" + +#ifdef GRAPHITE2_CUSTOM_HEADER +#include GRAPHITE2_CUSTOM_HEADER +#endif + +namespace graphite2 { + +typedef gr_uint8 uint8; +typedef gr_uint8 byte; +typedef gr_uint16 uint16; +typedef gr_uint32 uint32; +typedef gr_int8 int8; +typedef gr_int16 int16; +typedef gr_int32 int32; +typedef size_t uintptr; + +// typesafe wrapper around malloc for simple types +// use free(pointer) to deallocate +template T * gralloc(size_t n) +{ + return reinterpret_cast(malloc(sizeof(T) * n)); +} + +template T * grzeroalloc(size_t n) +{ + return reinterpret_cast(calloc(n, sizeof(T))); +} + +} // namespace graphite2 + +#define CLASS_NEW_DELETE \ + void * operator new (size_t size){ return malloc(size);} \ + void * operator new (size_t, void * p) throw() { return p; } \ + void * operator new[] (size_t size) {return malloc(size);} \ + void * operator new[] (size_t, void * p) throw() { return p; } \ + void operator delete (void * p) throw() { free(p);} \ + void operator delete (void *, void *) throw() {} \ + void operator delete[] (void * p)throw() { free(p); } \ + void operator delete[] (void *, void *) throw() {} + +#ifdef __GNUC__ +#define GR_MAYBE_UNUSED __attribute__((unused)) +#else +#define GR_MAYBE_UNUSED +#endif diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/NameTable.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/NameTable.h new file mode 100644 index 00000000000..0fdbeb4d85f --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/NameTable.h @@ -0,0 +1,65 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once + +#include +#include "inc/TtfTypes.h" +#include "inc/locale2lcid.h" + +namespace graphite2 { + +class NameTable +{ + NameTable(const NameTable &); + NameTable & operator = (const NameTable &); + +public: + NameTable(const void * data, size_t length, uint16 platfromId=3, uint16 encodingID = 1); + ~NameTable() { free(const_cast(m_table)); } + enum eNameFallback { + eNoFallback = 0, + eEnUSFallbackOnly = 1, + eEnOrAnyFallback = 2 + }; + uint16 setPlatformEncoding(uint16 platfromId=3, uint16 encodingID = 1); + void * getName(uint16 & languageId, uint16 nameId, gr_encform enc, uint32 & length); + uint16 getLanguageId(const char * bcp47Locale); + + CLASS_NEW_DELETE +private: + uint16 m_platformId; + uint16 m_encodingId; + uint16 m_languageCount; + uint16 m_platformOffset; // offset of first NameRecord with for platform 3, encoding 1 + uint16 m_platformLastRecord; + uint16 m_nameDataLength; + const TtfUtil::Sfnt::FontNames * m_table; + const uint8 * m_nameData; + Locale2Lang m_locale2Lang; +}; + +} // namespace graphite2 diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Pass.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Pass.h new file mode 100644 index 00000000000..64d071636d5 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Pass.h @@ -0,0 +1,97 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once + +#include +#include "inc/Code.h" + +namespace graphite2 { + +class Segment; +class Face; +class Silf; +struct Rule; +struct RuleEntry; +struct State; +class FiniteStateMachine; + +class Pass +{ +public: + Pass(); + ~Pass(); + + bool readPass(const byte * pPass, size_t pass_length, size_t subtable_base, const Face & face); + void runGraphite(vm::Machine & m, FiniteStateMachine & fsm) const; + void init(Silf *silf) { m_silf = silf; } + byte spaceContextuals() const { return (m_flags & 0x0E) >> 1; } + + CLASS_NEW_DELETE +private: + void findNDoRule(Slot* & iSlot, vm::Machine &, FiniteStateMachine& fsm) const; + int doAction(const vm::Machine::Code* codeptr, Slot * & slot_out, vm::Machine &) const; + bool testPassConstraint(vm::Machine & m) const; + bool testConstraint(const Rule & r, vm::Machine &) const; + bool readFSM(const byte* p, const byte*const pass_start, const size_t max_offset); + bool readRules(const byte * rule_map, const size_t num_entries, + const byte *precontext, const uint16 * sort_key, + const uint16 * o_constraint, const byte *constraint_data, + const uint16 * o_action, const byte * action_data, + const Face &); + bool readStates(const byte * starts, const byte * states, const byte * o_rule_map); + bool readRanges(const byte * ranges, size_t num_ranges); + uint16 glyphToCol(const uint16 gid) const; + bool runFSM(FiniteStateMachine & fsm, Slot * slot) const; + void dumpRuleEventConsidered(const FiniteStateMachine & fsm, const RuleEntry & re) const; + void dumpRuleEventOutput(const FiniteStateMachine & fsm, const Rule & r, Slot * os) const; + void adjustSlot(int delta, Slot * & slot_out, SlotMap &) const; + const Silf* m_silf; + uint16 * m_cols; + Rule * m_rules; // rules + RuleEntry * m_ruleMap; + State * * m_startStates; // prectxt length + State * * m_sTable; + State * m_states; + + byte m_flags; + byte m_iMaxLoop; + uint16 m_numGlyphs; + uint16 m_numRules; + uint16 m_sRows; + uint16 m_sTransition; + uint16 m_sSuccess; + uint16 m_sColumns; + byte m_minPreCtxt; + byte m_maxPreCtxt; + vm::Machine::Code m_cPConstraint; + +private: //defensive + Pass(const Pass&); + Pass& operator=(const Pass&); +}; + +} // namespace graphite2 diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Position.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Position.h new file mode 100644 index 00000000000..c6f1b755644 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Position.h @@ -0,0 +1,59 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once + +namespace graphite2 { + +class Position +{ +public: + Position() : x(0), y(0) { } + Position(const float inx, const float iny) : x(inx), y(iny) {} + Position operator + (const Position& a) const { return Position(x + a.x, y + a.y); } + Position operator - (const Position& a) const { return Position(x - a.x, y - a.y); } + Position operator * (const float m) const { return Position(x * m, y * m); } + Position &operator += (const Position &a) { x += a.x; y += a.y; return *this; } + Position &operator *= (const float m) { x *= m; y *= m; return *this; } + + float x; + float y; +}; + +class Rect +{ +public : + Rect() {} + Rect(const Position& botLeft, const Position& topRight): bl(botLeft), tr(topRight) {} + Rect widen(const Rect& other) { return Rect(Position(bl.x > other.bl.x ? other.bl.x : bl.x, bl.y > other.bl.y ? other.bl.y : bl.y), Position(tr.x > other.tr.x ? tr.x : other.tr.x, tr.y > other.tr.y ? tr.y : other.tr.y)); } + Rect operator + (const Position &a) const { return Rect(Position(bl.x + a.x, bl.y + a.y), Position(tr.x + a.x, tr.y + a.y)); } + Rect operator * (float m) const { return Rect(Position(bl.x, bl.y) * m, Position(tr.x, tr.y) * m); } + + Position bl; + Position tr; +}; + +} // namespace graphite2 diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Rule.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Rule.h new file mode 100644 index 00000000000..69442658e4d --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Rule.h @@ -0,0 +1,307 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ + +#pragma once + +#include "inc/Code.h" +#include "inc/Slot.h" + +namespace graphite2 { + +struct Rule { + const vm::Machine::Code * constraint, + * action; + unsigned short sort; + byte preContext; +#ifndef NDEBUG + uint16 rule_idx; +#endif + + Rule() : constraint(0), action(0), sort(0), preContext(0) {} + ~Rule(); + + CLASS_NEW_DELETE; + +private: + Rule(const Rule &); + Rule & operator = (const Rule &); +}; + +inline Rule::~Rule() +{ + delete constraint; + delete action; +} + + +struct RuleEntry +{ + const Rule * rule; + + inline + bool operator < (const RuleEntry &r) const + { + const unsigned short lsort = rule->sort, rsort = r.rule->sort; + return lsort > rsort || (lsort == rsort && rule < r.rule); + } + + inline + bool operator == (const RuleEntry &r) const + { + return rule == r.rule; + } +}; + + +struct State +{ + const RuleEntry * rules, + * rules_end; + const State * const * transitions; + + size_t size() const; + bool is_success() const; + bool is_transition() const; +}; + +inline +size_t State::size() const +{ + return rules_end - rules; +} + +inline +bool State::is_success() const +{ + return (rules != NULL); +} + +inline +bool State::is_transition() const +{ + return (transitions != NULL); +} + + +class SlotMap +{ +public: + enum {MAX_SLOTS=64}; + SlotMap(Segment & seg); + + Slot * * begin(); + Slot * * end(); + size_t size() const; + unsigned short context() const; + void reset(Slot &, unsigned short); + + Slot * const & operator[](int n) const; + Slot * & operator [] (int); + void pushSlot(Slot * const slot); + void collectGarbage(); + + Slot * highwater() { return m_highwater; } + void highwater(Slot *s) { m_highwater = s; m_highpassed = false; } + bool highpassed() const { return m_highpassed; } + void highpassed(bool v) { m_highpassed = v; } + + Segment & segment; +private: + Slot * m_slot_map[MAX_SLOTS+1]; + unsigned short m_size; + unsigned short m_precontext; + Slot * m_highwater; + bool m_highpassed; +}; + + +class FiniteStateMachine +{ +public: + enum {MAX_RULES=128}; + +private: + class Rules + { + public: + Rules(); + void clear(); + const RuleEntry * begin() const; + const RuleEntry * end() const; + size_t size() const; + + void accumulate_rules(const State &state); + + private: + RuleEntry * m_begin, + * m_end, + m_rules[MAX_RULES*2]; + }; + +public: + FiniteStateMachine(SlotMap & map, json * logger); + void reset(Slot * & slot, const short unsigned int max_pre_ctxt); + + Rules rules; + SlotMap & slots; + json * const dbgout; +}; + + +inline +FiniteStateMachine::FiniteStateMachine(SlotMap& map, json * logger) +: slots(map), + dbgout(logger) +{ +} + +inline +void FiniteStateMachine::reset(Slot * & slot, const short unsigned int max_pre_ctxt) +{ + rules.clear(); + int ctxt = 0; + for (; ctxt != max_pre_ctxt && slot->prev(); ++ctxt, slot = slot->prev()); + slots.reset(*slot, ctxt); +} + +inline +FiniteStateMachine::Rules::Rules() + : m_begin(m_rules), m_end(m_rules) +{ +} + +inline +void FiniteStateMachine::Rules::clear() +{ + m_end = m_begin; +} + +inline +const RuleEntry * FiniteStateMachine::Rules::begin() const +{ + return m_begin; +} + +inline +const RuleEntry * FiniteStateMachine::Rules::end() const +{ + return m_end; +} + +inline +size_t FiniteStateMachine::Rules::size() const +{ + return m_end - m_begin; +} + +inline +void FiniteStateMachine::Rules::accumulate_rules(const State &state) +{ + // Only bother if there are rules in the State object. + if (state.size() == 0) return; + + // Merge the new sorted rules list into the current sorted result set. + const RuleEntry * lre = begin(), * rre = state.rules; + RuleEntry * out = m_rules + (m_begin == m_rules)*MAX_RULES; + const RuleEntry * lrend = out + MAX_RULES; + m_begin = out; + while (lre != end() && out != lrend) + { + if (*lre < *rre) *out++ = *lre++; + else if (*rre < *lre) { *out++ = *rre++; } + else { *out++ = *lre++; ++rre; } + + if (rre == state.rules_end) + { + while (lre != end() && out != lrend) { *out++ = *lre++; } + m_end = out; + return; + } + } + while (rre != state.rules_end && out != lrend) { *out++ = *rre++; } + m_end = out; +} + +inline +SlotMap::SlotMap(Segment & seg) +: segment(seg), m_size(0), m_precontext(0), m_highwater(0), m_highpassed(false) +{ + m_slot_map[0] = 0; +} + +inline +Slot * * SlotMap::begin() +{ + return &m_slot_map[1]; // allow map to go 1 before slot_map when inserting + // at start of segment. +} + +inline +Slot * * SlotMap::end() +{ + return m_slot_map + m_size + 1; +} + +inline +size_t SlotMap::size() const +{ + return m_size; +} + +inline +short unsigned int SlotMap::context() const +{ + return m_precontext; +} + +inline +void SlotMap::reset(Slot & slot, short unsigned int ctxt) +{ + m_size = 0; + m_precontext = ctxt; + *m_slot_map = slot.prev(); +} + +inline +void SlotMap::pushSlot(Slot*const slot) +{ + m_slot_map[m_size++ + 1] = slot; +} + +inline +Slot * const & SlotMap::operator[](int n) const +{ + return m_slot_map[n + 1]; +} + +inline +Slot * & SlotMap::operator[](int n) +{ + return m_slot_map[n + 1]; +} + +} // namespace graphite2 diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/SegCache.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/SegCache.h new file mode 100644 index 00000000000..ac09966589c --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/SegCache.h @@ -0,0 +1,320 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once + +#ifndef GRAPHITE2_NSEGCACHE + +#include +#include "inc/Main.h" +#include "inc/Slot.h" +#include "inc/FeatureVal.h" +#include "inc/SegCacheEntry.h" +#include "inc/Segment.h" + +namespace graphite2 { + +class SegCache; +class SegCacheEntry; +class SegCacheStore; + +/** + * SegPrefixEntry stores lists of word/syllable segments + * with one list for each word length. The prefix size should be chosen so that + * these list sizes stay small since they will be searched iteratively. + */ +class SegCachePrefixEntry +{ + SegCachePrefixEntry(const SegCachePrefixEntry &); + SegCachePrefixEntry & operator = (const SegCachePrefixEntry &); + +public: + SegCachePrefixEntry() : m_lastPurge(0) + { + memset(m_entryCounts, 0, sizeof m_entryCounts); + memset(m_entryBSIndex, 0, sizeof m_entryBSIndex); + memset(m_entries, 0, sizeof m_entries); + } + + ~SegCachePrefixEntry() + { + for (size_t j = 0; j < eMaxSpliceSize; j++) + { + if (m_entryCounts[j]) + { + assert(m_entries[j]); + for (size_t k = 0; k < m_entryCounts[j]; k++) + m_entries[j][k].clear(); + + free(m_entries[j]); + } + } + } + const SegCacheEntry * find(const uint16 * cmapGlyphs, size_t length) const + { + if (length <= ePrefixLength) + { + assert(m_entryCounts[length-1] <= 1); + if (m_entries[length-1]) + return m_entries[length-1]; + return NULL; + } + SegCacheEntry * entry = NULL; + findPosition(cmapGlyphs, length, &entry); + return entry; + } + SegCacheEntry * cache(const uint16* cmapGlyphs, size_t length, Segment * seg, size_t charOffset, unsigned long long totalAccessCount) + { + size_t listSize = m_entryBSIndex[length-1]? (m_entryBSIndex[length-1] << 1) - 1 : 0; + SegCacheEntry * newEntries = NULL; + if (m_entryCounts[length-1] + 1u > listSize) + { + if (m_entryCounts[length-1] == 0) + { + listSize = 1; + } + else + { + // the problem comes when you get incremental numeric ids in a large doc + if (listSize >= eMaxSuffixCount) + return NULL; + listSize = (m_entryBSIndex[length-1] << 2) - 1; + } + newEntries = gralloc(listSize); + if (!newEntries) + { + return NULL; + } + } + + uint16 insertPos = 0; + if (m_entryCounts[length-1] > 0) + { + insertPos = findPosition(cmapGlyphs, length, NULL); + if (!newEntries) + { + // same buffer, shift entries up + memmove(m_entries[length-1] + insertPos + 1, m_entries[length-1] + insertPos, + sizeof(SegCacheEntry) * (m_entryCounts[length-1] - insertPos)); + } + else + { + memcpy(newEntries, m_entries[length-1], sizeof(SegCacheEntry) * (insertPos)); + memcpy(newEntries + insertPos + 1, m_entries[length-1] + insertPos, + sizeof(SegCacheEntry) * (m_entryCounts[length-1] - insertPos)); + + free(m_entries[length-1]); + m_entries[length-1] = newEntries; + assert (m_entryBSIndex[length-1]); + m_entryBSIndex[length-1] <<= 1; + } + } + else + { + m_entryBSIndex[length-1] = 1; + m_entries[length-1] = newEntries; + } + m_entryCounts[length-1] += 1; + new (m_entries[length-1] + insertPos) + SegCacheEntry(cmapGlyphs, length, seg, charOffset, totalAccessCount); + return m_entries[length-1] + insertPos; + } + uint32 purge(unsigned long long minAccessCount, unsigned long long oldAccessTime, + unsigned long long currentTime); + CLASS_NEW_DELETE +private: + uint16 findPosition(const uint16 * cmapGlyphs, uint16 length, SegCacheEntry ** entry) const + { + int dir = 0; + if (m_entryCounts[length-1] == 0) + { + if (entry) *entry = NULL; + return 0; + } + else if (m_entryCounts[length-1] == 1) + { + // optimize single entry case + for (int i = ePrefixLength; i < length; i++) + { + if (cmapGlyphs[i] > m_entries[length-1][0].m_unicode[i]) + { + return 1; + } + else if (cmapGlyphs[i] < m_entries[length-1][0].m_unicode[i]) + { + return 0; + } + } + if (entry) + *entry = m_entries[length-1]; + return 0; + } + uint16 searchIndex = m_entryBSIndex[length-1] - 1; + uint16 stepSize = m_entryBSIndex[length-1] >> 1; + size_t prevIndex = searchIndex; + do + { + dir = 0; + if (searchIndex >= m_entryCounts[length-1]) + { + dir = -1; + searchIndex -= stepSize; + stepSize >>= 1; + } + else + { + for (int i = ePrefixLength; i < length; i++) + { + if (cmapGlyphs[i] > m_entries[length-1][searchIndex].m_unicode[i]) + { + dir = 1; + searchIndex += stepSize; + stepSize >>= 1; + break; + } + else if (cmapGlyphs[i] < m_entries[length-1][searchIndex].m_unicode[i]) + { + dir = -1; + searchIndex -= stepSize; + stepSize >>= 1; + break; + } + } + } + if (prevIndex == searchIndex) + break; + prevIndex = searchIndex; + } while (dir != 0); + if (entry) + { + if (dir == 0) + *entry = m_entries[length-1] + searchIndex; + else + *entry = NULL; + } + else + { + // if entry is null, then this is for inserting a new value, which + // shouldn't already be in the cache + assert(dir != 0); + if (dir > 0) + ++searchIndex; + } + return searchIndex; + } + /** m_entries is a null terminated list of entries */ + uint16 m_entryCounts[eMaxSpliceSize]; + uint16 m_entryBSIndex[eMaxSpliceSize]; + SegCacheEntry * m_entries[eMaxSpliceSize]; + unsigned long long m_lastPurge; +}; + + +#define SEG_CACHE_MIN_INDEX (store->maxCmapGid()) +#define SEG_CACHE_MAX_INDEX (store->maxCmapGid()+1u) +#define SEG_CACHE_UNSET_INDEX (store->maxCmapGid()+2u) + +union SegCachePrefixArray +{ + void ** raw; + SegCachePrefixArray * array; + SegCachePrefixEntry ** prefixEntries; + uintptr * range; +}; + +class SegCache +{ +public: + SegCache(const SegCacheStore * store, const Features& features); + ~SegCache(); + + const SegCacheEntry * find(const uint16 * cmapGlyphs, size_t length) const; + SegCacheEntry * cache(SegCacheStore * store, const uint16 * cmapGlyphs, size_t length, Segment * seg, size_t charOffset); + void purge(SegCacheStore * store); + + long long totalAccessCount() const { return m_totalAccessCount; } + size_t segmentCount() const { return m_segmentCount; } + const Features & features() const { return m_features; } + void clear(SegCacheStore * store); + + CLASS_NEW_DELETE +private: + void freeLevel(SegCacheStore * store, SegCachePrefixArray prefixes, size_t level); + void purgeLevel(SegCacheStore * store, SegCachePrefixArray prefixes, size_t level, + unsigned long long minAccessCount, unsigned long long oldAccessTime); + + uint16 m_prefixLength; + uint16 m_maxCachedSegLength; + size_t m_segmentCount; + SegCachePrefixArray m_prefixes; + Features m_features; + mutable unsigned long long m_totalAccessCount; + mutable unsigned long long m_totalMisses; + float m_purgeFactor; +}; + +inline const SegCacheEntry * SegCache::find(const uint16 * cmapGlyphs, size_t length) const +{ + uint16 pos = 0; + if (!length || length > eMaxSpliceSize) return NULL; + SegCachePrefixArray pEntry = m_prefixes.array[cmapGlyphs[0]]; + while (++pos < m_prefixLength - 1) + { + if (!pEntry.raw) + { + ++m_totalMisses; + return NULL; + } + pEntry = pEntry.array[(pos < length)? cmapGlyphs[pos] : 0]; + } + if (!pEntry.raw) + { + ++m_totalMisses; + return NULL; + } + SegCachePrefixEntry * prefixEntry = pEntry.prefixEntries[(pos < length)? cmapGlyphs[pos] : 0]; + if (!prefixEntry) + { + ++m_totalMisses; + return NULL; + } + const SegCacheEntry * entry = prefixEntry->find(cmapGlyphs, length); + if (entry) + { + ++m_totalAccessCount; + entry->accessed(m_totalAccessCount); + } + else + { + ++m_totalMisses; + } + return entry; +} + +} // namespace graphite2 + +#endif + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/SegCacheEntry.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/SegCacheEntry.h new file mode 100644 index 00000000000..9a7d930677c --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/SegCacheEntry.h @@ -0,0 +1,121 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once + +#ifndef GRAPHITE2_NSEGCACHE + +#include "inc/Main.h" +#include "inc/Slot.h" + +namespace graphite2 { + +class Segment; +class Slot; +class SegCacheEntry; +class SegCachePrefixEntry; + +enum SegCacheParameters { + /** number of characters used in initial prefix tree */ + ePrefixLength = 2, + /** Segments more recent than maxSegmentCount() / eAgeFactor are kept */ + eAgeFactor = 4, + /** Segments are purged according to the formular: + * accessCount < (totalAccesses)/(ePurgeFactor * maxSegments) */ + ePurgeFactor = 5, + /** Maximum number of Segments to store which have the same + * prefix. Needed to prevent unique identifiers flooding the cache */ + eMaxSuffixCount = 15 + +}; + +class SegCacheCharInfo +{ +public: + uint16 m_unicode; + uint16 m_before; + uint16 m_after; +}; + +/** + * SegCacheEntry stores the result of running the engine for specific unicode + * code points in the typical mid-line situation. + */ +class SegCacheEntry +{ + // Prevent any implict copying; + SegCacheEntry(const SegCacheEntry &); + SegCacheEntry & operator = (const SegCacheEntry &); + + friend class SegCachePrefixEntry; +public: + SegCacheEntry() : + m_glyphLength(0), m_unicode(NULL), m_glyph(NULL), m_attr(NULL), m_justs(0), + m_accessCount(0), m_lastAccess(0) + {} + SegCacheEntry(const uint16 * cmapGlyphs, size_t length, Segment * seg, size_t charOffset, long long cacheTime); + ~SegCacheEntry() { clear(); }; + void clear(); + size_t glyphLength() const { return m_glyphLength; } + const Slot * first() const { return m_glyph; } + const Slot * last() const { return m_glyph + (m_glyphLength - 1); } + + /** Total number of times this entry has been accessed since creation */ + unsigned long long accessCount() const { return m_accessCount; } + /** "time" of last access where "time" is measured in accesses to the cache owning this entry */ + void accessed(unsigned long long cacheTime) const + { + m_lastAccess = cacheTime; ++m_accessCount; + }; + + int compareRank(const SegCacheEntry & entry) const + { + if (m_accessCount > entry.m_accessCount) return 1; + else if (m_accessCount < entry.m_accessCount) return 1; + else if (m_lastAccess > entry.m_lastAccess) return 1; + else if (m_lastAccess < entry.m_lastAccess) return -1; + return 0; + } + unsigned long long lastAccess() const { return m_lastAccess; }; + + CLASS_NEW_DELETE; +private: + + size_t m_glyphLength; + /** glyph ids resulting from cmap mapping from unicode to glyph before substitution + * the length of this array is determined by the position in the SegCachePrefixEntry */ + uint16 * m_unicode; + /** slots after shapping and positioning */ + Slot * m_glyph; + int16 * m_attr; + byte * m_justs; + mutable unsigned long long m_accessCount; + mutable unsigned long long m_lastAccess; +}; + +} // namespace graphite2 + +#endif diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/SegCacheStore.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/SegCacheStore.h new file mode 100644 index 00000000000..1e6a6e216e7 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/SegCacheStore.h @@ -0,0 +1,127 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once + +#ifndef GRAPHITE2_NSEGCACHE + +#include "inc/Main.h" +#include "inc/CmapCache.h" +#include "inc/SegCache.h" + +namespace graphite2 { + +class SegCache; +class Face; + +class SilfSegCache +{ + SilfSegCache(const SilfSegCache &); + SilfSegCache & operator = (const SilfSegCache &); + +public: + SilfSegCache() : m_caches(NULL), m_cacheCount(0) {}; + ~SilfSegCache() + { + assert(m_caches == NULL); + } + void clear(SegCacheStore * cacheStore) + { + for (size_t i = 0; i < m_cacheCount; i++) + { + m_caches[i]->clear(cacheStore); + delete m_caches[i]; + } + free(m_caches); + m_caches = NULL; + m_cacheCount = 0; + } + SegCache * getOrCreate(SegCacheStore * cacheStore, const Features & features) + { + for (size_t i = 0; i < m_cacheCount; i++) + { + if (m_caches[i]->features() == features) + return m_caches[i]; + } + SegCache ** newData = gralloc(m_cacheCount+1); + if (newData) + { + if (m_cacheCount > 0) + { + memcpy(newData, m_caches, sizeof(SegCache*) * m_cacheCount); + free(m_caches); + } + m_caches = newData; + m_caches[m_cacheCount] = new SegCache(cacheStore, features); + m_cacheCount++; + return m_caches[m_cacheCount - 1]; + } + return NULL; + } + CLASS_NEW_DELETE +private: + SegCache ** m_caches; + size_t m_cacheCount; +}; + +class SegCacheStore +{ + SegCacheStore(const SegCacheStore &); + SegCacheStore & operator = (const SegCacheStore &); + +public: + SegCacheStore(const Face & face, unsigned int numSilf, size_t maxSegments); + ~SegCacheStore() + { + for (size_t i = 0; i < m_numSilf; i++) + { + m_caches[i].clear(this); + } + delete [] m_caches; + m_caches = NULL; + } + SegCache * getOrCreate(unsigned int i, const Features & features) + { + return m_caches[i].getOrCreate(this, features); + } + bool isSpaceGlyph(uint16 gid) const { return (gid == m_spaceGid) || (gid == m_zwspGid); } + uint16 maxCmapGid() const { return m_maxCmapGid; } + uint32 maxSegmentCount() const { return m_maxSegments; }; + + CLASS_NEW_DELETE +private: + SilfSegCache * m_caches; + uint8 m_numSilf; + uint32 m_maxSegments; + uint16 m_maxCmapGid; + uint16 m_spaceGid; + uint16 m_zwspGid; +}; + +} // namespace graphite2 + +#endif + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Segment.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Segment.h new file mode 100644 index 00000000000..e934d2d40a1 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Segment.h @@ -0,0 +1,273 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once + +#include "inc/Main.h" + +#include + +#include "inc/CharInfo.h" +#include "inc/Face.h" +#include "inc/FeatureVal.h" +#include "inc/GlyphCache.h" +#include "inc/GlyphFace.h" +//#include "inc/Silf.h" +#include "inc/Slot.h" +#include "inc/Position.h" +#include "inc/List.h" + +#define MAX_SEG_GROWTH_FACTOR 256 + +namespace graphite2 { + +typedef Vector FeatureList; +typedef Vector SlotRope; +typedef Vector AttributeRope; +typedef Vector JustifyRope; + +#ifndef GRAPHITE2_NSEGCACHE +class SegmentScopeState; +#endif +class Font; +class Segment; +class Silf; + +enum SpliceParam { +/** sub-Segments longer than this are not cached + * (in Unicode code points) */ + eMaxSpliceSize = 96 +}; + +enum justFlags { + gr_justStartInline = 1, + gr_justEndInline = 2 +}; + +class SegmentScopeState +{ +private: + friend class Segment; + Slot * realFirstSlot; + Slot * slotBeforeScope; + Slot * slotAfterScope; + Slot * realLastSlot; + size_t numGlyphsOutsideScope; +}; + +class Segment +{ + // Prevent copying of any kind. + Segment(const Segment&); + Segment& operator=(const Segment&); + +public: + unsigned int slotCount() const { return m_numGlyphs; } //one slot per glyph + void extendLength(int num) { m_numGlyphs += num; } + Position advance() const { return m_advance; } + bool runGraphite() { if (m_silf) return m_face->runGraphite(this, m_silf); else return true;}; + void chooseSilf(uint32 script) { m_silf = m_face->chooseSilf(script); } + const Silf *silf() const { return m_silf; } + unsigned int charInfoCount() const { return m_numCharinfo; } + const CharInfo *charinfo(unsigned int index) const { return index < m_numCharinfo ? m_charinfo + index : NULL; } + CharInfo *charinfo(unsigned int index) { return index < m_numCharinfo ? m_charinfo + index : NULL; } + int8 dir() const { return m_dir; } + + Segment(unsigned int numchars, const Face* face, uint32 script, int dir); + ~Segment(); +#ifndef GRAPHITE2_NSEGCACHE + SegmentScopeState setScope(Slot * firstSlot, Slot * lastSlot, size_t subLength); + void removeScope(SegmentScopeState & state); + void append(const Segment &other); + void splice(size_t offset, size_t length, Slot * const startSlot, + Slot * endSlot, const Slot * srcSlot, + const size_t numGlyphs); +#endif + Slot *first() { return m_first; } + void first(Slot *p) { m_first = p; } + Slot *last() { return m_last; } + void last(Slot *p) { m_last = p; } + void appendSlot(int i, int cid, int gid, int fid, size_t coffset); + Slot *newSlot(); + void freeSlot(Slot *); + SlotJustify *newJustify(); + void freeJustify(SlotJustify *aJustify); + Position positionSlots(const Font *font, Slot *first=0, Slot *last=0); + void associateChars(); + void linkClusters(Slot *first, Slot *last); + uint16 getClassGlyph(uint16 cid, uint16 offset) const { return m_silf->getClassGlyph(cid, offset); } + uint16 findClassIndex(uint16 cid, uint16 gid) const { return m_silf->findClassIndex(cid, gid); } + int addFeatures(const Features& feats) { m_feats.push_back(feats); return m_feats.size() - 1; } + uint32 getFeature(int index, uint8 findex) const { const FeatureRef* pFR=m_face->theSill().theFeatureMap().featureRef(findex); if (!pFR) return 0; else return pFR->getFeatureVal(m_feats[index]); } + void dir(int8 val) { m_dir = val; } + uint16 glyphAttr(uint16 gid, uint16 gattr) const { return m_face->glyphs().glyphAttr(gid, gattr); } + uint16 getGlyphMetric(Slot *iSlot, uint8 metric, uint8 attrLevel) const; + float glyphAdvance(uint16 gid) const { return m_face->glyphs().glyph(gid)->theAdvance().x; } + const Rect &theGlyphBBoxTemporary(uint16 gid) const { return m_face->glyphs().glyph(gid)->theBBox(); } //warning value may become invalid when another glyph is accessed + Slot *findRoot(Slot *is) const { return is->attachedTo() ? findRoot(is->attachedTo()) : is; } + int numAttrs() const { return m_silf->numUser(); } + int defaultOriginal() const { return m_defaultOriginal; } + const Face * getFace() const { return m_face; } + const Features & getFeatures(unsigned int /*charIndex*/) { assert(m_feats.size() == 1); return m_feats[0]; } + void bidiPass(uint8 aBidi, int paradir, uint8 aMirror); + Slot *addLineEnd(Slot *nSlot); + void delLineEnd(Slot *s); + bool hasJustification() const { return m_justifies.size() != 0; } + + bool isWhitespace(const int cid) const; + + CLASS_NEW_DELETE + +public: //only used by: GrSegment* makeAndInitialize(const GrFont *font, const GrFace *face, uint32 script, const FeaturesHandle& pFeats/*must not be IsNull*/, encform enc, const void* pStart, size_t nChars, int dir); + void read_text(const Face *face, const Features* pFeats/*must not be NULL*/, gr_encform enc, const void*pStart, size_t nChars); + void prepare_pos(const Font *font); + void finalise(const Font *font); + float justify(Slot *pSlot, const Font *font, float width, enum justFlags flags, Slot *pFirst, Slot *pLast); + +private: + // do not instantiate + Segment(); + + Rect m_bbox; // ink box of the segment + Position m_advance; // whole segment advance + SlotRope m_slots; // std::vector of slot buffers + AttributeRope m_userAttrs; // std::vector of userAttrs buffers + JustifyRope m_justifies; // Slot justification info buffers + FeatureList m_feats; // feature settings referenced by charinfos in this segment + Slot * m_freeSlots; // linked list of free slots + SlotJustify * m_freeJustifies; // Slot justification blocks free list + CharInfo * m_charinfo; // character info, one per input character + const Face * m_face; // GrFace + const Silf * m_silf; + Slot * m_first; // first slot in segment + Slot * m_last; // last slot in segment + unsigned int m_bufSize, // how big a buffer to create when need more slots + m_numGlyphs, + m_numCharinfo; // size of the array and number of input characters + int m_defaultOriginal; // number of whitespace chars in the string + int8 m_dir; +}; + + + +inline +void Segment::finalise(const Font *font) +{ + if (!m_first) return; + + m_advance = positionSlots(font); + associateChars(); + linkClusters(m_first, m_last); +} + +inline +uint16 Segment::getGlyphMetric(Slot *iSlot, uint8 metric, uint8 attrLevel) const { + if (attrLevel > 0) + { + Slot *is = findRoot(iSlot); + return is->clusterMetric(this, metric, attrLevel); + } + else + return m_face->getGlyphMetric(iSlot->gid(), metric); +} + +inline +bool Segment::isWhitespace(const int cid) const +{ + return ((cid >= 0x0009) * (cid <= 0x000D) + + (cid == 0x0020) + + (cid == 0x0085) + + (cid == 0x00A0) + + (cid == 0x1680) + + (cid == 0x180E) + + (cid >= 0x2000) * (cid <= 0x200A) + + (cid == 0x2028) + + (cid == 0x2029) + + (cid == 0x202F) + + (cid == 0x205F) + + (cid == 0x3000)) != 0; +} + +//inline +//bool Segment::isWhitespace(const int cid) const +//{ +// switch (cid >> 8) +// { +// case 0x00: +// switch (cid) +// { +// case 0x09: +// case 0x0A: +// case 0x0B: +// case 0x0C: +// case 0x0D: +// case 0x20: +// return true; +// default: +// break; +// } +// break; +// case 0x16: +// return cid == 0x1680; +// break; +// case 0x18: +// return cid == 0x180E; +// break; +// case 0x20: +// switch (cid) +// { +// case 0x00: +// case 0x01: +// case 0x02: +// case 0x03: +// case 0x04: +// case 0x05: +// case 0x06: +// case 0x07: +// case 0x08: +// case 0x09: +// case 0x0A: +// case 0x28: +// case 0x29: +// case 0x2F: +// case 0x5F: +// return true +// default: +// break; +// } +// break; +// case 0x30: +// return cid == 0x3000; +// break; +// } +// +// return false; +//} + +} // namespace graphite2 + +struct gr_segment : public graphite2::Segment {}; + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Silf.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Silf.h new file mode 100644 index 00000000000..72459077708 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Silf.h @@ -0,0 +1,126 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once + +#include "graphite2/Font.h" +#include "inc/Main.h" +#include "inc/Pass.h" + +namespace graphite2 { + +class Face; +class Segment; +class FeatureVal; +class VMScratch; + +class Pseudo +{ +public: + uint32 uid; + uint32 gid; + CLASS_NEW_DELETE; +}; + +class Justinfo +{ +public: + Justinfo(uint8 stretch, uint8 shrink, uint8 step, uint8 weight) : + m_astretch(stretch), m_ashrink(shrink), m_astep(step), + m_aweight(weight) {}; + uint8 attrStretch() const { return m_astretch; } + uint8 attrShrink() const { return m_ashrink; } + uint8 attrStep() const { return m_astep; } + uint8 attrWeight() const { return m_aweight; } + +private: + uint8 m_astretch; + uint8 m_ashrink; + uint8 m_astep; + uint8 m_aweight; +}; + +class Silf +{ + // Prevent copying + Silf(const Silf&); + Silf& operator=(const Silf&); + +public: + Silf() throw(); + ~Silf() throw(); + + bool readGraphite(const byte * const pSilf, size_t lSilf, const Face &face, uint32 version); + bool runGraphite(Segment *seg, uint8 firstPass=0, uint8 lastPass=0) const; + uint16 findClassIndex(uint16 cid, uint16 gid) const; + uint16 getClassGlyph(uint16 cid, unsigned int index) const; + uint16 findPseudo(uint32 uid) const; + size_t numUser() const { return m_aUser; } + uint8 aPseudo() const { return m_aPseudo; } + uint8 aBreak() const { return m_aBreak; } + uint8 aMirror() const {return m_aMirror; } + uint8 substitutionPass() const { return m_sPass; } + uint8 positionPass() const { return m_pPass; } + uint8 justificationPass() const { return m_jPass; } + uint8 bidiPass() const { return m_bPass; } + size_t numPasses() const { return m_numPasses; } + size_t maxCompPerLig() const { return m_iMaxComp; } + size_t numClasses() const { return m_nClass; } + uint8 flags() const { return m_flags; } + size_t numJustLevels() const { return m_numJusts; } + Justinfo *justAttrs() const { return m_justs; } + uint16 endLineGlyphid() const { return m_gEndLine; } + const gr_faceinfo *silfInfo() const { return &m_silfinfo; } + + CLASS_NEW_DELETE; + +private: + size_t readClassMap(const byte *p, size_t data_len, uint32 version); + template inline uint32 readClassOffsets(const byte *&p, size_t data_len); + + Pass * m_passes; + Pseudo * m_pseudos; + uint32 * m_classOffsets; + uint16 * m_classData; + Justinfo * m_justs; + uint8 m_numPasses; + uint8 m_numJusts; + uint8 m_sPass, m_pPass, m_jPass, m_bPass, + m_flags; + + uint8 m_aPseudo, m_aBreak, m_aUser, m_aBidi, m_aMirror, + m_iMaxComp; + uint16 m_aLig, + m_numPseudo, + m_nClass, + m_nLinear, + m_gEndLine; + gr_faceinfo m_silfinfo; + + void releaseBuffers() throw(); +}; + +} // namespace graphite2 diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Slot.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Slot.h new file mode 100644 index 00000000000..285d7f10567 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Slot.h @@ -0,0 +1,167 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once + +#include "graphite2/Types.h" +#include "graphite2/Segment.h" +#include "inc/Main.h" +#include "inc/Font.h" +#include "inc/Position.h" + + + +namespace graphite2 { + +typedef gr_attrCode attrCode; + +class GlyphFace; +class Segment; +class SegCacheEntry; + +struct SlotJustify +{ + static const int NUMJUSTPARAMS = 5; + + SlotJustify(const SlotJustify &); + SlotJustify & operator = (const SlotJustify &); + +public: + static size_t size_of(size_t levels) { return sizeof(SlotJustify) + ((levels > 1 ? levels : 1)*NUMJUSTPARAMS - 1)*sizeof(int16); } + + void LoadSlot(const Slot *s, const Segment *seg); + + SlotJustify *next; + int16 values[1]; +}; + +class Slot +{ + enum Flag + { + DELETED = 1, + INSERTED = 2, + COPIED = 4, + POSITIONED = 8, + ATTACHED = 16 + }; + +public: + struct iterator; + + unsigned short gid() const { return m_glyphid; } + Position origin() const { return m_position; } + float advance() const { return m_advance.x; } + Position advancePos() const { return m_advance; } + int before() const { return m_before; } + int after() const { return m_after; } + uint32 index() const { return m_index; } + void index(uint32 val) { m_index = val; } + + Slot(); + void set(const Slot & slot, int charOffset, size_t numUserAttr, size_t justLevels); + Slot *next() const { return m_next; } + void next(Slot *s) { m_next = s; } + Slot *prev() const { return m_prev; } + void prev(Slot *s) { m_prev = s; } + uint16 glyph() const { return m_realglyphid ? m_realglyphid : m_glyphid; } + void setGlyph(Segment *seg, uint16 glyphid, const GlyphFace * theGlyph = NULL); + void setRealGid(uint16 realGid) { m_realglyphid = realGid; } + void adjKern(const Position &pos) { m_shift = m_shift + pos; m_advance = m_advance + pos; } + void origin(const Position &pos) { m_position = pos + m_shift; } + void originate(int ind) { m_original = ind; } + int original() const { return m_original; } + void before(int ind) { m_before = ind; } + void after(int ind) { m_after = ind; } + bool isBase() const { return (!m_parent); } + void update(int numSlots, int numCharInfo, Position &relpos); + Position finalise(const Segment* seg, const Font* font, Position & base, Rect & bbox, uint8 attrLevel, float & clusterMin); + bool isDeleted() const { return (m_flags & DELETED) ? true : false; } + void markDeleted(bool state) { if (state) m_flags |= DELETED; else m_flags &= ~DELETED; } + bool isCopied() const { return (m_flags & COPIED) ? true : false; } + void markCopied(bool state) { if (state) m_flags |= COPIED; else m_flags &= ~COPIED; } + bool isPositioned() const { return (m_flags & POSITIONED) ? true : false; } + void markPositioned(bool state) { if (state) m_flags |= POSITIONED; else m_flags &= ~POSITIONED; } + bool isInsertBefore() const { return !(m_flags & INSERTED); } + uint8 getBidiLevel() const { return m_bidiLevel; } + void setBidiLevel(uint8 level) { m_bidiLevel = level; } + uint8 getBidiClass() const { return m_bidiCls; } + void setBidiClass(uint8 cls) { m_bidiCls = cls; } + int16 *userAttrs() const { return m_userAttr; } + void userAttrs(int16 *p) { m_userAttr = p; } + void markInsertBefore(bool state) { if (!state) m_flags |= INSERTED; else m_flags &= ~INSERTED; } + void setAttr(Segment* seg, attrCode ind, uint8 subindex, int16 val, const SlotMap & map); + int getAttr(const Segment *seg, attrCode ind, uint8 subindex) const; + int getJustify(const Segment *seg, uint8 level, uint8 subindex) const; + void setJustify(Segment *seg, uint8 level, uint8 subindex, int16 value); + bool isLocalJustify() const { return m_justs != NULL; }; + void attachTo(Slot *ap) { m_parent = ap; } + Slot *attachedTo() const { return m_parent; } + Position attachOffset() const { return m_attach - m_with; } + Slot* firstChild() const { return m_child; } + bool child(Slot *ap); + Slot* nextSibling() const { return m_sibling; } + bool sibling(Slot *ap); + uint32 clusterMetric(const Segment* seg, uint8 metric, uint8 attrLevel); + void positionShift(Position a) { m_position += a; } + void floodShift(Position adj); + float just() const { return m_just; } + void just(float j) { m_just = j; } + + CLASS_NEW_DELETE + +private: + Slot *m_next; // linked list of slots + Slot *m_prev; + unsigned short m_glyphid; // glyph id + uint16 m_realglyphid; + uint32 m_original; // charinfo that originated this slot (e.g. for feature values) + uint32 m_before; // charinfo index of before association + uint32 m_after; // charinfo index of after association + uint32 m_index; // slot index given to this slot during finalising + Slot *m_parent; // index to parent we are attached to + Slot *m_child; // index to first child slot that attaches to us + Slot *m_sibling; // index to next child that attaches to our parent + Position m_position; // absolute position of glyph + Position m_shift; // .shift slot attribute + Position m_advance; // .advance slot attribute + Position m_attach; // attachment point on us + Position m_with; // attachment point position on parent + float m_just; // Justification inserted space + uint8 m_flags; // holds bit flags + byte m_attLevel; // attachment level + byte m_bidiCls; // bidirectional class + byte m_bidiLevel; // bidirectional level + int16 *m_userAttr; // pointer to user attributes + SlotJustify *m_justs; // pointer to justification parameters + + friend class SegCacheEntry; + friend class Segment; +}; + +} // namespace graphite2 + +struct gr_slot : public graphite2::Slot {}; diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Sparse.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Sparse.h new file mode 100644 index 00000000000..2eca5b6161c --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/Sparse.h @@ -0,0 +1,147 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once +#include +#include + +#include "inc/Main.h" + +namespace graphite2 { + + + +class sparse +{ +public: + typedef uint16 key_type; + typedef uint16 mapped_type; + typedef std::pair value_type; + +private: + typedef unsigned long mask_t; + + static const unsigned char SIZEOF_CHUNK = (sizeof(mask_t) - sizeof(key_type))*8; + + struct chunk + { + mask_t mask:SIZEOF_CHUNK; + key_type offset; + }; + + sparse(const sparse &); + sparse & operator = (const sparse &); + +public: + template + sparse(I first, const I last); + sparse() throw(); + ~sparse() throw(); + + operator bool () const throw(); + mapped_type operator [] (const key_type k) const throw(); + + size_t size() const throw(); + + size_t _sizeof() const throw(); + + CLASS_NEW_DELETE; + +private: + union { + chunk * map; + mapped_type * values; + } m_array; + key_type m_nchunks; +}; + + +inline +sparse::sparse() throw() : m_nchunks(0) +{ + m_array.map = 0; +} + + +template +sparse::sparse(I attr, const I last) +: m_nchunks(0) +{ + m_array.map = 0; + + // Find the maximum extent of the key space. + size_t n_values=0; + for (I i = attr; i != last; ++i, ++n_values) + { + const key_type k = (*i).first / SIZEOF_CHUNK; + if (k >= m_nchunks) m_nchunks = k+1; + } + if (m_nchunks == 0) return; + + m_array.values = grzeroalloc((m_nchunks*sizeof(chunk) + sizeof(mapped_type)/2) + / sizeof(mapped_type) + + n_values*sizeof(mapped_type)); + + if (m_array.values == 0) + { + free(m_array.values); m_array.map=0; + return; + } + + chunk * ci = m_array.map; + ci->offset = (m_nchunks*sizeof(chunk) + sizeof(mapped_type)-1)/sizeof(mapped_type); + mapped_type * vi = m_array.values + ci->offset; + for (; attr != last; ++attr, ++vi) + { + const typename std::iterator_traits::value_type v = *attr; + chunk * const ci_ = m_array.map + v.first/SIZEOF_CHUNK; + + if (ci != ci_) + { + ci = ci_; + ci->offset = vi - m_array.values; + } + + ci->mask |= 1UL << (SIZEOF_CHUNK - 1 - (v.first % SIZEOF_CHUNK)); + *vi = v.second; + } +} + + +inline +sparse::operator bool () const throw() +{ + return m_array.map != 0; +} + + +inline +size_t sparse::_sizeof() const throw() +{ + return sizeof(sparse) + size()*sizeof(mapped_type) + m_nchunks*sizeof(chunk); +} + +} // namespace graphite2 diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/TtfTypes.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/TtfTypes.h new file mode 100644 index 00000000000..49ffa39229e --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/TtfTypes.h @@ -0,0 +1,419 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once +/*--------------------------------------------------------------------*//*:Ignore this sentence. + +File: TtfTypes.h +Responsibility: Tim Eves +Last reviewed: Not yet. + +Description: +Provides types required to represent the TTF basic types. +-------------------------------------------------------------------------------*//*:End Ignore*/ + + +//********************************************************************************************** +// Include files +//********************************************************************************************** +namespace graphite2 +{ +namespace TtfUtil +{ +//********************************************************************************************** +// Forward declarations +//********************************************************************************************** + + +//********************************************************************************************** +// Type declarations +//********************************************************************************************** +typedef unsigned char uint8; +typedef uint8 byte; +typedef signed char int8; +typedef unsigned short uint16; +typedef short int16; +typedef unsigned int uint32; +typedef int int32; + +typedef int16 short_frac; +typedef int32 fixed; +typedef int16 fword; +typedef uint16 ufword; +typedef int16 f2dot14; +typedef uint32 long_date_time[2]; + +//********************************************************************************************** +// Constants and enum types +//**********************************************************************************************/ +enum +{ + OneFix = 1<<16 +}; + +//********************************************************************************************** +// Table declarations +//********************************************************************************************** +namespace Sfnt +{ +#pragma pack(1) // We need this or the structure members aren't alligned + // correctly. Fortunately this form of pragma is supposed + // to be recongnised by VS C++ too (at least according to + // MSDN). + + struct OffsetSubTable + { + uint32 scaler_type; + uint16 num_tables, + search_range, + entry_selector, + range_shift; + struct Entry + { + uint32 tag, + checksum, + offset, + length; + } table_directory[1]; + + enum ScalerType + { + TrueTypeMac = 0x74727565U, + TrueTypeWin = 0x00010000U, + Type1 = 0x74797031U + }; + }; + + + + + struct CharacterCodeMap + { + uint16 version, + num_subtables; + struct + { + uint16 platform_id, + platform_specific_id; + uint32 offset; + } encoding[1]; + }; + + struct CmapSubTable + { + uint16 format, + length, + language; + }; + + struct CmapSubTableFormat4 : CmapSubTable + { + uint16 seg_count_x2, + search_range, + entry_selector, + range_shift, + end_code[1]; + // There are arrarys after this which need their + // start positions calculated since end_code is + // seg_count uint16s long. + }; + + struct CmapSubTableFormat12 + { + fixed format; + uint32 length, + language, + num_groups; + struct + { + uint32 start_char_code, + end_char_code, + start_glyph_id; + } group[1]; + }; + + + + struct FontHeader + { + fixed version, + font_revision; + uint32 check_sum_adjustment, + magic_number; + uint16 flags, + units_per_em; + long_date_time created, + modified; + fword x_min, + y_min, + x_max, + y_max; + uint16 mac_style, + lowest_rec_ppem; + int16 font_direction_hint, + index_to_loc_format, + glyph_data_format; + enum + { + MagicNumber = 0x5F0F3CF5, + GlypDataFormat = 0 + }; + enum {ShortIndexLocFormat, LongIndexLocFormat}; + }; + + + + + struct PostScriptGlyphName + { + fixed format, + italic_angle; + fword underline_position, + underline_thickness; + uint32 is_fixed_pitch, + min_mem_type42, + max_mem_type42, + min_mem_type1, + max_mem_type1; + enum + { + Format1 = 0x10000, + Format2 = 0x20000, + Format25 = 0x28000, + Format3 = 0x30000, + Format4 = 0x40000 + }; + }; + + struct PostScriptGlyphName2 : PostScriptGlyphName + { + uint16 number_of_glyphs, + glyph_name_index[1]; + }; + + struct PostScriptGlyphName25 : PostScriptGlyphName + { + uint16 number_of_glyphs; + int8 offset[1]; + }; + + struct PostScriptGlyphName3 : PostScriptGlyphName {}; + + struct PostScriptGlyphName4 : PostScriptGlyphName + { + uint16 glyph_to_char_map[1]; + }; + + + struct HorizontalHeader + { + fixed version; + fword ascent, + descent, + line_gap; + ufword advance_width_max; + fword min_left_side_bearing, + max_left_side_bearing, + x_max_element; + int16 caret_slope_rise, + caret_slope_run; + fword caret_offset; + int16 reserved[4], + metric_data_format; + uint16 num_long_hor_metrics; + }; + + struct MaximumProfile + { + fixed version; + uint16 num_glyphs, + max_points, + max_contours, + max_component_points, + max_component_contours, + max_zones, + max_twilight_points, + max_storage, + max_function_defs, + max_instruction_defs, + max_stack_elements, + max_size_of_instructions, + max_component_elements, + max_component_depth; + }; + + + typedef byte Panose[10]; + + struct Compatibility0 + { + uint16 version; + int16 x_avg_char_width; + uint16 weight_class, + width_class; + int16 fs_type, + y_subscript_x_size, + y_subscript_y_size, + y_subscript_x_offset, + y_subscript_y_offset, + y_superscript_x_size, + y_superscript_y_size, + y_superscript_x_offset, + y_superscript_y_offset, + y_strikeout_size, + y_strikeout_position, + family_class; + Panose panose; + uint32 unicode_range[4]; + int8 ach_vend_id[4]; + uint16 fs_selection, + fs_first_char_index, + fs_last_char_index, // Acording to Apple's spec this is where v0 should end + typo_ascender, + typo_descender, + type_linegap, + win_ascent, + win_descent; + + enum + { + Italic =0x01, + Underscore=0x02, + Negative =0x04, + Outlined =0x08, + StrikeOut =0x10, + Bold =0x20 + }; + }; + + struct Compatibility1 : Compatibility0 + { + uint32 codepage_range[2]; + }; + + struct Compatibility2 : Compatibility1 + { + int16 x_height, + cap_height; + uint16 default_char, + break_char, + max_context; + }; + + struct Compatibility3 : Compatibility2 {}; + + typedef Compatibility3 Compatibility; + + + struct NameRecord + { + uint16 platform_id, + platform_specific_id, + language_id, + name_id, + length, + offset; + enum {Unicode, Mactintosh, Reserved, Microsoft}; + enum + { + Copyright, Family, Subfamily, UniqueSubfamily, + Fullname, Version, PostScript + }; + }; + + struct LangTagRecord + { + uint16 length, + offset; + }; + + struct FontNames + { + uint16 format, + count, + string_offset; + NameRecord name_record[1]; + }; + + + struct HorizontalMetric + { + uint16 advance_width; + int16 left_side_bearing; + }; + + + struct Glyph + { + int16 number_of_contours; + fword x_min, + y_min, + x_max, + y_max; + }; + + struct SimpleGlyph : Glyph + { + uint16 end_pts_of_contours[1]; + enum + { + OnCurve = 0x01, + XShort = 0x02, + YShort = 0x04, + Repeat = 0x08, + XIsSame = 0x10, + XIsPos = 0x10, + YIsSame = 0x20, + YIsPos = 0x20 + }; + }; + + struct CompoundGlyph : Glyph + { + uint16 flags, + glyph_index; + enum + { + Arg1Arg2Words = 0x01, + ArgsAreXYValues = 0x02, + RoundXYToGrid = 0x04, + HaveScale = 0x08, + MoreComponents = 0x20, + HaveXAndYScale = 0x40, + HaveTwoByTwo = 0x80, + HaveInstructions = 0x100, + UseMyMetrics = 0x200, + OverlapCompund = 0x400, + ScaledOffset = 0x800, + UnscaledOffset = 0x1000 + }; + }; + +#pragma pack() +} // end of namespace Sfnt + +} // end of namespace TtfUtil +} // end of namespace graphite2 diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/TtfUtil.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/TtfUtil.h new file mode 100644 index 00000000000..7fafb69cf29 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/TtfUtil.h @@ -0,0 +1,206 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once +/*--------------------------------------------------------------------*//*:Ignore this sentence. + +File: TtfUtil.h +Responsibility: Alan Ward +Last reviewed: Not yet. + +Description: + Utility class for handling TrueType font files. +----------------------------------------------------------------------------------------------*/ + + +#include + +namespace graphite2 +{ +namespace TtfUtil +{ + +typedef long fontTableId32; +typedef unsigned short gid16; + +#define TTF_TAG(a,b,c,d) ((a << 24UL) + (b << 16UL) + (c << 8UL) + (d)) + +// Enumeration used to specify a table in a TTF file +class Tag +{ + unsigned long _v; +public: + Tag(const char n[5]) throw() : _v(TTF_TAG(n[0],n[1],n[2],n[3])) {} + Tag(const unsigned long tag) throw() : _v(tag) {} + + operator unsigned long () const throw () { return _v; } + + enum + { + Feat = TTF_TAG('F','e','a','t'), + Glat = TTF_TAG('G','l','a','t'), + Gloc = TTF_TAG('G','l','o','c'), + Sile = TTF_TAG('S','i','l','e'), + Silf = TTF_TAG('S','i','l','f'), + Sill = TTF_TAG('S','i','l','l'), + cmap = TTF_TAG('c','m','a','p'), + cvt = TTF_TAG('c','v','t',' '), + cryp = TTF_TAG('c','r','y','p'), + head = TTF_TAG('h','e','a','d'), + fpgm = TTF_TAG('f','p','g','m'), + gdir = TTF_TAG('g','d','i','r'), + glyf = TTF_TAG('g','l','y','f'), + hdmx = TTF_TAG('h','d','m','x'), + hhea = TTF_TAG('h','h','e','a'), + hmtx = TTF_TAG('h','m','t','x'), + loca = TTF_TAG('l','o','c','a'), + kern = TTF_TAG('k','e','r','n'), + LTSH = TTF_TAG('L','T','S','H'), + maxp = TTF_TAG('m','a','x','p'), + name = TTF_TAG('n','a','m','e'), + OS_2 = TTF_TAG('O','S','/','2'), + post = TTF_TAG('p','o','s','t'), + prep = TTF_TAG('p','r','e','p') + }; +}; + +/*---------------------------------------------------------------------------------------------- + Class providing utility methods to parse a TrueType font file (TTF). + Callling application handles all file input and memory allocation. + Assumes minimal knowledge of TTF file format. +----------------------------------------------------------------------------------------------*/ + ////////////////////////////////// tools to find & check TTF tables + bool GetHeaderInfo(size_t & lOffset, size_t & lSize); + bool CheckHeader(const void * pHdr); + bool GetTableDirInfo(const void * pHdr, size_t & lOffset, size_t & lSize); + bool GetTableInfo(const Tag TableTag, const void * pHdr, const void * pTableDir, + size_t & lOffset, size_t & lSize); + bool CheckTable(const Tag TableId, const void * pTable, size_t lTableSize); + + ////////////////////////////////// simple font wide info + size_t GlyphCount(const void * pMaxp); +#ifdef ALL_TTFUTILS + size_t MaxCompositeComponentCount(const void * pMaxp); + size_t MaxCompositeLevelCount(const void * pMaxp); + size_t LocaGlyphCount(size_t lLocaSize, const void * pHead); // throw (std::domain_error); +#endif + int DesignUnits(const void * pHead); +#ifdef ALL_TTFUTILS + int HeadTableCheckSum(const void * pHead); + void HeadTableCreateTime(const void * pHead, unsigned int * pnDateBC, unsigned int * pnDateAD); + void HeadTableModifyTime(const void * pHead, unsigned int * pnDateBC, unsigned int * pnDateAD); + bool IsItalic(const void * pHead); + int FontAscent(const void * pOs2); + int FontDescent(const void * pOs2); + bool FontOs2Style(const void *pOs2, bool & fBold, bool & fItalic); + bool Get31EngFamilyInfo(const void * pName, size_t & lOffset, size_t & lSize); + bool Get31EngFullFontInfo(const void * pName, size_t & lOffset, size_t & lSize); + bool Get30EngFamilyInfo(const void * pName, size_t & lOffset, size_t & lSize); + bool Get30EngFullFontInfo(const void * pName, size_t & lOffset, size_t & lSize); + int PostLookup(const void * pPost, size_t lPostSize, const void * pMaxp, + const char * pPostName); +#endif + + ////////////////////////////////// utility methods helpful for name table + bool GetNameInfo(const void * pName, int nPlatformId, int nEncodingId, + int nLangId, int nNameId, size_t & lOffset, size_t & lSize); + //size_t NameTableLength(const byte * pTable); +#ifdef ALL_TTFUTILS + int GetLangsForNames(const void * pName, int nPlatformId, int nEncodingId, + int *nameIdList, int cNameIds, short *langIdList); + void SwapWString(void * pWStr, size_t nSize = 0); // throw (std::invalid_argument); +#endif + + ////////////////////////////////// cmap lookup tools + const void * FindCmapSubtable(const void * pCmap, int nPlatformId = 3, + int nEncodingId = 1, size_t length = 0); + bool CheckCmapSubtable4(const void * pCmap31); + gid16 CmapSubtable4Lookup(const void * pCmapSubtabel4, unsigned int nUnicodeId, int rangeKey = 0); + unsigned int CmapSubtable4NextCodepoint(const void *pCmap31, unsigned int nUnicodeId, + int * pRangeKey = 0); + bool CheckCmapSubtable12(const void *pCmap310); + gid16 CmapSubtable12Lookup(const void * pCmap310, unsigned int uUnicodeId, int rangeKey = 0); + unsigned int CmapSubtable12NextCodepoint(const void *pCmap310, unsigned int nUnicodeId, + int * pRangeKey = 0); + + ///////////////////////////////// horizontal metric data for a glyph + bool HorMetrics(gid16 nGlyphId, const void * pHmtx, size_t lHmtxSize, + const void * pHhea, int & nLsb, unsigned int & nAdvWid); + + ////////////////////////////////// primitives for loca and glyf lookup + size_t LocaLookup(gid16 nGlyphId, const void * pLoca, size_t lLocaSize, + const void * pHead); // throw (std::out_of_range); + void * GlyfLookup(const void * pGlyf, size_t lGlyfOffset, size_t lTableLen); + + ////////////////////////////////// primitves for simple glyph data + bool GlyfBox(const void * pSimpleGlyf, int & xMin, int & yMin, + int & xMax, int & yMax); + +#ifdef ALL_TTFUTILS + int GlyfContourCount(const void * pSimpleGlyf); + bool GlyfContourEndPoints(const void * pSimpleGlyf, int * prgnContourEndPoint, + int cnPointsTotal, size_t & cnPoints); + bool GlyfPoints(const void * pSimpleGlyf, int * prgnX, int * prgnY, + char * prgbFlag, int cnPointsTotal, int & cnPoints); + + // primitive to find the glyph ids in a composite glyph + bool GetComponentGlyphIds(const void * pSimpleGlyf, int * prgnCompId, + size_t cnCompIdTotal, size_t & cnCompId); + // primitive to find the placement data for a component in a composite glyph + bool GetComponentPlacement(const void * pSimpleGlyf, int nCompId, + bool fOffset, int & a, int & b); + // primitive to find the transform data for a component in a composite glyph + bool GetComponentTransform(const void * pSimpleGlyf, int nCompId, + float & flt11, float & flt12, float & flt21, float & flt22, bool & fTransOffset); +#endif + + ////////////////////////////////// operate on composite or simple glyph (auto glyf lookup) + void * GlyfLookup(gid16 nGlyphId, const void * pGlyf, const void * pLoca, + size_t lGlyfSize, size_t lLocaSize, const void * pHead); // primitive used by below methods + +#ifdef ALL_TTFUTILS + // below are primary user methods for handling glyf data + bool IsSpace(gid16 nGlyphId, const void * pLoca, size_t lLocaSize, const void * pHead); + bool IsDeepComposite(gid16 nGlyphId, const void * pGlyf, const void * pLoca, + size_t lGlyfSize, size_t lLocaSize, const void * pHead); + + bool GlyfBox(gid16 nGlyphId, const void * pGlyf, const void * pLoca, size_t lGlyfSize, size_t lLocaSize, + const void * pHead, int & xMin, int & yMin, int & xMax, int & yMax); + bool GlyfContourCount(gid16 nGlyphId, const void * pGlyf, const void * pLoca, + size_t lGlyfSize, size_t lLocaSize, const void *pHead, size_t & cnContours); + bool GlyfContourEndPoints(gid16 nGlyphId, const void * pGlyf, const void * pLoca, + size_t lGlyfSize, size_t lLocaSize, const void * pHead, int * prgnContourEndPoint, size_t cnPoints); + bool GlyfPoints(gid16 nGlyphId, const void * pGlyf, const void * pLoca, + size_t lGlyfSize, size_t lLocaSize, const void * pHead, const int * prgnContourEndPoint, size_t cnEndPoints, + int * prgnX, int * prgnY, bool * prgfOnCurve, size_t cnPoints); + + // utitily method used by high-level GlyfPoints + bool SimplifyFlags(char * prgbFlags, int cnPoints); + bool CalcAbsolutePoints(int * prgnX, int * prgnY, int cnPoints); +#endif + +} // end of namespace TtfUtil +} // end of namespace graphite2 diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/UtfCodec.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/UtfCodec.h new file mode 100644 index 00000000000..1a49179aafa --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/UtfCodec.h @@ -0,0 +1,207 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once + +#include +#include "inc/Main.h" + +namespace graphite2 { + +typedef uint32 uchar_t; + +template +struct _utf_codec +{ + typedef uchar_t codeunit_t; + + static void put(codeunit_t * cp, const uchar_t , int8 & len) throw(); + static uchar_t get(const codeunit_t * cp, int8 & len) throw(); +}; + + +template <> +struct _utf_codec<32> +{ +private: + static const uchar_t limit = 0x110000; +public: + typedef uint32 codeunit_t; + + inline + static void put(codeunit_t * cp, const uchar_t usv, int8 & l) throw() + { + *cp = usv; l = 1; + } + + inline + static uchar_t get(const codeunit_t * cp, int8 & l) throw() + { + if (cp[0] < limit) { l = 1; return cp[0]; } + else { l = -1; return 0xFFFD; } + } +}; + + +template <> +struct _utf_codec<16> +{ +private: + static const int32 lead_offset = 0xD800 - (0x10000 >> 10); + static const int32 surrogate_offset = 0x10000 - (0xD800 << 10) - 0xDC00; +public: + typedef uint16 codeunit_t; + + inline + static void put(codeunit_t * cp, const uchar_t usv, int8 & l) throw() + { + if (usv < 0x10000) { l = 1; cp[0] = codeunit_t(usv); } + else + { + cp[0] = codeunit_t(lead_offset + (usv >> 10)); + cp[1] = codeunit_t(0xDC00 + (usv & 0x3FF)); + l = 2; + } + } + + inline + static uchar_t get(const codeunit_t * cp, int8 & l) throw() + { + const uint32 uh = cp[0]; + l = 1; + + if (0xD800 > uh || uh > 0xDFFF) { return uh; } + const uint32 ul = cp[1]; + if (uh > 0xDBFF || 0xDC00 > ul || ul > 0xDFFF) { l = -1; return 0xFFFD; } + ++l; + return (uh<<10) + ul + surrogate_offset; + } +}; + + +template <> +struct _utf_codec<8> +{ +private: + static const int8 sz_lut[16]; + static const byte mask_lut[5]; + + +public: + typedef uint8 codeunit_t; + + inline + static void put(codeunit_t * cp, const uchar_t usv, int8 & l) throw() + { + if (usv < 0x80) {l = 1; cp[0] = usv; return; } + if (usv < 0x0800) {l = 2; cp[0] = 0xC0 + (usv >> 6); cp[1] = 0x80 + (usv & 0x3F); return; } + if (usv < 0x10000) {l = 3; cp[0] = 0xE0 + (usv >> 12); cp[1] = 0x80 + ((usv >> 6) & 0x3F); cp[2] = 0x80 + (usv & 0x3F); return; } + else {l = 4; cp[0] = 0xF0 + (usv >> 18); cp[1] = 0x80 + ((usv >> 12) & 0x3F); cp[2] = 0x80 + ((usv >> 6) & 0x3F); cp[3] = 0x80 + (usv & 0x3F); return; } + } + + inline + static uchar_t get(const codeunit_t * cp, int8 & l) throw() + { + const int8 seq_sz = sz_lut[*cp >> 4]; + uchar_t u = *cp & mask_lut[seq_sz]; + l = 1; + bool toolong = false; + + switch(seq_sz) { + case 4: u <<= 6; u |= *++cp & 0x3F; if (*cp >> 6 != 2) break; ++l; toolong = (u < 0x10); // no break + case 3: u <<= 6; u |= *++cp & 0x3F; if (*cp >> 6 != 2) break; ++l; toolong |= (u < 0x20); // no break + case 2: u <<= 6; u |= *++cp & 0x3F; if (*cp >> 6 != 2) break; ++l; toolong |= (u < 0x80); // no break + case 1: break; + case 0: l = -1; return 0xFFFD; + } + + if (l != seq_sz || toolong) + { + l = -l; + return 0xFFFD; + } + return u; + } +}; + + +template +class _utf_iterator +{ + typedef _utf_codec codec; + + C * cp; + mutable int8 sl; + +public: + typedef C codeunit_type; + typedef uchar_t value_type; + typedef uchar_t * pointer; + + class reference + { + const _utf_iterator & _i; + + reference(const _utf_iterator & i): _i(i) {} + public: + operator value_type () const throw () { return codec::get(_i.cp, _i.sl); } + reference & operator = (const value_type usv) throw() { codec::put(_i.cp, usv, _i.sl); return *this; } + + friend class _utf_iterator; + }; + + + _utf_iterator(const void * us=0) : cp(reinterpret_cast(const_cast(us))), sl(1) { } + + _utf_iterator & operator ++ () { cp += abs(sl); return *this; } + _utf_iterator operator ++ (int) { _utf_iterator tmp(*this); operator++(); return tmp; } + + bool operator == (const _utf_iterator & rhs) const throw() { return cp >= rhs.cp; } + bool operator != (const _utf_iterator & rhs) const throw() { return !operator==(rhs); } + + reference operator * () const throw() { return *this; } + pointer operator ->() const throw() { return &operator *(); } + + operator codeunit_type * () const throw() { return cp; } + + bool error() const throw() { return sl < 1; } +}; + +template +struct utf +{ + typedef typename _utf_codec::codeunit_t codeunit_t; + + typedef _utf_iterator iterator; + typedef _utf_iterator const_iterator; +}; + + +typedef utf utf32; +typedef utf utf16; +typedef utf utf8; + +} // namespace graphite2 diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/bits.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/bits.h new file mode 100644 index 00000000000..aec2a005fed --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/bits.h @@ -0,0 +1,87 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once + +template +inline unsigned int bit_set_count(T v) +{ + v = v - ((v >> 1) & T(~T(0)/3)); // temp + v = (v & T(~T(0)/15*3)) + ((v >> 2) & T(~T(0)/15*3)); // temp + v = (v + (v >> 4)) & T(~T(0)/255*15); // temp + return (T)(v * T(~T(0)/255)) >> (sizeof(T)-1)*8; // count +} + + +template +inline unsigned long _mask_over_val(unsigned long v) +{ + v = _mask_over_val(v); + v |= v >> S*4; + return v; +} + +template<> +inline unsigned long _mask_over_val<1>(unsigned long v) +{ + v |= v >> 1; + v |= v >> 2; + v |= v >> 4; + return v; +} + +template +inline T mask_over_val(T v) +{ + return _mask_over_val(v); +} + +template +inline unsigned long next_highest_power2(T v) +{ + return _mask_over_val(v-1)+1; +} + +template +inline unsigned int log_binary(T v) +{ + return bit_set_count(mask_over_val(v))-1; +} + +template +inline T haszero(const T x) +{ + return (x - T(~T(0)/255)) & ~x & T(~T(0)/255*128); +} + +template +inline T zerobytes(const T x, unsigned char n) +{ + const T t = T(~T(0)/255*n); + return T((haszero(x^t) >> 7)*n); +} + + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/debug.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/debug.h new file mode 100644 index 00000000000..6c733c6a5a4 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/debug.h @@ -0,0 +1,78 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +// debug.h +// +// Created on: 22 Dec 2011 +// Author: tim + +#pragma once + +#if !defined GRAPHITE2_NTRACING + +#include +#include "inc/json.h" +#include "inc/Position.h" + +namespace graphite2 +{ + +class CharInfo; +class Segment; +class Slot; + +typedef std::pair dslot; +struct objectid +{ + char name[16]; + objectid(const dslot &) throw(); + objectid(const Segment * const p) throw(); +}; + +json & operator << (json & j, const Position &) throw(); +json & operator << (json & j, const CharInfo &) throw(); +json & operator << (json & j, const dslot &) throw(); +json & operator << (json & j, const objectid &) throw(); + + +inline +json & operator << (json & j, const Position & p) throw() +{ + return j << json::flat << json::array << p.x << p.y << json::close; +} + + +inline +json & operator << (json & j, const objectid & sid) throw() +{ + return j << sid.name; +} + + +} // namespace graphite2 + +#endif //!defined GRAPHITE2_NTRACING + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/json.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/json.h new file mode 100644 index 00000000000..80ff5b5cbf8 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/json.h @@ -0,0 +1,165 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +// JSON pretty printer for graphite font debug output logging. +// Created on: 15 Dec 2011 +// Author: Tim Eves + +#pragma once +#include "inc/Main.h" +#include +#include + +namespace graphite2 { + +class json +{ + // Prevent copying + json(const json &); + json & operator = (const json &); + + typedef void (*_context_t)(json &); + class _null_t {}; + + FILE * const _stream; + char _contexts[128], // context stack + * _context, // current context (top of stack) + * _flatten; // if !0 points to context above which + // pretty printed output should occur. + + void context(const char current) throw(); + void indent(const int d=0) throw(); + void push_context(const char, const char) throw(); + void pop_context() throw(); + +public: + class closer; + + typedef const char * string; + typedef double number; + typedef long signed int integer; + typedef bool boolean; + static const _null_t null; + + static void flat(json &) throw(); + static void close(json &) throw(); + static void object(json &) throw(); + static void array(json &) throw(); + static void item(json &) throw(); + + json(FILE * stream) throw(); + ~json() throw (); + + FILE * stream() const throw(); + + json & operator << (string) throw(); + json & operator << (number) throw(); + json & operator << (integer) throw(); + json & operator << (long unsigned int d) throw(); + json & operator << (boolean) throw(); + json & operator << (_null_t) throw(); + json & operator << (_context_t) throw(); + + operator bool() const throw(); + bool good() const throw(); + bool eof() const throw(); + + CLASS_NEW_DELETE; +}; + +class json::closer +{ + // Prevent copying. + closer(const closer &); + closer & operator = (const closer &); + + json * const _j; +public: + closer(json * const j) : _j(j) {} + ~closer() throw() { if (_j) *_j << close; } +}; + +inline +json::json(FILE * s) throw() +: _stream(s), _context(_contexts), _flatten(0) +{ + if (good()) + fflush(s); +} + + +inline +json::~json() throw () +{ + while (_context > _contexts) pop_context(); +} + +inline +FILE * json::stream() const throw() { return _stream; } + + +inline +json & json::operator << (json::_context_t ctxt) throw() +{ + ctxt(*this); + return *this; +} + +inline +json & operator << (json & j, signed char d) throw() { return j << json::integer(d); } + +inline +json & operator << (json & j, short signed int d) throw() { return j << json::integer(d); } + +inline +json & operator << (json & j, signed int d) throw() { return j << json::integer(d); } + +inline +json & operator << (json & j, unsigned char d) throw() { return j << json::integer(d); } + +inline +json & operator << (json & j, short unsigned int d) throw() { return j << json::integer(d); } + +inline +json & operator << (json & j, unsigned int d) throw() { return j << json::integer(d); } + +inline +json & operator << (json & j, char c) throw () +{ + const char str[2] = {c,0}; + return j << str; +} + +inline +json::operator bool() const throw() { return good(); } + +inline +bool json::good() const throw() { return _stream && ferror(_stream) == 0; } + +inline +bool json::eof() const throw() { return feof(_stream) != 0; } + +} // namespace graphite2 diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/locale2lcid.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/locale2lcid.h new file mode 100644 index 00000000000..fc2d384b444 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/locale2lcid.h @@ -0,0 +1,444 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once +#include +#include + +#include "inc/Main.h" + + +namespace graphite2 { + +struct IsoLangEntry +{ + unsigned short mnLang; + const char maLangStr[4]; + const char maCountry[3]; +}; + +// Windows Language ID, Locale ISO-639 language, country code as used in +// naming table of OpenType fonts +const IsoLangEntry LANG_ENTRIES[] = { + { 0x0401, "ar","SA" }, // Arabic Saudi Arabia + { 0x0402, "bg","BG" }, // Bulgarian Bulgaria + { 0x0403, "ca","ES" }, // Catalan Catalan + { 0x0404, "zh","TW" }, // Chinese Taiwan + { 0x0405, "cs","CZ" }, // Czech Czech Republic + { 0x0406, "da","DK" }, // Danish Denmark + { 0x0407, "de","DE" }, // German Germany + { 0x0408, "el","GR" }, // Greek Greece + { 0x0409, "en","US" }, // English United States + { 0x040A, "es","ES" }, // Spanish (Traditional Sort) Spain + { 0x040B, "fi","FI" }, // Finnish Finland + { 0x040C, "fr","FR" }, // French France + { 0x040D, "he","IL" }, // Hebrew Israel + { 0x040E, "hu","HU" }, // Hungarian Hungary + { 0x040F, "is","IS" }, // Icelandic Iceland + { 0x0410, "it","IT" }, // Italian Italy + { 0x0411, "jp","JP" }, // Japanese Japan + { 0x0412, "ko","KR" }, // Korean Korea + { 0x0413, "nl","NL" }, // Dutch Netherlands + { 0x0414, "no","NO" }, // Norwegian (Bokmal) Norway + { 0x0415, "pl","PL" }, // Polish Poland + { 0x0416, "pt","BR" }, // Portuguese Brazil + { 0x0417, "rm","CH" }, // Romansh Switzerland + { 0x0418, "ro","RO" }, // Romanian Romania + { 0x0419, "ru","RU" }, // Russian Russia + { 0x041A, "hr","HR" }, // Croatian Croatia + { 0x041B, "sk","SK" }, // Slovak Slovakia + { 0x041C, "sq","AL" }, // Albanian Albania + { 0x041D, "sv","SE" }, // Swedish Sweden + { 0x041E, "th","TH" }, // Thai Thailand + { 0x041F, "tr","TR" }, // Turkish Turkey + { 0x0420, "ur","PK" }, // Urdu Islamic Republic of Pakistan + { 0x0421, "id","ID" }, // Indonesian Indonesia + { 0x0422, "uk","UA" }, // Ukrainian Ukraine + { 0x0423, "be","BY" }, // Belarusian Belarus + { 0x0424, "sl","SI" }, // Slovenian Slovenia + { 0x0425, "et","EE" }, // Estonian Estonia + { 0x0426, "lv","LV" }, // Latvian Latvia + { 0x0427, "lt","LT" }, // Lithuanian Lithuania + { 0x0428, "tg","TJ" }, // Tajik (Cyrillic) Tajikistan + { 0x042A, "vi","VN" }, // Vietnamese Vietnam + { 0x042B, "hy","AM" }, // Armenian Armenia + { 0x042C, "az","AZ" }, // Azeri (Latin) Azerbaijan + { 0x042D, "eu","" }, // Basque Basque + { 0x042E, "hsb","DE" }, // Upper Sorbian Germany + { 0x042F, "mk","MK" }, // Macedonian (FYROM) Former Yugoslav Republic of Macedonia + { 0x0432, "tn","ZA" }, // Setswana South Africa + { 0x0434, "xh","ZA" }, // isiXhosa South Africa + { 0x0435, "zu","ZA" }, // isiZulu South Africa + { 0x0436, "af","ZA" }, // Afrikaans South Africa + { 0x0437, "ka","GE" }, // Georgian Georgia + { 0x0438, "fo","FO" }, // Faroese Faroe Islands + { 0x0439, "hi","IN" }, // Hindi India + { 0x043A, "mt","MT" }, // Maltese Malta + { 0x043B, "se","NO" }, // Sami (Northern) Norway + { 0x043E, "ms","MY" }, // Malay Malaysia + { 0x043F, "kk","KZ" }, // Kazakh Kazakhstan + { 0x0440, "ky","KG" }, // Kyrgyz Kyrgyzstan + { 0x0441, "sw","KE" }, // Kiswahili Kenya + { 0x0442, "tk","TM" }, // Turkmen Turkmenistan + { 0x0443, "uz","UZ" }, // Uzbek (Latin) Uzbekistan + { 0x0444, "tt","RU" }, // Tatar Russia + { 0x0445, "bn","IN" }, // Bengali India + { 0x0446, "pa","IN" }, // Punjabi India + { 0x0447, "gu","IN" }, // Gujarati India + { 0x0448, "or","IN" }, // Oriya India + { 0x0448, "wo","SN" }, // Wolof Senegal + { 0x0449, "ta","IN" }, // Tamil India + { 0x044A, "te","IN" }, // Telugu India + { 0x044B, "kn","IN" }, // Kannada India + { 0x044C, "ml","IN" }, // Malayalam India + { 0x044D, "as","IN" }, // Assamese India + { 0x044E, "mr","IN" }, // Marathi India + { 0x044F, "sa","IN" }, // Sanskrit India + { 0x0450, "mn","MN" }, // Mongolian (Cyrillic) Mongolia + { 0x0451, "bo","CN" }, // Tibetan PRC + { 0x0452, "cy","GB" }, // Welsh United Kingdom + { 0x0453, "km","KH" }, // Khmer Cambodia + { 0x0454, "lo","LA" }, // Lao Lao P.D.R. + { 0x0455, "my","MM" }, // Burmese Myanmar - not listed in Microsoft docs anymore + { 0x0456, "gl","ES" }, // Galician Galician + { 0x0457, "kok","IN" }, // Konkani India + { 0x045A, "syr","TR" }, // Syriac Syria + { 0x045B, "si","LK" }, // Sinhala Sri Lanka + { 0x045D, "iu","CA" }, // Inuktitut Canada + { 0x045E, "am","ET" }, // Amharic Ethiopia + { 0x0461, "ne","NP" }, // Nepali Nepal + { 0x0462, "fy","NL" }, // Frisian Netherlands + { 0x0463, "ps","AF" }, // Pashto Afghanistan + { 0x0464, "fil","PH" }, // Filipino Philippines + { 0x0465, "dv","MV" }, // Divehi Maldives + { 0x0468, "ha","NG" }, // Hausa (Latin) Nigeria + { 0x046A, "yo","NG" }, // Yoruba Nigeria + { 0x046B, "qu","BO" }, // Quechua Bolivia + { 0x046C, "st","ZA" }, // Sesotho sa Leboa South Africa + { 0x046D, "ba","RU" }, // Bashkir Russia + { 0x046E, "lb","LU" }, // Luxembourgish Luxembourg + { 0x046F, "kl","GL" }, // Greenlandic Greenland + { 0x0470, "ig","NG" }, // Igbo Nigeria + { 0x0478, "ii","CN" }, // Yi PRC + { 0x047A, "arn","CL" }, // Mapudungun Chile + { 0x047C, "moh","CA" }, // Mohawk Mohawk + { 0x047E, "br","FR" }, // Breton France + { 0x0480, "ug","CN" }, // Uighur PRC + { 0x0481, "mi","NZ" }, // Maori New Zealand + { 0x0482, "oc","FR" }, // Occitan France + { 0x0483, "co","FR" }, // Corsican France + { 0x0484, "gsw","FR" }, // Alsatian France + { 0x0485, "sah","RU" }, // Yakut Russia + { 0x0486, "qut","GT" }, // K'iche Guatemala + { 0x0487, "rw","RW" }, // Kinyarwanda Rwanda + { 0x048C, "gbz","AF" }, // Dari Afghanistan + { 0x0801, "ar","IQ" }, // Arabic Iraq + { 0x0804, "zn","CH" }, // Chinese People's Republic of China + { 0x0807, "de","CH" }, // German Switzerland + { 0x0809, "en","GB" }, // English United Kingdom + { 0x080A, "es","MX" }, // Spanish Mexico + { 0x080C, "fr","BE" }, // French Belgium + { 0x0810, "it","CH" }, // Italian Switzerland + { 0x0813, "nl","BE" }, // Dutch Belgium + { 0x0814, "nn","NO" }, // Norwegian (Nynorsk) Norway + { 0x0816, "pt","PT" }, // Portuguese Portugal + { 0x081A, "sh","RS" }, // Serbian (Latin) Serbia + { 0x081D, "sv","FI" }, // Sweden Finland + { 0x082C, "az","AZ" }, // Azeri (Cyrillic) Azerbaijan + { 0x082E, "dsb","DE" }, // Lower Sorbian Germany + { 0x083B, "se","SE" }, // Sami (Northern) Sweden + { 0x083C, "ga","IE" }, // Irish Ireland + { 0x083E, "ms","BN" }, // Malay Brunei Darussalam + { 0x0843, "uz","UZ" }, // Uzbek (Cyrillic) Uzbekistan + { 0x0845, "bn","BD" }, // Bengali Bangladesh + { 0x0850, "mn","MN" }, // Mongolian (Traditional) People's Republic of China + { 0x085D, "iu","CA" }, // Inuktitut (Latin) Canada + { 0x085F, "ber","DZ" }, // Tamazight (Latin) Algeria + { 0x086B, "es","EC" }, // Quechua Ecuador + { 0x0C01, "ar","EG" }, // Arabic Egypt + { 0x0C04, "zh","HK" }, // Chinese Hong Kong S.A.R. + { 0x0C07, "de","AT" }, // German Austria + { 0x0C09, "en","AU" }, // English Australia + { 0x0C0A, "es","ES" }, // Spanish (Modern Sort) Spain + { 0x0C0C, "fr","CA" }, // French Canada + { 0x0C1A, "sr","CS" }, // Serbian (Cyrillic) Serbia + { 0x0C3B, "se","FI" }, // Sami (Northern) Finland + { 0x0C6B, "qu","PE" }, // Quechua Peru + { 0x1001, "ar","LY" }, // Arabic Libya + { 0x1004, "zh","SG" }, // Chinese Singapore + { 0x1007, "de","LU" }, // German Luxembourg + { 0x1009, "en","CA" }, // English Canada + { 0x100A, "es","GT" }, // Spanish Guatemala + { 0x100C, "fr","CH" }, // French Switzerland + { 0x101A, "hr","BA" }, // Croatian (Latin) Bosnia and Herzegovina + { 0x103B, "smj","NO" }, // Sami (Lule) Norway + { 0x1401, "ar","DZ" }, // Arabic Algeria + { 0x1404, "zh","MO" }, // Chinese Macao S.A.R. + { 0x1407, "de","LI" }, // German Liechtenstein + { 0x1409, "en","NZ" }, // English New Zealand + { 0x140A, "es","CR" }, // Spanish Costa Rica + { 0x140C, "fr","LU" }, // French Luxembourg + { 0x141A, "bs","BA" }, // Bosnian (Latin) Bosnia and Herzegovina + { 0x143B, "smj","SE" }, // Sami (Lule) Sweden + { 0x1801, "ar","MA" }, // Arabic Morocco + { 0x1809, "en","IE" }, // English Ireland + { 0x180A, "es","PA" }, // Spanish Panama + { 0x180C, "fr","MC" }, // French Principality of Monoco + { 0x181A, "sh","BA" }, // Serbian (Latin) Bosnia and Herzegovina + { 0x183B, "sma","NO" }, // Sami (Southern) Norway + { 0x1C01, "ar","TN" }, // Arabic Tunisia + { 0x1C09, "en","ZA" }, // English South Africa + { 0x1C0A, "es","DO" }, // Spanish Dominican Republic + { 0x1C1A, "sr","BA" }, // Serbian (Cyrillic) Bosnia and Herzegovina + { 0x1C3B, "sma","SE" }, // Sami (Southern) Sweden + { 0x2001, "ar","OM" }, // Arabic Oman + { 0x2009, "en","JM" }, // English Jamaica + { 0x200A, "es","VE" }, // Spanish Venezuela + { 0x201A, "bs","BA" }, // Bosnian (Cyrillic) Bosnia and Herzegovina + { 0x203B, "sms","FI" }, // Sami (Skolt) Finland + { 0x2401, "ar","YE" }, // Arabic Yemen + { 0x2409, "en","BS" }, // English Caribbean + { 0x240A, "es","CO" }, // Spanish Colombia + { 0x243B, "smn","FI" }, // Sami (Inari) Finland + { 0x2801, "ar","SY" }, // Arabic Syria + { 0x2809, "en","BZ" }, // English Belize + { 0x280A, "es","PE" }, // Spanish Peru + { 0x2C01, "ar","JO" }, // Arabic Jordan + { 0x2C09, "en","TT" }, // English Trinidad and Tobago + { 0x2C0A, "es","AR" }, // Spanish Argentina + { 0x3001, "ar","LB" }, // Arabic Lebanon + { 0x3009, "en","ZW" }, // English Zimbabwe + { 0x300A, "es","EC" }, // Spanish Ecuador + { 0x3401, "ar","KW" }, // Arabic Kuwait + { 0x3409, "en","PH" }, // English Republic of the Philippines + { 0x340A, "es","CL" }, // Spanish Chile + { 0x3801, "ar","AE" }, // Arabic U.A.E. + { 0x380A, "es","UY" }, // Spanish Uruguay + { 0x3C01, "ar","BH" }, // Arabic Bahrain + { 0x3C0A, "es","PY" }, // Spanish Paraguay + { 0x4001, "ar","QA" }, // Arabic Qatar + { 0x4009, "en","IN" }, // English India + { 0x400A, "es","BO" }, // Spanish Bolivia + { 0x4409, "en","MY" }, // English Malaysia + { 0x440A, "es","SV" }, // Spanish El Salvador + { 0x4809, "en","SG" }, // English Singapore + { 0x480A, "es","HN" }, // Spanish Honduras + { 0x4C0A, "es","NI" }, // Spanish Nicaragua + { 0x500A, "es","PR" }, // Spanish Puerto Rico + { 0x540A, "es","US" } // Spanish United States +}; + +class Locale2Lang +{ + Locale2Lang(const Locale2Lang &); + Locale2Lang & operator = (const Locale2Lang &); + +public: + Locale2Lang() : mSeedPosition(128) + { + memset((void*)mLangLookup, 0, sizeof(mLangLookup)); + // create a tri lookup on first 2 letters of language code + static const int maxIndex = sizeof(LANG_ENTRIES)/sizeof(IsoLangEntry); + for (int i = 0; i < maxIndex; i++) + { + size_t a = LANG_ENTRIES[i].maLangStr[0] - 'a'; + size_t b = LANG_ENTRIES[i].maLangStr[1] - 'a'; + if (mLangLookup[a][b]) + { + const IsoLangEntry ** old = mLangLookup[a][b]; + int len = 1; + while (old[len]) len++; + len += 2; + mLangLookup[a][b] = gralloc(len); + mLangLookup[a][b][--len] = NULL; + mLangLookup[a][b][--len] = &LANG_ENTRIES[i]; + while (--len >= 0) + { + assert(len >= 0); + mLangLookup[a][b][len] = old[len]; + } + free(old); + } + else + { + mLangLookup[a][b] = gralloc(2); + mLangLookup[a][b][1] = NULL; + mLangLookup[a][b][0] = &LANG_ENTRIES[i]; + } + } + while (2 * mSeedPosition < maxIndex) + mSeedPosition *= 2; + }; + ~Locale2Lang() + { + for (int i = 0; i != 26; ++i) + for (int j = 0; j != 26; ++j) + free(mLangLookup[i][j]); + } + unsigned short getMsId(const char * locale) const + { + size_t length = strlen(locale); + size_t langLength = length; + const char * language = locale; + const char * script = NULL; + const char * region = NULL; + size_t regionLength = 0; + const char * dash = strchr(locale, '-'); + if (dash && (dash != locale)) + { + langLength = (dash - locale); + size_t nextPartLength = length - langLength - 1; + if (nextPartLength >= 2) + { + script = ++dash; + dash = strchr(dash, '-'); + if (dash) + { + nextPartLength = (dash - script); + region = ++dash; + } + if (nextPartLength == 2 && + (locale[langLength+1] > 0x40) && (locale[langLength+1] < 0x5B) && + (locale[langLength+2] > 0x40) && (locale[langLength+2] < 0x5B)) + { + region = script; + regionLength = nextPartLength; + script = NULL; + } + else if (nextPartLength == 4) + { + if (dash) + { + dash = strchr(dash, '-'); + if (dash) + { + nextPartLength = (dash - region); + } + else + { + nextPartLength = langLength - (region - locale); + } + regionLength = nextPartLength; + } + } + } + } + size_t a = 'e' - 'a'; + size_t b = 'n' - 'a'; + unsigned short langId = 0; + int i = 0; + switch (langLength) + { + case 2: + { + a = language[0] - 'a'; + b = language[1] - 'a'; + if ((a < 26) && (b < 26) && mLangLookup[a][b]) + { + while (mLangLookup[a][b][i]) + { + if (mLangLookup[a][b][i]->maLangStr[2] != '\0') + { + ++i; + continue; + } + if (region && (strncmp(mLangLookup[a][b][i]->maCountry, region, regionLength) == 0)) + { + langId = mLangLookup[a][b][i]->mnLang; + break; + } + else if (langId == 0) + { + // possible fallback code + langId = mLangLookup[a][b][i]->mnLang; + } + ++i; + } + } + } + break; + case 3: + { + a = language[0] - 'a'; + b = language[1] - 'a'; + if (mLangLookup[a][b]) + { + while (mLangLookup[a][b][i]) + { + if (mLangLookup[a][b][i]->maLangStr[2] != language[2]) + { + ++i; + continue; + } + if (strcmp(mLangLookup[a][b][i]->maCountry, region) == 0) + { + langId = mLangLookup[a][b][i]->mnLang; + break; + } + else if (langId == 0) + { + // possible fallback code + langId = mLangLookup[a][b][i]->mnLang; + } + ++i; + } + } + } + break; + default: + break; + } + if (langId == 0) langId = 0x409; + return langId; + } + const IsoLangEntry * findEntryById(unsigned short langId) const + { + static const int maxIndex = sizeof(LANG_ENTRIES)/sizeof(IsoLangEntry); + int window = mSeedPosition; + int guess = mSeedPosition - 1; + while (LANG_ENTRIES[guess].mnLang != langId) + { + window /= 2; + if (window == 0) return NULL; + guess += (LANG_ENTRIES[guess].mnLang > langId)? -window : window; + while (guess >= maxIndex) + { + window /= 2; + guess -= window; + assert(window); + } + } + return &LANG_ENTRIES[guess]; + } + + CLASS_NEW_DELETE; + +private: + const IsoLangEntry ** mLangLookup[26][26]; + int mSeedPosition; +}; + +} // namespace graphite2 diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/opcode_table.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/opcode_table.h new file mode 100644 index 00000000000..efab472a207 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/opcode_table.h @@ -0,0 +1,120 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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 file will be pulled into and integrated into a machine implmentation +// DO NOT build directly +#pragma once + +#define do2(n) do_(n) ,do_(n) +#define NILOP 0U + +// types or parameters are: (.. is inclusive) +// number - any byte +// output_class - 0 .. silf.m_nClass +// input_class - 0 .. silf.m_nClass +// sattrnum - 0 .. 29 (gr_slatJWidth) , 55 (gr_slatUserDefn) +// attrid - 0 .. silf.numUser() where sattrnum == 55; 0..silf.m_iMaxComp where sattrnum == 15 otherwise 0 +// gattrnum - 0 .. face->getGlyphFaceCache->numAttrs() +// gmetric - 0 .. 11 (kgmetDescent) +// featidx - 0 .. face.numFeatures() +// level - any byte +static const opcode_t opcode_table[] = +{ + {{do2(nop)}, 0, "NOP"}, + + {{do2(push_byte)}, 1, "PUSH_BYTE"}, // number + {{do2(push_byte_u)}, 1, "PUSH_BYTE_U"}, // number + {{do2(push_short)}, 2, "PUSH_SHORT"}, // number number + {{do2(push_short_u)}, 2, "PUSH_SHORT_U"}, // number number + {{do2(push_long)}, 4, "PUSH_LONG"}, // number number number number + + {{do2(add)}, 0, "ADD"}, + {{do2(sub)}, 0, "SUB"}, + {{do2(mul)}, 0, "MUL"}, + {{do2(div_)}, 0, "DIV"}, + {{do2(min)}, 0, "MIN"}, + {{do2(max)}, 0, "MAX"}, + {{do2(neg)}, 0, "NEG"}, + {{do2(trunc8)}, 0, "TRUNC8"}, + {{do2(trunc16)}, 0, "TRUNC16"}, + + {{do2(cond)}, 0, "COND"}, + {{do2(and_)}, 0, "AND"}, // 0x10 + {{do2(or_)}, 0, "OR"}, + {{do2(not_)}, 0, "NOT"}, + {{do2(equal)}, 0, "EQUAL"}, + {{do2(not_eq_)}, 0, "NOT_EQ"}, + {{do2(less)}, 0, "LESS"}, + {{do2(gtr)}, 0, "GTR"}, + {{do2(less_eq)}, 0, "LESS_EQ"}, + {{do2(gtr_eq)}, 0, "GTR_EQ"}, // 0x18 + + {{do_(next), NILOP}, 0, "NEXT"}, + {{do_(next_n), NILOP}, 1, "NEXT_N"}, // number <= smap.end - map + {{do_(next), NILOP}, 0, "COPY_NEXT"}, + {{do_(put_glyph_8bit_obs), NILOP}, 1, "PUT_GLYPH_8BIT_OBS"}, // output_class + {{do_(put_subs_8bit_obs), NILOP}, 3, "PUT_SUBS_8BIT_OBS"}, // slot input_class output_class + {{do_(put_copy), NILOP}, 1, "PUT_COPY"}, // slot + {{do_(insert), NILOP}, 0, "INSERT"}, + {{do_(delete_), NILOP}, 0, "DELETE"}, // 0x20 + {{do_(assoc), NILOP}, VARARGS, "ASSOC"}, + {{NILOP ,do_(cntxt_item)}, 2, "CNTXT_ITEM"}, // slot offset + + {{do_(attr_set), NILOP}, 1, "ATTR_SET"}, // sattrnum + {{do_(attr_add), NILOP}, 1, "ATTR_ADD"}, // sattrnum + {{do_(attr_sub), NILOP}, 1, "ATTR_SUB"}, // sattrnum + {{do_(attr_set_slot), NILOP}, 1, "ATTR_SET_SLOT"}, // sattrnum + {{do_(iattr_set_slot), NILOP}, 2, "IATTR_SET_SLOT"}, // sattrnum attrid + {{do2(push_slot_attr)}, 2, "PUSH_SLOT_ATTR"}, // sattrnum slot + {{do2(push_glyph_attr_obs)}, 2, "PUSH_GLYPH_ATTR_OBS"}, // gattrnum slot + {{do2(push_glyph_metric)}, 3, "PUSH_GLYPH_METRIC"}, // gmetric slot level + {{do2(push_feat)}, 2, "PUSH_FEAT"}, // featidx slot + + {{do2(push_att_to_gattr_obs)}, 2, "PUSH_ATT_TO_GATTR_OBS"}, // gattrnum slot + {{do2(push_att_to_glyph_metric)}, 3, "PUSH_ATT_TO_GLYPH_METRIC"}, // gmetric slot level + {{do2(push_islot_attr)}, 3, "PUSH_ISLOT_ATTR"}, // sattrnum slot attrid + + {{NILOP,NILOP}, 3, "PUSH_IGLYPH_ATTR"}, + + {{do2(pop_ret)}, 0, "POP_RET"}, // 0x30 + {{do2(ret_zero)}, 0, "RET_ZERO"}, + {{do2(ret_true)}, 0, "RET_TRUE"}, + + {{do_(iattr_set), NILOP}, 2, "IATTR_SET"}, // sattrnum attrid + {{do_(iattr_add), NILOP}, 2, "IATTR_ADD"}, // sattrnum attrid + {{do_(iattr_sub), NILOP}, 2, "IATTR_SUB"}, // sattrnum attrid + {{do2(push_proc_state)}, 1, "PUSH_PROC_STATE"}, // dummy + {{do2(push_version)}, 0, "PUSH_VERSION"}, + {{do_(put_subs), NILOP}, 5, "PUT_SUBS"}, // slot input_class input_class output_class output_class + {{NILOP,NILOP}, 0, "PUT_SUBS2"}, + {{NILOP,NILOP}, 0, "PUT_SUBS3"}, + {{do_(put_glyph), NILOP}, 2, "PUT_GLYPH"}, // output_class output_class + {{do2(push_glyph_attr)}, 3, "PUSH_GLYPH_ATTR"}, // gattrnum gattrnum slot + {{do2(push_att_to_glyph_attr)}, 3, "PUSH_ATT_TO_GLYPH_ATTR"}, // gattrnum gattrnum slot + // private internal private opcodes for internal use only, comes after all other on disk opcodes. + {{do_(temp_copy), NILOP}, 0, "TEMP_COPY"} +}; + diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/opcodes.h b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/opcodes.h new file mode 100644 index 00000000000..6127c8ff359 --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/inc/opcodes.h @@ -0,0 +1,644 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +#pragma once +// This file will be pulled into and integrated into a machine implmentation +// DO NOT build directly and under no circumstances every #include headers in +// here or you will break the direct_machine. +// +// Implementers' notes +// ================== +// You have access to a few primitives and the full C++ code: +// declare_params(n) Tells the interpreter how many bytes of parameter +// space to claim for this instruction uses and +// initialises the param pointer. You *must* before the +// first use of param. +// use_params(n) Claim n extra bytes of param space beyond what was +// claimed using delcare_param. +// param A const byte pointer for the parameter space claimed by +// this instruction. +// binop(op) Implement a binary operation on the stack using the +// specified C++ operator. +// NOT_IMPLEMENTED Any instruction body containing this will exit the +// program with an assertion error. Instructions that are +// not implemented should also be marked NILOP in the +// opcodes tables this will cause the code class to spot +// them in a live code stream and throw a runtime_error +// instead. +// push(n) Push the value n onto the stack. +// pop() Pop the top most value and return it. +// +// You have access to the following named fast 'registers': +// sp = The pointer to the current top of stack, the last value +// pushed. +// seg = A reference to the Segment this code is running over. +// is = The current slot index +// isb = The original base slot index at the start of this rule +// isf = The first positioned slot +// isl = The last positioned slot +// ip = The current instruction pointer +// endPos = Position of advance of last cluster + + +// #define NOT_IMPLEMENTED assert(false) +#define NOT_IMPLEMENTED + +#define binop(op) const int32 a = pop(); *sp = int32(*sp) op a +#define use_params(n) dp += n + +#define declare_params(n) const byte * param = dp; \ + use_params(n); + +#define push(n) { *++sp = n; } +#define pop() (*sp--) +#define slotat(x) (map[(x)]) +#define DIE { is=seg.last(); EXIT(1); } +#define POSITIONED 1 + +STARTOP(nop) + do {} while (0); +ENDOP + +STARTOP(push_byte) + declare_params(1); + push(int8(*param)); +ENDOP + +STARTOP(push_byte_u) + declare_params(1); + push(uint8(*param)); +ENDOP + +STARTOP(push_short) + declare_params(2); + const int16 r = int16(param[0]) << 8 + | uint8(param[1]); + push(r); +ENDOP + +STARTOP(push_short_u) + declare_params(2); + const uint16 r = uint16(param[0]) << 8 + | uint8(param[1]); + push(r); +ENDOP + +STARTOP(push_long) + declare_params(4); + const int32 r = int32(param[0]) << 24 + | uint32(param[1]) << 16 + | uint32(param[2]) << 8 + | uint8(param[3]); + push(r); +ENDOP + +STARTOP(add) + binop(+); +ENDOP + +STARTOP(sub) + binop(-); +ENDOP + +STARTOP(mul) + binop(*); +ENDOP + +STARTOP(div_) + if (*sp == 0) DIE; + binop(/); +ENDOP + +STARTOP(min) + const int32 a = pop(), b = *sp; + if (a < b) *sp = a; +ENDOP + +STARTOP(max) + const int32 a = pop(), b = *sp; + if (a > b) *sp = a; +ENDOP + +STARTOP(neg) + *sp = uint32(-int32(*sp)); +ENDOP + +STARTOP(trunc8) + *sp = uint8(*sp); +ENDOP + +STARTOP(trunc16) + *sp = uint16(*sp); +ENDOP + +STARTOP(cond) + const uint32 f = pop(), t = pop(), c = pop(); + push(c ? t : f); +ENDOP + +STARTOP(and_) + binop(&&); +ENDOP + +STARTOP(or_) + binop(||); +ENDOP + +STARTOP(not_) + *sp = !*sp; +ENDOP + +STARTOP(equal) + binop(==); +ENDOP + +STARTOP(not_eq_) + binop(!=); +ENDOP + +STARTOP(less) + binop(<); +ENDOP + +STARTOP(gtr) + binop(>); +ENDOP + +STARTOP(less_eq) + binop(<=); +ENDOP + +STARTOP(gtr_eq) + binop(>=); +ENDOP + +STARTOP(next) + if (map - &smap[0] >= int(smap.size())) DIE + if (is) + { + if (is == smap.highwater()) + smap.highpassed(true); + is = is->next(); + } + ++map; +ENDOP + +STARTOP(next_n) + use_params(1); + NOT_IMPLEMENTED; + //declare_params(1); + //const size_t num = uint8(*param); +ENDOP + +//STARTOP(copy_next) +// if (is) is = is->next(); +// ++map; +// ENDOP + +STARTOP(put_glyph_8bit_obs) + declare_params(1); + const unsigned int output_class = uint8(*param); + is->setGlyph(&seg, seg.getClassGlyph(output_class, 0)); +ENDOP + +STARTOP(put_subs_8bit_obs) + declare_params(3); + const int slot_ref = int8(param[0]); + const unsigned int input_class = uint8(param[1]), + output_class = uint8(param[2]); + uint16 index; + slotref slot = slotat(slot_ref); + if (slot) + { + index = seg.findClassIndex(input_class, slot->gid()); + is->setGlyph(&seg, seg.getClassGlyph(output_class, index)); + } +ENDOP + +STARTOP(put_copy) + declare_params(1); + const int slot_ref = int8(*param); + if (is && (slot_ref ||is != *map)) + { + int16 *tempUserAttrs = is->userAttrs(); + slotref ref = slotat(slot_ref); + if (ref) + { + memcpy(tempUserAttrs, ref->userAttrs(), seg.numAttrs() * sizeof(uint16)); + Slot *prev = is->prev(); + Slot *next = is->next(); + memcpy(is, slotat(slot_ref), sizeof(Slot)); + is->userAttrs(tempUserAttrs); + is->next(next); + is->prev(prev); + is->sibling(NULL); + } + is->markCopied(false); + is->markDeleted(false); + } +ENDOP + +STARTOP(insert) + Slot *newSlot = seg.newSlot(); + Slot *iss = is; + while (iss && iss->isDeleted()) iss = iss->next(); + if (!iss) + { + if (seg.last()) + { + seg.last()->next(newSlot); + newSlot->prev(seg.last()); + newSlot->before(seg.last()->before()); + seg.last(newSlot); + } + else + { + seg.first(newSlot); + seg.last(newSlot); + } + } + else if (iss->prev()) + { + iss->prev()->next(newSlot); + newSlot->prev(iss->prev()); + newSlot->before(iss->prev()->after()); + } + else + { + newSlot->prev(NULL); + newSlot->before(iss->before()); + seg.first(newSlot); + } + newSlot->next(iss); + if (iss) + { + iss->prev(newSlot); + newSlot->originate(iss->original()); + newSlot->after(iss->before()); + } + else if (newSlot->prev()) + { + newSlot->originate(newSlot->prev()->original()); + newSlot->after(newSlot->prev()->after()); + } + else + { + newSlot->originate(seg.defaultOriginal()); + } + is = newSlot; + seg.extendLength(1); + if (map != &smap[-1]) + --map; +ENDOP + +STARTOP(delete_) + if (!is) DIE + is->markDeleted(true); + if (is->prev()) + is->prev()->next(is->next()); + else + seg.first(is->next()); + + if (is->next()) + is->next()->prev(is->prev()); + else + seg.last(is->prev()); + + if (is == smap.highwater()) + smap.highwater(is->next()); + if (is->prev()) + is = is->prev(); + seg.extendLength(-1); +ENDOP + +STARTOP(assoc) + declare_params(1); + unsigned int num = uint8(*param); + const int8 * assocs = reinterpret_cast(param+1); + use_params(num); + int max = -1; + int min = -1; + + while (num-- > 0) + { + int sr = *assocs++; + slotref ts = slotat(sr); + if (ts && (min == -1 || ts->before() < min)) min = ts->before(); + if (ts && ts->after() > max) max = ts->after(); + } + if (min > -1) // implies max > -1 + { + is->before(min); + is->after(max); + } +ENDOP + +STARTOP(cntxt_item) + // It turns out this is a cunningly disguised condition forward jump. + declare_params(3); + const int is_arg = int8(param[0]); + const size_t iskip = uint8(param[1]), + dskip = uint8(param[2]); + + if (mapb + is_arg != map) + { + ip += iskip; + dp += dskip; + push(true); + } +ENDOP + +STARTOP(attr_set) + declare_params(1); + const attrCode slat = attrCode(uint8(*param)); + const int val = int(pop()); + is->setAttr(&seg, slat, 0, val, smap); +ENDOP + +STARTOP(attr_add) + declare_params(1); + const attrCode slat = attrCode(uint8(*param)); + const int val = int(pop()); + if ((slat == gr_slatPosX || slat == gr_slatPosY) && (flags & POSITIONED) == 0) + { + seg.positionSlots(0, *smap.begin(), *(smap.end()-1)); + flags |= POSITIONED; + } + int res = is->getAttr(&seg, slat, 0); + is->setAttr(&seg, slat, 0, val + res, smap); +ENDOP + +STARTOP(attr_sub) + declare_params(1); + const attrCode slat = attrCode(uint8(*param)); + const int val = int(pop()); + if ((slat == gr_slatPosX || slat == gr_slatPosY) && (flags & POSITIONED) == 0) + { + seg.positionSlots(0, *smap.begin(), *(smap.end()-1)); + flags |= POSITIONED; + } + int res = is->getAttr(&seg, slat, 0); + is->setAttr(&seg, slat, 0, res - val, smap); +ENDOP + +STARTOP(attr_set_slot) + declare_params(1); + const attrCode slat = attrCode(uint8(*param)); + const int offset = (map - smap.begin())*int(slat == gr_slatAttTo); + const int val = int(pop()) + offset; + is->setAttr(&seg, slat, offset, val, smap); +ENDOP + +STARTOP(iattr_set_slot) + declare_params(2); + const attrCode slat = attrCode(uint8(param[0])); + const size_t idx = uint8(param[1]); + const int val = int(pop()) + (map - smap.begin())*int(slat == gr_slatAttTo); + is->setAttr(&seg, slat, idx, val, smap); +ENDOP + +STARTOP(push_slot_attr) + declare_params(2); + const attrCode slat = attrCode(uint8(param[0])); + const int slot_ref = int8(param[1]); + if ((slat == gr_slatPosX || slat == gr_slatPosY) && (flags & POSITIONED) == 0) + { + seg.positionSlots(0, *smap.begin(), *(smap.end()-1)); + flags |= POSITIONED; + } + slotref slot = slotat(slot_ref); + if (slot) + { + int res = slot->getAttr(&seg, slat, 0); + push(res); + } +ENDOP + +STARTOP(push_glyph_attr_obs) + declare_params(2); + const unsigned int glyph_attr = uint8(param[0]); + const int slot_ref = int8(param[1]); + slotref slot = slotat(slot_ref); + if (slot) + push(seg.glyphAttr(slot->gid(), glyph_attr)); +ENDOP + +STARTOP(push_glyph_metric) + declare_params(3); + const unsigned int glyph_attr = uint8(param[0]); + const int slot_ref = int8(param[1]); + const signed int attr_level = uint8(param[2]); + slotref slot = slotat(slot_ref); + if (slot) + push(seg.getGlyphMetric(slot, glyph_attr, attr_level)); +ENDOP + +STARTOP(push_feat) + declare_params(2); + const unsigned int feat = uint8(param[0]); + const int slot_ref = int8(param[1]); + slotref slot = slotat(slot_ref); + if (slot) + { + uint8 fid = seg.charinfo(slot->original())->fid(); + push(seg.getFeature(fid, feat)); + } +ENDOP + +STARTOP(push_att_to_gattr_obs) + declare_params(2); + const unsigned int glyph_attr = uint8(param[0]); + const int slot_ref = int8(param[1]); + slotref slot = slotat(slot_ref); + if (slot) + { + slotref att = slot->attachedTo(); + if (att) slot = att; + push(seg.glyphAttr(slot->gid(), glyph_attr)); + } +ENDOP + +STARTOP(push_att_to_glyph_metric) + declare_params(3); + const unsigned int glyph_attr = uint8(param[0]); + const int slot_ref = int8(param[1]); + const signed int attr_level = uint8(param[2]); + slotref slot = slotat(slot_ref); + if (slot) + { + slotref att = slot->attachedTo(); + if (att) slot = att; + push(seg.getGlyphMetric(slot, glyph_attr, attr_level)); + } +ENDOP + +STARTOP(push_islot_attr) + declare_params(3); + const attrCode slat = attrCode(uint8(param[0])); + const int slot_ref = int8(param[1]), + idx = uint8(param[2]); + if ((slat == gr_slatPosX || slat == gr_slatPosY) && (flags & POSITIONED) == 0) + { + seg.positionSlots(0, *smap.begin(), *(smap.end()-1)); + flags |= POSITIONED; + } + slotref slot = slotat(slot_ref); + if (slot) + { + int res = slot->getAttr(&seg, slat, idx); + push(res); + } +ENDOP + +#if 0 +STARTOP(push_iglyph_attr) // not implemented + NOT_IMPLEMENTED; +ENDOP +#endif + +STARTOP(pop_ret) + const uint32 ret = pop(); + EXIT(ret); +ENDOP + +STARTOP(ret_zero) + EXIT(0); +ENDOP + +STARTOP(ret_true) + EXIT(1); +ENDOP + +STARTOP(iattr_set) + declare_params(2); + const attrCode slat = attrCode(uint8(param[0])); + const size_t idx = uint8(param[1]); + const int val = int(pop()); + is->setAttr(&seg, slat, idx, val, smap); +ENDOP + +STARTOP(iattr_add) + declare_params(2); + const attrCode slat = attrCode(uint8(param[0])); + const size_t idx = uint8(param[1]); + const int val = int(pop()); + if ((slat == gr_slatPosX || slat == gr_slatPosY) && (flags & POSITIONED) == 0) + { + seg.positionSlots(0, *smap.begin(), *(smap.end()-1)); + flags |= POSITIONED; + } + int res = is->getAttr(&seg, slat, idx); + is->setAttr(&seg, slat, idx, val + res, smap); +ENDOP + +STARTOP(iattr_sub) + declare_params(2); + const attrCode slat = attrCode(uint8(param[0])); + const size_t idx = uint8(param[1]); + const int val = int(pop()); + if ((slat == gr_slatPosX || slat == gr_slatPosY) && (flags & POSITIONED) == 0) + { + seg.positionSlots(0, *smap.begin(), *(smap.end()-1)); + flags |= POSITIONED; + } + int res = is->getAttr(&seg, slat, idx); + is->setAttr(&seg, slat, idx, res - val, smap); +ENDOP + +STARTOP(push_proc_state) + use_params(1); + push(1); +ENDOP + +STARTOP(push_version) + push(0x00030000); +ENDOP + +STARTOP(put_subs) + declare_params(5); + const int slot_ref = int8(param[0]); + const unsigned int input_class = uint8(param[1]) << 8 + | uint8(param[2]); + const unsigned int output_class = uint8(param[3]) << 8 + | uint8(param[4]); + slotref slot = slotat(slot_ref); + if (slot) + { + int index = seg.findClassIndex(input_class, slot->gid()); + is->setGlyph(&seg, seg.getClassGlyph(output_class, index)); + } +ENDOP + +#if 0 +STARTOP(put_subs2) // not implemented + NOT_IMPLEMENTED; +ENDOP + +STARTOP(put_subs3) // not implemented + NOT_IMPLEMENTED; +ENDOP +#endif + +STARTOP(put_glyph) + declare_params(2); + const unsigned int output_class = uint8(param[0]) << 8 + | uint8(param[1]); + is->setGlyph(&seg, seg.getClassGlyph(output_class, 0)); +ENDOP + +STARTOP(push_glyph_attr) + declare_params(3); + const unsigned int glyph_attr = uint8(param[0]) << 8 + | uint8(param[1]); + const int slot_ref = int8(param[2]); + slotref slot = slotat(slot_ref); + if (slot) + push(seg.glyphAttr(slot->gid(), glyph_attr)); +ENDOP + +STARTOP(push_att_to_glyph_attr) + declare_params(3); + const unsigned int glyph_attr = uint8(param[0]) << 8 + | uint8(param[1]); + const int slot_ref = int8(param[2]); + slotref slot = slotat(slot_ref); + if (slot) + { + slotref att = slot->attachedTo(); + if (att) slot = att; + push(seg.glyphAttr(slot->gid(), glyph_attr)); + } +ENDOP + +STARTOP(temp_copy) + slotref newSlot = seg.newSlot(); + int16 *tempUserAttrs = newSlot->userAttrs(); + memcpy(newSlot, is, sizeof(Slot)); + memcpy(tempUserAttrs, is->userAttrs(), seg.numAttrs() * sizeof(uint16)); + newSlot->userAttrs(tempUserAttrs); + newSlot->markCopied(true); + *map = newSlot; +ENDOP diff --git a/Build/source/libs/graphite2/graphite2-1.2.0/src/json.cpp b/Build/source/libs/graphite2/graphite2-1.2.0/src/json.cpp new file mode 100644 index 00000000000..c10037f3afe --- /dev/null +++ b/Build/source/libs/graphite2/graphite2-1.2.0/src/json.cpp @@ -0,0 +1,126 @@ +/* GRAPHITE2 LICENSING + + Copyright 2010, SIL International + All rights reserved. + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of 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 + Lesser General Public License for more details. + + You should also have received a copy of the GNU Lesser General Public + License along with this library in the file named "LICENSE". + If not, write to the Free Software Foundation, 51 Franklin Street, + Suite 500, Boston, MA 02110-1335, USA or visit their web page on the + internet at http://www.fsf.org/licenses/lgpl.html. + +Alternatively, the contents of this file may be used under the terms of the +Mozilla Public License (http://mozilla.org/MPL) or 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. +*/ +// JSON debug logging +// Author: Tim Eves + +#if !defined GRAPHITE2_NTRACING + +#include +#include "inc/json.h" + +using namespace graphite2; + +namespace +{ + enum + { + seq = ',', + obj='}', member=':', empty_obj='{', + arr=']', empty_arr='[' + }; +} + +const json::_null_t json::null = {}; + +inline +void json::context(const char current) throw() +{ + fprintf(_stream, "%c", *_context); + indent(); + *_context = current; +} + + +void json::indent(const int d) throw() +{ + if (*_context == member || (_flatten && _flatten < _context)) + fputc(' ', _stream); + else + fprintf(_stream, "\n%*s", 4*int(_context - _contexts + d), ""); +} + + +inline +void json::push_context(const char prefix, const char suffix) throw() +{ + assert(_context - _contexts < ptrdiff_t(sizeof _contexts)); + + if (_context == _contexts) + *_context = suffix; + else + context(suffix); + *++_context = prefix; +} + + +void json::pop_context() throw() +{ + assert(_context > _contexts); + + if (*_context == seq) indent(-1); + else fputc(*_context, _stream); + + fputc(*--_context, _stream); + if (_context == _contexts) fputc('\n', _stream); + fflush(_stream); + + if (_flatten >= _context) _flatten = 0; + *_context = seq; +} + + +// These four functions cannot be inlined as pointers to these +// functions are needed for operator << (_context_t) to work. +void json::flat(json & j) throw() { if (!j._flatten) j._flatten = j._context; } +void json::close(json & j) throw() { j.pop_context(); } +void json::object(json & j) throw() { j.push_context('{', '}'); } +void json::array(json & j) throw() { j.push_context('[', ']'); } +void json::item(json & j) throw() +{ + while (j._context > j._contexts+1 && j._context[-1] != arr) + j.pop_context(); +} + + +json & json::operator << (json::string s) throw() +{ + const char ctxt = _context[-1] == obj ? *_context == member ? seq : member : seq; + context(ctxt); + fprintf(_stream, "\"%s\"", s); + if (ctxt == member) fputc(' ', _stream); + + return *this; +} + +json & json::operator << (json::number f) throw() { context(seq); fprintf(_stream, "%g", f); return *this; } +json & json::operator << (json::integer d) throw() { context(seq); fprintf(_stream, "%ld", d); return *this; } +json & json::operator << (long unsigned d) throw() { context(seq); fprintf(_stream, "%ld", d); return *this; } +json & json::operator << (json::boolean b) throw() { context(seq); fputs(b ? "true" : "false", _stream); return *this; } +json & json::operator << (json::_null_t) throw() { context(seq); fputs("null",_stream); return *this; } + +#endif + diff --git a/Build/source/libs/graphite2/include/graphite2/Makefile.am b/Build/source/libs/graphite2/include/graphite2/Makefile.am new file mode 100644 index 00000000000..5dccc5239e2 --- /dev/null +++ b/Build/source/libs/graphite2/include/graphite2/Makefile.am @@ -0,0 +1,18 @@ +## Proxy Makefile.am to install graphite2 headers for TeX Live. +## +## Copyright (C) 2012 Peter Breitenlohner +## +## This file is free software; the copyright holder +## gives unlimited permission to copy and/or distribute it, +## with or without modifications, as long as this notice is preserved. +## +GRAPHITE2_INC = $(top_srcdir)/$(GRAPHITE2_TREE)/include/graphite2 + +hdr_links = \ + $(GRAPHITE2_INC)/Font.h \ + $(GRAPHITE2_INC)/Log.h \ + $(GRAPHITE2_INC)/Segment.h \ + $(GRAPHITE2_INC)/Types.h + +include $(top_srcdir)/../am/hdr_links.am + diff --git a/Build/source/libs/graphite2/include/graphite2/Makefile.in b/Build/source/libs/graphite2/include/graphite2/Makefile.in new file mode 100644 index 00000000000..4c7a97385f1 --- /dev/null +++ b/Build/source/libs/graphite2/include/graphite2/Makefile.in @@ -0,0 +1,414 @@ +# Makefile.in generated by automake 1.12.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/../am/hdr_links.am +subdir = include/graphite2 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-warnings.m4 \ + $(top_srcdir)/../../m4/libtool.m4 \ + $(top_srcdir)/../../m4/ltoptions.m4 \ + $(top_srcdir)/../../m4/ltsugar.m4 \ + $(top_srcdir)/../../m4/ltversion.m4 \ + $(top_srcdir)/../../m4/lt~obsolete.m4 $(top_srcdir)/version.ac \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GRAPHITE2_TREE = @GRAPHITE2_TREE@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +WARNING_CFLAGS = @WARNING_CFLAGS@ +WARNING_CXXFLAGS = @WARNING_CXXFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +GRAPHITE2_INC = $(top_srcdir)/$(GRAPHITE2_TREE)/include/graphite2 +hdr_links = \ + $(GRAPHITE2_INC)/Font.h \ + $(GRAPHITE2_INC)/Log.h \ + $(GRAPHITE2_INC)/Segment.h \ + $(GRAPHITE2_INC)/Types.h + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/../am/hdr_links.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/graphite2/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign include/graphite2/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; +$(top_srcdir)/../am/hdr_links.am: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + +cscope cscopelist: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile all-local +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-local + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am all-local check check-am clean clean-generic \ + clean-libtool distclean distclean-generic distclean-libtool \ + distclean-local distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am + +all-local: + @for file in $(hdr_links); do \ + test -f $$file || continue; \ + inst=`echo $$file | sed -e 's/^.*\///'`; \ + test -f $$inst || { \ + rm -f $$inst; \ + echo "$(LN_S) $$file $$inst"; \ + $(LN_S) $$file $$inst; } || exit 1; \ + done + +distclean-local: + rm -f *.h + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/Build/source/libs/graphite2/version.ac b/Build/source/libs/graphite2/version.ac new file mode 100644 index 00000000000..d4a32558577 --- /dev/null +++ b/Build/source/libs/graphite2/version.ac @@ -0,0 +1,11 @@ +dnl +dnl Copyright (C) 2012 Peter Breitenlohner +dnl +dnl This file is free software; the copyright holder +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl -------------------------------------------------------- +dnl +dnl m4-include this file to define the current graphite2 version +m4_define([graphite2_version], [1.2.0]) diff --git a/Build/source/libs/harfbuzz/Makefile.am b/Build/source/libs/harfbuzz/Makefile.am index f2a6173732c..1e6bda6f792 100644 --- a/Build/source/libs/harfbuzz/Makefile.am +++ b/Build/source/libs/harfbuzz/Makefile.am @@ -104,9 +104,9 @@ libharfbuzz_dependencies += $(ICU_DEPEND) libharfbuzz_a_SOURCES += $(HARFBUZZ_SRC)/hb-icu.cc ## Graphite library -## not yet AM_CPPFLAGS += $(GRAPHITE2_INCLUDES) -## not yet libharfbuzz_dependencies += $(GRAPHITE2_DEPEND) -## not yet libharfbuzz_a_SOURCES += $(HARFBUZZ_SRC)/hb-graphite2.cc +AM_CPPFLAGS += $(GRAPHITE2_INCLUDES) +libharfbuzz_dependencies += $(GRAPHITE2_DEPEND) +libharfbuzz_a_SOURCES += $(HARFBUZZ_SRC)/hb-graphite2.cc ## FreeType 2 library AM_CPPFLAGS += $(FREETYPE2_INCLUDES) @@ -124,7 +124,7 @@ DISTCLEANFILES = config.force ## Rebuild libsicuxxx @ICU_RULE@ ## Rebuild libgraphite2 -## not yet @GRAPHITE2_RULE@ +@GRAPHITE2_RULE@ ## Rebuild libfreetype @FREETYPE2_RULE@ diff --git a/Build/source/libs/harfbuzz/Makefile.in b/Build/source/libs/harfbuzz/Makefile.in index b445c8429bf..eee42928b2f 100644 --- a/Build/source/libs/harfbuzz/Makefile.in +++ b/Build/source/libs/harfbuzz/Makefile.in @@ -67,6 +67,7 @@ DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-common.m4 \ $(top_srcdir)/../../m4/kpse-freetype2-flags.m4 \ + $(top_srcdir)/../../m4/kpse-graphite2-flags.m4 \ $(top_srcdir)/../../m4/kpse-icu-flags.m4 \ $(top_srcdir)/../../m4/kpse-lib-version.m4 \ $(top_srcdir)/../../m4/kpse-warnings.m4 \ @@ -100,7 +101,7 @@ am_libharfbuzz_a_OBJECTS = hb-blob.$(OBJEXT) hb-buffer.$(OBJEXT) \ hb-ot-shape-complex-indic.$(OBJEXT) \ hb-ot-shape-complex-thai.$(OBJEXT) \ hb-ot-shape-normalize.$(OBJEXT) hb-ot-shape-fallback.$(OBJEXT) \ - hb-icu.$(OBJEXT) hb-ft.$(OBJEXT) + hb-icu.$(OBJEXT) hb-graphite2.$(OBJEXT) hb-ft.$(OBJEXT) libharfbuzz_a_OBJECTS = $(am_libharfbuzz_a_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/../../build-aux/depcomp @@ -221,6 +222,9 @@ FREETYPE2_DEPEND = @FREETYPE2_DEPEND@ FREETYPE2_INCLUDES = @FREETYPE2_INCLUDES@ FREETYPE2_LIBS = @FREETYPE2_LIBS@ FT2_CONFIG = @FT2_CONFIG@ +GRAPHITE2_DEPEND = @GRAPHITE2_DEPEND@ +GRAPHITE2_INCLUDES = @GRAPHITE2_INCLUDES@ +GRAPHITE2_LIBS = @GRAPHITE2_LIBS@ GREP = @GREP@ HARFBUZZ_TREE = @HARFBUZZ_TREE@ HB_VERSION = @HB_VERSION@ @@ -262,6 +266,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -332,8 +337,9 @@ HARFBUZZ_SRC = $(HARFBUZZ_TREE)/src SUBDIRS = . include noinst_LIBRARIES = libharfbuzz.a AM_CPPFLAGS = -DHB_NO_MT -I$(top_srcdir)/$(HARFBUZZ_SRC) \ - $(ICU_INCLUDES) $(FREETYPE2_INCLUDES) -libharfbuzz_dependencies = $(ICU_DEPEND) $(FREETYPE2_DEPEND) + $(ICU_INCLUDES) $(GRAPHITE2_INCLUDES) $(FREETYPE2_INCLUDES) +libharfbuzz_dependencies = $(ICU_DEPEND) $(GRAPHITE2_DEPEND) \ + $(FREETYPE2_DEPEND) libharfbuzz_a_SOURCES = $(HARFBUZZ_SRC)/hb-atomic-private.hh \ $(HARFBUZZ_SRC)/hb-blob.cc \ $(HARFBUZZ_SRC)/hb-buffer-private.hh \ @@ -388,7 +394,8 @@ libharfbuzz_a_SOURCES = $(HARFBUZZ_SRC)/hb-atomic-private.hh \ $(HARFBUZZ_SRC)/hb-ot-shape-fallback-private.hh \ $(HARFBUZZ_SRC)/hb-ot-shape-fallback.cc \ $(HARFBUZZ_SRC)/hb-ot-shape-private.hh \ - $(HARFBUZZ_SRC)/hb-icu.cc $(HARFBUZZ_SRC)/hb-ft.cc + $(HARFBUZZ_SRC)/hb-icu.cc $(HARFBUZZ_SRC)/hb-graphite2.cc \ + $(HARFBUZZ_SRC)/hb-ft.cc DISTCLEANFILES = config.force LDADD = libharfbuzz.a all: config.h @@ -467,6 +474,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hb-fallback-shape.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hb-font.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hb-ft.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hb-graphite2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hb-icu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hb-ot-layout.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hb-ot-map.Po@am__quote@ @@ -829,6 +837,20 @@ hb-icu.obj: $(HARFBUZZ_SRC)/hb-icu.cc @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o hb-icu.obj `if test -f '$(HARFBUZZ_SRC)/hb-icu.cc'; then $(CYGPATH_W) '$(HARFBUZZ_SRC)/hb-icu.cc'; else $(CYGPATH_W) '$(srcdir)/$(HARFBUZZ_SRC)/hb-icu.cc'; fi` +hb-graphite2.o: $(HARFBUZZ_SRC)/hb-graphite2.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT hb-graphite2.o -MD -MP -MF $(DEPDIR)/hb-graphite2.Tpo -c -o hb-graphite2.o `test -f '$(HARFBUZZ_SRC)/hb-graphite2.cc' || echo '$(srcdir)/'`$(HARFBUZZ_SRC)/hb-graphite2.cc +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/hb-graphite2.Tpo $(DEPDIR)/hb-graphite2.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(HARFBUZZ_SRC)/hb-graphite2.cc' object='hb-graphite2.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o hb-graphite2.o `test -f '$(HARFBUZZ_SRC)/hb-graphite2.cc' || echo '$(srcdir)/'`$(HARFBUZZ_SRC)/hb-graphite2.cc + +hb-graphite2.obj: $(HARFBUZZ_SRC)/hb-graphite2.cc +@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT hb-graphite2.obj -MD -MP -MF $(DEPDIR)/hb-graphite2.Tpo -c -o hb-graphite2.obj `if test -f '$(HARFBUZZ_SRC)/hb-graphite2.cc'; then $(CYGPATH_W) '$(HARFBUZZ_SRC)/hb-graphite2.cc'; else $(CYGPATH_W) '$(srcdir)/$(HARFBUZZ_SRC)/hb-graphite2.cc'; fi` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/hb-graphite2.Tpo $(DEPDIR)/hb-graphite2.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(HARFBUZZ_SRC)/hb-graphite2.cc' object='hb-graphite2.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o hb-graphite2.obj `if test -f '$(HARFBUZZ_SRC)/hb-graphite2.cc'; then $(CYGPATH_W) '$(HARFBUZZ_SRC)/hb-graphite2.cc'; else $(CYGPATH_W) '$(srcdir)/$(HARFBUZZ_SRC)/hb-graphite2.cc'; fi` + hb-ft.o: $(HARFBUZZ_SRC)/hb-ft.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT hb-ft.o -MD -MP -MF $(DEPDIR)/hb-ft.Tpo -c -o hb-ft.o `test -f '$(HARFBUZZ_SRC)/hb-ft.cc' || echo '$(srcdir)/'`$(HARFBUZZ_SRC)/hb-ft.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/hb-ft.Tpo $(DEPDIR)/hb-ft.Po @@ -1322,6 +1344,7 @@ config.force: $(libharfbuzz_dependencies) $(SHELL) ./config.status --recheck @ICU_RULE@ +@GRAPHITE2_RULE@ @FREETYPE2_RULE@ # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/Build/source/libs/harfbuzz/ac/withenable.ac b/Build/source/libs/harfbuzz/ac/withenable.ac index 65c29274173..a1947932332 100644 --- a/Build/source/libs/harfbuzz/ac/withenable.ac +++ b/Build/source/libs/harfbuzz/ac/withenable.ac @@ -4,4 +4,4 @@ dnl Copyright (C) 2012 Peter Breitenlohner dnl You may freely use, modify and/or distribute this file. dnl ## configure options and TL libraries required for harfbuzz -KPSE_WITH_LIB([harfbuzz], [freetype2 icu]) +KPSE_WITH_LIB([harfbuzz], [freetype2 graphite2 icu]) diff --git a/Build/source/libs/harfbuzz/aclocal.m4 b/Build/source/libs/harfbuzz/aclocal.m4 index e1843aca7d7..bf019a0b867 100644 --- a/Build/source/libs/harfbuzz/aclocal.m4 +++ b/Build/source/libs/harfbuzz/aclocal.m4 @@ -982,6 +982,7 @@ AC_SUBST([am__untar]) m4_include([../../m4/kpse-common.m4]) m4_include([../../m4/kpse-freetype2-flags.m4]) +m4_include([../../m4/kpse-graphite2-flags.m4]) m4_include([../../m4/kpse-icu-flags.m4]) m4_include([../../m4/kpse-lib-version.m4]) m4_include([../../m4/kpse-warnings.m4]) diff --git a/Build/source/libs/harfbuzz/configure b/Build/source/libs/harfbuzz/configure index 121ae5dc993..ac1e1cdd096 100755 --- a/Build/source/libs/harfbuzz/configure +++ b/Build/source/libs/harfbuzz/configure @@ -639,6 +639,11 @@ LIBOBJS HARFBUZZ_TREE build_FALSE build_TRUE +GRAPHITE2_RULE +GRAPHITE2_DEPEND +GRAPHITE2_LIBS +GRAPHITE2_INCLUDES +PKG_CONFIG ICU_RULE ICU_DEPEND ICU_LIBS @@ -795,6 +800,7 @@ with_zlib_includes with_zlib_libdir with_system_freetype2 with_system_icu +with_system_graphite2 ' ac_precious_vars='build_alias host_alias @@ -1460,6 +1466,8 @@ Optional Packages: (requires freetype-config) --with-system-icu use installed ICU headers and libraries (requires icu-config, not for XeTeX) + --with-system-graphite2 use installed graphite2 headers and library + (requires pkg-config) Some influential environment variables: CC C compiler command @@ -17202,6 +17210,148 @@ ${top_builddir}/../../libs/icu/include/unicode/uversion.h: cd ${top_builddir}/../../libs/icu && $(MAKE) $(AM_MAKEFLAGS) rebuild' fi +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_prog_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$PKG_CONFIG"; then + ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test. +else +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_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config" + $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 + +fi +fi +PKG_CONFIG=$ac_cv_prog_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_prog_PKG_CONFIG"; then + ac_ct_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_prog_ac_ct_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_PKG_CONFIG"; then + ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test. +else +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_prog_ac_ct_PKG_CONFIG="pkg-config" + $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 + +fi +fi +ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG +if test -n "$ac_ct_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5 +$as_echo "$ac_ct_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_PKG_CONFIG" = x; then + PKG_CONFIG="false" + 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_ct_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_prog_PKG_CONFIG" +fi + +## _KPSE_LIB_FLAGS: Setup graphite2 (-lgraphite2) flags + +# Check whether --with-system-graphite2 was given. +if test "${with_system_graphite2+set}" = set; then : + withval=$with_system_graphite2; +fi +if test "x$with_system_graphite2" = xyes; then + if $PKG_CONFIG graphite2; then + GRAPHITE2_INCLUDES=`$PKG_CONFIG graphite2 --cflags` + GRAPHITE2_LIBS=`$PKG_CONFIG graphite2 --libs` +elif test "x$need_graphite2:$with_system_graphite2" = xyes:yes; then + as_fn_error $? "did not find graphite2" "$LINENO" 5 +fi +else + GRAPHITE2_INCLUDES="-I$kpse_BLD/libs/graphite2/include -DGRAPHITE2_STATIC" + GRAPHITE2_LIBS="$kpse_BLD/libs/graphite2/libgraphite2.a" + GRAPHITE2_DEPEND='${top_builddir}/../../libs/graphite2/libgraphite2.a' + GRAPHITE2_RULE='# Rebuild libgraphite2 +$(GRAPHITE2_DEPEND): ${top_builddir}/../../libs/graphite2/include/graphite2/Font.h + cd ${top_builddir}/../../libs/graphite2 && $(MAKE) $(AM_MAKEFLAGS) rebuild +${top_builddir}/../../libs/graphite2/include/graphite2/Font.h: + cd ${top_builddir}/../../libs/graphite2 && $(MAKE) $(AM_MAKEFLAGS) rebuild' +fi + +## _KPSE_LIB_FLAGS: Setup icu (-licuxxx) flags + +# Check whether --with-system-icu was given. +if test "${with_system_icu+set}" = set; then : + withval=$with_system_icu; +fi +if test "x$with_system_icu" = xyes; then + if $ICU_CONFIG --version >/dev/null 2>&1; then + ICU_INCLUDES=`$ICU_CONFIG --cppflags` + # Work around bug in icu-config version 4.4 + ICU_LIBS=`$ICU_CONFIG --ldflags-searchpath ` + ICU_LIBS="$ICU_LIBS `$ICU_CONFIG --ldflags-libsonly --ldflags-system`" +elif test "x$need_icu:$with_system_icu" = xyes:yes; then + as_fn_error $? "did not find icu-config required for system icu libraries" "$LINENO" 5 +fi +else + ICU_INCLUDES="-DU_STATIC_IMPLEMENTATION -I$kpse_BLD/libs/icu/include" + ICU_LIBS=" $kpse_BLD/libs/icu/icu-build/lib/libicuuc.a $kpse_BLD/libs/icu/icu-build/lib/libicudata.a" + ICU_DEPEND=' ${top_builddir}/../../libs/icu/icu-build/lib/libicuuc.a ${top_builddir}/../../libs/icu/icu-build/lib/libicudata.a' + ICU_RULE='# Rebuild libicuxxx +$(ICU_DEPEND): ${top_builddir}/../../libs/icu/include/unicode/uversion.h + cd ${top_builddir}/../../libs/icu && $(MAKE) $(AM_MAKEFLAGS) rebuild +${top_builddir}/../../libs/icu/include/unicode/uversion.h: + cd ${top_builddir}/../../libs/icu && $(MAKE) $(AM_MAKEFLAGS) rebuild' +fi + # Functions and headers for ac_func in atexit mprotect sysconf getpagesize sched_yield mmap _setmode isatty @@ -17272,6 +17422,9 @@ $as_echo "#define HAVE_OT 1" >>confdefs.h $as_echo "#define HAVE_ICU 1" >>confdefs.h +$as_echo "#define HAVE_GRAPHITE2 1" >>confdefs.h + + $as_echo "#define HAVE_FREETYPE 1" >>confdefs.h @@ -17306,9 +17459,6 @@ $as_echo "#define HAVE_CAIRO_FT 1" >>confdefs.h $as_echo "#define HAVE_ICU_LE 1" >>confdefs.h -$as_echo "#define HAVE_GRAPHITE2 1" >>confdefs.h - - $as_echo "#define HAVE_UNISCRIBE 1" >>confdefs.h diff --git a/Build/source/libs/harfbuzz/configure.ac b/Build/source/libs/harfbuzz/configure.ac index 62509da69ed..f700a67acca 100644 --- a/Build/source/libs/harfbuzz/configure.ac +++ b/Build/source/libs/harfbuzz/configure.ac @@ -32,7 +32,7 @@ KPSE_COMPILER_WARNINGS LT_INIT KPSE_FREETYPE2_FLAGS -dnl not yet KPSE_GRAPHITE2_FLAGS +KPSE_GRAPHITE2_FLAGS KPSE_ICU_FLAGS # Functions and headers @@ -55,7 +55,7 @@ fi if :; then AC_DEFINE([HAVE_OT], 1, [Use native OpenType Layout backend]) AC_DEFINE([HAVE_ICU], 1, [Use ICU library]) -dnl not yet AC_DEFINE([HAVE_GRAPHITE2], 1, [Use Graphite library]) + AC_DEFINE([HAVE_GRAPHITE2], 1, [Use Graphite library]) AC_DEFINE([HAVE_FREETYPE], 1, [Use FreeType 2 library]) AC_DEFINE([HAVE_FT_FACE_GETCHARVARIANTINDEX], 1, [Define to 1 if you have the `FT_Face_GetCharVariantIndex' function.]) @@ -70,7 +70,6 @@ dnl add all these to config.h.in but do not define them in config.h AC_DEFINE([HAVE_CAIRO], 1, [Use cairo graphics library]) AC_DEFINE([HAVE_CAIRO_FT], 1, [Use cairo-ft support in cairo graphics library]) AC_DEFINE([HAVE_ICU_LE], 1, [Use ICU Layout Engine library]) - AC_DEFINE([HAVE_GRAPHITE2], 1, [Use Graphite library]) AC_DEFINE([HAVE_UNISCRIBE], 1, [Use Uniscribe backend]) AC_DEFINE([HAVE_CORETEXT], 1, [Use Core Text backend]) AC_DEFINE([HAVE_INTEL_ATOMIC_PRIMITIVES], 1, [Use Intel __sync_* atomic primitives]) diff --git a/Build/source/libs/harfbuzz/include/Makefile.in b/Build/source/libs/harfbuzz/include/Makefile.in index 40244b2a3a7..7a79d94c8ce 100644 --- a/Build/source/libs/harfbuzz/include/Makefile.in +++ b/Build/source/libs/harfbuzz/include/Makefile.in @@ -55,6 +55,7 @@ subdir = include ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-common.m4 \ $(top_srcdir)/../../m4/kpse-freetype2-flags.m4 \ + $(top_srcdir)/../../m4/kpse-graphite2-flags.m4 \ $(top_srcdir)/../../m4/kpse-icu-flags.m4 \ $(top_srcdir)/../../m4/kpse-lib-version.m4 \ $(top_srcdir)/../../m4/kpse-warnings.m4 \ @@ -111,6 +112,9 @@ FREETYPE2_DEPEND = @FREETYPE2_DEPEND@ FREETYPE2_INCLUDES = @FREETYPE2_INCLUDES@ FREETYPE2_LIBS = @FREETYPE2_LIBS@ FT2_CONFIG = @FT2_CONFIG@ +GRAPHITE2_DEPEND = @GRAPHITE2_DEPEND@ +GRAPHITE2_INCLUDES = @GRAPHITE2_INCLUDES@ +GRAPHITE2_LIBS = @GRAPHITE2_LIBS@ GREP = @GREP@ HARFBUZZ_TREE = @HARFBUZZ_TREE@ HB_VERSION = @HB_VERSION@ @@ -152,6 +156,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ diff --git a/Build/source/m4/ChangeLog b/Build/source/m4/ChangeLog index 95b02c04a49..decbb863a13 100644 --- a/Build/source/m4/ChangeLog +++ b/Build/source/m4/ChangeLog @@ -1,3 +1,9 @@ +2012-12-04 Peter Breitenlohner + + Add libs/graphite2 for future XeTeX. + * kpse-graphite2-flags.m4: New file. + * kpse-harfbuzz-flags.m4, kpse-pkgs.m4: Add the new library. + 2012-11-30 Peter Breitenlohner Add libs/harfbuzz for future XeTeX. diff --git a/Build/source/m4/kpse-graphite2-flags.m4 b/Build/source/m4/kpse-graphite2-flags.m4 new file mode 100644 index 00000000000..d408dfd4d6c --- /dev/null +++ b/Build/source/m4/kpse-graphite2-flags.m4 @@ -0,0 +1,43 @@ +# Public macros for the TeX Live (TL) tree. +# Copyright (C) 2012 Peter Breitenlohner +# +# This file is free software; the copyright holder +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# KPSE_GRAPHITE2_FLAGS +# -------------------- +# Provide the configure options '--with-system-graphite2' (if in the TL tree). +# +# Set the make variables GRAPHITE2_INCLUDES and GRAPHITE2_LIBS to the CPPFLAGS and +# LIBS required for the `-lgraphite2' library in libs/graphite2/ of the TL tree. +AC_DEFUN([KPSE_GRAPHITE2_FLAGS], +[AC_REQUIRE([KPSE_FREETYPE2_FLAGS])[]dnl +AC_REQUIRE([KPSE_ICU_FLAGS])[]dnl +_KPSE_LIB_FLAGS([graphite2], [graphite2], [], + [-IBLD/libs/graphite2/include -DGRAPHITE2_STATIC], + [BLD/libs/graphite2/libgraphite2.a], [], + [], [${top_builddir}/../../libs/graphite2/include/graphite2/Font.h])[]dnl +]) # KPSE_GRAPHITE2_FLAGS + +# KPSE_GRAPHITE2_OPTIONS([WITH-SYSTEM]) +# ------------------------------------- +AC_DEFUN([KPSE_GRAPHITE2_OPTIONS], +[m4_ifval([$1], + [AC_ARG_WITH([system-graphite2], + AS_HELP_STRING([--with-system-graphite2], + [use installed graphite2 headers and library + (requires pkg-config)]))])[]dnl +]) # KPSE_GRAPHITE2_OPTIONS + +# KPSE_GRAPHITE2_SYSTEM_FLAGS +# --------------------------- +AC_DEFUN([KPSE_GRAPHITE2_SYSTEM_FLAGS], +[AC_REQUIRE([_KPSE_CHECK_PKG_CONFIG])[]dnl +if $PKG_CONFIG graphite2; then + GRAPHITE2_INCLUDES=`$PKG_CONFIG graphite2 --cflags` + GRAPHITE2_LIBS=`$PKG_CONFIG graphite2 --libs` +elif test "x$need_graphite2:$with_system_graphite2" = xyes:yes; then + AC_MSG_ERROR([did not find graphite2]) +fi +]) # KPSE_GRAPHITE2_SYSTEM_FLAGS diff --git a/Build/source/m4/kpse-harfbuzz-flags.m4 b/Build/source/m4/kpse-harfbuzz-flags.m4 index e8fb50d0b1e..a6026fec163 100644 --- a/Build/source/m4/kpse-harfbuzz-flags.m4 +++ b/Build/source/m4/kpse-harfbuzz-flags.m4 @@ -6,13 +6,14 @@ # with or without modifications, as long as this notice is preserved. # KPSE_HARFBUZZ_FLAGS -# ----------------- +# ------------------- # Provide the configure options '--with-system-harfbuzz' (if in the TL tree). # # Set the make variables HARFBUZZ_INCLUDES and HARFBUZZ_LIBS to the CPPFLAGS and -# LIBS required for the `-lpng' library in libs/harfbuzz/ of the TL tree. +# LIBS required for the `-lharfbuzz' library in libs/harfbuzz/ of the TL tree. AC_DEFUN([KPSE_HARFBUZZ_FLAGS], [AC_REQUIRE([KPSE_FREETYPE2_FLAGS])[]dnl +AC_REQUIRE([KPSE_GRAPHITE2_FLAGS])[]dnl AC_REQUIRE([KPSE_ICU_FLAGS])[]dnl _KPSE_LIB_FLAGS([harfbuzz], [harfbuzz], [], [-IBLD/libs/harfbuzz/include], [BLD/libs/harfbuzz/libharfbuzz.a], [], @@ -20,7 +21,7 @@ _KPSE_LIB_FLAGS([harfbuzz], [harfbuzz], [], ]) # KPSE_HARFBUZZ_FLAGS # KPSE_HARFBUZZ_OPTIONS([WITH-SYSTEM]) -# ---------------------------------- +# ------------------------------------ AC_DEFUN([KPSE_HARFBUZZ_OPTIONS], [m4_ifval([$1], [AC_ARG_WITH([system-harfbuzz], @@ -30,7 +31,7 @@ AC_DEFUN([KPSE_HARFBUZZ_OPTIONS], ]) # KPSE_HARFBUZZ_OPTIONS # KPSE_HARFBUZZ_SYSTEM_FLAGS -# ------------------------ +# -------------------------- AC_DEFUN([KPSE_HARFBUZZ_SYSTEM_FLAGS], [AC_REQUIRE([_KPSE_CHECK_PKG_CONFIG])[]dnl if $PKG_CONFIG harfbuzz; then diff --git a/Build/source/m4/kpse-pkgs.m4 b/Build/source/m4/kpse-pkgs.m4 index fb82346f5ad..bbea923cc33 100644 --- a/Build/source/m4/kpse-pkgs.m4 +++ b/Build/source/m4/kpse-pkgs.m4 @@ -27,6 +27,7 @@ m4_define([kpse_libs_pkgs], [ harfbuzz icu teckit +graphite2 graphite zziplib xpdf @@ -66,6 +67,7 @@ AC_REQUIRE([KPSE_XPDF_SYSTEM_FLAGS])[]dnl AC_REQUIRE([KPSE_POPPLER_SYSTEM_FLAGS])[]dnl AC_REQUIRE([KPSE_ZZIPLIB_SYSTEM_FLAGS])[]dnl AC_REQUIRE([KPSE_GRAPHITE_SYSTEM_FLAGS])[]dnl +AC_REQUIRE([KPSE_GRAPHITE2_SYSTEM_FLAGS])[]dnl AC_REQUIRE([KPSE_TECKIT_SYSTEM_FLAGS])[]dnl AC_REQUIRE([KPSE_ICU_SYSTEM_FLAGS])[]dnl AC_REQUIRE([KPSE_HARFBUZZ_SYSTEM_FLAGS])[]dnl diff --git a/Build/source/texk/Makefile.in b/Build/source/texk/Makefile.in index c595d1c4fb4..3a2084f8f01 100644 --- a/Build/source/texk/Makefile.in +++ b/Build/source/texk/Makefile.in @@ -67,6 +67,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../m4/kpse-cairo-flags.m4 \ $(top_srcdir)/../m4/kpse-freetype2-flags.m4 \ $(top_srcdir)/../m4/kpse-gd-flags.m4 \ $(top_srcdir)/../m4/kpse-graphite-flags.m4 \ + $(top_srcdir)/../m4/kpse-graphite2-flags.m4 \ $(top_srcdir)/../m4/kpse-harfbuzz-flags.m4 \ $(top_srcdir)/../m4/kpse-icu-flags.m4 \ $(top_srcdir)/../m4/kpse-kpathsea-flags.m4 \ @@ -141,6 +142,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../m4/kpse-cairo-flags.m4 \ $(top_srcdir)/../libs/harfbuzz/ac/withenable.ac \ $(top_srcdir)/../libs/icu/ac/withenable.ac \ $(top_srcdir)/../libs/teckit/ac/withenable.ac \ + $(top_srcdir)/../libs/graphite2/ac/withenable.ac \ $(top_srcdir)/../libs/graphite/ac/withenable.ac \ $(top_srcdir)/../libs/zziplib/ac/withenable.ac \ $(top_srcdir)/../libs/xpdf/ac/withenable.ac \ diff --git a/Build/source/texk/aclocal.m4 b/Build/source/texk/aclocal.m4 index ba6b5e7db3b..c61e839ee0a 100644 --- a/Build/source/texk/aclocal.m4 +++ b/Build/source/texk/aclocal.m4 @@ -987,6 +987,7 @@ m4_include([../m4/kpse-freetype-flags.m4]) m4_include([../m4/kpse-freetype2-flags.m4]) m4_include([../m4/kpse-gd-flags.m4]) m4_include([../m4/kpse-graphite-flags.m4]) +m4_include([../m4/kpse-graphite2-flags.m4]) m4_include([../m4/kpse-harfbuzz-flags.m4]) m4_include([../m4/kpse-icu-flags.m4]) m4_include([../m4/kpse-kpathsea-flags.m4]) diff --git a/Build/source/texk/configure b/Build/source/texk/configure index 03f65f9fad2..9739282d1a3 100755 --- a/Build/source/texk/configure +++ b/Build/source/texk/configure @@ -800,6 +800,7 @@ with_system_icu with_system_teckit with_teckit_includes with_teckit_libdir +with_system_graphite2 with_graphite with_system_graphite with_system_zziplib @@ -1654,6 +1655,8 @@ Optional Packages: teckit headers installed in DIR --with-teckit-libdir=DIR teckit library installed in DIR + --with-system-graphite2 use installed graphite2 headers and library + (requires pkg-config) --without-graphite build XeTeX without graphite support --with-system-graphite use installed silgraphite headers and library (requires pkg-config) @@ -4702,6 +4705,14 @@ $as_echo "$as_me: -> installed \`freetype2' headers and library" >&6;} elif test "x$with_system_freetype2" != xyes; then as_fn_error $? "Sorry, \`--with-system-harfbuzz' requires \`--with-system-freetype2'" "$LINENO" 5 fi + if test "x$with_system_graphite2" = x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: -> installed \`graphite2' headers and library" >&5 +$as_echo "$as_me: -> installed \`graphite2' headers and library" >&6;} + with_system_graphite2=yes + ac_configure_args="$ac_configure_args '--with-system-graphite2'" + elif test "x$with_system_graphite2" != xyes; then + as_fn_error $? "Sorry, \`--with-system-harfbuzz' requires \`--with-system-graphite2'" "$LINENO" 5 + fi if test "x$with_system_icu" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: -> installed \`icu' headers and library" >&5 $as_echo "$as_me: -> installed \`icu' headers and library" >&6;} @@ -4714,6 +4725,7 @@ fi test "x$need_harfbuzz" = xyes && { need_freetype2=yes + need_graphite2=yes need_icu=yes } @@ -4784,6 +4796,27 @@ test "x$need_teckit" = xyes && { } +## libs/graphite2/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/graphite2/ +## configure options and TL libraries required for graphite2 + +# Check whether --with-system-graphite2 was given. +if test "${with_system_graphite2+set}" = set; then : + withval=$with_system_graphite2; +fi +if test "x$with_system_graphite2" = x; then + if test -f $srcdir/../libs/graphite2/configure; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`graphite2' headers and library from TL tree" >&5 +$as_echo "$as_me: Assuming \`graphite2' headers and library from TL tree" >&6;} + with_system_graphite2=no + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming installed \`graphite2' headers and library" >&5 +$as_echo "$as_me: Assuming installed \`graphite2' headers and library" >&6;} + with_system_graphite2=yes + fi + ac_configure_args="$ac_configure_args '--with-system-graphite2=$with_system_graphite2'" +fi + + ## libs/graphite/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/graphite/ ## XeTeX can be built without graphite support diff --git a/Build/source/texk/web2c/Makefile.in b/Build/source/texk/web2c/Makefile.in index d8f0cfb5d22..0a4e6da8327 100644 --- a/Build/source/texk/web2c/Makefile.in +++ b/Build/source/texk/web2c/Makefile.in @@ -324,6 +324,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \ $(top_srcdir)/../../m4/kpse-fontconfig-flags.m4 \ $(top_srcdir)/../../m4/kpse-freetype2-flags.m4 \ $(top_srcdir)/../../m4/kpse-graphite-flags.m4 \ + $(top_srcdir)/../../m4/kpse-graphite2-flags.m4 \ $(top_srcdir)/../../m4/kpse-harfbuzz-flags.m4 \ $(top_srcdir)/../../m4/kpse-icu-flags.m4 \ $(top_srcdir)/../../m4/kpse-kpathsea-flags.m4 \ @@ -1232,6 +1233,9 @@ FREETYPE2_DEPEND = @FREETYPE2_DEPEND@ FREETYPE2_INCLUDES = @FREETYPE2_INCLUDES@ FREETYPE2_LIBS = @FREETYPE2_LIBS@ FT2_CONFIG = @FT2_CONFIG@ +GRAPHITE2_DEPEND = @GRAPHITE2_DEPEND@ +GRAPHITE2_INCLUDES = @GRAPHITE2_INCLUDES@ +GRAPHITE2_LIBS = @GRAPHITE2_LIBS@ GRAPHITE_DEPEND = @GRAPHITE_DEPEND@ GRAPHITE_INCLUDES = @GRAPHITE_INCLUDES@ GRAPHITE_LIBS = @GRAPHITE_LIBS@ diff --git a/Build/source/texk/web2c/aclocal.m4 b/Build/source/texk/web2c/aclocal.m4 index 0c6042bd976..3f9bb7caf94 100644 --- a/Build/source/texk/web2c/aclocal.m4 +++ b/Build/source/texk/web2c/aclocal.m4 @@ -1096,6 +1096,7 @@ m4_include([../../m4/kpse-cxx-hack.m4]) m4_include([../../m4/kpse-fontconfig-flags.m4]) m4_include([../../m4/kpse-freetype2-flags.m4]) m4_include([../../m4/kpse-graphite-flags.m4]) +m4_include([../../m4/kpse-graphite2-flags.m4]) m4_include([../../m4/kpse-harfbuzz-flags.m4]) m4_include([../../m4/kpse-icu-flags.m4]) m4_include([../../m4/kpse-kpathsea-flags.m4]) diff --git a/Build/source/texk/web2c/configure b/Build/source/texk/web2c/configure index e8939cc912c..79e6373e7e4 100755 --- a/Build/source/texk/web2c/configure +++ b/Build/source/texk/web2c/configure @@ -648,6 +648,10 @@ HARFBUZZ_RULE HARFBUZZ_DEPEND HARFBUZZ_LIBS HARFBUZZ_INCLUDES +GRAPHITE2_RULE +GRAPHITE2_DEPEND +GRAPHITE2_LIBS +GRAPHITE2_INCLUDES ICU_RULE ICU_DEPEND ICU_LIBS @@ -994,6 +998,7 @@ with_system_teckit with_teckit_includes with_teckit_libdir with_system_icu +with_system_graphite2 with_system_harfbuzz ' ac_precious_vars='build_alias @@ -1747,6 +1752,8 @@ Optional Packages: teckit library installed in DIR --with-system-icu use installed ICU headers and libraries (requires icu-config, not for XeTeX) + --with-system-graphite2 use installed graphite2 headers and library + (requires pkg-config) --with-system-harfbuzz use installed harfbuzz headers and library (requires pkg-config) @@ -23132,6 +23139,30 @@ $(ICU_DEPEND): ${top_builddir}/../../libs/icu/include/unicode/uversion.h ${top_builddir}/../../libs/icu/include/unicode/uversion.h: cd ${top_builddir}/../../libs/icu && $(MAKE) $(AM_MAKEFLAGS) rebuild' +## _KPSE_LIB_FLAGS: Setup graphite2 (-lgraphite2) flags + +# Check whether --with-system-graphite2 was given. +if test "${with_system_graphite2+set}" = set; then : + withval=$with_system_graphite2; +fi +if test "x$with_system_graphite2" = xyes; then + if $PKG_CONFIG graphite2; then + GRAPHITE2_INCLUDES=`$PKG_CONFIG graphite2 --cflags` + GRAPHITE2_LIBS=`$PKG_CONFIG graphite2 --libs` +elif test "x$need_graphite2:$with_system_graphite2" = xyes:yes; then + as_fn_error $? "did not find graphite2" "$LINENO" 5 +fi +else + GRAPHITE2_INCLUDES="-I$kpse_BLD/libs/graphite2/include -DGRAPHITE2_STATIC" + GRAPHITE2_LIBS="$kpse_BLD/libs/graphite2/libgraphite2.a" + GRAPHITE2_DEPEND='${top_builddir}/../../libs/graphite2/libgraphite2.a' + GRAPHITE2_RULE='# Rebuild libgraphite2 +$(GRAPHITE2_DEPEND): ${top_builddir}/../../libs/graphite2/include/graphite2/Font.h + cd ${top_builddir}/../../libs/graphite2 && $(MAKE) $(AM_MAKEFLAGS) rebuild +${top_builddir}/../../libs/graphite2/include/graphite2/Font.h: + cd ${top_builddir}/../../libs/graphite2 && $(MAKE) $(AM_MAKEFLAGS) rebuild' +fi + ## _KPSE_LIB_FLAGS: Setup harfbuzz (-lharfbuzz) flags # Check whether --with-system-harfbuzz was given. diff --git a/Build/source/texk/web2c/doc/Makefile.in b/Build/source/texk/web2c/doc/Makefile.in index e209f7e0b08..82aff792cfe 100644 --- a/Build/source/texk/web2c/doc/Makefile.in +++ b/Build/source/texk/web2c/doc/Makefile.in @@ -62,6 +62,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \ $(top_srcdir)/../../m4/kpse-fontconfig-flags.m4 \ $(top_srcdir)/../../m4/kpse-freetype2-flags.m4 \ $(top_srcdir)/../../m4/kpse-graphite-flags.m4 \ + $(top_srcdir)/../../m4/kpse-graphite2-flags.m4 \ $(top_srcdir)/../../m4/kpse-harfbuzz-flags.m4 \ $(top_srcdir)/../../m4/kpse-icu-flags.m4 \ $(top_srcdir)/../../m4/kpse-kpathsea-flags.m4 \ @@ -184,6 +185,9 @@ FREETYPE2_DEPEND = @FREETYPE2_DEPEND@ FREETYPE2_INCLUDES = @FREETYPE2_INCLUDES@ FREETYPE2_LIBS = @FREETYPE2_LIBS@ FT2_CONFIG = @FT2_CONFIG@ +GRAPHITE2_DEPEND = @GRAPHITE2_DEPEND@ +GRAPHITE2_INCLUDES = @GRAPHITE2_INCLUDES@ +GRAPHITE2_LIBS = @GRAPHITE2_LIBS@ GRAPHITE_DEPEND = @GRAPHITE_DEPEND@ GRAPHITE_INCLUDES = @GRAPHITE_INCLUDES@ GRAPHITE_LIBS = @GRAPHITE_LIBS@ diff --git a/Build/source/texk/web2c/lib/Makefile.in b/Build/source/texk/web2c/lib/Makefile.in index 3fe857499a5..ccbc79ab71a 100644 --- a/Build/source/texk/web2c/lib/Makefile.in +++ b/Build/source/texk/web2c/lib/Makefile.in @@ -64,6 +64,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \ $(top_srcdir)/../../m4/kpse-fontconfig-flags.m4 \ $(top_srcdir)/../../m4/kpse-freetype2-flags.m4 \ $(top_srcdir)/../../m4/kpse-graphite-flags.m4 \ + $(top_srcdir)/../../m4/kpse-graphite2-flags.m4 \ $(top_srcdir)/../../m4/kpse-harfbuzz-flags.m4 \ $(top_srcdir)/../../m4/kpse-icu-flags.m4 \ $(top_srcdir)/../../m4/kpse-kpathsea-flags.m4 \ @@ -176,6 +177,9 @@ FREETYPE2_DEPEND = @FREETYPE2_DEPEND@ FREETYPE2_INCLUDES = @FREETYPE2_INCLUDES@ FREETYPE2_LIBS = @FREETYPE2_LIBS@ FT2_CONFIG = @FT2_CONFIG@ +GRAPHITE2_DEPEND = @GRAPHITE2_DEPEND@ +GRAPHITE2_INCLUDES = @GRAPHITE2_INCLUDES@ +GRAPHITE2_LIBS = @GRAPHITE2_LIBS@ GRAPHITE_DEPEND = @GRAPHITE_DEPEND@ GRAPHITE_INCLUDES = @GRAPHITE_INCLUDES@ GRAPHITE_LIBS = @GRAPHITE_LIBS@ diff --git a/Build/source/texk/web2c/man/Makefile.in b/Build/source/texk/web2c/man/Makefile.in index a68954b7b08..36b598c430d 100644 --- a/Build/source/texk/web2c/man/Makefile.in +++ b/Build/source/texk/web2c/man/Makefile.in @@ -78,6 +78,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \ $(top_srcdir)/../../m4/kpse-fontconfig-flags.m4 \ $(top_srcdir)/../../m4/kpse-freetype2-flags.m4 \ $(top_srcdir)/../../m4/kpse-graphite-flags.m4 \ + $(top_srcdir)/../../m4/kpse-graphite2-flags.m4 \ $(top_srcdir)/../../m4/kpse-harfbuzz-flags.m4 \ $(top_srcdir)/../../m4/kpse-icu-flags.m4 \ $(top_srcdir)/../../m4/kpse-kpathsea-flags.m4 \ @@ -190,6 +191,9 @@ FREETYPE2_DEPEND = @FREETYPE2_DEPEND@ FREETYPE2_INCLUDES = @FREETYPE2_INCLUDES@ FREETYPE2_LIBS = @FREETYPE2_LIBS@ FT2_CONFIG = @FT2_CONFIG@ +GRAPHITE2_DEPEND = @GRAPHITE2_DEPEND@ +GRAPHITE2_INCLUDES = @GRAPHITE2_INCLUDES@ +GRAPHITE2_LIBS = @GRAPHITE2_LIBS@ GRAPHITE_DEPEND = @GRAPHITE_DEPEND@ GRAPHITE_INCLUDES = @GRAPHITE_INCLUDES@ GRAPHITE_LIBS = @GRAPHITE_LIBS@ diff --git a/Build/source/texk/web2c/omegafonts/Makefile.in b/Build/source/texk/web2c/omegafonts/Makefile.in index b940e055655..9b86b0ab52f 100644 --- a/Build/source/texk/web2c/omegafonts/Makefile.in +++ b/Build/source/texk/web2c/omegafonts/Makefile.in @@ -71,6 +71,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \ $(top_srcdir)/../../m4/kpse-fontconfig-flags.m4 \ $(top_srcdir)/../../m4/kpse-freetype2-flags.m4 \ $(top_srcdir)/../../m4/kpse-graphite-flags.m4 \ + $(top_srcdir)/../../m4/kpse-graphite2-flags.m4 \ $(top_srcdir)/../../m4/kpse-harfbuzz-flags.m4 \ $(top_srcdir)/../../m4/kpse-icu-flags.m4 \ $(top_srcdir)/../../m4/kpse-kpathsea-flags.m4 \ @@ -199,6 +200,9 @@ FREETYPE2_DEPEND = @FREETYPE2_DEPEND@ FREETYPE2_INCLUDES = @FREETYPE2_INCLUDES@ FREETYPE2_LIBS = @FREETYPE2_LIBS@ FT2_CONFIG = @FT2_CONFIG@ +GRAPHITE2_DEPEND = @GRAPHITE2_DEPEND@ +GRAPHITE2_INCLUDES = @GRAPHITE2_INCLUDES@ +GRAPHITE2_LIBS = @GRAPHITE2_LIBS@ GRAPHITE_DEPEND = @GRAPHITE_DEPEND@ GRAPHITE_INCLUDES = @GRAPHITE_INCLUDES@ GRAPHITE_LIBS = @GRAPHITE_LIBS@ diff --git a/Build/source/texk/web2c/otps/Makefile.in b/Build/source/texk/web2c/otps/Makefile.in index 5f1a54fbb1e..04f12bfd9ce 100644 --- a/Build/source/texk/web2c/otps/Makefile.in +++ b/Build/source/texk/web2c/otps/Makefile.in @@ -70,6 +70,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \ $(top_srcdir)/../../m4/kpse-fontconfig-flags.m4 \ $(top_srcdir)/../../m4/kpse-freetype2-flags.m4 \ $(top_srcdir)/../../m4/kpse-graphite-flags.m4 \ + $(top_srcdir)/../../m4/kpse-graphite2-flags.m4 \ $(top_srcdir)/../../m4/kpse-harfbuzz-flags.m4 \ $(top_srcdir)/../../m4/kpse-icu-flags.m4 \ $(top_srcdir)/../../m4/kpse-kpathsea-flags.m4 \ @@ -263,6 +264,9 @@ FREETYPE2_DEPEND = @FREETYPE2_DEPEND@ FREETYPE2_INCLUDES = @FREETYPE2_INCLUDES@ FREETYPE2_LIBS = @FREETYPE2_LIBS@ FT2_CONFIG = @FT2_CONFIG@ +GRAPHITE2_DEPEND = @GRAPHITE2_DEPEND@ +GRAPHITE2_INCLUDES = @GRAPHITE2_INCLUDES@ +GRAPHITE2_LIBS = @GRAPHITE2_LIBS@ GRAPHITE_DEPEND = @GRAPHITE_DEPEND@ GRAPHITE_INCLUDES = @GRAPHITE_INCLUDES@ GRAPHITE_LIBS = @GRAPHITE_LIBS@ diff --git a/Build/source/texk/web2c/otps/win32/Makefile.in b/Build/source/texk/web2c/otps/win32/Makefile.in index fc799955936..3dfde7de0c5 100644 --- a/Build/source/texk/web2c/otps/win32/Makefile.in +++ b/Build/source/texk/web2c/otps/win32/Makefile.in @@ -64,6 +64,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \ $(top_srcdir)/../../m4/kpse-fontconfig-flags.m4 \ $(top_srcdir)/../../m4/kpse-freetype2-flags.m4 \ $(top_srcdir)/../../m4/kpse-graphite-flags.m4 \ + $(top_srcdir)/../../m4/kpse-graphite2-flags.m4 \ $(top_srcdir)/../../m4/kpse-harfbuzz-flags.m4 \ $(top_srcdir)/../../m4/kpse-icu-flags.m4 \ $(top_srcdir)/../../m4/kpse-kpathsea-flags.m4 \ @@ -168,6 +169,9 @@ FREETYPE2_DEPEND = @FREETYPE2_DEPEND@ FREETYPE2_INCLUDES = @FREETYPE2_INCLUDES@ FREETYPE2_LIBS = @FREETYPE2_LIBS@ FT2_CONFIG = @FT2_CONFIG@ +GRAPHITE2_DEPEND = @GRAPHITE2_DEPEND@ +GRAPHITE2_INCLUDES = @GRAPHITE2_INCLUDES@ +GRAPHITE2_LIBS = @GRAPHITE2_LIBS@ GRAPHITE_DEPEND = @GRAPHITE_DEPEND@ GRAPHITE_INCLUDES = @GRAPHITE_INCLUDES@ GRAPHITE_LIBS = @GRAPHITE_LIBS@ diff --git a/Build/source/texk/web2c/window/Makefile.in b/Build/source/texk/web2c/window/Makefile.in index 172b3a22414..693c9dbdbe2 100644 --- a/Build/source/texk/web2c/window/Makefile.in +++ b/Build/source/texk/web2c/window/Makefile.in @@ -64,6 +64,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \ $(top_srcdir)/../../m4/kpse-fontconfig-flags.m4 \ $(top_srcdir)/../../m4/kpse-freetype2-flags.m4 \ $(top_srcdir)/../../m4/kpse-graphite-flags.m4 \ + $(top_srcdir)/../../m4/kpse-graphite2-flags.m4 \ $(top_srcdir)/../../m4/kpse-harfbuzz-flags.m4 \ $(top_srcdir)/../../m4/kpse-icu-flags.m4 \ $(top_srcdir)/../../m4/kpse-kpathsea-flags.m4 \ @@ -174,6 +175,9 @@ FREETYPE2_DEPEND = @FREETYPE2_DEPEND@ FREETYPE2_INCLUDES = @FREETYPE2_INCLUDES@ FREETYPE2_LIBS = @FREETYPE2_LIBS@ FT2_CONFIG = @FT2_CONFIG@ +GRAPHITE2_DEPEND = @GRAPHITE2_DEPEND@ +GRAPHITE2_INCLUDES = @GRAPHITE2_INCLUDES@ +GRAPHITE2_LIBS = @GRAPHITE2_LIBS@ GRAPHITE_DEPEND = @GRAPHITE_DEPEND@ GRAPHITE_INCLUDES = @GRAPHITE_INCLUDES@ GRAPHITE_LIBS = @GRAPHITE_LIBS@ diff --git a/Build/source/utils/Makefile.in b/Build/source/utils/Makefile.in index b84343c5c6f..963d63b0d10 100644 --- a/Build/source/utils/Makefile.in +++ b/Build/source/utils/Makefile.in @@ -67,6 +67,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../m4/kpse-cairo-flags.m4 \ $(top_srcdir)/../m4/kpse-freetype2-flags.m4 \ $(top_srcdir)/../m4/kpse-gd-flags.m4 \ $(top_srcdir)/../m4/kpse-graphite-flags.m4 \ + $(top_srcdir)/../m4/kpse-graphite2-flags.m4 \ $(top_srcdir)/../m4/kpse-harfbuzz-flags.m4 \ $(top_srcdir)/../m4/kpse-icu-flags.m4 \ $(top_srcdir)/../m4/kpse-kpathsea-flags.m4 \ @@ -141,6 +142,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../m4/kpse-cairo-flags.m4 \ $(top_srcdir)/../libs/harfbuzz/ac/withenable.ac \ $(top_srcdir)/../libs/icu/ac/withenable.ac \ $(top_srcdir)/../libs/teckit/ac/withenable.ac \ + $(top_srcdir)/../libs/graphite2/ac/withenable.ac \ $(top_srcdir)/../libs/graphite/ac/withenable.ac \ $(top_srcdir)/../libs/zziplib/ac/withenable.ac \ $(top_srcdir)/../libs/xpdf/ac/withenable.ac \ diff --git a/Build/source/utils/aclocal.m4 b/Build/source/utils/aclocal.m4 index ba6b5e7db3b..c61e839ee0a 100644 --- a/Build/source/utils/aclocal.m4 +++ b/Build/source/utils/aclocal.m4 @@ -987,6 +987,7 @@ m4_include([../m4/kpse-freetype-flags.m4]) m4_include([../m4/kpse-freetype2-flags.m4]) m4_include([../m4/kpse-gd-flags.m4]) m4_include([../m4/kpse-graphite-flags.m4]) +m4_include([../m4/kpse-graphite2-flags.m4]) m4_include([../m4/kpse-harfbuzz-flags.m4]) m4_include([../m4/kpse-icu-flags.m4]) m4_include([../m4/kpse-kpathsea-flags.m4]) diff --git a/Build/source/utils/configure b/Build/source/utils/configure index 191c990c78f..91a47265f65 100755 --- a/Build/source/utils/configure +++ b/Build/source/utils/configure @@ -800,6 +800,7 @@ with_system_icu with_system_teckit with_teckit_includes with_teckit_libdir +with_system_graphite2 with_graphite with_system_graphite with_system_zziplib @@ -1630,6 +1631,8 @@ Optional Packages: teckit headers installed in DIR --with-teckit-libdir=DIR teckit library installed in DIR + --with-system-graphite2 use installed graphite2 headers and library + (requires pkg-config) --without-graphite build XeTeX without graphite support --with-system-graphite use installed silgraphite headers and library (requires pkg-config) @@ -4678,6 +4681,14 @@ $as_echo "$as_me: -> installed \`freetype2' headers and library" >&6;} elif test "x$with_system_freetype2" != xyes; then as_fn_error $? "Sorry, \`--with-system-harfbuzz' requires \`--with-system-freetype2'" "$LINENO" 5 fi + if test "x$with_system_graphite2" = x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: -> installed \`graphite2' headers and library" >&5 +$as_echo "$as_me: -> installed \`graphite2' headers and library" >&6;} + with_system_graphite2=yes + ac_configure_args="$ac_configure_args '--with-system-graphite2'" + elif test "x$with_system_graphite2" != xyes; then + as_fn_error $? "Sorry, \`--with-system-harfbuzz' requires \`--with-system-graphite2'" "$LINENO" 5 + fi if test "x$with_system_icu" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: -> installed \`icu' headers and library" >&5 $as_echo "$as_me: -> installed \`icu' headers and library" >&6;} @@ -4690,6 +4701,7 @@ fi test "x$need_harfbuzz" = xyes && { need_freetype2=yes + need_graphite2=yes need_icu=yes } @@ -4760,6 +4772,27 @@ test "x$need_teckit" = xyes && { } +## libs/graphite2/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/graphite2/ +## configure options and TL libraries required for graphite2 + +# Check whether --with-system-graphite2 was given. +if test "${with_system_graphite2+set}" = set; then : + withval=$with_system_graphite2; +fi +if test "x$with_system_graphite2" = x; then + if test -f $srcdir/../libs/graphite2/configure; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`graphite2' headers and library from TL tree" >&5 +$as_echo "$as_me: Assuming \`graphite2' headers and library from TL tree" >&6;} + with_system_graphite2=no + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming installed \`graphite2' headers and library" >&5 +$as_echo "$as_me: Assuming installed \`graphite2' headers and library" >&6;} + with_system_graphite2=yes + fi + ac_configure_args="$ac_configure_args '--with-system-graphite2=$with_system_graphite2'" +fi + + ## libs/graphite/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/graphite/ ## XeTeX can be built without graphite support -- cgit v1.2.3